- Changed QueryParser.jj to allow '-' and '+' characters in search terms.

Morus Walter's patch: http://issues.apache.org/bugzilla/show_bug.cgi?id=27491


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150242 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Otis Gospodnetic 2004-03-24 10:12:27 +00:00
parent 88165f0252
commit 1ebfc379fd
3 changed files with 8 additions and 4 deletions

View File

@ -71,6 +71,10 @@ $Id$
- default write lock timeout
(Otis)
13. Changed QueryParser.jj to allow '-' and '+' within tokens:
http://issues.apache.org/bugzilla/show_bug.cgi?id=27491
(Morus Walter via Otis)
1.3 final

View File

@ -446,7 +446,7 @@ PARSER_END(QueryParser)
| <#_TERM_START_CHAR: ( ~[ " ", "\t", "\n", "\r", "+", "-", "!", "(", ")", ":", "^",
"[", "]", "\"", "{", "}", "~", "*", "?" ]
| <_ESCAPED_CHAR> ) >
| <#_TERM_CHAR: ( <_TERM_START_CHAR> | <_ESCAPED_CHAR> ) >
| <#_TERM_CHAR: ( <_TERM_START_CHAR> | <_ESCAPED_CHAR> | "-" | "+" ) >
| <#_WHITESPACE: ( " " | "\t" | "\n" | "\r") >
}

View File

@ -181,7 +181,7 @@ private final int jjMoveNfa_3(int startState, int curPos)
jjCheckNAddStates(0, 6);
break;
case 20:
if ((0x7bffd0f8ffffd9ffL & l) == 0L)
if ((0x7bfff8f8ffffd9ffL & l) == 0L)
break;
if (kind > 17)
kind = 17;
@ -195,7 +195,7 @@ private final int jjMoveNfa_3(int startState, int curPos)
jjCheckNAddTwoStates(20, 21);
break;
case 23:
if ((0x7bffd0f8ffffd9ffL & l) != 0L)
if ((0x7bfff8f8ffffd9ffL & l) != 0L)
jjCheckNAddStates(7, 9);
break;
case 24:
@ -207,7 +207,7 @@ private final int jjMoveNfa_3(int startState, int curPos)
jjCheckNAddStates(7, 9);
break;
case 27:
if ((0xfbffd4f8ffffd9ffL & l) == 0L)
if ((0xfbfffcf8ffffd9ffL & l) == 0L)
break;
if (kind > 21)
kind = 21;