<!DOCTYPE html>
<html>
<head>
</head>
<body>
<dl style="line-height: 1.5; margin-left: 2em">
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Author</dt>
<dd style="margin-left: 8.5em">Kouhei Sutou <kou****@clear*****></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
<dd style="margin-left: 8.5em">2012-08-06 14:53:05 +0900 (Mon, 06 Aug 2012)</dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">New Revision</dt>
<dd style="margin-left: 8.5em"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f">f0248478311847a2f3826bdc2b12d4c7f810a02f</a></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Log</dt>
<dd style="margin-left: 8.5em"><pre style="border: 1px solid #aaa; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; padding: 0.5em">bq: throw exception for no escaped value</pre></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Modified files</dt>
<dd style="margin-left: 8.5em">
<ul>
<li><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#diff-0">lib/bq-translator.js</a></li>
<li><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#diff-1">test/bq-translator.test.js</a></li>
</ul>
</dd>
</dl>
<div class="diff-section" style="clear: both">
<table style="border-collapse: collapse; border: 1px solid #aaa">
<thead>
<tr class="diff-header" style="border: 1px solid #aaa">
<td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: lib/bq-translator.js (+7 -2)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
</td>
</tr>
</thead>
<tbody>
<tr>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0L252">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0L253">253</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0L254">254</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0L255">255</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0L256">256</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0L257">257</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0L258">258</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0L259">259</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0L288">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0L289">289</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0L290">290</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0L291">291</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0L292">292</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0L293">293</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0L294">294</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0L295">295</a></span>
</pre>
</th>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0R252">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0R253">253</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0R254">254</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0R255">255</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0R256">256</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0R257">257</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0R258">258</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0R259">259</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0R260">260</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0R261">261</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0R262">262</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0R291">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0R292">292</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0R293">293</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0R294">294</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0R295">295</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0R296">296</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0R297">297</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0R298">298</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0R299">299</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L0R300">300</a></span>
</pre>
</th>
<td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -253,7 +253,10 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">BooleanQueryTranslator.prototype = {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> tokens.push("||");</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> } else if (character == "\\") {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> this.offset++;</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- // TODO: check length</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ if (this.offset == this.query.length) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ this.throwTranslateError("escaped character is missing " +</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "in string value");</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> character = this.query[this.offset];</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> value += character;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> } else if (character == "\"") {</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -289,7 +292,9 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">BooleanQueryTranslator.prototype = {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> var character = this.query[this.offset];</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> if (character == "\\") {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> this.offset++;</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- // TODO: check length</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ if (this.offset == this.query.length) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ this.throwTranslateError("escaped character is missing in phrase");</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> character = this.query[this.offset];</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> value += character;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> } else if (character == "\"") {</span>
</pre>
</td>
</tr>
</tbody>
</table>
<table style="border-collapse: collapse; border: 1px solid #aaa">
<thead>
<tr class="diff-header" style="border: 1px solid #aaa">
<td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: test/bq-translator.test.js (+8 -0)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
</td>
</tr>
</thead>
<tbody>
<tr>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L1L279">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L1L280">280</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L1L281">281</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L1L282">282</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L1L283">283</a></span>
</pre>
</th>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L1R279">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L1R280">280</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L1R281">281</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L1R282">282</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L1R283">283</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L1R284">284</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L1R285">285</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L1R286">286</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L1R287">287</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L1R288">288</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L1R289">289</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L1R290">290</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/f0248478311847a2f3826bdc2b12d4c7f810a02f#L1R291">291</a></span>
</pre>
</th>
<td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -280,4 +280,12 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">suite('BoolanQueryTranslator', function() {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> "'keyword1\"keyword2\"' 'other keyword'",</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> "'keyword1|\"|keyword2\"' 'other keyword'",</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> "operator is missing: keyword:<keyword1>");</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ testExpressionError("value only: stirng: missing escaped value",</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "'keyword1\\",</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "'keyword1\\||",</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "escaped character is missing in string value");</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ testExpressionError("value only: phrase: missing escaped value",</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "'\"keyword1\\",</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "'\"keyword1\\||",</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "escaped character is missing in phrase");</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> });</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>