code generation.
git-svn-id: http://svn.complang.org/ragel/trunk@204
052ea7fc-9027-0410-9066-
f65837a77df0
" _mid = _lower + (((_upper-_lower) >> 1) & ~1);\n"
" if ( " << GET_WIDE_KEY() << " < " << CK() << "[_mid] )\n"
" _upper = _mid - 2;\n"
- " else if ( " << GET_WIDE_KEY() << " > " << CK() << "[_mid] )\n"
+ " else if ( " << GET_WIDE_KEY() << " > " << CK() << "[_mid+1] )\n"
" _lower = _mid + 2;\n"
" else {\n"
" switch ( " << C() << "[" << CO() << "[" << CS() << "]"
<< INDENT_S() << "_mid = _lower + (((_upper-_lower) >> 1) & ~1)"
<< INDENT_U() << "if " << GET_WIDE_KEY() << " < " << CK() << "[_mid]"
<< INDENT_O() << "_upper = _mid - 2"
- << INDENT_U() << "elsif " << GET_WIDE_KEY() << " > " << CK() << "[_mid]"
+ << INDENT_U() << "elsif " << GET_WIDE_KEY() << " > " << CK() << "[_mid+1]"
<< INDENT_O() << "_lower = _mid + 2"
<< INDENT_U() << "else"
<< INDENT_U() << "case " << C() << "[" << CO() << "[" << CS() << "]"