You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by si...@apache.org on 2012/09/21 19:22:27 UTC

svn commit: r1388574 [26/45] - in /lucene/dev/branches/LUCENE-2878: ./ dev-tools/ dev-tools/eclipse/ dev-tools/eclipse/dot.settings/ dev-tools/idea/ dev-tools/idea/.idea/ dev-tools/idea/.idea/libraries/ dev-tools/idea/lucene/ dev-tools/idea/lucene/anal...

Modified: lucene/dev/branches/LUCENE-2878/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TFValueSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TFValueSource.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TFValueSource.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TFValueSource.java Fri Sep 21 17:21:34 2012
@@ -28,6 +28,13 @@ import org.apache.lucene.util.BytesRef;
 import java.io.IOException;
 import java.util.Map;
 
+/** 
+ * Function that returns {@link TFIDFSimilarity#tf(int)}
+ * for every document.
+ * <p>
+ * Note that the configured Similarity for the field must be
+ * a subclass of {@link TFIDFSimilarity}
+ * @lucene.internal */
 public class TFValueSource extends TermFreqValueSource {
   public TFValueSource(String field, String val, String indexedField, BytesRef indexedBytes) {
     super(field, val, indexedField, indexedBytes);

Modified: lucene/dev/branches/LUCENE-2878/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TermFreqValueSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TermFreqValueSource.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TermFreqValueSource.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TermFreqValueSource.java Fri Sep 21 17:21:34 2012
@@ -26,6 +26,13 @@ import org.apache.lucene.util.BytesRef;
 import java.io.IOException;
 import java.util.Map;
 
+/**
+ * Function that returns {@link DocsEnum#freq()} for the
+ * supplied term in every document.
+ * <p>
+ * If the term does not exist in the document, returns 0.
+ * If frequencies are omitted, returns 1.
+ */
 public class TermFreqValueSource extends DocFreqValueSource {
   public TermFreqValueSource(String field, String val, String indexedField, BytesRef indexedBytes) {
     super(field, val, indexedField, indexedBytes);

Modified: lucene/dev/branches/LUCENE-2878/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TotalTermFreqValueSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TotalTermFreqValueSource.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TotalTermFreqValueSource.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TotalTermFreqValueSource.java Fri Sep 21 17:21:34 2012
@@ -18,6 +18,7 @@
 package org.apache.lucene.queries.function.valuesource;
 
 import org.apache.lucene.index.AtomicReaderContext;
+import org.apache.lucene.index.Term;
 import org.apache.lucene.queries.function.FunctionValues;
 import org.apache.lucene.queries.function.ValueSource;
 import org.apache.lucene.queries.function.docvalues.LongDocValues;
@@ -28,7 +29,10 @@ import java.io.IOException;
 import java.util.Map;
 
 /**
- * <code>TotalTermFreqValueSource</code> returns the total term freq (sum of term freqs across all docuyments).
+ * <code>TotalTermFreqValueSource</code> returns the total term freq 
+ * (sum of term freqs across all documents).
+ * Returns -1 if frequencies were omitted for the field, or if 
+ * the codec doesn't support this statistic.
  * @lucene.internal
  */
 public class TotalTermFreqValueSource extends ValueSource {
@@ -62,7 +66,7 @@ public class TotalTermFreqValueSource ex
   public void createWeight(Map context, IndexSearcher searcher) throws IOException {
     long totalTermFreq = 0;
     for (AtomicReaderContext readerContext : searcher.getTopReaderContext().leaves()) {
-      long val = readerContext.reader().totalTermFreq(indexedField, indexedBytes);
+      long val = readerContext.reader().totalTermFreq(new Term(indexedField, indexedBytes));
       if (val == -1) {
         totalTermFreq = -1;
         break;

Modified: lucene/dev/branches/LUCENE-2878/lucene/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java Fri Sep 21 17:21:34 2012
@@ -26,6 +26,8 @@ import org.apache.lucene.index.Fields;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.IndexableField;
 import org.apache.lucene.index.MultiFields;
+import org.apache.lucene.index.StorableField;
+import org.apache.lucene.index.StoredDocument;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.index.Terms;
 import org.apache.lucene.index.TermsEnum;
@@ -715,9 +717,9 @@ public final class MoreLikeThis {
 
       // field does not store term vector info
       if (vector == null) {
-        Document d = ir.document(docNum);
-        IndexableField fields[] = d.getFields(fieldName);
-        for (IndexableField field : fields) {
+        StoredDocument d = ir.document(docNum);
+        StorableField[] fields = d.getFields(fieldName);
+        for (StorableField field : fields) {
           final String stringValue = field.stringValue();
           if (stringValue != null) {
             addTermFrequencies(new StringReader(stringValue), termFreqMap, fieldName);

Modified: lucene/dev/branches/LUCENE-2878/lucene/queries/src/test/org/apache/lucene/queries/BooleanFilterTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queries/src/test/org/apache/lucene/queries/BooleanFilterTest.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queries/src/test/org/apache/lucene/queries/BooleanFilterTest.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queries/src/test/org/apache/lucene/queries/BooleanFilterTest.java Fri Sep 21 17:21:34 2012
@@ -132,7 +132,7 @@ public class BooleanFilterTest extends L
   private void tstFilterCard(String mes, int expected, Filter filt)
       throws Exception {
     // BooleanFilter never returns null DIS or null DISI!
-    DocIdSetIterator disi = filt.getDocIdSet(reader.getTopReaderContext(), reader.getLiveDocs()).iterator();
+    DocIdSetIterator disi = filt.getDocIdSet(reader.getContext(), reader.getLiveDocs()).iterator();
     int actual = 0;
     while (disi.nextDoc() != DocIdSetIterator.NO_MORE_DOCS) {
       actual++;

Modified: lucene/dev/branches/LUCENE-2878/lucene/queries/src/test/org/apache/lucene/queries/TermsFilterTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queries/src/test/org/apache/lucene/queries/TermsFilterTest.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queries/src/test/org/apache/lucene/queries/TermsFilterTest.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queries/src/test/org/apache/lucene/queries/TermsFilterTest.java Fri Sep 21 17:21:34 2012
@@ -62,8 +62,8 @@ public class TermsFilterTest extends Luc
       w.addDocument(doc);
     }
     IndexReader reader = new SlowCompositeReaderWrapper(w.getReader());
-    assertTrue(reader.getTopReaderContext() instanceof AtomicReaderContext);
-    AtomicReaderContext context = (AtomicReaderContext) reader.getTopReaderContext();
+    assertTrue(reader.getContext() instanceof AtomicReaderContext);
+    AtomicReaderContext context = (AtomicReaderContext) reader.getContext();
     w.close();
 
     TermsFilter tf = new TermsFilter();
@@ -110,7 +110,7 @@ public class TermsFilterTest extends Luc
     tf.addTerm(new Term(fieldName, "content1"));
     
     MultiReader multi = new MultiReader(reader1, reader2);
-    for (AtomicReaderContext context : multi.getTopReaderContext().leaves()) {
+    for (AtomicReaderContext context : multi.leaves()) {
       FixedBitSet bits = (FixedBitSet) tf.getDocIdSet(context, context.reader().getLiveDocs());
       assertTrue("Must be >= 0", bits.cardinality() >= 0);      
     }

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/build.xml?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/build.xml (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/build.xml Fri Sep 21 17:21:34 2012
@@ -39,15 +39,10 @@
     </invoke-module-javadoc>
   </target>
 
-  <target name="javacc" depends="init,javacc-check,javacc-QueryParser,javacc-surround,javacc-flexible"/>
-
-  <target name="javacc-QueryParser" depends="init,javacc-check" if="javacc.present">
+  <target name="javacc" depends="javacc-QueryParser,javacc-surround,javacc-flexible"/>
+  
+  <target name="javacc-QueryParser" depends="resolve-javacc">
     <sequential>
-      <delete>
-        <fileset dir="src/java/org/apache/lucene/queryparser/classic" includes="*.java">
-          <containsregexp expression="Generated.*By.*JavaCC"/>
-        </fileset>
-      </delete>
       <invoke-javacc target="src/java/org/apache/lucene/queryparser/classic/QueryParser.jj"
                      outputDir="src/java/org/apache/lucene/queryparser/classic"/>
 
@@ -64,23 +59,13 @@
     </sequential>
   </target>
 
-  <target name="javacc-surround" depends="javacc-check" description="generate surround query parser from jj (requires javacc 4.1">
-    <delete>
-      <fileset dir="src/java/org/apache/lucene/queryparser/surround/parser" includes="*.java">
-        <containsregexp expression="Generated.*By.*JavaCC"/>
-      </fileset>
-    </delete>
+  <target name="javacc-surround" depends="resolve-javacc" description="generate surround query parser">
   	<invoke-javacc target="src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.jj"
                    outputDir="src/java/org/apache/lucene/queryparser/surround/parser"
     />
   </target>
 
-  <target name="javacc-flexible" depends="javacc-check">
-    <delete>
-      <fileset dir="src/java/org/apache/lucene/queryparser/flexible/standard/parser" includes="*.java">
-        <containsregexp expression="Generated.*By.*JavaCC"/>
-      </fileset>
-    </delete>
+  <target name="javacc-flexible" depends="resolve-javacc">
     <invoke-javacc target="src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.jj"
                    outputDir="src/java/org/apache/lucene/queryparser/flexible/standard/parser"
     />
@@ -138,4 +123,33 @@ import org.apache.lucene.queryparser.fle
                              byline="true"/>
   </target>
 
+  <target name="resolve-javacc" xmlns:ivy="antlib:org.apache.ivy.ant">
+    <!-- setup a "fake" JavaCC distribution folder in ${build.dir} to make JavaCC ANT task happy: -->
+    <ivy:retrieve organisation="net.java.dev.javacc" module="javacc" revision="5.0"
+      inline="true" conf="default" transitive="false" type="jar" sync="true"
+      pattern="${build.dir}/javacc/bin/lib/[artifact].[ext]"/>
+  </target>
+
+  <macrodef name="invoke-javacc">
+    <attribute name="target"/>
+    <attribute name="outputDir"/>
+    <sequential>
+      <mkdir dir="@{outputDir}"/>
+      <delete>
+        <fileset dir="@{outputDir}" includes="*.java">
+          <containsregexp expression="Generated.*By.*JavaCC"/>
+        </fileset>
+      </delete>
+      <javacc
+          target="@{target}"
+          outputDirectory="@{outputDir}"
+          javacchome="${build.dir}/javacc"
+          jdkversion="${javac.source}"
+      />
+      <fixcrlf srcdir="@{outputDir}" includes="*.java" encoding="UTF-8">
+        <containsregexp expression="Generated.*By.*JavaCC"/>
+      </fixcrlf>
+    </sequential>
+  </macrodef>
+
 </project>

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/CharStream.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/CharStream.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/CharStream.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/CharStream.java Fri Sep 21 17:21:34 2012
@@ -1,5 +1,5 @@
-/* Generated By:JavaCC: Do not edit this line. CharStream.java Version 4.1 */
-/* JavaCCOptions:STATIC=false */
+/* Generated By:JavaCC: Do not edit this line. CharStream.java Version 5.0 */
+/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
 package org.apache.lucene.queryparser.classic;
 
 /**
@@ -17,7 +17,8 @@ package org.apache.lucene.queryparser.cl
  * operation.
  */
 
-public interface CharStream {
+public
+interface CharStream {
 
   /**
    * Returns the next character from the selected input.  The method
@@ -26,6 +27,7 @@ public interface CharStream {
    */
   char readChar() throws java.io.IOException;
 
+  @Deprecated
   /**
    * Returns the column position of the character last read.
    * @deprecated
@@ -33,6 +35,7 @@ public interface CharStream {
    */
   int getColumn();
 
+  @Deprecated
   /**
    * Returns the line number of the character last read.
    * @deprecated
@@ -109,4 +112,4 @@ public interface CharStream {
   void Done();
 
 }
-/* JavaCC - OriginalChecksum=0790771f0d47abfd976f028fa2364b0f (do not edit this line) */
+/* JavaCC - OriginalChecksum=30b94cad7b10d0d81e3a59a1083939d0 (do not edit this line) */

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/FastCharStream.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/FastCharStream.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/FastCharStream.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/FastCharStream.java Fri Sep 21 17:21:34 2012
@@ -29,13 +29,13 @@ import java.io.*;
 public final class FastCharStream implements CharStream {
   char[] buffer = null;
 
-  int bufferLength = 0;				  // end of valid chars
-  int bufferPosition = 0;			  // next char to read
+  int bufferLength = 0;          // end of valid chars
+  int bufferPosition = 0;        // next char to read
 
-  int tokenStart = 0;				  // offset in buffer
-  int bufferStart = 0;				  // position in file of buffer
+  int tokenStart = 0;          // offset in buffer
+  int bufferStart = 0;          // position in file of buffer
 
-  Reader input;					  // source of chars
+  Reader input;            // source of chars
 
   /** Constructs from a Reader. */
   public FastCharStream(Reader r) {
@@ -51,24 +51,24 @@ public final class FastCharStream implem
   private final void refill() throws IOException {
     int newPosition = bufferLength - tokenStart;
 
-    if (tokenStart == 0) {			  // token won't fit in buffer
-      if (buffer == null) {			  // first time: alloc buffer
-	buffer = new char[2048];
+    if (tokenStart == 0) {        // token won't fit in buffer
+      if (buffer == null) {        // first time: alloc buffer
+  buffer = new char[2048];
       } else if (bufferLength == buffer.length) { // grow buffer
-	char[] newBuffer = new char[buffer.length*2];
-	System.arraycopy(buffer, 0, newBuffer, 0, bufferLength);
-	buffer = newBuffer;
+  char[] newBuffer = new char[buffer.length*2];
+  System.arraycopy(buffer, 0, newBuffer, 0, bufferLength);
+  buffer = newBuffer;
       }
-    } else {					  // shift token to front
+    } else {            // shift token to front
       System.arraycopy(buffer, tokenStart, buffer, 0, newPosition);
     }
 
-    bufferLength = newPosition;			  // update state
+    bufferLength = newPosition;        // update state
     bufferPosition = newPosition;
     bufferStart += tokenStart;
     tokenStart = 0;
 
-    int charsRead =				  // fill space in buffer
+    int charsRead =          // fill space in buffer
       input.read(buffer, newPosition, buffer.length-newPosition);
     if (charsRead == -1)
       throw new IOException("read past eof");

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/MultiFieldQueryParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/MultiFieldQueryParser.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/MultiFieldQueryParser.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/MultiFieldQueryParser.java Fri Sep 21 17:21:34 2012
@@ -253,8 +253,9 @@ public class MultiFieldQueryParser exten
    * Parses a query, searching on the fields specified.
    * Use this if you need to specify certain fields as required,
    * and others as prohibited.
-   * <p><pre>
+   * <p>
    * Usage:
+   * <pre class="prettyprint">
    * <code>
    * String[] fields = {"filename", "contents", "description"};
    * BooleanClause.Occur[] flags = {BooleanClause.Occur.SHOULD,
@@ -300,8 +301,9 @@ public class MultiFieldQueryParser exten
    * Parses a query, searching on the fields specified.
    * Use this if you need to specify certain fields as required,
    * and others as prohibited.
-   * <p><pre>
+   * <p>
    * Usage:
+   * <pre class="prettyprint">
    * <code>
    * String[] query = {"query1", "query2", "query3"};
    * String[] fields = {"filename", "contents", "description"};

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/ParseException.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/ParseException.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/ParseException.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/ParseException.java Fri Sep 21 17:21:34 2012
@@ -1,4 +1,4 @@
-/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 4.1 */
+/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 5.0 */
 /* JavaCCOptions:KEEP_LINE_COL=null */
 package org.apache.lucene.queryparser.classic;
 
@@ -14,24 +14,24 @@ package org.apache.lucene.queryparser.cl
 public class ParseException extends Exception {
 
   /**
+   * The version identifier for this Serializable class.
+   * Increment only if the <i>serialized</i> form of the
+   * class changes.
+   */
+  private static final long serialVersionUID = 1L;
+
+  /**
    * This constructor is used by the method "generateParseException"
    * in the generated parser.  Calling this constructor generates
    * a new object of this type with the fields "currentToken",
-   * "expectedTokenSequences", and "tokenImage" set.  The boolean
-   * flag "specialConstructor" is also set to true to indicate that
-   * this constructor was used to create this object.
-   * This constructor calls its super class with the empty string
-   * to force the "toString" method of parent class "Throwable" to
-   * print the error message in the form:
-   *     ParseException: <result of getMessage>
+   * "expectedTokenSequences", and "tokenImage" set.
    */
   public ParseException(Token currentTokenVal,
                         int[][] expectedTokenSequencesVal,
                         String[] tokenImageVal
                        )
   {
-    super("");
-    specialConstructor = true;
+    super(initialise(currentTokenVal, expectedTokenSequencesVal, tokenImageVal));
     currentToken = currentTokenVal;
     expectedTokenSequences = expectedTokenSequencesVal;
     tokenImage = tokenImageVal;
@@ -49,33 +49,13 @@ public class ParseException extends Exce
 
   public ParseException() {
     super();
-    specialConstructor = false;
   }
 
   /** Constructor with message. */
   public ParseException(String message) {
     super(message);
-    specialConstructor = false;
   }
 
-  /**
-   * Creates a new ParseException which is wrapping another Throwable with an
-   * additional message
-   *
-   * @param message Message for the Exception
-   * @param throwable Wrapped Throwable
-   */
-  public ParseException(String message, Throwable throwable) {
-    super(message, throwable);
-    specialConstructor = false;
-  }
-
-  /**
-   * This variable determines which constructor was used to create
-   * this object and thereby affects the semantics of the
-   * "getMessage" method (see below).
-   */
-  protected boolean specialConstructor;
 
   /**
    * This is the last token that has been consumed successfully.  If
@@ -99,19 +79,16 @@ public class ParseException extends Exce
   public String[] tokenImage;
 
   /**
-   * This method has the standard behavior when this object has been
-   * created using the standard constructors.  Otherwise, it uses
-   * "currentToken" and "expectedTokenSequences" to generate a parse
+   * It uses "currentToken" and "expectedTokenSequences" to generate a parse
    * error message and returns it.  If this object has been created
    * due to a parse error, and you do not catch it (it gets thrown
-   * from the parser), then this method is called during the printing
-   * of the final stack trace, and hence the correct error message
+   * from the parser) the correct error message
    * gets displayed.
    */
-  public String getMessage() {
-    if (!specialConstructor) {
-      return super.getMessage();
-    }
+  private static String initialise(Token currentToken,
+                           int[][] expectedTokenSequences,
+                           String[] tokenImage) {
+    String eol = System.getProperty("line.separator", "\n");
     StringBuffer expected = new StringBuffer();
     int maxSize = 0;
     for (int i = 0; i < expectedTokenSequences.length; i++) {
@@ -161,7 +138,7 @@ public class ParseException extends Exce
    * when these raw version cannot be used as part of an ASCII
    * string literal.
    */
-  protected String add_escapes(String str) {
+  static String add_escapes(String str) {
       StringBuffer retval = new StringBuffer();
       char ch;
       for (int i = 0; i < str.length(); i++) {
@@ -207,4 +184,4 @@ public class ParseException extends Exce
    }
 
 }
-/* JavaCC - OriginalChecksum=f669ffb14d5be55de6298772ac9befeb (do not edit this line) */
+/* JavaCC - OriginalChecksum=b187d97d5bb75c3fc63d642c1c26ac6e (do not edit this line) */

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.java Fri Sep 21 17:21:34 2012
@@ -44,8 +44,8 @@ import org.apache.lucene.util.Version;
  *
  * <p>
  * Examples of appropriately formatted queries can be found in the <a
- * href="{@docRoot}/org/apache/lucene/queryparser/classic/package-summary.html#package_description">
- * query syntax documentation</a>
+ * href="{@docRoot}/org/apache/lucene/queryparser/classic/package-summary.html#package_description">query syntax
+ * documentation</a>.
  * </p>
  *
  * <p>
@@ -76,6 +76,14 @@ import org.apache.lucene.util.Version;
  * <p><b>NOTE</b>: there is a new QueryParser in contrib, which matches
  * the same syntax as this class, but is more modular,
  * enabling substantial customization to how a query is created.
+ *
+ * <a name="version"/>
+ * <p><b>NOTE</b>: You must specify the required {@link Version}
+ * compatibility when creating QueryParser:
+ * <ul>
+ *    <li> As of 3.1, {@link #setAutoGeneratePhraseQueries} is false by
+ *         default.
+ * </ul>
  */
 public class QueryParser extends QueryParserBase implements QueryParserConstants {
   /** The default operator for parsing queries.
@@ -84,7 +92,7 @@ public class QueryParser extends QueryPa
   static public enum Operator { OR, AND }
 
   /** Create a query parser.
-   *  @param matchVersion  Lucene version to match.
+   *  @param matchVersion  Lucene version to match. See <a href="#version">above</a>.
    *  @param f  the default field for query terms.
    *  @param a   used to find terms in the query text.
    */
@@ -158,10 +166,10 @@ public class QueryParser extends QueryPa
 
 // This makes sure that there is no garbage after the query string
   final public Query TopLevelQuery(String field) throws ParseException {
-        Query q;
+  Query q;
     q = Query(field);
     jj_consume_token(0);
-                {if (true) return q;}
+    {if (true) return q;}
     throw new Error("Missing return statement in function");
   }
 
@@ -632,7 +640,7 @@ public class QueryParser extends QueryPa
       return (jj_ntk = jj_nt.kind);
   }
 
-  private java.util.List jj_expentries = new java.util.ArrayList();
+  private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>();
   private int[] jj_expentry;
   private int jj_kind = -1;
   private int[] jj_lasttokens = new int[100];
@@ -647,7 +655,7 @@ public class QueryParser extends QueryPa
       for (int i = 0; i < jj_endpos; i++) {
         jj_expentry[i] = jj_lasttokens[i];
       }
-      jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) {
+      jj_entries_loop: for (java.util.Iterator<?> it = jj_expentries.iterator(); it.hasNext();) {
         int[] oldentry = (int[])(it.next());
         if (oldentry.length == jj_expentry.length) {
           for (int i = 0; i < jj_expentry.length; i++) {
@@ -695,7 +703,7 @@ public class QueryParser extends QueryPa
     jj_add_error_token(0, 0);
     int[][] exptokseq = new int[jj_expentries.size()][];
     for (int i = 0; i < jj_expentries.size(); i++) {
-      exptokseq[i] = (int[])jj_expentries.get(i);
+      exptokseq[i] = jj_expentries.get(i);
     }
     return new ParseException(token, exptokseq, tokenImage);
   }

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.jj
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.jj?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.jj (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.jj Fri Sep 21 17:21:34 2012
@@ -68,7 +68,7 @@ import org.apache.lucene.util.Version;
  *
  * <p>
  * Examples of appropriately formatted queries can be found in the <a
- * href="../../../../../../queryparsersyntax.html">query syntax
+ * href="{@docRoot}/org/apache/lucene/queryparser/classic/package-summary.html#package_description">query syntax
  * documentation</a>.
  * </p>
  *
@@ -211,13 +211,13 @@ int Modifiers() : {
 // This makes sure that there is no garbage after the query string
 Query TopLevelQuery(String field) : 
 {
-	Query q;
+  Query q;
 }
 {
-	q=Query(field) <EOF>
-	{
-		return q;
-	}
+  q=Query(field) <EOF>
+  {
+    return q;
+  }
 }
 
 Query Query(String field) :

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java Fri Sep 21 17:21:34 2012
@@ -482,7 +482,9 @@ public abstract class QueryParserBase im
       source = analyzer.tokenStream(field, new StringReader(queryText));
       source.reset();
     } catch (IOException e) {
-      throw new ParseException("Unable to initialize TokenStream to analyze query text", e);
+      ParseException p = new ParseException("Unable to initialize TokenStream to analyze query text");
+      p.initCause(e);
+      throw p;
     }
     CachingTokenFilter buffer = new CachingTokenFilter(source);
     TermToBytesRefAttribute termAtt = null;
@@ -527,7 +529,9 @@ public abstract class QueryParserBase im
       source.close();
     }
     catch (IOException e) {
-      throw new ParseException("Cannot close TokenStream analyzing query text", e);
+      ParseException p = new ParseException("Cannot close TokenStream analyzing query text");
+      p.initCause(e);
+      throw p;
     }
 
     BytesRef bytes = termAtt == null ? null : termAtt.getBytesRef();

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/Token.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/Token.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/Token.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/Token.java Fri Sep 21 17:21:34 2012
@@ -1,12 +1,19 @@
-/* Generated By:JavaCC: Do not edit this line. Token.java Version 4.1 */
-/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null */
+/* Generated By:JavaCC: Do not edit this line. Token.java Version 5.0 */
+/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
 package org.apache.lucene.queryparser.classic;
 
 /**
  * Describes the input token stream.
  */
 
-public class Token {
+public class Token implements java.io.Serializable {
+
+  /**
+   * The version identifier for this Serializable class.
+   * Increment only if the <i>serialized</i> form of the
+   * class changes.
+   */
+  private static final long serialVersionUID = 1L;
 
   /**
    * An integer that describes the kind of this token.  This numbering
@@ -75,7 +82,7 @@ public class Token {
    */
   public Token(int kind)
   {
-     this(kind, null);
+    this(kind, null);
   }
 
   /**
@@ -83,8 +90,8 @@ public class Token {
    */
   public Token(int kind, String image)
   {
-     this.kind = kind;
-     this.image = image;
+    this.kind = kind;
+    this.image = image;
   }
 
   /**
@@ -92,7 +99,7 @@ public class Token {
    */
   public String toString()
   {
-     return image;
+    return image;
   }
 
   /**
@@ -109,16 +116,16 @@ public class Token {
    */
   public static Token newToken(int ofKind, String image)
   {
-     switch(ofKind)
-     {
-       default : return new Token(ofKind, image);
-     }
+    switch(ofKind)
+    {
+      default : return new Token(ofKind, image);
+    }
   }
 
   public static Token newToken(int ofKind)
   {
-     return newToken(ofKind, null);
+    return newToken(ofKind, null);
   }
 
 }
-/* JavaCC - OriginalChecksum=9f74ef8b727ef4e5dafb84a45b3584c9 (do not edit this line) */
+/* JavaCC - OriginalChecksum=405bb5d2fcd84e94ac1c8f0b12c1f914 (do not edit this line) */

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/TokenMgrError.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/TokenMgrError.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/TokenMgrError.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/TokenMgrError.java Fri Sep 21 17:21:34 2012
@@ -1,141 +1,147 @@
-/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 4.1 */
+/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 5.0 */
 /* JavaCCOptions: */
 package org.apache.lucene.queryparser.classic;
 
 /** Token Manager Error. */
-@SuppressWarnings("serial")
 public class TokenMgrError extends Error
 {
 
-   /*
-    * Ordinals for various reasons why an Error of this type can be thrown.
-    */
-
-   /**
-    * Lexical error occurred.
-    */
-   static final int LEXICAL_ERROR = 0;
-
-   /**
-    * An attempt was made to create a second instance of a static token manager.
-    */
-   static final int STATIC_LEXER_ERROR = 1;
-
-   /**
-    * Tried to change to an invalid lexical state.
-    */
-   static final int INVALID_LEXICAL_STATE = 2;
-
-   /**
-    * Detected (and bailed out of) an infinite loop in the token manager.
-    */
-   static final int LOOP_DETECTED = 3;
-
-   /**
-    * Indicates the reason why the exception is thrown. It will have
-    * one of the above 4 values.
-    */
-   int errorCode;
-
-   /**
-    * Replaces unprintable characters by their escaped (or unicode escaped)
-    * equivalents in the given string
-    */
-   protected static final String addEscapes(String str) {
-      StringBuffer retval = new StringBuffer();
-      char ch;
-      for (int i = 0; i < str.length(); i++) {
-        switch (str.charAt(i))
-        {
-           case 0 :
-              continue;
-           case '\b':
-              retval.append("\\b");
-              continue;
-           case '\t':
-              retval.append("\\t");
-              continue;
-           case '\n':
-              retval.append("\\n");
-              continue;
-           case '\f':
-              retval.append("\\f");
-              continue;
-           case '\r':
-              retval.append("\\r");
-              continue;
-           case '\"':
-              retval.append("\\\"");
-              continue;
-           case '\'':
-              retval.append("\\\'");
-              continue;
-           case '\\':
-              retval.append("\\\\");
-              continue;
-           default:
-              if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
-                 String s = "0000" + Integer.toString(ch, 16);
-                 retval.append("\\u" + s.substring(s.length() - 4, s.length()));
-              } else {
-                 retval.append(ch);
-              }
-              continue;
-        }
+  /**
+   * The version identifier for this Serializable class.
+   * Increment only if the <i>serialized</i> form of the
+   * class changes.
+   */
+  private static final long serialVersionUID = 1L;
+
+  /*
+   * Ordinals for various reasons why an Error of this type can be thrown.
+   */
+
+  /**
+   * Lexical error occurred.
+   */
+  static final int LEXICAL_ERROR = 0;
+
+  /**
+   * An attempt was made to create a second instance of a static token manager.
+   */
+  static final int STATIC_LEXER_ERROR = 1;
+
+  /**
+   * Tried to change to an invalid lexical state.
+   */
+  static final int INVALID_LEXICAL_STATE = 2;
+
+  /**
+   * Detected (and bailed out of) an infinite loop in the token manager.
+   */
+  static final int LOOP_DETECTED = 3;
+
+  /**
+   * Indicates the reason why the exception is thrown. It will have
+   * one of the above 4 values.
+   */
+  int errorCode;
+
+  /**
+   * Replaces unprintable characters by their escaped (or unicode escaped)
+   * equivalents in the given string
+   */
+  protected static final String addEscapes(String str) {
+    StringBuffer retval = new StringBuffer();
+    char ch;
+    for (int i = 0; i < str.length(); i++) {
+      switch (str.charAt(i))
+      {
+        case 0 :
+          continue;
+        case '\b':
+          retval.append("\\b");
+          continue;
+        case '\t':
+          retval.append("\\t");
+          continue;
+        case '\n':
+          retval.append("\\n");
+          continue;
+        case '\f':
+          retval.append("\\f");
+          continue;
+        case '\r':
+          retval.append("\\r");
+          continue;
+        case '\"':
+          retval.append("\\\"");
+          continue;
+        case '\'':
+          retval.append("\\\'");
+          continue;
+        case '\\':
+          retval.append("\\\\");
+          continue;
+        default:
+          if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
+            String s = "0000" + Integer.toString(ch, 16);
+            retval.append("\\u" + s.substring(s.length() - 4, s.length()));
+          } else {
+            retval.append(ch);
+          }
+          continue;
       }
-      return retval.toString();
-   }
-
-   /**
-    * Returns a detailed message for the Error when it is thrown by the
-    * token manager to indicate a lexical error.
-    * Parameters :
-    *    EOFSeen     : indicates if EOF caused the lexical error
-    *    curLexState : lexical state in which this error occurred
-    *    errorLine   : line number when the error occurred
-    *    errorColumn : column number when the error occurred
-    *    errorAfter  : prefix that was seen before this error occurred
-    *    curchar     : the offending character
-    * Note: You can customize the lexical error message by modifying this method.
-    */
-   protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
-      return("Lexical error at line " +
-           errorLine + ", column " +
-           errorColumn + ".  Encountered: " +
-           (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") +
-           "after : \"" + addEscapes(errorAfter) + "\"");
-   }
-
-   /**
-    * You can also modify the body of this method to customize your error messages.
-    * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not
-    * of end-users concern, so you can return something like :
-    *
-    *     "Internal Error : Please file a bug report .... "
-    *
-    * from this method for such cases in the release version of your parser.
-    */
-   public String getMessage() {
-      return super.getMessage();
-   }
-
-   /*
-    * Constructors of various flavors follow.
-    */
-
-   /** No arg constructor. */
-   public TokenMgrError() {
-   }
-
-   /** Constructor with message and reason. */
-   public TokenMgrError(String message, int reason) {
-      super(message);
-      errorCode = reason;
-   }
-
-   /** Full Constructor. */
-   public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
-      this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
-   }
+    }
+    return retval.toString();
+  }
+
+  /**
+   * Returns a detailed message for the Error when it is thrown by the
+   * token manager to indicate a lexical error.
+   * Parameters :
+   *    EOFSeen     : indicates if EOF caused the lexical error
+   *    curLexState : lexical state in which this error occurred
+   *    errorLine   : line number when the error occurred
+   *    errorColumn : column number when the error occurred
+   *    errorAfter  : prefix that was seen before this error occurred
+   *    curchar     : the offending character
+   * Note: You can customize the lexical error message by modifying this method.
+   */
+  protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
+    return("Lexical error at line " +
+          errorLine + ", column " +
+          errorColumn + ".  Encountered: " +
+          (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") +
+          "after : \"" + addEscapes(errorAfter) + "\"");
+  }
+
+  /**
+   * You can also modify the body of this method to customize your error messages.
+   * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not
+   * of end-users concern, so you can return something like :
+   *
+   *     "Internal Error : Please file a bug report .... "
+   *
+   * from this method for such cases in the release version of your parser.
+   */
+  public String getMessage() {
+    return super.getMessage();
+  }
+
+  /*
+   * Constructors of various flavors follow.
+   */
+
+  /** No arg constructor. */
+  public TokenMgrError() {
+  }
+
+  /** Constructor with message and reason. */
+  public TokenMgrError(String message, int reason) {
+    super(message);
+    errorCode = reason;
+  }
+
+  /** Full Constructor. */
+  public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
+    this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
+  }
 }
-/* JavaCC - OriginalChecksum=b55ad725f5fbc672fa115f498926930c (do not edit this line) */
+/* JavaCC - OriginalChecksum=f433e1a52b8eadbf12f3fbbbf87fd140 (do not edit this line) */

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/QueryNodeParseException.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/QueryNodeParseException.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/QueryNodeParseException.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/QueryNodeParseException.java Fri Sep 21 17:21:34 2012
@@ -80,7 +80,7 @@ public class QueryNodeParseException ext
   }
 
   /**
-   * For EndOfLine and EndOfFile ("<EOF>") parsing problems the last char in the
+   * For EndOfLine and EndOfFile ("&lt;EOF&gt;") parsing problems the last char in the
    * string is returned For the case where the parser is not able to figure out
    * the line and column number -1 will be returned
    * 
@@ -91,7 +91,7 @@ public class QueryNodeParseException ext
   }
 
   /**
-   * For EndOfLine and EndOfFile ("<EOF>") parsing problems the last char in the
+   * For EndOfLine and EndOfFile ("&lt;EOF&gt;") parsing problems the last char in the
    * string is returned For the case where the parser is not able to figure out
    * the line and column number -1 will be returned
    * 

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/AbstractQueryConfig.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/AbstractQueryConfig.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/AbstractQueryConfig.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/AbstractQueryConfig.java Fri Sep 21 17:21:34 2012
@@ -62,7 +62,7 @@ public abstract class AbstractQueryConfi
   /**
    * Returns true if there is a value set with the given key, otherwise false.
    * 
-   * @param <T> @param <T> the value's type
+   * @param <T> the value's type
    * @param key the key, cannot be <code>null</code>
    * @return true if there is a value set with the given key, otherwise false
    */

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/FieldQueryNode.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/FieldQueryNode.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/FieldQueryNode.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/FieldQueryNode.java Fri Sep 21 17:21:34 2012
@@ -179,12 +179,12 @@ public class FieldQueryNode extends Quer
 
   }
 
-	public CharSequence getValue() {
-		return getText();
-	}
+  public CharSequence getValue() {
+    return getText();
+  }
 
-	public void setValue(CharSequence value) {
-		setText(value);
-	}
+  public void setValue(CharSequence value) {
+    setText(value);
+  }
 
 }

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/ModifierQueryNode.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/ModifierQueryNode.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/ModifierQueryNode.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/ModifierQueryNode.java Fri Sep 21 17:21:34 2012
@@ -36,6 +36,9 @@ import org.apache.lucene.queryparser.fle
  */
 public class ModifierQueryNode extends QueryNodeImpl {
 
+  /**
+   * Modifier type: such as required (REQ), prohibited (NOT)
+   */
   public enum Modifier {
     MOD_NONE, MOD_NOT, MOD_REQ;
 

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/PathQueryNode.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/PathQueryNode.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/PathQueryNode.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/PathQueryNode.java Fri Sep 21 17:21:34 2012
@@ -31,7 +31,7 @@ import org.apache.lucene.queryparser.fle
  * <p>
  * Example how the text parser creates these objects:
  * </p>
- * <pre>
+ * <pre class="prettyprint">
  * List values = ArrayList(); 
  * values.add(new PathQueryNode.QueryText("company", 1, 7)); 
  * values.add(new PathQueryNode.QueryText("USA", 9, 12)); 
@@ -41,6 +41,9 @@ import org.apache.lucene.queryparser.fle
  */
 public class PathQueryNode extends QueryNodeImpl {
 
+  /**
+   * Term text with a beginning and end position
+   */
   public static class QueryText implements Cloneable {
     CharSequence value = null;
     /**

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/PhraseSlopQueryNode.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/PhraseSlopQueryNode.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/PhraseSlopQueryNode.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/PhraseSlopQueryNode.java Fri Sep 21 17:21:34 2012
@@ -17,11 +17,15 @@ package org.apache.lucene.queryparser.fl
  * limitations under the License.
  */
 
+import org.apache.lucene.search.PhraseQuery; // javadocs
 import org.apache.lucene.queryparser.flexible.messages.MessageImpl;
 import org.apache.lucene.queryparser.flexible.core.QueryNodeError;
 import org.apache.lucene.queryparser.flexible.core.messages.QueryParserMessages;
 import org.apache.lucene.queryparser.flexible.core.parser.EscapeQuerySyntax;
 
+/**
+ * Query node for {@link PhraseQuery}'s slop factor.
+ */
 public class PhraseSlopQueryNode extends QueryNodeImpl implements FieldableNode {
 
   private int value = 0;

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/ProximityQueryNode.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/ProximityQueryNode.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/ProximityQueryNode.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/ProximityQueryNode.java Fri Sep 21 17:21:34 2012
@@ -33,6 +33,9 @@ import org.apache.lucene.queryparser.fle
  */
 public class ProximityQueryNode extends BooleanQueryNode {
 
+  /**
+   * Distance condition: PARAGRAPH, SENTENCE, or NUMBER
+   */
   public enum Type {
     PARAGRAPH {
       @Override
@@ -50,7 +53,7 @@ public class ProximityQueryNode extends 
     abstract CharSequence toQueryString();
   }
 
-  // utility class
+  /** utility class containing the distance condition and number */
   static public class ProximityType {
     int pDistance = 0;
 

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/QueryNodeImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/QueryNodeImpl.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/QueryNodeImpl.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/QueryNodeImpl.java Fri Sep 21 17:21:34 2012
@@ -211,7 +211,7 @@ public abstract class QueryNodeImpl impl
   /**
    * Every implementation of this class should return pseudo xml like this:
    * 
-   * For FieldQueryNode: <field start='1' end='2' field='subject' text='foo'/>
+   * For FieldQueryNode: &lt;field start='1' end='2' field='subject' text='foo'/&gt;
    * 
    * @see org.apache.lucene.queryparser.flexible.core.nodes.QueryNode#toString()
    */

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/TextableQueryNode.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/TextableQueryNode.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/TextableQueryNode.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/TextableQueryNode.java Fri Sep 21 17:21:34 2012
@@ -18,7 +18,7 @@ package org.apache.lucene.queryparser.fl
  */
 
 /**
- * 
+ * Interface for a node that has text as a {@link CharSequence}
  */
 public interface TextableQueryNode {
 

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/parser/EscapeQuerySyntax.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/parser/EscapeQuerySyntax.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/parser/EscapeQuerySyntax.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/parser/EscapeQuerySyntax.java Fri Sep 21 17:21:34 2012
@@ -24,6 +24,10 @@ import java.util.Locale;
  * to escape the queries, when the toQueryString method is called.
  */
 public interface EscapeQuerySyntax {
+  /**
+   * Type of escaping: String for escaping syntax,
+   * NORMAL for escaping reserved words (like AND) in terms
+   */
   public enum Type {
     STRING, NORMAL;
   }

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/util/StringUtils.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/util/StringUtils.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/util/StringUtils.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/util/StringUtils.java Fri Sep 21 17:21:34 2012
@@ -17,6 +17,9 @@ package org.apache.lucene.queryparser.fl
  * limitations under the License.
  */
 
+/**
+ * String manipulation routines
+ */
 final public class StringUtils {
 
   public static String toString(Object obj) {

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/CommonQueryParserConfiguration.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/CommonQueryParserConfiguration.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/CommonQueryParserConfiguration.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/CommonQueryParserConfiguration.java Fri Sep 21 17:21:34 2012
@@ -27,6 +27,9 @@ import org.apache.lucene.search.MultiTer
  * limitations under the License.
  */
 
+/**
+ * Configuration options common across queryparser implementations.
+ */
 public interface CommonQueryParserConfiguration {
   
   /**

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/QueryParserUtil.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/QueryParserUtil.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/QueryParserUtil.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/QueryParserUtil.java Fri Sep 21 17:21:34 2012
@@ -35,9 +35,9 @@ final public class QueryParserUtil {
    * If x fields are specified, this effectively constructs:
    * 
    * <pre>
-   * &lt;code&gt;
+   * <code>
    * (field1:query1) (field2:query2) (field3:query3)...(fieldx:queryx)
-   * &lt;/code&gt;
+   * </code>
    * </pre>
    * 
    * @param queries
@@ -75,23 +75,23 @@ final public class QueryParserUtil {
    * specify certain fields as required, and others as prohibited.
    * <p>
    * 
-   * <pre>
    * Usage:
-   * &lt;code&gt;
+   * <pre class="prettyprint">
+   * <code>
    * String[] fields = {&quot;filename&quot;, &quot;contents&quot;, &quot;description&quot;};
    * BooleanClause.Occur[] flags = {BooleanClause.Occur.SHOULD,
    *                BooleanClause.Occur.MUST,
    *                BooleanClause.Occur.MUST_NOT};
    * MultiFieldQueryParser.parse(&quot;query&quot;, fields, flags, analyzer);
-   * &lt;/code&gt;
+   * </code>
    * </pre>
    *<p>
    * The code above would construct a query:
    * 
    * <pre>
-   * &lt;code&gt;
+   * <code>
    * (filename:query) +(contents:query) -(description:query)
-   * &lt;/code&gt;
+   * </code>
    * </pre>
    * 
    * @param query
@@ -131,24 +131,24 @@ final public class QueryParserUtil {
    * specify certain fields as required, and others as prohibited.
    * <p>
    * 
-   * <pre>
    * Usage:
-   * &lt;code&gt;
+   * <pre class="prettyprint">
+   * <code>
    * String[] query = {&quot;query1&quot;, &quot;query2&quot;, &quot;query3&quot;};
    * String[] fields = {&quot;filename&quot;, &quot;contents&quot;, &quot;description&quot;};
    * BooleanClause.Occur[] flags = {BooleanClause.Occur.SHOULD,
    *                BooleanClause.Occur.MUST,
    *                BooleanClause.Occur.MUST_NOT};
    * MultiFieldQueryParser.parse(query, fields, flags, analyzer);
-   * &lt;/code&gt;
+   * </code>
    * </pre>
    *<p>
    * The code above would construct a query:
    * 
    * <pre>
-   * &lt;code&gt;
+   * <code>
    * (filename:query1) +(contents:query2) -(description:query3)
-   * &lt;/code&gt;
+   * </code>
    * </pre>
    * 
    * @param queries

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/builders/AnyQueryNodeBuilder.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/builders/AnyQueryNodeBuilder.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/builders/AnyQueryNodeBuilder.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/builders/AnyQueryNodeBuilder.java Fri Sep 21 17:21:34 2012
@@ -30,6 +30,10 @@ import org.apache.lucene.search.BooleanQ
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.BooleanQuery.TooManyClauses;
 
+/**
+ * Builds a BooleanQuery of SHOULD clauses, possibly with
+ * some minimum number to match.
+ */
 public class AnyQueryNodeBuilder implements StandardQueryBuilder {
 
   public AnyQueryNodeBuilder() {

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/FuzzyConfig.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/FuzzyConfig.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/FuzzyConfig.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/FuzzyConfig.java Fri Sep 21 17:21:34 2012
@@ -19,6 +19,9 @@ package org.apache.lucene.queryparser.fl
 
 import org.apache.lucene.search.FuzzyQuery;
 
+/**
+ * Configuration parameters for {@link FuzzyQuery}s
+ */
 public class FuzzyConfig {
   
   private int prefixLength = FuzzyQuery.defaultPrefixLength;

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/StandardQueryConfigHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/StandardQueryConfigHandler.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/StandardQueryConfigHandler.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/StandardQueryConfigHandler.java Fri Sep 21 17:21:34 2012
@@ -44,6 +44,9 @@ import org.apache.lucene.search.MultiTer
  */
 public class StandardQueryConfigHandler extends QueryConfigHandler {
 
+  /**
+   * Class holding keys for StandardQueryNodeProcessorPipeline options.
+   */
   final public static class ConfigurationKeys  {
     
     /**
@@ -182,6 +185,9 @@ public class StandardQueryConfigHandler 
     
   }
   
+  /**
+   * Boolean Operator: AND or OR
+   */
   public static enum Operator {
     AND, OR;
   }

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/CharStream.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/CharStream.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/CharStream.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/CharStream.java Fri Sep 21 17:21:34 2012
@@ -1,5 +1,5 @@
-/* Generated By:JavaCC: Do not edit this line. CharStream.java Version 4.1 */
-/* JavaCCOptions:STATIC=false */
+/* Generated By:JavaCC: Do not edit this line. CharStream.java Version 5.0 */
+/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
 package org.apache.lucene.queryparser.flexible.standard.parser;
 
 /**
@@ -17,7 +17,8 @@ package org.apache.lucene.queryparser.fl
  * operation.
  */
 
-public interface CharStream {
+public
+interface CharStream {
 
   /**
    * Returns the next character from the selected input.  The method
@@ -26,6 +27,7 @@ public interface CharStream {
    */
   char readChar() throws java.io.IOException;
 
+  @Deprecated
   /**
    * Returns the column position of the character last read.
    * @deprecated
@@ -33,6 +35,7 @@ public interface CharStream {
    */
   int getColumn();
 
+  @Deprecated
   /**
    * Returns the line number of the character last read.
    * @deprecated
@@ -109,4 +112,4 @@ public interface CharStream {
   void Done();
 
 }
-/* JavaCC - OriginalChecksum=298ffb3c7c64c6de9b7812e011e58d99 (do not edit this line) */
+/* JavaCC - OriginalChecksum=53b2ec7502d50e2290e86187a6c01270 (do not edit this line) */

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/EscapeQuerySyntaxImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/EscapeQuerySyntaxImpl.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/EscapeQuerySyntaxImpl.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/EscapeQuerySyntaxImpl.java Fri Sep 21 17:21:34 2012
@@ -25,6 +25,8 @@ import org.apache.lucene.queryparser.fle
 import org.apache.lucene.queryparser.flexible.core.util.UnescapedCharSequence;
 
 /**
+ * Implementation of {@link EscapeQuerySyntax} for the standard lucene
+ * syntax.
  */
 public class EscapeQuerySyntaxImpl implements EscapeQuerySyntax {
 

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/FastCharStream.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/FastCharStream.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/FastCharStream.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/FastCharStream.java Fri Sep 21 17:21:34 2012
@@ -29,13 +29,13 @@ import java.io.*;
 public final class FastCharStream implements CharStream {
   char[] buffer = null;
 
-  int bufferLength = 0;				  // end of valid chars
-  int bufferPosition = 0;			  // next char to read
+  int bufferLength = 0;          // end of valid chars
+  int bufferPosition = 0;        // next char to read
 
-  int tokenStart = 0;				  // offset in buffer
-  int bufferStart = 0;				  // position in file of buffer
+  int tokenStart = 0;          // offset in buffer
+  int bufferStart = 0;          // position in file of buffer
 
-  Reader input;					  // source of chars
+  Reader input;            // source of chars
 
   /** Constructs from a Reader. */
   public FastCharStream(Reader r) {
@@ -51,24 +51,24 @@ public final class FastCharStream implem
   private final void refill() throws IOException {
     int newPosition = bufferLength - tokenStart;
 
-    if (tokenStart == 0) {			  // token won't fit in buffer
-      if (buffer == null) {			  // first time: alloc buffer
-	buffer = new char[2048];
+    if (tokenStart == 0) {        // token won't fit in buffer
+      if (buffer == null) {        // first time: alloc buffer
+        buffer = new char[2048];
       } else if (bufferLength == buffer.length) { // grow buffer
-	char[] newBuffer = new char[buffer.length*2];
-	System.arraycopy(buffer, 0, newBuffer, 0, bufferLength);
-	buffer = newBuffer;
+        char[] newBuffer = new char[buffer.length * 2];
+        System.arraycopy(buffer, 0, newBuffer, 0, bufferLength);
+        buffer = newBuffer;
       }
-    } else {					  // shift token to front
+    } else {            // shift token to front
       System.arraycopy(buffer, tokenStart, buffer, 0, newPosition);
     }
 
-    bufferLength = newPosition;			  // update state
+    bufferLength = newPosition;        // update state
     bufferPosition = newPosition;
     bufferStart += tokenStart;
     tokenStart = 0;
 
-    int charsRead =				  // fill space in buffer
+    int charsRead =          // fill space in buffer
       input.read(buffer, newPosition, buffer.length-newPosition);
     if (charsRead == -1)
       throw new IOException("read past eof");

Modified: lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/ParseException.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/ParseException.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/ParseException.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/ParseException.java Fri Sep 21 17:21:34 2012
@@ -1,4 +1,4 @@
-/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 4.1 */
+/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 5.0 */
 /* JavaCCOptions:KEEP_LINE_COL=null */
 package org.apache.lucene.queryparser.flexible.standard.parser;
  
@@ -19,16 +19,17 @@ package org.apache.lucene.queryparser.fl
 public class ParseException extends QueryNodeParseException {
 
   /**
+   * The version identifier for this Serializable class.
+   * Increment only if the <i>serialized</i> form of the
+   * class changes.
+   */
+  private static final long serialVersionUID = 1L;
+
+  /**
    * This constructor is used by the method "generateParseException"
    * in the generated parser.  Calling this constructor generates
    * a new object of this type with the fields "currentToken",
-   * "expectedTokenSequences", and "tokenImage" set.  The boolean
-   * flag "specialConstructor" is also set to true to indicate that
-   * this constructor was used to create this object.
-   * This constructor calls its super class with the empty string
-   * to force the "toString" method of parent class "Throwable" to
-   * print the error message in the form:
-   *     ParseException: <result of getMessage>
+   * "expectedTokenSequences", and "tokenImage" set.
    */
   public ParseException(Token currentTokenVal,
      int[][] expectedTokenSequencesVal, String[] tokenImageVal) {
@@ -58,12 +59,6 @@ public class ParseException extends Quer
      super(message);
    }
 
-  /**
-   * This variable determines which constructor was used to create
-   * this object and thereby affects the semantics of the
-   * "getMessage" method (see below).
-   */
-  protected boolean specialConstructor;
 
   /**
    * This is the last token that has been consumed successfully.  If
@@ -87,17 +82,16 @@ public class ParseException extends Quer
   public String[] tokenImage;
 
   /**
-   * This method has the standard behavior when this object has been
-   * created using the standard constructors.  Otherwise, it uses
-   * "currentToken" and "expectedTokenSequences" to generate a parse
+   * It uses "currentToken" and "expectedTokenSequences" to generate a parse
    * error message and returns it.  If this object has been created
    * due to a parse error, and you do not catch it (it gets thrown
-   * from the parser), then this method is called during the printing
-   * of the final stack trace, and hence the correct error message
+   * from the parser) the correct error message
    * gets displayed.
    */
-  private static String initialise(Token currentToken, int[][] expectedTokenSequences, String[] tokenImage) {
-     String eol = System.getProperty("line.separator", "n");
+  private static String initialise(Token currentToken,
+                           int[][] expectedTokenSequences,
+                           String[] tokenImage) {
+    String eol = System.getProperty("line.separator", "\n");
     StringBuffer expected = new StringBuffer();
     int maxSize = 0;
     for (int i = 0; i < expectedTokenSequences.length; i++) {
@@ -147,7 +141,7 @@ public class ParseException extends Quer
    * when these raw version cannot be used as part of an ASCII
    * string literal.
    */
-  static private String add_escapes(String str) {
+  static String add_escapes(String str) {
       StringBuffer retval = new StringBuffer();
       char ch;
       for (int i = 0; i < str.length(); i++) {
@@ -193,4 +187,4 @@ public class ParseException extends Quer
    }
 
 }
-/* JavaCC - OriginalChecksum=7601d49d11bc059457ae5850628ebc8a (do not edit this line) */
+/* JavaCC - OriginalChecksum=4263a02db9988d7a863aa97ad2f6dc67 (do not edit this line) */