lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From busc...@apache.org
Subject svn commit: r805633 [1/2] - in /lucene/java/trunk/contrib: ./ queryparser/src/java/org/apache/lucene/queryParser/core/ queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ queryparser/src/java/org/apache/lucene/queryParser/core/util/ querypar...
Date Wed, 19 Aug 2009 00:09:42 GMT
Author: buschmi
Date: Wed Aug 19 00:09:41 2009
New Revision: 805633

URL: http://svn.apache.org/viewvc?rev=805633&view=rev
Log:
LUCENE-1792: Fix new query parser to set rewrite method for multi-term queries.

Added:
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/PrefixWildcardQueryNode.java   (with props)
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/WildcardQueryNode.java   (with props)
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/MultiTermRewriteMethodProcessor.java   (with props)
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/WildcardQueryNodeProcessor.java   (with props)
Modified:
    lucene/java/trunk/contrib/CHANGES.txt
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryParserHelper.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/FieldQueryNode.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/PrefixWildcardQueryNode.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/WildcardQueryNode.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/util/UnescapedCharSequence.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/QueryParserWrapper.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/StandardQueryParser.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/PrefixWildcardQueryNodeBuilder.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/RangeQueryNodeBuilder.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/StandardQueryTreeBuilder.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/WildcardQueryNodeBuilder.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiTermRewriteMethodAttribute.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiTermRewriteMethodAttributeImpl.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/StandardQueryConfigHandler.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/RangeQueryNode.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/JavaCharStream.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/StandardSyntaxParser.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/StandardSyntaxParser.jj
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/StandardSyntaxParserConstants.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/StandardSyntaxParserTokenManager.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/Token.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/TokenMgrError.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/AllowLeadingWildcardProcessor.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/AnalyzerQueryNodeProcessor.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/LowercaseExpandedTermsQueryNodeProcessor.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/MatchAllDocsQueryNodeProcessor.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/MultiTermRewriteDefaultProcessor.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/ParametricRangeQueryNodeProcessor.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/PrefixWildcardQueryNodeProcessor.java
    lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/StandardQueryNodeProcessorPipeline.java
    lucene/java/trunk/contrib/queryparser/src/test/org/apache/lucene/queryParser/spans/TestSpanQueryParser.java
    lucene/java/trunk/contrib/queryparser/src/test/org/apache/lucene/queryParser/standard/TestQPHelper.java
    lucene/java/trunk/contrib/queryparser/src/test/org/apache/lucene/queryParser/standard/TestQueryParserWrapper.java

Modified: lucene/java/trunk/contrib/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/CHANGES.txt?rev=805633&r1=805632&r2=805633&view=diff
==============================================================================
--- lucene/java/trunk/contrib/CHANGES.txt (original)
+++ lucene/java/trunk/contrib/CHANGES.txt Wed Aug 19 00:09:41 2009
@@ -75,6 +75,9 @@
     that the regexp must match the entire string, not just a prefix.
     (Trejkaz via Mike McCandless)
 
+10. LUCENE-1792: Fix new query parser to set rewrite method for
+    multi-term queries. (Luis Alves, Mike McCandless via Michael Busch)
+
 
 New features
 

Modified: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryParserHelper.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryParserHelper.java?rev=805633&r1=805632&r2=805633&view=diff
==============================================================================
--- lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryParserHelper.java (original)
+++ lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryParserHelper.java Wed Aug 19 00:09:41 2009
@@ -122,7 +122,7 @@
    * @param syntaxParser
    *          the text parser that will be used to parse the query string
    * 
-   * @see #getTextParser()
+   * @see #getSyntaxParser()
    * @see SyntaxParser
    */
   public void setSyntaxParser(SyntaxParser syntaxParser) {
@@ -193,7 +193,7 @@
    * @see SyntaxParser
    * @see #setSyntaxParser(SyntaxParser)
    */
-  public SyntaxParser getTextParser() {
+  public SyntaxParser getSyntaxParser() {
     return this.syntaxParser;
   }
 
@@ -225,7 +225,7 @@
    * In this method the three phases are executed: <br/>
    * <br/>
    * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1st - the query string is parsed using the
-   * text parser returned by {@link #getTextParser()}, the result is a query
+   * text parser returned by {@link #getSyntaxParser()}, the result is a query
    * node tree <br/>
    * <br/>
    * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2nd - the query node tree is processed by the
@@ -246,7 +246,7 @@
    */
   public Object parse(String query, String defaultField)
       throws QueryNodeException {
-    QueryNode queryTree = getTextParser().parse(query, defaultField);
+    QueryNode queryTree = getSyntaxParser().parse(query, defaultField);
 
     QueryNodeProcessor processor = getQueryNodeProcessor();
 

Modified: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/FieldQueryNode.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/FieldQueryNode.java?rev=805633&r1=805632&r2=805633&view=diff
==============================================================================
--- lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/FieldQueryNode.java (original)
+++ lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/FieldQueryNode.java Wed Aug 19 00:09:41 2009
@@ -75,11 +75,11 @@
 
   }
 
-  CharSequence getTermEscaped(EscapeQuerySyntax escaper) {
+  protected CharSequence getTermEscaped(EscapeQuerySyntax escaper) {
     return escaper.escape(this.text, Locale.getDefault(), Type.NORMAL);
   }
 
-  CharSequence getTermEscapeQuoted(EscapeQuerySyntax escaper) {
+  protected CharSequence getTermEscapeQuoted(EscapeQuerySyntax escaper) {
     return escaper.escape(this.text, Locale.getDefault(), Type.STRING);
   }
 

Modified: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/PrefixWildcardQueryNode.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/PrefixWildcardQueryNode.java?rev=805633&r1=805632&r2=805633&view=diff
==============================================================================
--- lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/PrefixWildcardQueryNode.java (original)
+++ lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/PrefixWildcardQueryNode.java Wed Aug 19 00:09:41 2009
@@ -1,57 +0,0 @@
-package org.apache.lucene.queryParser.core.nodes;
-
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * A {@link PrefixWildcardQueryNode} represents wildcardquery that matches abc*
- * or *. This does not apply to phrases, this is a special case on the original
- * lucene parser. TODO: refactor the code to remove this special case from the
- * parser. and probably do it on a Processor
- */
-public class PrefixWildcardQueryNode extends WildcardQueryNode {
-
-  private static final long serialVersionUID = 6851557641826407515L;
-
-  /**
-   * @param field
-   *          - field name
-   * @param text
-   *          - value including the wildcard
-   * @param begin
-   *          - position in the query string
-   * @param end
-   *          - position in the query string
-   */
-  public PrefixWildcardQueryNode(CharSequence field, CharSequence text,
-      int begin, int end) {
-    super(field, text, begin, end);
-  }
-
-  public String toString() {
-    return "<prefixWildcard field='" + this.field + "' term='" + this.text
-        + "'/>";
-  }
-
-  public PrefixWildcardQueryNode cloneTree() throws CloneNotSupportedException {
-    PrefixWildcardQueryNode clone = (PrefixWildcardQueryNode) super.cloneTree();
-
-    // nothing to do here
-
-    return clone;
-  }
-}

Modified: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/WildcardQueryNode.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/WildcardQueryNode.java?rev=805633&r1=805632&r2=805633&view=diff
==============================================================================
--- lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/WildcardQueryNode.java (original)
+++ lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/WildcardQueryNode.java Wed Aug 19 00:09:41 2009
@@ -1,76 +0,0 @@
-package org.apache.lucene.queryParser.core.nodes;
-
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax;
-import org.apache.lucene.search.MultiTermQuery;
-
-/**
- * A {@link WildcardQueryNode} represents wildcard query This does not apply to
- * phrases. Examples: a*b*c Fl?w? m?ke*g
- */
-public class WildcardQueryNode extends FieldQueryNode {
-  private static final long serialVersionUID = 0L;
-  private MultiTermQuery.RewriteMethod multiTermRewriteMethod;
-
-  /**
-   * @param field
-   *          - field name
-   * @param text
-   *          - value that contains one or more wild card characters (? or *)
-   * @param begin
-   *          - position in the query string
-   * @param end
-   *          - position in the query string
-   */
-  public WildcardQueryNode(CharSequence field, CharSequence text, int begin,
-      int end) {
-    super(field, text, begin, end);
-  }
-
-  public CharSequence toQueryString(EscapeQuerySyntax escaper) {
-    if (isDefaultField(this.field)) {
-      return getTermEscaped(escaper);
-    } else {
-      return this.field + ":" + getTermEscaped(escaper);
-    }
-  }
-
-  public String toString() {
-    return "<wildcard field='" + this.field + "' term='" + this.text + "'/>";
-  }
-
-  public WildcardQueryNode cloneTree() throws CloneNotSupportedException {
-    WildcardQueryNode clone = (WildcardQueryNode) super.cloneTree();
-
-    // nothing to do here
-
-    return clone;
-  }
-
-  /**
-   * @return the rewrite method
-   */
-  public MultiTermQuery.RewriteMethod getMultiTermRewriteMethod() {
-    return multiTermRewriteMethod;
-  }
-
-  public void setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method) {
-    multiTermRewriteMethod = method;
-  }
-}

Modified: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/util/UnescapedCharSequence.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/util/UnescapedCharSequence.java?rev=805633&r1=805632&r2=805633&view=diff
==============================================================================
--- lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/util/UnescapedCharSequence.java (original)
+++ lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/util/UnescapedCharSequence.java Wed Aug 19 00:09:41 2009
@@ -85,10 +85,6 @@
         newLength);
   }
 
-  public boolean wasEscaped(int index) {
-    return this.wasEscaped[index];
-  }
-
   public String toString() {
     return new String(this.chars);
   }
@@ -138,4 +134,23 @@
     }
     return result.toString();
   }
+
+  public boolean wasEscaped(int index) {
+    return this.wasEscaped[index];
+  }
+  
+  static final public boolean wasEscaped(CharSequence text, int index) {
+    if (text instanceof UnescapedCharSequence)
+      return ((UnescapedCharSequence)text).wasEscaped[index];
+    else return false;
+  }
+  
+  public static CharSequence toLowerCase(CharSequence text) {
+    if (text instanceof UnescapedCharSequence) {
+      char[] chars = text.toString().toLowerCase().toCharArray();
+      boolean[] wasEscaped = ((UnescapedCharSequence)text).wasEscaped;
+      return new UnescapedCharSequence(chars, wasEscaped, 0, chars.length);
+    } else 
+      return new UnescapedCharSequence(text.toString().toLowerCase());
+  }
 }

Modified: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/QueryParserWrapper.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/QueryParserWrapper.java?rev=805633&r1=805632&r2=805633&view=diff
==============================================================================
--- lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/QueryParserWrapper.java (original)
+++ lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/QueryParserWrapper.java Wed Aug 19 00:09:41 2009
@@ -38,15 +38,15 @@
 import org.apache.lucene.queryParser.standard.builders.StandardQueryTreeBuilder;
 import org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttribute;
 import org.apache.lucene.queryParser.standard.config.AnalyzerAttribute;
-import org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttribute;
 import org.apache.lucene.queryParser.standard.config.DateResolutionAttribute;
 import org.apache.lucene.queryParser.standard.config.DefaultOperatorAttribute;
 import org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttribute;
 import org.apache.lucene.queryParser.standard.config.LocaleAttribute;
 import org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttribute;
-import org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler;
+import org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttribute;
 import org.apache.lucene.queryParser.standard.config.PositionIncrementsAttribute;
 import org.apache.lucene.queryParser.standard.config.RangeCollatorAttribute;
+import org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler;
 import org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser;
 import org.apache.lucene.queryParser.standard.processors.StandardQueryNodeProcessorPipeline;
 import org.apache.lucene.search.FuzzyQuery;

Modified: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/StandardQueryParser.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/StandardQueryParser.java?rev=805633&r1=805632&r2=805633&view=diff
==============================================================================
--- lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/StandardQueryParser.java (original)
+++ lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/StandardQueryParser.java Wed Aug 19 00:09:41 2009
@@ -31,18 +31,18 @@
 import org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttribute;
 import org.apache.lucene.queryParser.standard.config.AnalyzerAttribute;
 import org.apache.lucene.queryParser.standard.config.DateResolutionAttribute;
-import org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttribute;
 import org.apache.lucene.queryParser.standard.config.DefaultOperatorAttribute;
 import org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttribute;
 import org.apache.lucene.queryParser.standard.config.FieldBoostMapAttribute;
+import org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttribute;
 import org.apache.lucene.queryParser.standard.config.FuzzyAttribute;
 import org.apache.lucene.queryParser.standard.config.LocaleAttribute;
 import org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttribute;
 import org.apache.lucene.queryParser.standard.config.MultiFieldAttribute;
 import org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttribute;
-import org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler;
 import org.apache.lucene.queryParser.standard.config.PositionIncrementsAttribute;
 import org.apache.lucene.queryParser.standard.config.RangeCollatorAttribute;
+import org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler;
 import org.apache.lucene.queryParser.standard.config.DefaultOperatorAttribute.Operator;
 import org.apache.lucene.queryParser.standard.nodes.RangeQueryNode;
 import org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser;

Modified: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/PrefixWildcardQueryNodeBuilder.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/PrefixWildcardQueryNodeBuilder.java?rev=805633&r1=805632&r2=805633&view=diff
==============================================================================
--- lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/PrefixWildcardQueryNodeBuilder.java (original)
+++ lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/PrefixWildcardQueryNodeBuilder.java Wed Aug 19 00:09:41 2009
@@ -19,8 +19,10 @@
 
 import org.apache.lucene.index.Term;
 import org.apache.lucene.queryParser.core.QueryNodeException;
-import org.apache.lucene.queryParser.core.nodes.PrefixWildcardQueryNode;
 import org.apache.lucene.queryParser.core.nodes.QueryNode;
+import org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttribute;
+import org.apache.lucene.queryParser.standard.nodes.PrefixWildcardQueryNode;
+import org.apache.lucene.search.MultiTermQuery;
 import org.apache.lucene.search.PrefixQuery;
 
 /**
@@ -33,12 +35,18 @@
     // empty constructor
   }
 
-  public PrefixQuery build(QueryNode queryNode) throws QueryNodeException {
+  public PrefixQuery build(QueryNode queryNode) throws QueryNodeException {    
+
     PrefixWildcardQueryNode wildcardNode = (PrefixWildcardQueryNode) queryNode;
 
-    PrefixQuery q = new PrefixQuery(new Term(wildcardNode.getFieldAsString(),
-                                             wildcardNode.getTextAsString()));
-    q.setRewriteMethod(wildcardNode.getMultiTermRewriteMethod());
+    String text = wildcardNode.getText().subSequence(0, wildcardNode.getText().length() - 1).toString();
+    PrefixQuery q = new PrefixQuery(new Term(wildcardNode.getFieldAsString(), text));
+    
+    MultiTermQuery.RewriteMethod method = (MultiTermQuery.RewriteMethod)queryNode.getTag(MultiTermRewriteMethodAttribute.TAG_ID);
+    if (method != null) {
+      q.setRewriteMethod(method);
+    }
+    
     return q;
   }
 

Modified: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/RangeQueryNodeBuilder.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/RangeQueryNodeBuilder.java?rev=805633&r1=805632&r2=805633&view=diff
==============================================================================
--- lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/RangeQueryNodeBuilder.java (original)
+++ lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/RangeQueryNodeBuilder.java Wed Aug 19 00:09:41 2009
@@ -21,7 +21,9 @@
 import org.apache.lucene.queryParser.core.nodes.ParametricQueryNode;
 import org.apache.lucene.queryParser.core.nodes.QueryNode;
 import org.apache.lucene.queryParser.core.nodes.ParametricQueryNode.CompareOperator;
+import org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttribute;
 import org.apache.lucene.queryParser.standard.nodes.RangeQueryNode;
+import org.apache.lucene.search.MultiTermQuery;
 import org.apache.lucene.search.TermRangeQuery;
 
 /**
@@ -54,7 +56,11 @@
     TermRangeQuery rangeQuery = new TermRangeQuery(field, lower
         .getTextAsString(), upper.getTextAsString(), lowerInclusive,
         upperInclusive, rangeNode.getCollator());
-    rangeQuery.setRewriteMethod(rangeNode.getMultiTermRewriteMethod());
+    
+    MultiTermQuery.RewriteMethod method = (MultiTermQuery.RewriteMethod)queryNode.getTag(MultiTermRewriteMethodAttribute.TAG_ID);
+    if (method != null) {
+      rangeQuery.setRewriteMethod(method);
+    }
 
     return rangeQuery;
 

Modified: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/StandardQueryTreeBuilder.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/StandardQueryTreeBuilder.java?rev=805633&r1=805632&r2=805633&view=diff
==============================================================================
--- lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/StandardQueryTreeBuilder.java (original)
+++ lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/StandardQueryTreeBuilder.java Wed Aug 19 00:09:41 2009
@@ -27,14 +27,14 @@
 import org.apache.lucene.queryParser.core.nodes.MatchAllDocsQueryNode;
 import org.apache.lucene.queryParser.core.nodes.MatchNoDocsQueryNode;
 import org.apache.lucene.queryParser.core.nodes.ModifierQueryNode;
-import org.apache.lucene.queryParser.core.nodes.PrefixWildcardQueryNode;
 import org.apache.lucene.queryParser.core.nodes.QueryNode;
 import org.apache.lucene.queryParser.core.nodes.SlopQueryNode;
 import org.apache.lucene.queryParser.core.nodes.TokenizedPhraseQueryNode;
-import org.apache.lucene.queryParser.core.nodes.WildcardQueryNode;
-import org.apache.lucene.queryParser.standard.nodes.StandardBooleanQueryNode;
 import org.apache.lucene.queryParser.standard.nodes.MultiPhraseQueryNode;
+import org.apache.lucene.queryParser.standard.nodes.PrefixWildcardQueryNode;
 import org.apache.lucene.queryParser.standard.nodes.RangeQueryNode;
+import org.apache.lucene.queryParser.standard.nodes.StandardBooleanQueryNode;
+import org.apache.lucene.queryParser.standard.nodes.WildcardQueryNode;
 import org.apache.lucene.queryParser.standard.processors.StandardQueryNodeProcessorPipeline;
 import org.apache.lucene.search.Query;
 

Modified: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/WildcardQueryNodeBuilder.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/WildcardQueryNodeBuilder.java?rev=805633&r1=805632&r2=805633&view=diff
==============================================================================
--- lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/WildcardQueryNodeBuilder.java (original)
+++ lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/builders/WildcardQueryNodeBuilder.java Wed Aug 19 00:09:41 2009
@@ -20,7 +20,9 @@
 import org.apache.lucene.index.Term;
 import org.apache.lucene.queryParser.core.QueryNodeException;
 import org.apache.lucene.queryParser.core.nodes.QueryNode;
-import org.apache.lucene.queryParser.core.nodes.WildcardQueryNode;
+import org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttribute;
+import org.apache.lucene.queryParser.standard.nodes.WildcardQueryNode;
+import org.apache.lucene.search.MultiTermQuery;
 import org.apache.lucene.search.WildcardQuery;
 
 /**
@@ -38,7 +40,12 @@
 
     WildcardQuery q = new WildcardQuery(new Term(wildcardNode.getFieldAsString(),
                                                  wildcardNode.getTextAsString()));
-    q.setRewriteMethod(wildcardNode.getMultiTermRewriteMethod());
+    
+    MultiTermQuery.RewriteMethod method = (MultiTermQuery.RewriteMethod)queryNode.getTag(MultiTermRewriteMethodAttribute.TAG_ID);
+    if (method != null) {
+      q.setRewriteMethod(method);
+    }
+    
     return q;
   }
 

Modified: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiTermRewriteMethodAttribute.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiTermRewriteMethodAttribute.java?rev=805633&r1=805632&r2=805633&view=diff
==============================================================================
--- lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiTermRewriteMethodAttribute.java (original)
+++ lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiTermRewriteMethodAttribute.java Wed Aug 19 00:09:41 2009
@@ -31,6 +31,9 @@
  * 
  */
 public interface MultiTermRewriteMethodAttribute extends Attribute {
+  
+  public static final CharSequence TAG_ID = "MultiTermRewriteMethodAttribute";
+  
   public void setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method);
 
   public MultiTermQuery.RewriteMethod getMultiTermRewriteMethod();

Modified: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiTermRewriteMethodAttributeImpl.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiTermRewriteMethodAttributeImpl.java?rev=805633&r1=805632&r2=805633&view=diff
==============================================================================
--- lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiTermRewriteMethodAttributeImpl.java (original)
+++ lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiTermRewriteMethodAttributeImpl.java Wed Aug 19 00:09:41 2009
@@ -35,7 +35,7 @@
     implements MultiTermRewriteMethodAttribute {
 
   private static final long serialVersionUID = -2104763012723049527L;
-
+  
   private MultiTermQuery.RewriteMethod multiTermRewriteMethod = MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT;
 
   public MultiTermRewriteMethodAttributeImpl() {

Modified: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/StandardQueryConfigHandler.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/StandardQueryConfigHandler.java?rev=805633&r1=805632&r2=805633&view=diff
==============================================================================
--- lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/StandardQueryConfigHandler.java (original)
+++ lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/StandardQueryConfigHandler.java Wed Aug 19 00:09:41 2009
@@ -48,7 +48,7 @@
     addAttribute(PositionIncrementsAttribute.class);
     addAttribute(LocaleAttribute.class);
     addAttribute(DefaultPhraseSlopAttribute.class);
-    //addAttribute(DateResolutionAttribute.class);
+    addAttribute(MultiTermRewriteMethodAttribute.class);   
     
   }
 

Added: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/PrefixWildcardQueryNode.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/PrefixWildcardQueryNode.java?rev=805633&view=auto
==============================================================================
--- lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/PrefixWildcardQueryNode.java (added)
+++ lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/PrefixWildcardQueryNode.java Wed Aug 19 00:09:41 2009
@@ -0,0 +1,63 @@
+package org.apache.lucene.queryParser.standard.nodes;
+
+import org.apache.lucene.queryParser.core.nodes.FieldQueryNode;
+
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * A {@link PrefixWildcardQueryNode} represents wildcardquery that matches abc*
+ * or *. This does not apply to phrases, this is a special case on the original
+ * lucene parser. TODO: refactor the code to remove this special case from the
+ * parser. and probably do it on a Processor
+ */
+public class PrefixWildcardQueryNode extends WildcardQueryNode {
+
+  private static final long serialVersionUID = 6851557641826407515L;
+
+  /**
+   * @param field
+   *          - field name
+   * @param text
+   *          - value including the wildcard
+   * @param begin
+   *          - position in the query string
+   * @param end
+   *          - position in the query string
+   */
+  public PrefixWildcardQueryNode(CharSequence field, CharSequence text,
+      int begin, int end) {
+    super(field, text, begin, end);
+  }
+
+  public PrefixWildcardQueryNode(FieldQueryNode fqn) {
+    this(fqn.getField(), fqn.getText(), fqn.getBegin(), fqn.getEnd());
+  }
+
+  public String toString() {
+    return "<prefixWildcard field='" + this.field + "' term='" + this.text
+        + "'/>";
+  }
+
+  public PrefixWildcardQueryNode cloneTree() throws CloneNotSupportedException {
+    PrefixWildcardQueryNode clone = (PrefixWildcardQueryNode) super.cloneTree();
+
+    // nothing to do here
+
+    return clone;
+  }
+}

Propchange: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/PrefixWildcardQueryNode.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/RangeQueryNode.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/RangeQueryNode.java?rev=805633&r1=805632&r2=805633&view=diff
==============================================================================
--- lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/RangeQueryNode.java (original)
+++ lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/RangeQueryNode.java Wed Aug 19 00:09:41 2009
@@ -23,7 +23,6 @@
 import org.apache.lucene.queryParser.core.nodes.ParametricRangeQueryNode;
 import org.apache.lucene.queryParser.standard.config.RangeCollatorAttribute;
 import org.apache.lucene.queryParser.standard.processors.ParametricRangeQueryNodeProcessor;
-import org.apache.lucene.search.MultiTermQuery;
 
 /**
  * This query node represents a range query. It also holds which collator will
@@ -39,17 +38,13 @@
 
   private Collator collator;
 
-  private MultiTermQuery.RewriteMethod multiTermRewriteMethod;
-
   /**
    * @param lower
    * @param upper
    */
-  public RangeQueryNode(ParametricQueryNode lower, ParametricQueryNode upper,
-      Collator collator, MultiTermQuery.RewriteMethod multiTermRewriteMethod) {
+  public RangeQueryNode(ParametricQueryNode lower, ParametricQueryNode upper, Collator collator) {
     super(lower, upper);
 
-    this.multiTermRewriteMethod = multiTermRewriteMethod;
     this.collator = collator;
 
   }
@@ -71,10 +66,4 @@
     return this.collator;
   }
 
-  /**
-   * @return the rewrite method
-   */
-  public MultiTermQuery.RewriteMethod getMultiTermRewriteMethod() {
-    return multiTermRewriteMethod;
-  }
 }

Added: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/WildcardQueryNode.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/WildcardQueryNode.java?rev=805633&view=auto
==============================================================================
--- lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/WildcardQueryNode.java (added)
+++ lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/WildcardQueryNode.java Wed Aug 19 00:09:41 2009
@@ -0,0 +1,69 @@
+package org.apache.lucene.queryParser.standard.nodes;
+
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.lucene.queryParser.core.nodes.FieldQueryNode;
+import org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax;
+
+/**
+ * A {@link WildcardQueryNode} represents wildcard query This does not apply to
+ * phrases. Examples: a*b*c Fl?w? m?ke*g
+ */
+public class WildcardQueryNode extends FieldQueryNode {
+  private static final long serialVersionUID = 0L;
+
+  /**
+   * @param field
+   *          - field name
+   * @param text
+   *          - value that contains one or more wild card characters (? or *)
+   * @param begin
+   *          - position in the query string
+   * @param end
+   *          - position in the query string
+   */
+  public WildcardQueryNode(CharSequence field, CharSequence text, int begin,
+      int end) {
+    super(field, text, begin, end);
+  }
+
+  public WildcardQueryNode(FieldQueryNode fqn) {
+    this(fqn.getField(), fqn.getText(), fqn.getBegin(), fqn.getEnd());
+  }
+
+  public CharSequence toQueryString(EscapeQuerySyntax escaper) {
+    if (isDefaultField(this.field)) {
+      return getTermEscaped(escaper);
+    } else {
+      return this.field + ":" + getTermEscaped(escaper);
+    }
+  }
+
+  public String toString() {
+    return "<wildcard field='" + this.field + "' term='" + this.text + "'/>";
+  }
+
+  public WildcardQueryNode cloneTree() throws CloneNotSupportedException {
+    WildcardQueryNode clone = (WildcardQueryNode) super.cloneTree();
+
+    // nothing to do here
+
+    return clone;
+  }
+
+}

Propchange: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/WildcardQueryNode.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/JavaCharStream.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/JavaCharStream.java?rev=805633&r1=805632&r2=805633&view=diff
==============================================================================
--- lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/JavaCharStream.java (original)
+++ lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/JavaCharStream.java Wed Aug 19 00:09:41 2009
@@ -614,4 +614,4 @@
   }
 
 }
-/* JavaCC - StandardChecksum=065d79d49fcd02f542903038e37bd9d9 (do not edit this line) */
+/* JavaCC - OriginalChecksum=d665eff1df49d9f82f07f7dc863fcd22 (do not edit this line) */

Modified: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/StandardSyntaxParser.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/StandardSyntaxParser.java?rev=805633&r1=805632&r2=805633&view=diff
==============================================================================
--- lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/StandardSyntaxParser.java (original)
+++ lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/StandardSyntaxParser.java Wed Aug 19 00:09:41 2009
@@ -19,14 +19,10 @@
  */
 
 import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.List;
 import java.util.Vector;
 
 import org.apache.lucene.messages.Message;
 import org.apache.lucene.messages.MessageImpl;
-import org.apache.lucene.queryParser.core.QueryNodeError;
-import org.apache.lucene.queryParser.core.QueryNodeException;
 import org.apache.lucene.queryParser.core.QueryNodeParseException;
 import org.apache.lucene.queryParser.core.messages.QueryParserMessages;
 import org.apache.lucene.queryParser.core.nodes.AndQueryNode;
@@ -34,19 +30,14 @@
 import org.apache.lucene.queryParser.core.nodes.BoostQueryNode;
 import org.apache.lucene.queryParser.core.nodes.FieldQueryNode;
 import org.apache.lucene.queryParser.core.nodes.FuzzyQueryNode;
-import org.apache.lucene.queryParser.core.nodes.ModifierQueryNode;
 import org.apache.lucene.queryParser.core.nodes.GroupQueryNode;
-import org.apache.lucene.queryParser.core.nodes.OpaqueQueryNode;
+import org.apache.lucene.queryParser.core.nodes.ModifierQueryNode;
 import org.apache.lucene.queryParser.core.nodes.OrQueryNode;
 import org.apache.lucene.queryParser.core.nodes.ParametricQueryNode;
 import org.apache.lucene.queryParser.core.nodes.ParametricRangeQueryNode;
-import org.apache.lucene.queryParser.core.nodes.PrefixWildcardQueryNode;
-import org.apache.lucene.queryParser.core.nodes.SlopQueryNode;
-import org.apache.lucene.queryParser.core.nodes.ProximityQueryNode;
 import org.apache.lucene.queryParser.core.nodes.QueryNode;
-import org.apache.lucene.queryParser.core.nodes.QueryNodeImpl;
 import org.apache.lucene.queryParser.core.nodes.QuotedFieldQueryNode;
-import org.apache.lucene.queryParser.core.nodes.WildcardQueryNode;
+import org.apache.lucene.queryParser.core.nodes.SlopQueryNode;
 import org.apache.lucene.queryParser.core.parser.SyntaxParser;
 
 @SuppressWarnings("all")
@@ -178,11 +169,8 @@
       case PLUS:
       case MINUS:
       case LPAREN:
-      case STAR:
       case QUOTED:
       case TERM:
-      case PREFIXTERM:
-      case WILDTERM:
       case RANGEIN_START:
       case RANGEEX_START:
       case NUMBER:
@@ -322,31 +310,15 @@
   Token fieldToken=null, boost=null;
   boolean group = false;
     if (jj_2_1(2)) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case TERM:
-        fieldToken = jj_consume_token(TERM);
-        jj_consume_token(COLON);
+      fieldToken = jj_consume_token(TERM);
+      jj_consume_token(COLON);
                                field=EscapeQuerySyntaxImpl.discardEscapeChar(fieldToken.image);
-        break;
-      case STAR:
-        jj_consume_token(STAR);
-        jj_consume_token(COLON);
-                      field="*";
-        break;
-      default:
-        jj_la1[7] = jj_gen;
-        jj_consume_token(-1);
-        throw new ParseException();
-      }
     } else {
       ;
     }
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case STAR:
     case QUOTED:
     case TERM:
-    case PREFIXTERM:
-    case WILDTERM:
     case RANGEIN_START:
     case RANGEEX_START:
     case NUMBER:
@@ -362,13 +334,13 @@
         boost = jj_consume_token(NUMBER);
         break;
       default:
-        jj_la1[8] = jj_gen;
+        jj_la1[7] = jj_gen;
         ;
       }
                                                                  group=true;
       break;
     default:
-      jj_la1[9] = jj_gen;
+      jj_la1[8] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
@@ -393,40 +365,23 @@
 
   final public QueryNode Term(CharSequence field) throws ParseException {
   Token term, boost=null, fuzzySlop=null, goop1, goop2;
-  boolean prefix = false;
-  boolean wildcard = false;
   boolean fuzzy = false;
   QueryNode q =null;
   ParametricQueryNode qLower, qUpper;
   float defaultMinSimilarity = 0.5f;
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case STAR:
     case TERM:
-    case PREFIXTERM:
-    case WILDTERM:
     case NUMBER:
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
       case TERM:
         term = jj_consume_token(TERM);
                          q = new FieldQueryNode(field, EscapeQuerySyntaxImpl.discardEscapeChar(term.image), term.beginColumn, term.endColumn);
         break;
-      case STAR:
-        term = jj_consume_token(STAR);
-                           wildcard=true; q = new WildcardQueryNode(field, EscapeQuerySyntaxImpl.discardEscapeChar(term.image), term.beginColumn, term.endColumn);
-        break;
-      case PREFIXTERM:
-        term = jj_consume_token(PREFIXTERM);
-                                 prefix=true; q = new PrefixWildcardQueryNode(field, EscapeQuerySyntaxImpl.discardEscapeChar(term.image), term.beginColumn, term.endColumn);
-        break;
-      case WILDTERM:
-        term = jj_consume_token(WILDTERM);
-                               wildcard=true; q = new WildcardQueryNode(field, EscapeQuerySyntaxImpl.discardEscapeChar(term.image), term.beginColumn, term.endColumn);
-        break;
       case NUMBER:
         term = jj_consume_token(NUMBER);
         break;
       default:
-        jj_la1[10] = jj_gen;
+        jj_la1[9] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
@@ -436,7 +391,7 @@
                                 fuzzy=true;
         break;
       default:
-        jj_la1[11] = jj_gen;
+        jj_la1[10] = jj_gen;
         ;
       }
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -449,15 +404,15 @@
                                                          fuzzy=true;
           break;
         default:
-          jj_la1[12] = jj_gen;
+          jj_la1[11] = jj_gen;
           ;
         }
         break;
       default:
-        jj_la1[13] = jj_gen;
+        jj_la1[12] = jj_gen;
         ;
       }
-       if (!wildcard && !prefix && fuzzy) {
+       if (fuzzy) {
           float fms = defaultMinSimilarity;
           try {
             fms = Float.valueOf(fuzzySlop.image.substring(1)).floatValue();
@@ -478,7 +433,7 @@
         goop1 = jj_consume_token(RANGEIN_QUOTED);
         break;
       default:
-        jj_la1[14] = jj_gen;
+        jj_la1[13] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
@@ -487,7 +442,7 @@
         jj_consume_token(RANGEIN_TO);
         break;
       default:
-        jj_la1[15] = jj_gen;
+        jj_la1[14] = jj_gen;
         ;
       }
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -498,7 +453,7 @@
         goop2 = jj_consume_token(RANGEIN_QUOTED);
         break;
       default:
-        jj_la1[16] = jj_gen;
+        jj_la1[15] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
@@ -509,7 +464,7 @@
         boost = jj_consume_token(NUMBER);
         break;
       default:
-        jj_la1[17] = jj_gen;
+        jj_la1[16] = jj_gen;
         ;
       }
           if (goop1.kind == RANGEIN_QUOTED) {
@@ -535,7 +490,7 @@
         goop1 = jj_consume_token(RANGEEX_QUOTED);
         break;
       default:
-        jj_la1[18] = jj_gen;
+        jj_la1[17] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
@@ -544,7 +499,7 @@
         jj_consume_token(RANGEEX_TO);
         break;
       default:
-        jj_la1[19] = jj_gen;
+        jj_la1[18] = jj_gen;
         ;
       }
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -555,7 +510,7 @@
         goop2 = jj_consume_token(RANGEEX_QUOTED);
         break;
       default:
-        jj_la1[20] = jj_gen;
+        jj_la1[19] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
@@ -566,7 +521,7 @@
         boost = jj_consume_token(NUMBER);
         break;
       default:
-        jj_la1[21] = jj_gen;
+        jj_la1[20] = jj_gen;
         ;
       }
           if (goop1.kind == RANGEEX_QUOTED) {
@@ -589,7 +544,7 @@
         fuzzySlop = jj_consume_token(FUZZY_SLOP);
         break;
       default:
-        jj_la1[22] = jj_gen;
+        jj_la1[21] = jj_gen;
         ;
       }
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -598,7 +553,7 @@
         boost = jj_consume_token(NUMBER);
         break;
       default:
-        jj_la1[23] = jj_gen;
+        jj_la1[22] = jj_gen;
         ;
       }
          int phraseSlop = 0;
@@ -616,7 +571,7 @@
          }
       break;
     default:
-      jj_la1[24] = jj_gen;
+      jj_la1[23] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
@@ -645,28 +600,12 @@
     finally { jj_save(0, xla); }
   }
 
-  private boolean jj_3R_5() {
-    if (jj_scan_token(STAR)) return true;
-    if (jj_scan_token(COLON)) return true;
-    return false;
-  }
-
-  private boolean jj_3R_4() {
+  private boolean jj_3_1() {
     if (jj_scan_token(TERM)) return true;
     if (jj_scan_token(COLON)) return true;
     return false;
   }
 
-  private boolean jj_3_1() {
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_4()) {
-    jj_scanpos = xsp;
-    if (jj_3R_5()) return true;
-    }
-    return false;
-  }
-
   /** Generated Token Manager. */
   public StandardSyntaxParserTokenManager token_source;
   JavaCharStream jj_input_stream;
@@ -678,18 +617,13 @@
   private Token jj_scanpos, jj_lastpos;
   private int jj_la;
   private int jj_gen;
-  final private int[] jj_la1 = new int[25];
+  final private int[] jj_la1 = new int[24];
   static private int[] jj_la1_0;
-  static private int[] jj_la1_1;
   static {
       jj_la1_init_0();
-      jj_la1_init_1();
    }
    private static void jj_la1_init_0() {
-      jj_la1_0 = new int[] {0x300,0x300,0x1c00,0x1c00,0x3ed3c00,0x200,0x100,0x90000,0x20000,0x3ed2000,0x2690000,0x100000,0x100000,0x20000,0x30000000,0x4000000,0x30000000,0x20000,0x0,0x40000000,0x0,0x20000,0x100000,0x20000,0x3ed0000,};
-   }
-   private static void jj_la1_init_1() {
-      jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0x0,0x3,0x0,0x0,0x0,0x0,};
+      jj_la1_0 = new int[] {0x300,0x300,0x1c00,0x1c00,0x763c00,0x200,0x100,0x10000,0x762000,0x440000,0x80000,0x80000,0x10000,0x6000000,0x800000,0x6000000,0x10000,0x60000000,0x8000000,0x60000000,0x10000,0x80000,0x10000,0x760000,};
    }
   final private JJCalls[] jj_2_rtns = new JJCalls[1];
   private boolean jj_rescan = false;
@@ -706,7 +640,7 @@
     token = new Token();
     jj_ntk = -1;
     jj_gen = 0;
-    for (int i = 0; i < 25; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 24; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
@@ -721,7 +655,7 @@
     token = new Token();
     jj_ntk = -1;
     jj_gen = 0;
-    for (int i = 0; i < 25; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 24; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
@@ -732,7 +666,7 @@
     token = new Token();
     jj_ntk = -1;
     jj_gen = 0;
-    for (int i = 0; i < 25; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 24; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
@@ -743,7 +677,7 @@
     token = new Token();
     jj_ntk = -1;
     jj_gen = 0;
-    for (int i = 0; i < 25; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 24; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
@@ -753,7 +687,7 @@
     token = new Token();
     jj_ntk = -1;
     jj_gen = 0;
-    for (int i = 0; i < 25; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 24; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
@@ -763,7 +697,7 @@
     token = new Token();
     jj_ntk = -1;
     jj_gen = 0;
-    for (int i = 0; i < 25; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 24; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
@@ -875,24 +809,21 @@
   /** Generate ParseException. */
   public ParseException generateParseException() {
     jj_expentries.clear();
-    boolean[] la1tokens = new boolean[34];
+    boolean[] la1tokens = new boolean[31];
     if (jj_kind >= 0) {
       la1tokens[jj_kind] = true;
       jj_kind = -1;
     }
-    for (int i = 0; i < 25; i++) {
+    for (int i = 0; i < 24; i++) {
       if (jj_la1[i] == jj_gen) {
         for (int j = 0; j < 32; j++) {
           if ((jj_la1_0[i] & (1<<j)) != 0) {
             la1tokens[j] = true;
           }
-          if ((jj_la1_1[i] & (1<<j)) != 0) {
-            la1tokens[32+j] = true;
-          }
         }
       }
     }
-    for (int i = 0; i < 34; i++) {
+    for (int i = 0; i < 31; i++) {
       if (la1tokens[i]) {
         jj_expentry = new int[1];
         jj_expentry[0] = i;

Modified: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/StandardSyntaxParser.jj
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/StandardSyntaxParser.jj?rev=805633&r1=805632&r2=805633&view=diff
==============================================================================
--- lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/StandardSyntaxParser.jj (original)
+++ lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/StandardSyntaxParser.jj Wed Aug 19 00:09:41 2009
@@ -52,13 +52,11 @@
 import org.apache.lucene.queryParser.core.nodes.OrQueryNode;
 import org.apache.lucene.queryParser.core.nodes.ParametricQueryNode;
 import org.apache.lucene.queryParser.core.nodes.ParametricRangeQueryNode;
-import org.apache.lucene.queryParser.core.nodes.PrefixWildcardQueryNode;
 import org.apache.lucene.queryParser.core.nodes.SlopQueryNode;
 import org.apache.lucene.queryParser.core.nodes.ProximityQueryNode;
 import org.apache.lucene.queryParser.core.nodes.QueryNode;
 import org.apache.lucene.queryParser.core.nodes.QueryNodeImpl;
 import org.apache.lucene.queryParser.core.nodes.QuotedFieldQueryNode;
-import org.apache.lucene.queryParser.core.nodes.WildcardQueryNode;
 import org.apache.lucene.queryParser.core.parser.SyntaxParser;
 
 @SuppressWarnings("all")
@@ -110,7 +108,7 @@
 // every character that follows a backslash is considered as an escaped character
 | <#_ESCAPED_CHAR: "\\" ~[] >
 | <#_TERM_START_CHAR: ( ~[ " ", "\t", "\n", "\r", "\u3000", "+", "-", "!", "(", ")", ":", "^",
-                           "[", "]", "\"", "{", "}", "~", "*", "?", "\\" ]
+                           "[", "]", "\"", "{", "}", "~", "\\" ]
                        | <_ESCAPED_CHAR> ) >
 | <#_TERM_CHAR: ( <_TERM_START_CHAR> | <_ESCAPED_CHAR> | "-" | "+" ) >
 | <#_WHITESPACE: ( " " | "\t" | "\n" | "\r" | "\u3000") >
@@ -130,13 +128,10 @@
 | <LPAREN:    "(" >
 | <RPAREN:    ")" >
 | <COLON:     ":" >
-| <STAR:      "*" >
 | <CARAT:     "^" > : Boost
 | <QUOTED:     "\"" (<_QUOTED_CHAR>)* "\"">
 | <TERM:      <_TERM_START_CHAR> (<_TERM_CHAR>)*  >
 | <FUZZY_SLOP:     "~" ( (<_NUM_CHAR>)+ ( "." (<_NUM_CHAR>)+ )? )? >
-| <PREFIXTERM:  ("*") | ( <_TERM_START_CHAR> (<_TERM_CHAR>)* "*" ) >
-| <WILDTERM:  (<_TERM_START_CHAR> | [ "*", "?" ]) (<_TERM_CHAR> | ( [ "*", "?" ] ))* >
 | <RANGEIN_START: "[" > : RangeIn
 | <RANGEEX_START: "{" > : RangeEx
 }
@@ -346,8 +341,7 @@
   [
     LOOKAHEAD(2)
     (
-    fieldToken=<TERM> <COLON> {field=EscapeQuerySyntaxImpl.discardEscapeChar(fieldToken.image);}
-    | <STAR> <COLON> {field="*";}
+    fieldToken=<TERM> <COLON> {field=EscapeQuerySyntaxImpl.discardEscapeChar(fieldToken.image);}    
     )
   ]
 
@@ -379,8 +373,6 @@
 
 QueryNode Term(CharSequence field) : {
   Token term, boost=null, fuzzySlop=null, goop1, goop2;
-  boolean prefix = false;
-  boolean wildcard = false;
   boolean fuzzy = false;
   QueryNode q =null; 
   ParametricQueryNode qLower, qUpper;
@@ -390,15 +382,12 @@
   (
      (
  	   term=<TERM> { q = new FieldQueryNode(field, EscapeQuerySyntaxImpl.discardEscapeChar(term.image), term.beginColumn, term.endColumn); }
-	   | term=<STAR> { wildcard=true; q = new WildcardQueryNode(field, EscapeQuerySyntaxImpl.discardEscapeChar(term.image), term.beginColumn, term.endColumn); }
-	   | term=<PREFIXTERM> { prefix=true; q = new PrefixWildcardQueryNode(field, EscapeQuerySyntaxImpl.discardEscapeChar(term.image), term.beginColumn, term.endColumn); }
-	   | term=<WILDTERM> { wildcard=true; q = new WildcardQueryNode(field, EscapeQuerySyntaxImpl.discardEscapeChar(term.image), term.beginColumn, term.endColumn); }
        | term=<NUMBER>
      )
      [ fuzzySlop=<FUZZY_SLOP> { fuzzy=true; } ]
      [ <CARAT> boost=<NUMBER> [ fuzzySlop=<FUZZY_SLOP> { fuzzy=true; } ] ]
      {
-       if (!wildcard && !prefix && fuzzy) {
+       if (fuzzy) {
        	  float fms = defaultMinSimilarity;
        	  try {
             fms = Float.valueOf(fuzzySlop.image.substring(1)).floatValue();

Modified: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/StandardSyntaxParserConstants.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/StandardSyntaxParserConstants.java?rev=805633&r1=805632&r2=805633&view=diff
==============================================================================
--- lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/StandardSyntaxParserConstants.java (original)
+++ lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/StandardSyntaxParserConstants.java Wed Aug 19 00:09:41 2009
@@ -39,41 +39,35 @@
   /** RegularExpression Id. */
   int COLON = 15;
   /** RegularExpression Id. */
-  int STAR = 16;
+  int CARAT = 16;
   /** RegularExpression Id. */
-  int CARAT = 17;
+  int QUOTED = 17;
   /** RegularExpression Id. */
-  int QUOTED = 18;
+  int TERM = 18;
   /** RegularExpression Id. */
-  int TERM = 19;
+  int FUZZY_SLOP = 19;
   /** RegularExpression Id. */
-  int FUZZY_SLOP = 20;
+  int RANGEIN_START = 20;
   /** RegularExpression Id. */
-  int PREFIXTERM = 21;
+  int RANGEEX_START = 21;
   /** RegularExpression Id. */
-  int WILDTERM = 22;
+  int NUMBER = 22;
   /** RegularExpression Id. */
-  int RANGEIN_START = 23;
+  int RANGEIN_TO = 23;
   /** RegularExpression Id. */
-  int RANGEEX_START = 24;
+  int RANGEIN_END = 24;
   /** RegularExpression Id. */
-  int NUMBER = 25;
+  int RANGEIN_QUOTED = 25;
   /** RegularExpression Id. */
-  int RANGEIN_TO = 26;
+  int RANGEIN_GOOP = 26;
   /** RegularExpression Id. */
-  int RANGEIN_END = 27;
+  int RANGEEX_TO = 27;
   /** RegularExpression Id. */
-  int RANGEIN_QUOTED = 28;
+  int RANGEEX_END = 28;
   /** RegularExpression Id. */
-  int RANGEIN_GOOP = 29;
+  int RANGEEX_QUOTED = 29;
   /** RegularExpression Id. */
-  int RANGEEX_TO = 30;
-  /** RegularExpression Id. */
-  int RANGEEX_END = 31;
-  /** RegularExpression Id. */
-  int RANGEEX_QUOTED = 32;
-  /** RegularExpression Id. */
-  int RANGEEX_GOOP = 33;
+  int RANGEEX_GOOP = 30;
 
   /** Lexical state. */
   int Boost = 0;
@@ -102,13 +96,10 @@
     "\"(\"",
     "\")\"",
     "\":\"",
-    "\"*\"",
     "\"^\"",
     "<QUOTED>",
     "<TERM>",
     "<FUZZY_SLOP>",
-    "<PREFIXTERM>",
-    "<WILDTERM>",
     "\"[\"",
     "\"{\"",
     "<NUMBER>",

Modified: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/StandardSyntaxParserTokenManager.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/StandardSyntaxParserTokenManager.java?rev=805633&r1=805632&r2=805633&view=diff
==============================================================================
--- lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/StandardSyntaxParserTokenManager.java (original)
+++ lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/StandardSyntaxParserTokenManager.java Wed Aug 19 00:09:41 2009
@@ -17,35 +17,6 @@
  * limitations under the License.
  */
 
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Vector;
-import org.apache.lucene.messages.Message;
-import org.apache.lucene.messages.MessageImpl;
-import org.apache.lucene.queryParser.core.QueryNodeError;
-import org.apache.lucene.queryParser.core.QueryNodeException;
-import org.apache.lucene.queryParser.core.QueryNodeParseException;
-import org.apache.lucene.queryParser.core.messages.QueryParserMessages;
-import org.apache.lucene.queryParser.core.nodes.AndQueryNode;
-import org.apache.lucene.queryParser.core.nodes.BooleanQueryNode;
-import org.apache.lucene.queryParser.core.nodes.BoostQueryNode;
-import org.apache.lucene.queryParser.core.nodes.FieldQueryNode;
-import org.apache.lucene.queryParser.core.nodes.FuzzyQueryNode;
-import org.apache.lucene.queryParser.core.nodes.ModifierQueryNode;
-import org.apache.lucene.queryParser.core.nodes.GroupQueryNode;
-import org.apache.lucene.queryParser.core.nodes.OpaqueQueryNode;
-import org.apache.lucene.queryParser.core.nodes.OrQueryNode;
-import org.apache.lucene.queryParser.core.nodes.ParametricQueryNode;
-import org.apache.lucene.queryParser.core.nodes.ParametricRangeQueryNode;
-import org.apache.lucene.queryParser.core.nodes.PrefixWildcardQueryNode;
-import org.apache.lucene.queryParser.core.nodes.SlopQueryNode;
-import org.apache.lucene.queryParser.core.nodes.ProximityQueryNode;
-import org.apache.lucene.queryParser.core.nodes.QueryNode;
-import org.apache.lucene.queryParser.core.nodes.QueryNodeImpl;
-import org.apache.lucene.queryParser.core.nodes.QuotedFieldQueryNode;
-import org.apache.lucene.queryParser.core.nodes.WildcardQueryNode;
-import org.apache.lucene.queryParser.core.parser.SyntaxParser;
 
 /** Token Manager. */
 public class StandardSyntaxParserTokenManager implements StandardSyntaxParserConstants
@@ -81,8 +52,6 @@
          return jjStopAtPos(0, 13);
       case 41:
          return jjStopAtPos(0, 14);
-      case 42:
-         return jjStartNfaWithStates_3(0, 16, 36);
       case 43:
          return jjStopAtPos(0, 11);
       case 45:
@@ -90,23 +59,15 @@
       case 58:
          return jjStopAtPos(0, 15);
       case 91:
-         return jjStopAtPos(0, 23);
+         return jjStopAtPos(0, 20);
       case 94:
-         return jjStopAtPos(0, 17);
+         return jjStopAtPos(0, 16);
       case 123:
-         return jjStopAtPos(0, 24);
+         return jjStopAtPos(0, 21);
       default :
          return jjMoveNfa_3(0, 0);
    }
 }
-private int jjStartNfaWithStates_3(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_3(state, pos + 1);
-}
 static final long[] jjbitVec0 = {
    0x1L, 0x0L, 0x0L, 0x0L
 };
@@ -122,7 +83,7 @@
 private int jjMoveNfa_3(int startState, int curPos)
 {
    int startsAt = 0;
-   jjnewStateCnt = 36;
+   jjnewStateCnt = 28;
    int i = 1;
    jjstateSet[0] = startState;
    int kind = 0x7fffffff;
@@ -137,20 +98,12 @@
          {
             switch(jjstateSet[--i])
             {
-               case 36:
-               case 25:
-                  if ((0xfbfffcf8ffffd9ffL & l) == 0L)
-                     break;
-                  if (kind > 22)
-                     kind = 22;
-                  jjCheckNAddTwoStates(25, 26);
-                  break;
                case 0:
                   if ((0xfbffd4f8ffffd9ffL & l) != 0L)
                   {
-                     if (kind > 22)
-                        kind = 22;
-                     jjCheckNAddTwoStates(25, 26);
+                     if (kind > 18)
+                        kind = 18;
+                     jjCheckNAddTwoStates(20, 21);
                   }
                   else if ((0x100002600L & l) != 0L)
                   {
@@ -164,17 +117,6 @@
                      if (kind > 10)
                         kind = 10;
                   }
-                  if ((0x7bffd0f8ffffd9ffL & l) != 0L)
-                  {
-                     if (kind > 19)
-                        kind = 19;
-                     jjCheckNAddStates(3, 7);
-                  }
-                  else if (curChar == 42)
-                  {
-                     if (kind > 21)
-                        kind = 21;
-                  }
                   if (curChar == 38)
                      jjstateSet[jjnewStateCnt++] = 4;
                   break;
@@ -202,68 +144,45 @@
                   jjCheckNAddStates(0, 2);
                   break;
                case 18:
-                  if (curChar == 34 && kind > 18)
+                  if (curChar == 34 && kind > 17)
+                     kind = 17;
+                  break;
+               case 19:
+                  if ((0xfbffd4f8ffffd9ffL & l) == 0L)
+                     break;
+                  if (kind > 18)
                      kind = 18;
+                  jjCheckNAddTwoStates(20, 21);
                   break;
                case 20:
-                  if ((0x3ff000000000000L & l) == 0L)
+                  if ((0xfbfffcf8ffffd9ffL & l) == 0L)
                      break;
-                  if (kind > 20)
-                     kind = 20;
-                  jjAddStates(8, 9);
-                  break;
-               case 21:
-                  if (curChar == 46)
-                     jjCheckNAdd(22);
+                  if (kind > 18)
+                     kind = 18;
+                  jjCheckNAddTwoStates(20, 21);
                   break;
                case 22:
-                  if ((0x3ff000000000000L & l) == 0L)
-                     break;
-                  if (kind > 20)
-                     kind = 20;
-                  jjCheckNAdd(22);
-                  break;
-               case 23:
-                  if (curChar == 42 && kind > 21)
-                     kind = 21;
-                  break;
-               case 24:
-                  if ((0xfbffd4f8ffffd9ffL & l) == 0L)
-                     break;
-                  if (kind > 22)
-                     kind = 22;
-                  jjCheckNAddTwoStates(25, 26);
-                  break;
-               case 27:
-                  if (kind > 22)
-                     kind = 22;
-                  jjCheckNAddTwoStates(25, 26);
+                  if (kind > 18)
+                     kind = 18;
+                  jjCheckNAddTwoStates(20, 21);
                   break;
-               case 28:
-                  if ((0x7bffd0f8ffffd9ffL & l) == 0L)
+               case 25:
+                  if ((0x3ff000000000000L & l) == 0L)
                      break;
                   if (kind > 19)
                      kind = 19;
-                  jjCheckNAddStates(3, 7);
+                  jjAddStates(3, 4);
                   break;
-               case 29:
-                  if ((0x7bfff8f8ffffd9ffL & l) == 0L)
-                     break;
-                  if (kind > 19)
-                     kind = 19;
-                  jjCheckNAddTwoStates(29, 30);
+               case 26:
+                  if (curChar == 46)
+                     jjCheckNAdd(27);
                   break;
-               case 31:
+               case 27:
+                  if ((0x3ff000000000000L & l) == 0L)
+                     break;
                   if (kind > 19)
                      kind = 19;
-                  jjCheckNAddTwoStates(29, 30);
-                  break;
-               case 32:
-                  if ((0x7bfff8f8ffffd9ffL & l) != 0L)
-                     jjCheckNAddStates(10, 12);
-                  break;
-               case 34:
-                  jjCheckNAddStates(10, 12);
+                  jjCheckNAdd(27);
                   break;
                default : break;
             }
@@ -276,37 +195,21 @@
          {
             switch(jjstateSet[--i])
             {
-               case 36:
+               case 0:
                   if ((0x97ffffff87ffffffL & l) != 0L)
                   {
-                     if (kind > 22)
-                        kind = 22;
-                     jjCheckNAddTwoStates(25, 26);
+                     if (kind > 18)
+                        kind = 18;
+                     jjCheckNAddTwoStates(20, 21);
                   }
-                  else if (curChar == 92)
-                     jjCheckNAddTwoStates(27, 27);
-                  break;
-               case 0:
-                  if ((0x97ffffff87ffffffL & l) != 0L)
+                  else if (curChar == 126)
                   {
                      if (kind > 19)
                         kind = 19;
-                     jjCheckNAddStates(3, 7);
+                     jjstateSet[jjnewStateCnt++] = 25;
                   }
                   else if (curChar == 92)
-                     jjCheckNAddStates(13, 15);
-                  else if (curChar == 126)
-                  {
-                     if (kind > 20)
-                        kind = 20;
-                     jjstateSet[jjnewStateCnt++] = 20;
-                  }
-                  if ((0x97ffffff87ffffffL & l) != 0L)
-                  {
-                     if (kind > 22)
-                        kind = 22;
-                     jjCheckNAddTwoStates(25, 26);
-                  }
+                     jjCheckNAdd(22);
                   if (curChar == 78)
                      jjstateSet[jjnewStateCnt++] = 11;
                   else if (curChar == 124)
@@ -368,72 +271,32 @@
                   jjCheckNAddStates(0, 2);
                   break;
                case 19:
-                  if (curChar != 126)
-                     break;
-                  if (kind > 20)
-                     kind = 20;
-                  jjstateSet[jjnewStateCnt++] = 20;
-                  break;
-               case 24:
-                  if ((0x97ffffff87ffffffL & l) == 0L)
-                     break;
-                  if (kind > 22)
-                     kind = 22;
-                  jjCheckNAddTwoStates(25, 26);
-                  break;
-               case 25:
+               case 20:
                   if ((0x97ffffff87ffffffL & l) == 0L)
                      break;
-                  if (kind > 22)
-                     kind = 22;
-                  jjCheckNAddTwoStates(25, 26);
+                  if (kind > 18)
+                     kind = 18;
+                  jjCheckNAddTwoStates(20, 21);
                   break;
-               case 26:
+               case 21:
                   if (curChar == 92)
-                     jjCheckNAddTwoStates(27, 27);
+                     jjCheckNAddTwoStates(22, 22);
                   break;
-               case 27:
-                  if (kind > 22)
-                     kind = 22;
-                  jjCheckNAddTwoStates(25, 26);
-                  break;
-               case 28:
-                  if ((0x97ffffff87ffffffL & l) == 0L)
-                     break;
-                  if (kind > 19)
-                     kind = 19;
-                  jjCheckNAddStates(3, 7);
-                  break;
-               case 29:
-                  if ((0x97ffffff87ffffffL & l) == 0L)
-                     break;
-                  if (kind > 19)
-                     kind = 19;
-                  jjCheckNAddTwoStates(29, 30);
+               case 22:
+                  if (kind > 18)
+                     kind = 18;
+                  jjCheckNAddTwoStates(20, 21);
                   break;
-               case 30:
+               case 23:
                   if (curChar == 92)
-                     jjCheckNAddTwoStates(31, 31);
+                     jjCheckNAdd(22);
                   break;
-               case 31:
+               case 24:
+                  if (curChar != 126)
+                     break;
                   if (kind > 19)
                      kind = 19;
-                  jjCheckNAddTwoStates(29, 30);
-                  break;
-               case 32:
-                  if ((0x97ffffff87ffffffL & l) != 0L)
-                     jjCheckNAddStates(10, 12);
-                  break;
-               case 33:
-                  if (curChar == 92)
-                     jjCheckNAddTwoStates(34, 34);
-                  break;
-               case 34:
-                  jjCheckNAddStates(10, 12);
-                  break;
-               case 35:
-                  if (curChar == 92)
-                     jjCheckNAddStates(13, 15);
+                  jjstateSet[jjnewStateCnt++] = 25;
                   break;
                default : break;
             }
@@ -450,14 +313,6 @@
          {
             switch(jjstateSet[--i])
             {
-               case 36:
-               case 25:
-                  if (!jjCanMove_2(hiByte, i1, i2, l1, l2))
-                     break;
-                  if (kind > 22)
-                     kind = 22;
-                  jjCheckNAddTwoStates(25, 26);
-                  break;
                case 0:
                   if (jjCanMove_0(hiByte, i1, i2, l1, l2))
                   {
@@ -466,15 +321,9 @@
                   }
                   if (jjCanMove_2(hiByte, i1, i2, l1, l2))
                   {
-                     if (kind > 22)
-                        kind = 22;
-                     jjCheckNAddTwoStates(25, 26);
-                  }
-                  if (jjCanMove_2(hiByte, i1, i2, l1, l2))
-                  {
-                     if (kind > 19)
-                        kind = 19;
-                     jjCheckNAddStates(3, 7);
+                     if (kind > 18)
+                        kind = 18;
+                     jjCheckNAddTwoStates(20, 21);
                   }
                   break;
                case 15:
@@ -482,48 +331,20 @@
                   if (jjCanMove_1(hiByte, i1, i2, l1, l2))
                      jjCheckNAddStates(0, 2);
                   break;
-               case 24:
-                  if (!jjCanMove_2(hiByte, i1, i2, l1, l2))
-                     break;
-                  if (kind > 22)
-                     kind = 22;
-                  jjCheckNAddTwoStates(25, 26);
-                  break;
-               case 27:
-                  if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
-                     break;
-                  if (kind > 22)
-                     kind = 22;
-                  jjCheckNAddTwoStates(25, 26);
-                  break;
-               case 28:
-                  if (!jjCanMove_2(hiByte, i1, i2, l1, l2))
-                     break;
-                  if (kind > 19)
-                     kind = 19;
-                  jjCheckNAddStates(3, 7);
-                  break;
-               case 29:
+               case 19:
+               case 20:
                   if (!jjCanMove_2(hiByte, i1, i2, l1, l2))
                      break;
-                  if (kind > 19)
-                     kind = 19;
-                  jjCheckNAddTwoStates(29, 30);
+                  if (kind > 18)
+                     kind = 18;
+                  jjCheckNAddTwoStates(20, 21);
                   break;
-               case 31:
+               case 22:
                   if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
                      break;
-                  if (kind > 19)
-                     kind = 19;
-                  jjCheckNAddTwoStates(29, 30);
-                  break;
-               case 32:
-                  if (jjCanMove_2(hiByte, i1, i2, l1, l2))
-                     jjCheckNAddStates(10, 12);
-                  break;
-               case 34:
-                  if (jjCanMove_1(hiByte, i1, i2, l1, l2))
-                     jjCheckNAddStates(10, 12);
+                  if (kind > 18)
+                     kind = 18;
+                  jjCheckNAddTwoStates(20, 21);
                   break;
                default : break;
             }
@@ -536,7 +357,7 @@
          kind = 0x7fffffff;
       }
       ++curPos;
-      if ((i = jjnewStateCnt) == (startsAt = 36 - (jjnewStateCnt = startsAt)))
+      if ((i = jjnewStateCnt) == (startsAt = 28 - (jjnewStateCnt = startsAt)))
          return curPos;
       try { curChar = input_stream.readChar(); }
       catch(java.io.IOException e) { return curPos; }
@@ -547,9 +368,9 @@
    switch (pos)
    {
       case 0:
-         if ((active0 & 0x40000000L) != 0L)
+         if ((active0 & 0x8000000L) != 0L)
          {
-            jjmatchedKind = 33;
+            jjmatchedKind = 30;
             return 6;
          }
          return -1;
@@ -566,9 +387,9 @@
    switch(curChar)
    {
       case 84:
-         return jjMoveStringLiteralDfa1_1(0x40000000L);
+         return jjMoveStringLiteralDfa1_1(0x8000000L);
       case 125:
-         return jjStopAtPos(0, 31);
+         return jjStopAtPos(0, 28);
       default :
          return jjMoveNfa_1(0, 0);
    }
@@ -583,8 +404,8 @@
    switch(curChar)
    {
       case 79:
-         if ((active0 & 0x40000000L) != 0L)
-            return jjStartNfaWithStates_1(1, 30, 6);
+         if ((active0 & 0x8000000L) != 0L)
+            return jjStartNfaWithStates_1(1, 27, 6);
          break;
       default :
          break;
@@ -620,8 +441,8 @@
                case 0:
                   if ((0xfffffffeffffffffL & l) != 0L)
                   {
-                     if (kind > 33)
-                        kind = 33;
+                     if (kind > 30)
+                        kind = 30;
                      jjCheckNAdd(6);
                   }
                   if ((0x100002600L & l) != 0L)
@@ -638,21 +459,21 @@
                   break;
                case 2:
                   if ((0xfffffffbffffffffL & l) != 0L)
-                     jjCheckNAddStates(16, 18);
+                     jjCheckNAddStates(5, 7);
                   break;
                case 3:
                   if (curChar == 34)
-                     jjCheckNAddStates(16, 18);
+                     jjCheckNAddStates(5, 7);
                   break;
                case 5:
-                  if (curChar == 34 && kind > 32)
-                     kind = 32;
+                  if (curChar == 34 && kind > 29)
+                     kind = 29;
                   break;
                case 6:
                   if ((0xfffffffeffffffffL & l) == 0L)
                      break;
-                  if (kind > 33)
-                     kind = 33;
+                  if (kind > 30)
+                     kind = 30;
                   jjCheckNAdd(6);
                   break;
                default : break;
@@ -670,12 +491,12 @@
                case 6:
                   if ((0xdfffffffffffffffL & l) == 0L)
                      break;
-                  if (kind > 33)
-                     kind = 33;
+                  if (kind > 30)
+                     kind = 30;
                   jjCheckNAdd(6);
                   break;
                case 2:
-                  jjAddStates(16, 18);
+                  jjAddStates(5, 7);
                   break;
                case 4:
                   if (curChar == 92)
@@ -704,20 +525,20 @@
                   }
                   if (jjCanMove_1(hiByte, i1, i2, l1, l2))
                   {
-                     if (kind > 33)
-                        kind = 33;
+                     if (kind > 30)
+                        kind = 30;
                      jjCheckNAdd(6);
                   }
                   break;
                case 2:
                   if (jjCanMove_1(hiByte, i1, i2, l1, l2))
-                     jjAddStates(16, 18);
+                     jjAddStates(5, 7);
                   break;
                case 6:
                   if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
                      break;
-                  if (kind > 33)
-                     kind = 33;
+                  if (kind > 30)
+                     kind = 30;
                   jjCheckNAdd(6);
                   break;
                default : break;
@@ -762,9 +583,9 @@
                case 0:
                   if ((0x3ff000000000000L & l) == 0L)
                      break;
-                  if (kind > 25)
-                     kind = 25;
-                  jjAddStates(19, 20);
+                  if (kind > 22)
+                     kind = 22;
+                  jjAddStates(8, 9);
                   break;
                case 1:
                   if (curChar == 46)
@@ -773,8 +594,8 @@
                case 2:
                   if ((0x3ff000000000000L & l) == 0L)
                      break;
-                  if (kind > 25)
-                     kind = 25;
+                  if (kind > 22)
+                     kind = 22;
                   jjCheckNAdd(2);
                   break;
                default : break;
@@ -825,9 +646,9 @@
    switch (pos)
    {
       case 0:
-         if ((active0 & 0x4000000L) != 0L)
+         if ((active0 & 0x800000L) != 0L)
          {
-            jjmatchedKind = 29;
+            jjmatchedKind = 26;
             return 6;
          }
          return -1;
@@ -844,9 +665,9 @@
    switch(curChar)
    {
       case 84:
-         return jjMoveStringLiteralDfa1_2(0x4000000L);
+         return jjMoveStringLiteralDfa1_2(0x800000L);
       case 93:
-         return jjStopAtPos(0, 27);
+         return jjStopAtPos(0, 24);
       default :
          return jjMoveNfa_2(0, 0);
    }
@@ -861,8 +682,8 @@
    switch(curChar)
    {
       case 79:
-         if ((active0 & 0x4000000L) != 0L)
-            return jjStartNfaWithStates_2(1, 26, 6);
+         if ((active0 & 0x800000L) != 0L)
+            return jjStartNfaWithStates_2(1, 23, 6);
          break;
       default :
          break;
@@ -898,8 +719,8 @@
                case 0:
                   if ((0xfffffffeffffffffL & l) != 0L)
                   {
-                     if (kind > 29)
-                        kind = 29;
+                     if (kind > 26)
+                        kind = 26;
                      jjCheckNAdd(6);
                   }
                   if ((0x100002600L & l) != 0L)
@@ -916,21 +737,21 @@
                   break;
                case 2:
                   if ((0xfffffffbffffffffL & l) != 0L)
-                     jjCheckNAddStates(16, 18);
+                     jjCheckNAddStates(5, 7);
                   break;
                case 3:
                   if (curChar == 34)
-                     jjCheckNAddStates(16, 18);
+                     jjCheckNAddStates(5, 7);
                   break;
                case 5:
-                  if (curChar == 34 && kind > 28)
-                     kind = 28;
+                  if (curChar == 34 && kind > 25)
+                     kind = 25;
                   break;
                case 6:
                   if ((0xfffffffeffffffffL & l) == 0L)
                      break;
-                  if (kind > 29)
-                     kind = 29;
+                  if (kind > 26)
+                     kind = 26;
                   jjCheckNAdd(6);
                   break;
                default : break;
@@ -948,12 +769,12 @@
                case 6:
                   if ((0xffffffffdfffffffL & l) == 0L)
                      break;
-                  if (kind > 29)
-                     kind = 29;
+                  if (kind > 26)
+                     kind = 26;
                   jjCheckNAdd(6);
                   break;
                case 2:
-                  jjAddStates(16, 18);
+                  jjAddStates(5, 7);
                   break;
                case 4:
                   if (curChar == 92)
@@ -982,20 +803,20 @@
                   }
                   if (jjCanMove_1(hiByte, i1, i2, l1, l2))
                   {
-                     if (kind > 29)
-                        kind = 29;
+                     if (kind > 26)
+                        kind = 26;
                      jjCheckNAdd(6);
                   }
                   break;
                case 2:
                   if (jjCanMove_1(hiByte, i1, i2, l1, l2))
-                     jjAddStates(16, 18);
+                     jjAddStates(5, 7);
                   break;
                case 6:
                   if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
                      break;
-                  if (kind > 29)
-                     kind = 29;
+                  if (kind > 26)
+                     kind = 26;
                   jjCheckNAdd(6);
                   break;
                default : break;
@@ -1016,8 +837,7 @@
    }
 }
 static final int[] jjnextStates = {
-   15, 16, 18, 29, 32, 23, 33, 30, 20, 21, 32, 23, 33, 31, 34, 27, 
-   2, 4, 5, 0, 1, 
+   15, 16, 18, 25, 26, 2, 4, 5, 0, 1, 
 };
 private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
 {
@@ -1059,8 +879,8 @@
 /** Token literal values. */
 public static final String[] jjstrLiteralImages = {
 "", null, null, null, null, null, null, null, null, null, null, "\53", "\55", 
-"\50", "\51", "\72", "\52", "\136", null, null, null, null, null, "\133", "\173", 
-null, "\124\117", "\135", null, null, "\124\117", "\175", null, null, };
+"\50", "\51", "\72", "\136", null, null, null, "\133", "\173", null, "\124\117", 
+"\135", null, null, "\124\117", "\175", null, null, };
 
 /** Lexer state names. */
 public static final String[] lexStateNames = {
@@ -1072,18 +892,18 @@
 
 /** Lex State array. */
 public static final int[] jjnewLexState = {
-   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, 2, 1, 
-   3, -1, 3, -1, -1, -1, 3, -1, -1, 
+   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, 2, 1, 3, -1, 3, 
+   -1, -1, -1, 3, -1, -1, 
 };
 static final long[] jjtoToken = {
-   0x3ffffff01L, 
+   0x7fffff01L, 
 };
 static final long[] jjtoSkip = {
    0x80L, 
 };
 protected JavaCharStream input_stream;
-private final int[] jjrounds = new int[36];
-private final int[] jjstateSet = new int[72];
+private final int[] jjrounds = new int[28];
+private final int[] jjstateSet = new int[56];
 protected char curChar;
 /** Constructor. */
 public StandardSyntaxParserTokenManager(JavaCharStream stream){
@@ -1110,7 +930,7 @@
 {
    int i;
    jjround = 0x80000001;
-   for (i = 36; i-- > 0;)
+   for (i = 28; i-- > 0;)
       jjrounds[i] = 0x80000000;
 }
 

Modified: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/Token.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/Token.java?rev=805633&r1=805632&r2=805633&view=diff
==============================================================================
--- lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/Token.java (original)
+++ lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/Token.java Wed Aug 19 00:09:41 2009
@@ -128,4 +128,4 @@
   }
 
 }
-/* JavaCC - StandardChecksum=f9eb36a076cde62bf39ccbf828bc2117 (do not edit this line) */
+/* JavaCC - OriginalChecksum=75998e81abbed08b0922a65bec11680d (do not edit this line) */

Modified: lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/TokenMgrError.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/TokenMgrError.java?rev=805633&r1=805632&r2=805633&view=diff
==============================================================================
--- lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/TokenMgrError.java (original)
+++ lucene/java/trunk/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/TokenMgrError.java Wed Aug 19 00:09:41 2009
@@ -144,4 +144,4 @@
     this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
   }
 }
-/* JavaCC - StandardChecksum=91ba9c9f5e0e552a815530d639ce15ed (do not edit this line) */
+/* JavaCC - OriginalChecksum=9672a6de7ecf4f5789a473d7dd40f6fb (do not edit this line) */



Mime
View raw message