lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r827772 [1/6] - in /lucene/java/branches/flex_1458: ./ contrib/ contrib/instantiated/src/java/org/apache/lucene/store/instantiated/ contrib/misc/src/java/org/apache/lucene/queryParser/precedence/ contrib/queries/src/java/org/apache/lucene/s...
Date Tue, 20 Oct 2009 19:58:22 GMT
Author: markrmiller
Date: Tue Oct 20 19:58:18 2009
New Revision: 827772

URL: http://svn.apache.org/viewvc?rev=827772&view=rev
Log:
merge up to 827042

Added:
    lucene/java/branches/flex_1458/tags/
    lucene/java/branches/flex_1458/tags/flex_1458_2_9_back_compat_tests_20091015/
    lucene/java/branches/flex_1458/test/
    lucene/java/branches/flex_1458/test/file
Removed:
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharacterCache.java
Modified:
    lucene/java/branches/flex_1458/CHANGES.txt
    lucene/java/branches/flex_1458/contrib/CHANGES.txt
    lucene/java/branches/flex_1458/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndex.java
    lucene/java/branches/flex_1458/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndexWriter.java
    lucene/java/branches/flex_1458/contrib/misc/src/java/org/apache/lucene/queryParser/precedence/PrecedenceQueryParser.java
    lucene/java/branches/flex_1458/contrib/misc/src/java/org/apache/lucene/queryParser/precedence/TokenMgrError.java
    lucene/java/branches/flex_1458/contrib/queries/src/java/org/apache/lucene/search/similar/MoreLikeThis.java
    lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/CharStream.java
    lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/ParseException.java
    lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/QueryParser.java
    lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/QueryParserConstants.java
    lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/QueryParserTokenManager.java
    lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/Token.java
    lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/TokenMgrError.java
    lucene/java/branches/flex_1458/src/demo/org/apache/lucene/demo/html/HTMLParser.java
    lucene/java/branches/flex_1458/src/demo/org/apache/lucene/demo/html/HTMLParserConstants.java
    lucene/java/branches/flex_1458/src/demo/org/apache/lucene/demo/html/HTMLParserTokenManager.java
    lucene/java/branches/flex_1458/src/demo/org/apache/lucene/demo/html/ParseException.java
    lucene/java/branches/flex_1458/src/demo/org/apache/lucene/demo/html/SimpleCharStream.java
    lucene/java/branches/flex_1458/src/demo/org/apache/lucene/demo/html/Token.java
    lucene/java/branches/flex_1458/src/demo/org/apache/lucene/demo/html/TokenMgrError.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/Analyzer.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/BaseCharFilter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CachingTokenFilter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharArraySet.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/MappingCharFilter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/NormalizeCharMap.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/PerFieldAnalyzerWrapper.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/TeeSinkTokenFilter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/Token.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/TokenStream.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/MapFieldSelector.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/SetBasedFieldSelector.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/CheckIndex.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/CompoundFileReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/CompoundFileWriter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DirectoryReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocConsumer.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldConsumer.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldConsumers.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldProcessor.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldProcessorPerThread.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocInverter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocumentsWriter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/FieldInfos.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/FieldSortedTermVectorMapper.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/FieldsReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/FieldsWriter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/FilterIndexReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/FreqProxTermsWriter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexCommit.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexDeletionPolicy.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexFileDeleter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexFileNameFilter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexWriter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/InvertedDocConsumer.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/InvertedDocEndConsumer.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/KeepOnlyLastCommitDeletionPolicy.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/LogMergePolicy.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/MergePolicy.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/MultiReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/MultipleTermPositions.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/NormsWriter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/ParallelReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/PositionBasedTermVectorMapper.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/ReadOnlyDirectoryReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SegmentFieldMergeQueue.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SegmentInfo.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SegmentInfos.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SegmentMerger.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SegmentReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SegmentWriteState.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SnapshotDeletionPolicy.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SortedTermVectorMapper.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermDocs.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermEnum.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermVectorEntryFreqSortedComparator.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermVectorsTermsWriter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermsHash.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermsHashConsumer.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/Codecs.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/queryParser/CharStream.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/queryParser/ParseException.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/queryParser/QueryParser.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/queryParser/Token.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/queryParser/TokenMgrError.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/CachingSpanFilter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/ConjunctionScorer.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/Explanation.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/FieldCacheImpl.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/FieldCacheRangeFilter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/FieldValueHitQueue.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/FilterManager.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/IndexSearcher.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/MultiPhraseQuery.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/MultiSearcher.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/MultiTermQuery.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/NumericRangeFilter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/PhraseQuery.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/PrefixFilter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/Query.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/QueryTermVector.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/Searchable.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/Similarity.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/SloppyPhraseScorer.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/SpanFilterResult.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/SpanQueryFilter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/TermRangeFilter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/TopDocsCollector.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/TopFieldCollector.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/TopScoreDocCollector.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/payloads/PayloadNearQuery.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/payloads/PayloadSpanUtil.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/spans/FieldMaskingSpanQuery.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/spans/NearSpansOrdered.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/spans/NearSpansUnordered.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/spans/SpanFirstQuery.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/spans/SpanNearQuery.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/spans/SpanNotQuery.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/spans/SpanOrQuery.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/spans/SpanQuery.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/spans/SpanTermQuery.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/spans/SpanWeight.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/spans/Spans.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/spans/TermSpans.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/store/Directory.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/store/FSDirectory.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/store/FileSwitchDirectory.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/store/IndexInput.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/store/IndexOutput.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/store/MMapDirectory.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/store/NativeFSLockFactory.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/store/RAMDirectory.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/store/RAMFile.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/store/SingleInstanceLockFactory.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/AverageGuessMemoryModel.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/CloseableThreadLocal.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/FieldCacheSanityChecker.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/MapOfSets.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/Parameter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/RamUsageEstimator.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/ReaderUtil.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/cache/Cache.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/cache/SimpleLRUCache.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/cache/SimpleMapCache.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java   (props changed)
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestToken.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/document/TestDateTools.java   (props changed)
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/document/TestNumberTools.java   (props changed)
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java   (props changed)
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexReaderClone.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexReaderCloneNorms.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriter.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/payloads/TestPayloadNearQuery.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/MockRAMDirectory.java

Modified: lucene/java/branches/flex_1458/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/CHANGES.txt?rev=827772&r1=827771&r2=827772&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/CHANGES.txt (original)
+++ lucene/java/branches/flex_1458/CHANGES.txt Tue Oct 20 19:58:18 2009
@@ -75,6 +75,16 @@
 * LUCENE-1979: Remove remaining deprecations from indexer package.
   (Uwe Schindler, Michael Busch)
 
+* LUCENE-1989: Generify CharArraySet. (Uwe Schindler)
+
+* LUCENE-1987: Rremove deprecations from analysis package and Token.
+  Un-deprecate some ctors of Token, as they are still useful.
+  (Uwe Schindler)
+
+* LUCENE-1945: All public classes that have a close() method now
+  also implement java.io.Closeable (IndexReader, IndexWriter, Directory,...).
+  (Uwe Schindler)
+
 Bug fixes
 
 * LUCENE-1951: When the text provided to WildcardQuery has no wildcard
@@ -87,6 +97,16 @@
   BooleanScorer for scoring), whereby some matching documents fail to
   be collected.  (Fulin Tang via Mike McCandless)
 
+* LUCENE-1986: Fix NPE when scoring PayloadNearQuery (Peter Keegan,
+  Mark Miller via Mike McCandless)
+
+* LUCENE-1992: Fix thread hazard if a merge is committing just as an
+  exception occurs during sync (Uwe Schindler, Mike McCandless)
+
+* LUCENE-1995: Note in javadocs that IndexWriter.setRAMBufferSizeMB
+  cannot exceed 2048 MB, and throw IllegalArgumentException if it
+  does.  (Aaron McKee, Yonik Seeley, Mike McCandless)
+
 New features
 
 * LUCENE-1933: Provide a convenience AttributeFactory that creates a

Modified: lucene/java/branches/flex_1458/contrib/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/CHANGES.txt?rev=827772&r1=827771&r2=827772&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/CHANGES.txt (original)
+++ lucene/java/branches/flex_1458/contrib/CHANGES.txt Tue Oct 20 19:58:18 2009
@@ -53,6 +53,10 @@
    any number of output parts, at the cost of doing multiple passes over
    the input index. (Andrzej Bialecki)
 
+ * LUCENE-1993: Add maxDocFreq setting to MoreLikeThis, to exclude
+   from consideration terms that match more than the specified number
+   of documents.  (Christian Steinert via Mike McCandless)
+
 Optimizations
 
  * LUCENE-1965, LUCENE-1962: Arabic-, Persian- and SmartChineseAnalyzer

Modified: lucene/java/branches/flex_1458/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndex.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndex.java?rev=827772&r1=827771&r2=827772&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndex.java (original)
+++ lucene/java/branches/flex_1458/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndex.java Tue Oct 20 19:58:18 2009
@@ -18,6 +18,7 @@
 
 import java.io.IOException;
 import java.io.Serializable;
+import java.io.Closeable;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
@@ -52,7 +53,7 @@
  * Consider using InstantiatedIndex as if it was immutable.
  */
 public class InstantiatedIndex
-    implements Serializable {
+    implements Serializable,Closeable {
 
   private static final long serialVersionUID = 1l;
 

Modified: lucene/java/branches/flex_1458/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndexWriter.java?rev=827772&r1=827771&r2=827772&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndexWriter.java (original)
+++ lucene/java/branches/flex_1458/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndexWriter.java Tue Oct 20 19:58:18 2009
@@ -19,6 +19,7 @@
 import java.io.IOException;
 import java.io.PrintStream;
 import java.io.StringReader;
+import java.io.Closeable;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -58,7 +59,7 @@
  *
  * @see org.apache.lucene.index.IndexWriter 
  */
-public class InstantiatedIndexWriter {
+public class InstantiatedIndexWriter implements Closeable {
 
   private PrintStream infoStream = null;
 

Modified: lucene/java/branches/flex_1458/contrib/misc/src/java/org/apache/lucene/queryParser/precedence/PrecedenceQueryParser.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/misc/src/java/org/apache/lucene/queryParser/precedence/PrecedenceQueryParser.java?rev=827772&r1=827771&r2=827772&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/misc/src/java/org/apache/lucene/queryParser/precedence/PrecedenceQueryParser.java (original)
+++ lucene/java/branches/flex_1458/contrib/misc/src/java/org/apache/lucene/queryParser/precedence/PrecedenceQueryParser.java Tue Oct 20 19:58:18 2009
@@ -1237,7 +1237,7 @@
       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];
@@ -1297,7 +1297,7 @@
     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/java/branches/flex_1458/contrib/misc/src/java/org/apache/lucene/queryParser/precedence/TokenMgrError.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/misc/src/java/org/apache/lucene/queryParser/precedence/TokenMgrError.java?rev=827772&r1=827771&r2=827772&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/misc/src/java/org/apache/lucene/queryParser/precedence/TokenMgrError.java (original)
+++ lucene/java/branches/flex_1458/contrib/misc/src/java/org/apache/lucene/queryParser/precedence/TokenMgrError.java Tue Oct 20 19:58:18 2009
@@ -3,6 +3,7 @@
 package org.apache.lucene.queryParser.precedence;
 
 /** Token Manager Error. */
+@SuppressWarnings("serial")
 public class TokenMgrError extends Error
 {
 
@@ -137,4 +138,4 @@
       this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
    }
 }
-/* JavaCC - OriginalChecksum=43f834e732189cec173ab002c94ae97f (do not edit this line) */
+/* JavaCC - OriginalChecksum=257b82f2650841e86289a309cb3dae76 (do not edit this line) */

Modified: lucene/java/branches/flex_1458/contrib/queries/src/java/org/apache/lucene/search/similar/MoreLikeThis.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/queries/src/java/org/apache/lucene/search/similar/MoreLikeThis.java?rev=827772&r1=827771&r2=827772&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/queries/src/java/org/apache/lucene/search/similar/MoreLikeThis.java (original)
+++ lucene/java/branches/flex_1458/contrib/queries/src/java/org/apache/lucene/search/similar/MoreLikeThis.java Tue Oct 20 19:58:18 2009
@@ -128,6 +128,8 @@
  * <ul>
  * <li> {@link #setMinTermFreq setMinTermFreq(...)}
  * <li> {@link #setMinDocFreq setMinDocFreq(...)}
+ * <li> {@link #setMaxDocFreq setMaxDocFreq(...)}
+ * <li> {@link #setMaxDocFreqPct setMaxDocFreqPct(...)}
  * <li> {@link #setMinWordLen setMinWordLen(...)}
  * <li> {@link #setMaxWordLen setMaxWordLen(...)}
  * <li> {@link #setMaxQueryTerms setMaxQueryTerms(...)}
@@ -177,6 +179,14 @@
     public static final int DEFAULT_MIN_DOC_FREQ = 5;
 
     /**
+     * Ignore words which occur in more than this many docs.
+	 * @see #getMaxDocFreq
+	 * @see #setMaxDocFreq	 
+	 * @see #setMaxDocFreqPct	 
+     */
+    public static final int DEFAULT_MAX_DOC_FREQ = Integer.MAX_VALUE;
+    
+    /**
      * Boost terms in query based on score.
 	 * @see #isBoost
 	 * @see #setBoost 
@@ -241,6 +251,11 @@
      */
     private int minDocFreq = DEFAULT_MIN_DOC_FREQ;
 
+	/**
+     * Ignore words which occur in more than this many docs.
+	 */
+	private int maxDocFreq = DEFAULT_MAX_DOC_FREQ;
+    
     /**
      * Should we apply a boost to the Query based on the scores?
      */
@@ -388,6 +403,43 @@
     }
 
     /**
+     * Returns the maximum frequency in which words may still appear. 
+     * Words that appear in more than this many docs will be ignored. The default frequency is 
+     * {@link #DEFAULT_MAX_DOC_FREQ}.
+     *
+     * @return get the maximum frequency at which words are still allowed,  
+     * words which occur in more docs than this are ignored.
+     */
+    public int getMaxDocFreq() {
+        return maxDocFreq;
+    }
+
+	/**
+     * Set the maximum frequency in which words may still appear. Words that appear
+     * in more than this many docs will be ignored.
+	 * 
+	 * @param maxFreq
+	 *            the maximum count of documents that a term may appear 
+	 *            in to be still considered relevant
+	 */
+	public void setMaxDocFreq(int maxFreq) {
+		this.maxDocFreq = maxFreq;
+	}
+
+	/**
+     * Set the maximum percentage in which words may still appear. Words that appear
+     * in more than this many percent of all docs will be ignored.
+	 * 
+	 * @param maxPercentage
+	 *            the maximum percentage of documents (0-100) that a term may appear 
+	 *            in to be still considered relevant
+	 */
+	public void setMaxDocFreqPct(int maxPercentage) {
+		this.maxDocFreq = maxPercentage * ir.numDocs() / 100;
+	}
+
+	
+    /**
      * Returns whether to boost terms in query based on "score" or not. The default is
      * {@link #DEFAULT_BOOST}.
      *
@@ -660,6 +712,10 @@
                 continue; // filter out words that don't occur in enough docs
             }
 
+            if (docFreq > maxDocFreq) {
+                continue; // filter out words that occur in too many docs            	
+            }
+
             if (docFreq == 0) {
                 continue; // index update problem?
             }

Modified: lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/CharStream.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/CharStream.java?rev=827772&r1=827771&r2=827772&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/CharStream.java (original)
+++ lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/CharStream.java Tue Oct 20 19:58:18 2009
@@ -1,4 +1,5 @@
-/* Generated By:JavaCC: Do not edit this line. CharStream.java Version 3.0 */
+/* Generated By:JavaCC: Do not edit this line. CharStream.java Version 4.1 */
+/* JavaCCOptions:STATIC=false */
 package org.apache.lucene.queryParser.surround.parser;
 
 /**
@@ -26,6 +27,20 @@
   char readChar() throws java.io.IOException;
 
   /**
+   * Returns the column position of the character last read.
+   * @deprecated
+   * @see #getEndColumn
+   */
+  int getColumn();
+
+  /**
+   * Returns the line number of the character last read.
+   * @deprecated
+   * @see #getEndLine
+   */
+  int getLine();
+
+  /**
    * Returns the column number of the last character for current token (being
    * matched after the last call to BeginTOken).
    */
@@ -65,7 +80,7 @@
   char BeginToken() throws java.io.IOException;
 
   /**
-   * Returns a string made up of characters from the marked token beginning 
+   * Returns a string made up of characters from the marked token beginning
    * to the current buffer position. Implementations have the choice of returning
    * anything that they want to. For example, for efficiency, one might decide
    * to just return null, which is a valid implementation.
@@ -94,3 +109,4 @@
   void Done();
 
 }
+/* JavaCC - OriginalChecksum=872eafa2c180de2e08862f87f675b2dd (do not edit this line) */

Modified: lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/ParseException.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/ParseException.java?rev=827772&r1=827771&r2=827772&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/ParseException.java (original)
+++ lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/ParseException.java Tue Oct 20 19:58:18 2009
@@ -1,5 +1,5 @@
-/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */
-
+/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 4.1 */
+/* JavaCCOptions:KEEP_LINE_COL=null */
 package org.apache.lucene.queryParser.surround.parser;
 
 /**
@@ -52,6 +52,7 @@
     specialConstructor = false;
   }
 
+  /** Constructor with message. */
   public ParseException(String message) {
     super(message);
     specialConstructor = false;
@@ -99,19 +100,19 @@
     if (!specialConstructor) {
       return super.getMessage();
     }
-    String expected = "";
+    StringBuffer expected = new StringBuffer();
     int maxSize = 0;
     for (int i = 0; i < expectedTokenSequences.length; i++) {
       if (maxSize < expectedTokenSequences[i].length) {
         maxSize = expectedTokenSequences[i].length;
       }
       for (int j = 0; j < expectedTokenSequences[i].length; j++) {
-        expected += tokenImage[expectedTokenSequences[i][j]] + " ";
+        expected.append(tokenImage[expectedTokenSequences[i][j]]).append(' ');
       }
       if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
-        expected += "...";
+        expected.append("...");
       }
-      expected += eol + "    ";
+      expected.append(eol).append("    ");
     }
     String retval = "Encountered \"";
     Token tok = currentToken.next;
@@ -121,8 +122,11 @@
         retval += tokenImage[0];
         break;
       }
+      retval += " " + tokenImage[tok.kind];
+      retval += " \"";
       retval += add_escapes(tok.image);
-      tok = tok.next; 
+      retval += " \"";
+      tok = tok.next;
     }
     retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
     retval += "." + eol;
@@ -131,7 +135,7 @@
     } else {
       retval += "Was expecting one of:" + eol + "    ";
     }
-    retval += expected;
+    retval += expected.toString();
     return retval;
   }
 
@@ -139,7 +143,7 @@
    * The end of line string for this machine.
    */
   protected String eol = System.getProperty("line.separator", "\n");
- 
+
   /**
    * Used to convert raw characters to their escaped version
    * when these raw version cannot be used as part of an ASCII
@@ -191,3 +195,4 @@
    }
 
 }
+/* JavaCC - OriginalChecksum=2a154532f17c98e29d1671b8413edb60 (do not edit this line) */

Modified: lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/QueryParser.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/QueryParser.java?rev=827772&r1=827771&r2=827772&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/QueryParser.java (original)
+++ lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/QueryParser.java Tue Oct 20 19:58:18 2009
@@ -35,7 +35,7 @@
   final char quote = '\"';
   final char fieldOperator = ':';
   final char comma = ','; /* prefix list separator */
-  final char carat = '^'; /* weight oparator */
+  final char carat = '^'; /* weight operator */
 
   static public SrndQuery parse(String query) throws ParseException {
     QueryParser parser = new QueryParser();
@@ -475,39 +475,42 @@
     }
   }
 
-  final private boolean jj_2_1(int xla) {
+  private boolean jj_2_1(int xla) {
     jj_la = xla; jj_lastpos = jj_scanpos = token;
     try { return !jj_3_1(); }
     catch(LookaheadSuccess ls) { return true; }
     finally { jj_save(0, xla); }
   }
 
-  final private boolean jj_3_1() {
+  private boolean jj_3_1() {
     if (jj_scan_token(TERM)) return true;
     if (jj_scan_token(COLON)) return true;
     return false;
   }
 
+  /** Generated Token Manager. */
   public QueryParserTokenManager token_source;
-  public Token token, jj_nt;
+  /** Current token. */
+  public Token token;
+  /** Next token. */
+  public Token jj_nt;
   private int jj_ntk;
   private Token jj_scanpos, jj_lastpos;
   private int jj_la;
-  public boolean lookingAhead = false;
-  private boolean jj_semLA;
   private int jj_gen;
   final private int[] jj_la1 = new int[10];
   static private int[] jj_la1_0;
   static {
-      jj_la1_0();
+      jj_la1_init_0();
    }
-   private static void jj_la1_0() {
+   private static void jj_la1_init_0() {
       jj_la1_0 = new int[] {0x100,0x200,0x400,0x1000,0x800,0x7c3b00,0x1b00,0x8000,0x7c0000,0x20000,};
    }
   final private JJCalls[] jj_2_rtns = new JJCalls[1];
   private boolean jj_rescan = false;
   private int jj_gc = 0;
 
+  /** Constructor with user supplied CharStream. */
   public QueryParser(CharStream stream) {
     token_source = new QueryParserTokenManager(stream);
     token = new Token();
@@ -517,6 +520,7 @@
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
+  /** Reinitialise. */
   public void ReInit(CharStream stream) {
     token_source.ReInit(stream);
     token = new Token();
@@ -526,6 +530,7 @@
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
+  /** Constructor with generated Token Manager. */
   public QueryParser(QueryParserTokenManager tm) {
     token_source = tm;
     token = new Token();
@@ -535,6 +540,7 @@
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
+  /** Reinitialise. */
   public void ReInit(QueryParserTokenManager tm) {
     token_source = tm;
     token = new Token();
@@ -544,7 +550,7 @@
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
-  final private Token jj_consume_token(int kind) throws ParseException {
+  private Token jj_consume_token(int kind) throws ParseException {
     Token oldToken;
     if ((oldToken = token).next != null) token = token.next;
     else token = token.next = token_source.getNextToken();
@@ -570,7 +576,7 @@
 
   static private final class LookaheadSuccess extends java.lang.Error { }
   final private LookaheadSuccess jj_ls = new LookaheadSuccess();
-  final private boolean jj_scan_token(int kind) {
+  private boolean jj_scan_token(int kind) {
     if (jj_scanpos == jj_lastpos) {
       jj_la--;
       if (jj_scanpos.next == null) {
@@ -591,6 +597,8 @@
     return false;
   }
 
+
+/** Get the next Token. */
   final public Token getNextToken() {
     if (token.next != null) token = token.next;
     else token = token.next = token_source.getNextToken();
@@ -599,8 +607,9 @@
     return token;
   }
 
+/** Get the specific Token. */
   final public Token getToken(int index) {
-    Token t = lookingAhead ? jj_scanpos : token;
+    Token t = token;
     for (int i = 0; i < index; i++) {
       if (t.next != null) t = t.next;
       else t = t.next = token_source.getNextToken();
@@ -608,14 +617,14 @@
     return t;
   }
 
-  final private int jj_ntk() {
+  private int jj_ntk() {
     if ((jj_nt=token.next) == null)
       return (jj_ntk = (token.next=token_source.getNextToken()).kind);
     else
       return (jj_ntk = jj_nt.kind);
   }
 
-  private java.util.Vector jj_expentries = new java.util.Vector();
+  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];
@@ -630,31 +639,26 @@
       for (int i = 0; i < jj_endpos; i++) {
         jj_expentry[i] = jj_lasttokens[i];
       }
-      boolean exists = false;
-      for (java.util.Enumeration e = jj_expentries.elements(); e.hasMoreElements();) {
-        int[] oldentry = (int[])(e.nextElement());
+      jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) {
+        int[] oldentry = (int[])(it.next());
         if (oldentry.length == jj_expentry.length) {
-          exists = true;
           for (int i = 0; i < jj_expentry.length; i++) {
             if (oldentry[i] != jj_expentry[i]) {
-              exists = false;
-              break;
+              continue jj_entries_loop;
             }
           }
-          if (exists) break;
+          jj_expentries.add(jj_expentry);
+          break jj_entries_loop;
         }
       }
-      if (!exists) jj_expentries.addElement(jj_expentry);
       if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
     }
   }
 
+  /** Generate ParseException. */
   public ParseException generateParseException() {
-    jj_expentries.removeAllElements();
+    jj_expentries.clear();
     boolean[] la1tokens = new boolean[24];
-    for (int i = 0; i < 24; i++) {
-      la1tokens[i] = false;
-    }
     if (jj_kind >= 0) {
       la1tokens[jj_kind] = true;
       jj_kind = -1;
@@ -672,7 +676,7 @@
       if (la1tokens[i]) {
         jj_expentry = new int[1];
         jj_expentry[0] = i;
-        jj_expentries.addElement(jj_expentry);
+        jj_expentries.add(jj_expentry);
       }
     }
     jj_endpos = 0;
@@ -680,20 +684,23 @@
     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.elementAt(i);
+      exptokseq[i] = jj_expentries.get(i);
     }
     return new ParseException(token, exptokseq, tokenImage);
   }
 
+  /** Enable tracing. */
   final public void enable_tracing() {
   }
 
+  /** Disable tracing. */
   final public void disable_tracing() {
   }
 
-  final private void jj_rescan_token() {
+  private void jj_rescan_token() {
     jj_rescan = true;
     for (int i = 0; i < 1; i++) {
+    try {
       JJCalls p = jj_2_rtns[i];
       do {
         if (p.gen > jj_gen) {
@@ -704,11 +711,12 @@
         }
         p = p.next;
       } while (p != null);
+      } catch(LookaheadSuccess ls) { }
     }
     jj_rescan = false;
   }
 
-  final private void jj_save(int index, int xla) {
+  private void jj_save(int index, int xla) {
     JJCalls p = jj_2_rtns[index];
     while (p.gen > jj_gen) {
       if (p.next == null) { p = p.next = new JJCalls(); break; }

Modified: lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/QueryParserConstants.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/QueryParserConstants.java?rev=827772&r1=827771&r2=827772&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/QueryParserConstants.java (original)
+++ lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/QueryParserConstants.java Tue Oct 20 19:58:18 2009
@@ -1,35 +1,66 @@
 /* Generated By:JavaCC: Do not edit this line. QueryParserConstants.java */
 package org.apache.lucene.queryParser.surround.parser;
 
+
+/**
+ * Token literal values and constants.
+ * Generated by org.javacc.parser.OtherFilesGen#start()
+ */
 public interface QueryParserConstants {
 
+  /** End of File. */
   int EOF = 0;
+  /** RegularExpression Id. */
   int _NUM_CHAR = 1;
+  /** RegularExpression Id. */
   int _TERM_CHAR = 2;
+  /** RegularExpression Id. */
   int _WHITESPACE = 3;
+  /** RegularExpression Id. */
   int _STAR = 4;
+  /** RegularExpression Id. */
   int _ONE_CHAR = 5;
+  /** RegularExpression Id. */
   int _DISTOP_NUM = 6;
+  /** RegularExpression Id. */
   int OR = 8;
+  /** RegularExpression Id. */
   int AND = 9;
+  /** RegularExpression Id. */
   int NOT = 10;
+  /** RegularExpression Id. */
   int W = 11;
+  /** RegularExpression Id. */
   int N = 12;
+  /** RegularExpression Id. */
   int LPAREN = 13;
+  /** RegularExpression Id. */
   int RPAREN = 14;
+  /** RegularExpression Id. */
   int COMMA = 15;
+  /** RegularExpression Id. */
   int COLON = 16;
+  /** RegularExpression Id. */
   int CARAT = 17;
+  /** RegularExpression Id. */
   int TRUNCQUOTED = 18;
+  /** RegularExpression Id. */
   int QUOTED = 19;
+  /** RegularExpression Id. */
   int SUFFIXTERM = 20;
+  /** RegularExpression Id. */
   int TRUNCTERM = 21;
+  /** RegularExpression Id. */
   int TERM = 22;
+  /** RegularExpression Id. */
   int NUMBER = 23;
 
+  /** Lexical state. */
   int Boost = 0;
+  /** Lexical state. */
   int DEFAULT = 1;
 
+  /** Literal token values. */
   String[] tokenImage = {
     "<EOF>",
     "<_NUM_CHAR>",

Modified: lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/QueryParserTokenManager.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/QueryParserTokenManager.java?rev=827772&r1=827771&r2=827772&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/QueryParserTokenManager.java (original)
+++ lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/QueryParserTokenManager.java Tue Oct 20 19:58:18 2009
@@ -14,9 +14,13 @@
 import org.apache.lucene.queryParser.surround.query.SrndPrefixQuery;
 import org.apache.lucene.queryParser.surround.query.SrndTruncQuery;
 
+/** Token Manager. */
 public class QueryParserTokenManager implements QueryParserConstants
 {
+
+  /** Debug output. */
   public  java.io.PrintStream debugStream = System.out;
+  /** Set debug output. */
   public  void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
 private final int jjStopStringLiteralDfa_1(int pos, long active0)
 {
@@ -30,21 +34,13 @@
 {
    return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0), pos + 1);
 }
-private final int jjStopAtPos(int pos, int kind)
+private int jjStopAtPos(int pos, int kind)
 {
    jjmatchedKind = kind;
    jjmatchedPos = pos;
    return pos + 1;
 }
-private final int jjStartNfaWithStates_1(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_1(state, pos + 1);
-}
-private final int jjMoveStringLiteralDfa0_1()
+private int jjMoveStringLiteralDfa0_1()
 {
    switch(curChar)
    {
@@ -62,50 +58,19 @@
          return jjMoveNfa_1(0, 0);
    }
 }
-private final void jjCheckNAdd(int state)
-{
-   if (jjrounds[state] != jjround)
-   {
-      jjstateSet[jjnewStateCnt++] = state;
-      jjrounds[state] = jjround;
-   }
-}
-private final void jjAddStates(int start, int end)
-{
-   do {
-      jjstateSet[jjnewStateCnt++] = jjnextStates[start];
-   } while (start++ != end);
-}
-private final void jjCheckNAddTwoStates(int state1, int state2)
-{
-   jjCheckNAdd(state1);
-   jjCheckNAdd(state2);
-}
-private final void jjCheckNAddStates(int start, int end)
-{
-   do {
-      jjCheckNAdd(jjnextStates[start]);
-   } while (start++ != end);
-}
-private final void jjCheckNAddStates(int start)
-{
-   jjCheckNAdd(jjnextStates[start]);
-   jjCheckNAdd(jjnextStates[start + 1]);
-}
 static final long[] jjbitVec0 = {
    0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
 };
 static final long[] jjbitVec2 = {
    0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
 };
-private final int jjMoveNfa_1(int startState, int curPos)
+private int jjMoveNfa_1(int startState, int curPos)
 {
-   int[] nextStates;
    int startsAt = 0;
    jjnewStateCnt = 38;
    int i = 1;
    jjstateSet[0] = startState;
-   int j, kind = 0x7fffffff;
+   int kind = 0x7fffffff;
    for (;;)
    {
       if (++jjround == 0x7fffffff)
@@ -113,7 +78,7 @@
       if (curChar < 64)
       {
          long l = 1L << curChar;
-         MatchLoop: do
+         do
          {
             switch(jjstateSet[--i])
             {
@@ -227,7 +192,7 @@
       else if (curChar < 128)
       {
          long l = 1L << (curChar & 077);
-         MatchLoop: do
+         do
          {
             switch(jjstateSet[--i])
             {
@@ -388,7 +353,7 @@
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
          long l2 = 1L << (curChar & 077);
-         MatchLoop: do
+         do
          {
             switch(jjstateSet[--i])
             {
@@ -446,18 +411,17 @@
       catch(java.io.IOException e) { return curPos; }
    }
 }
-private final int jjMoveStringLiteralDfa0_0()
+private int jjMoveStringLiteralDfa0_0()
 {
    return jjMoveNfa_0(0, 0);
 }
-private final int jjMoveNfa_0(int startState, int curPos)
+private int jjMoveNfa_0(int startState, int curPos)
 {
-   int[] nextStates;
    int startsAt = 0;
    jjnewStateCnt = 3;
    int i = 1;
    jjstateSet[0] = startState;
-   int j, kind = 0x7fffffff;
+   int kind = 0x7fffffff;
    for (;;)
    {
       if (++jjround == 0x7fffffff)
@@ -465,7 +429,7 @@
       if (curChar < 64)
       {
          long l = 1L << curChar;
-         MatchLoop: do
+         do
          {
             switch(jjstateSet[--i])
             {
@@ -494,7 +458,7 @@
       else if (curChar < 128)
       {
          long l = 1L << (curChar & 077);
-         MatchLoop: do
+         do
          {
             switch(jjstateSet[--i])
             {
@@ -509,7 +473,7 @@
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
          long l2 = 1L << (curChar & 077);
-         MatchLoop: do
+         do
          {
             switch(jjstateSet[--i])
             {
@@ -540,19 +504,25 @@
    {
       case 0:
          return ((jjbitVec2[i2] & l2) != 0L);
-      default : 
+      default :
          if ((jjbitVec0[i1] & l1) != 0L)
             return true;
          return false;
    }
 }
+
+/** Token literal values. */
 public static final String[] jjstrLiteralImages = {
 "", null, null, null, null, null, null, null, null, null, null, null, null, 
 "\50", "\51", "\54", "\72", "\136", null, null, null, null, null, null, };
+
+/** Lexer state names. */
 public static final String[] lexStateNames = {
-   "Boost", 
-   "DEFAULT", 
+   "Boost",
+   "DEFAULT",
 };
+
+/** 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, 1, 
 };
@@ -566,15 +536,18 @@
 private final int[] jjrounds = new int[38];
 private final int[] jjstateSet = new int[76];
 protected char curChar;
-public QueryParserTokenManager(CharStream stream)
-{
+/** Constructor. */
+public QueryParserTokenManager(CharStream stream){
    input_stream = stream;
 }
-public QueryParserTokenManager(CharStream stream, int lexState)
-{
+
+/** Constructor. */
+public QueryParserTokenManager(CharStream stream, int lexState){
    this(stream);
    SwitchTo(lexState);
 }
+
+/** Reinitialise parser. */
 public void ReInit(CharStream stream)
 {
    jjmatchedPos = jjnewStateCnt = 0;
@@ -582,18 +555,22 @@
    input_stream = stream;
    ReInitRounds();
 }
-private final void ReInitRounds()
+private void ReInitRounds()
 {
    int i;
    jjround = 0x80000001;
    for (i = 38; i-- > 0;)
       jjrounds[i] = 0x80000000;
 }
+
+/** Reinitialise parser. */
 public void ReInit(CharStream stream, int lexState)
 {
    ReInit(stream);
    SwitchTo(lexState);
 }
+
+/** Switch to specified lex state. */
 public void SwitchTo(int lexState)
 {
    if (lexState >= 2 || lexState < 0)
@@ -604,14 +581,25 @@
 
 protected Token jjFillToken()
 {
-   Token t = Token.newToken(jjmatchedKind);
-   t.kind = jjmatchedKind;
+   final Token t;
+   final String curTokenImage;
+   final int beginLine;
+   final int endLine;
+   final int beginColumn;
+   final int endColumn;
    String im = jjstrLiteralImages[jjmatchedKind];
-   t.image = (im == null) ? input_stream.GetImage() : im;
-   t.beginLine = input_stream.getBeginLine();
-   t.beginColumn = input_stream.getBeginColumn();
-   t.endLine = input_stream.getEndLine();
-   t.endColumn = input_stream.getEndColumn();
+   curTokenImage = (im == null) ? input_stream.GetImage() : im;
+   beginLine = input_stream.getBeginLine();
+   beginColumn = input_stream.getBeginColumn();
+   endLine = input_stream.getEndLine();
+   endColumn = input_stream.getEndColumn();
+   t = Token.newToken(jjmatchedKind, curTokenImage);
+
+   t.beginLine = beginLine;
+   t.endLine = endLine;
+   t.beginColumn = beginColumn;
+   t.endColumn = endColumn;
+
    return t;
 }
 
@@ -622,22 +610,21 @@
 int jjmatchedPos;
 int jjmatchedKind;
 
+/** Get the next Token. */
 public Token getNextToken() 
 {
-  int kind;
-  Token specialToken = null;
   Token matchedToken;
   int curPos = 0;
 
   EOFLoop :
   for (;;)
-  {   
-   try   
-   {     
+  {
+   try
+   {
       curChar = input_stream.BeginToken();
-   }     
+   }
    catch(java.io.IOException e)
-   {        
+   {
       jjmatchedKind = 0;
       matchedToken = jjFillToken();
       return matchedToken;
@@ -697,4 +684,31 @@
   }
 }
 
+private void jjCheckNAdd(int state)
+{
+   if (jjrounds[state] != jjround)
+   {
+      jjstateSet[jjnewStateCnt++] = state;
+      jjrounds[state] = jjround;
+   }
+}
+private void jjAddStates(int start, int end)
+{
+   do {
+      jjstateSet[jjnewStateCnt++] = jjnextStates[start];
+   } while (start++ != end);
+}
+private void jjCheckNAddTwoStates(int state1, int state2)
+{
+   jjCheckNAdd(state1);
+   jjCheckNAdd(state2);
+}
+
+private void jjCheckNAddStates(int start, int end)
+{
+   do {
+      jjCheckNAdd(jjnextStates[start]);
+   } while (start++ != end);
+}
+
 }

Modified: lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/Token.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/Token.java?rev=827772&r1=827771&r2=827772&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/Token.java (original)
+++ lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/Token.java Tue Oct 20 19:58:18 2009
@@ -1,4 +1,5 @@
-/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */
+/* Generated By:JavaCC: Do not edit this line. Token.java Version 4.1 */
+/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null */
 package org.apache.lucene.queryParser.surround.parser;
 
 /**
@@ -14,12 +15,14 @@
    */
   public int kind;
 
-  /**
-   * beginLine and beginColumn describe the position of the first character
-   * of this token; endLine and endColumn describe the position of the
-   * last character of this token.
-   */
-  public int beginLine, beginColumn, endLine, endColumn;
+  /** The line number of the first character of this Token. */
+  public int beginLine;
+  /** The column number of the first character of this Token. */
+  public int beginColumn;
+  /** The line number of the last character of this Token. */
+  public int endLine;
+  /** The column number of the last character of this Token. */
+  public int endColumn;
 
   /**
    * The string image of the token.
@@ -51,6 +54,40 @@
   public Token specialToken;
 
   /**
+   * An optional attribute value of the Token.
+   * Tokens which are not used as syntactic sugar will often contain
+   * meaningful values that will be used later on by the compiler or
+   * interpreter. This attribute value is often different from the image.
+   * Any subclass of Token that actually wants to return a non-null value can
+   * override this method as appropriate.
+   */
+  public Object getValue() {
+    return null;
+  }
+
+  /**
+   * No-argument constructor
+   */
+  public Token() {}
+
+  /**
+   * Constructs a new token for the specified Image.
+   */
+  public Token(int kind)
+  {
+     this(kind, null);
+  }
+
+  /**
+   * Constructs a new token for the specified Image and Kind.
+   */
+  public Token(int kind, String image)
+  {
+     this.kind = kind;
+     this.image = image;
+  }
+
+  /**
    * Returns the image.
    */
   public String toString()
@@ -63,19 +100,25 @@
    * can create and return subclass objects based on the value of ofKind.
    * Simply add the cases to the switch for all those special cases.
    * For example, if you have a subclass of Token called IDToken that
-   * you want to create if ofKind is ID, simlpy add something like :
+   * you want to create if ofKind is ID, simply add something like :
    *
-   *    case MyParserConstants.ID : return new IDToken();
+   *    case MyParserConstants.ID : return new IDToken(ofKind, image);
    *
    * to the following switch statement. Then you can cast matchedToken
-   * variable to the appropriate type and use it in your lexical actions.
+   * variable to the appropriate type and use sit in your lexical actions.
    */
-  public static final Token newToken(int ofKind)
+  public static Token newToken(int ofKind, String image)
   {
      switch(ofKind)
      {
-       default : return new Token();
+       default : return new Token(ofKind, image);
      }
   }
 
+  public static Token newToken(int ofKind)
+  {
+     return newToken(ofKind, null);
+  }
+
 }
+/* JavaCC - OriginalChecksum=a1d2d2c0d7f5810183a1438fb4d51c1c (do not edit this line) */

Modified: lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/TokenMgrError.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/TokenMgrError.java?rev=827772&r1=827771&r2=827772&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/TokenMgrError.java (original)
+++ lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/TokenMgrError.java Tue Oct 20 19:58:18 2009
@@ -1,19 +1,23 @@
-/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 3.0 */
+/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 4.1 */
+/* JavaCCOptions: */
 package org.apache.lucene.queryParser.surround.parser;
 
+/** 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 occured.
+    * Lexical error occurred.
     */
    static final int LEXICAL_ERROR = 0;
 
    /**
-    * An attempt wass made to create a second instance of a static token manager.
+    * An attempt was made to create a second instance of a static token manager.
     */
    static final int STATIC_LEXER_ERROR = 1;
 
@@ -34,7 +38,7 @@
    int errorCode;
 
    /**
-    * Replaces unprintable characters by their espaced (or unicode escaped)
+    * Replaces unprintable characters by their escaped (or unicode escaped)
     * equivalents in the given string
     */
    protected static final String addEscapes(String str) {
@@ -85,12 +89,12 @@
    /**
     * 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 lexicl error
-    *    curLexState : lexical state in which this error occured
-    *    errorLine   : line number when the error occured
-    *    errorColumn : column number when the error occured
-    *    errorAfter  : prefix that was seen before this error occured
+    * 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.
     */
@@ -105,7 +109,7 @@
    /**
     * 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 : 
+    * of end-users concern, so you can return something like :
     *
     *     "Internal Error : Please file a bug report .... "
     *
@@ -119,15 +123,19 @@
     * 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=fecdd69c7d7b49407e441e312085db53 (do not edit this line) */

Modified: lucene/java/branches/flex_1458/src/demo/org/apache/lucene/demo/html/HTMLParser.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/demo/org/apache/lucene/demo/html/HTMLParser.java?rev=827772&r1=827771&r2=827772&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/demo/org/apache/lucene/demo/html/HTMLParser.java (original)
+++ lucene/java/branches/flex_1458/src/demo/org/apache/lucene/demo/html/HTMLParser.java Tue Oct 20 19:58:18 2009
@@ -439,56 +439,60 @@
     jj_consume_token(ScriptEnd);
   }
 
-  final private boolean jj_2_1(int xla) {
+  private boolean jj_2_1(int xla) {
     jj_la = xla; jj_lastpos = jj_scanpos = token;
     try { return !jj_3_1(); }
     catch(LookaheadSuccess ls) { return true; }
     finally { jj_save(0, xla); }
   }
 
-  final private boolean jj_2_2(int xla) {
+  private boolean jj_2_2(int xla) {
     jj_la = xla; jj_lastpos = jj_scanpos = token;
     try { return !jj_3_2(); }
     catch(LookaheadSuccess ls) { return true; }
     finally { jj_save(1, xla); }
   }
 
-  final private boolean jj_3_1() {
+  private boolean jj_3_1() {
     if (jj_scan_token(ArgQuote1)) return true;
     if (jj_scan_token(CloseQuote1)) return true;
     return false;
   }
 
-  final private boolean jj_3_2() {
+  private boolean jj_3_2() {
     if (jj_scan_token(ArgQuote2)) return true;
     if (jj_scan_token(CloseQuote2)) return true;
     return false;
   }
 
+  /** Generated Token Manager. */
   public HTMLParserTokenManager token_source;
   SimpleCharStream jj_input_stream;
-  public Token token, jj_nt;
+  /** Current token. */
+  public Token token;
+  /** Next token. */
+  public Token jj_nt;
   private int jj_ntk;
   private Token jj_scanpos, jj_lastpos;
   private int jj_la;
-  public boolean lookingAhead = false;
-  private boolean jj_semLA;
   private int jj_gen;
   final private int[] jj_la1 = new int[14];
   static private int[] jj_la1_0;
   static {
-      jj_la1_0();
+      jj_la1_init_0();
    }
-   private static void jj_la1_0() {
+   private static void jj_la1_init_0() {
       jj_la1_0 = new int[] {0x2c7e,0x2c7e,0x10000,0x380000,0x20000,0x80000,0x100000,0x200000,0x3b0000,0x3b0000,0x8000000,0x20000000,0x30,0x4000,};
    }
   final private JJCalls[] jj_2_rtns = new JJCalls[2];
   private boolean jj_rescan = false;
   private int jj_gc = 0;
 
+  /** Constructor with InputStream. */
   public HTMLParser(java.io.InputStream stream) {
      this(stream, null);
   }
+  /** Constructor with InputStream and supplied encoding */
   public HTMLParser(java.io.InputStream stream, String encoding) {
     try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
     token_source = new HTMLParserTokenManager(jj_input_stream);
@@ -499,9 +503,11 @@
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
+  /** Reinitialise. */
   public void ReInit(java.io.InputStream stream) {
      ReInit(stream, null);
   }
+  /** Reinitialise. */
   public void ReInit(java.io.InputStream stream, String encoding) {
     try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
     token_source.ReInit(jj_input_stream);
@@ -512,6 +518,7 @@
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
+  /** Constructor. */
   public HTMLParser(java.io.Reader stream) {
     jj_input_stream = new SimpleCharStream(stream, 1, 1);
     token_source = new HTMLParserTokenManager(jj_input_stream);
@@ -522,6 +529,7 @@
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
+  /** Reinitialise. */
   public void ReInit(java.io.Reader stream) {
     jj_input_stream.ReInit(stream, 1, 1);
     token_source.ReInit(jj_input_stream);
@@ -532,6 +540,7 @@
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
+  /** Constructor with generated Token Manager. */
   public HTMLParser(HTMLParserTokenManager tm) {
     token_source = tm;
     token = new Token();
@@ -541,6 +550,7 @@
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
+  /** Reinitialise. */
   public void ReInit(HTMLParserTokenManager tm) {
     token_source = tm;
     token = new Token();
@@ -550,7 +560,7 @@
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
-  final private Token jj_consume_token(int kind) throws ParseException {
+  private Token jj_consume_token(int kind) throws ParseException {
     Token oldToken;
     if ((oldToken = token).next != null) token = token.next;
     else token = token.next = token_source.getNextToken();
@@ -576,7 +586,7 @@
 
   static private final class LookaheadSuccess extends java.lang.Error { }
   final private LookaheadSuccess jj_ls = new LookaheadSuccess();
-  final private boolean jj_scan_token(int kind) {
+  private boolean jj_scan_token(int kind) {
     if (jj_scanpos == jj_lastpos) {
       jj_la--;
       if (jj_scanpos.next == null) {
@@ -597,6 +607,8 @@
     return false;
   }
 
+
+/** Get the next Token. */
   final public Token getNextToken() {
     if (token.next != null) token = token.next;
     else token = token.next = token_source.getNextToken();
@@ -605,8 +617,9 @@
     return token;
   }
 
+/** Get the specific Token. */
   final public Token getToken(int index) {
-    Token t = lookingAhead ? jj_scanpos : token;
+    Token t = token;
     for (int i = 0; i < index; i++) {
       if (t.next != null) t = t.next;
       else t = t.next = token_source.getNextToken();
@@ -614,14 +627,14 @@
     return t;
   }
 
-  final private int jj_ntk() {
+  private int jj_ntk() {
     if ((jj_nt=token.next) == null)
       return (jj_ntk = (token.next=token_source.getNextToken()).kind);
     else
       return (jj_ntk = jj_nt.kind);
   }
 
-  private java.util.Vector jj_expentries = new java.util.Vector();
+  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];
@@ -636,31 +649,26 @@
       for (int i = 0; i < jj_endpos; i++) {
         jj_expentry[i] = jj_lasttokens[i];
       }
-      boolean exists = false;
-      for (java.util.Enumeration e = jj_expentries.elements(); e.hasMoreElements();) {
-        int[] oldentry = (int[])(e.nextElement());
+      jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) {
+        int[] oldentry = (int[])(it.next());
         if (oldentry.length == jj_expentry.length) {
-          exists = true;
           for (int i = 0; i < jj_expentry.length; i++) {
             if (oldentry[i] != jj_expentry[i]) {
-              exists = false;
-              break;
+              continue jj_entries_loop;
             }
           }
-          if (exists) break;
+          jj_expentries.add(jj_expentry);
+          break jj_entries_loop;
         }
       }
-      if (!exists) jj_expentries.addElement(jj_expentry);
       if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
     }
   }
 
+  /** Generate ParseException. */
   public ParseException generateParseException() {
-    jj_expentries.removeAllElements();
+    jj_expentries.clear();
     boolean[] la1tokens = new boolean[31];
-    for (int i = 0; i < 31; i++) {
-      la1tokens[i] = false;
-    }
     if (jj_kind >= 0) {
       la1tokens[jj_kind] = true;
       jj_kind = -1;
@@ -678,7 +686,7 @@
       if (la1tokens[i]) {
         jj_expentry = new int[1];
         jj_expentry[0] = i;
-        jj_expentries.addElement(jj_expentry);
+        jj_expentries.add(jj_expentry);
       }
     }
     jj_endpos = 0;
@@ -686,18 +694,20 @@
     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.elementAt(i);
+      exptokseq[i] = jj_expentries.get(i);
     }
     return new ParseException(token, exptokseq, tokenImage);
   }
 
+  /** Enable tracing. */
   final public void enable_tracing() {
   }
 
+  /** Disable tracing. */
   final public void disable_tracing() {
   }
 
-  final private void jj_rescan_token() {
+  private void jj_rescan_token() {
     jj_rescan = true;
     for (int i = 0; i < 2; i++) {
     try {
@@ -717,7 +727,7 @@
     jj_rescan = false;
   }
 
-  final private void jj_save(int index, int xla) {
+  private void jj_save(int index, int xla) {
     JJCalls p = jj_2_rtns[index];
     while (p.gen > jj_gen) {
       if (p.next == null) { p = p.next = new JJCalls(); break; }

Modified: lucene/java/branches/flex_1458/src/demo/org/apache/lucene/demo/html/HTMLParserConstants.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/demo/org/apache/lucene/demo/html/HTMLParserConstants.java?rev=827772&r1=827771&r2=827772&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/demo/org/apache/lucene/demo/html/HTMLParserConstants.java (original)
+++ lucene/java/branches/flex_1458/src/demo/org/apache/lucene/demo/html/HTMLParserConstants.java Tue Oct 20 19:58:18 2009
@@ -1,48 +1,92 @@
 /* Generated By:JavaCC: Do not edit this line. HTMLParserConstants.java */
 package org.apache.lucene.demo.html;
 
+
+/**
+ * Token literal values and constants.
+ * Generated by org.javacc.parser.OtherFilesGen#start()
+ */
 public interface HTMLParserConstants {
 
+  /** End of File. */
   int EOF = 0;
+  /** RegularExpression Id. */
   int ScriptStart = 1;
+  /** RegularExpression Id. */
   int TagName = 2;
+  /** RegularExpression Id. */
   int DeclName = 3;
+  /** RegularExpression Id. */
   int Comment1 = 4;
+  /** RegularExpression Id. */
   int Comment2 = 5;
+  /** RegularExpression Id. */
   int Word = 6;
+  /** RegularExpression Id. */
   int LET = 7;
+  /** RegularExpression Id. */
   int NUM = 8;
+  /** RegularExpression Id. */
   int HEX = 9;
+  /** RegularExpression Id. */
   int Entity = 10;
+  /** RegularExpression Id. */
   int Space = 11;
+  /** RegularExpression Id. */
   int SP = 12;
+  /** RegularExpression Id. */
   int Punct = 13;
+  /** RegularExpression Id. */
   int ScriptText = 14;
+  /** RegularExpression Id. */
   int ScriptEnd = 15;
+  /** RegularExpression Id. */
   int ArgName = 16;
+  /** RegularExpression Id. */
   int ArgEquals = 17;
+  /** RegularExpression Id. */
   int TagEnd = 18;
+  /** RegularExpression Id. */
   int ArgValue = 19;
+  /** RegularExpression Id. */
   int ArgQuote1 = 20;
+  /** RegularExpression Id. */
   int ArgQuote2 = 21;
+  /** RegularExpression Id. */
   int Quote1Text = 23;
+  /** RegularExpression Id. */
   int CloseQuote1 = 24;
+  /** RegularExpression Id. */
   int Quote2Text = 25;
+  /** RegularExpression Id. */
   int CloseQuote2 = 26;
+  /** RegularExpression Id. */
   int CommentText1 = 27;
+  /** RegularExpression Id. */
   int CommentEnd1 = 28;
+  /** RegularExpression Id. */
   int CommentText2 = 29;
+  /** RegularExpression Id. */
   int CommentEnd2 = 30;
 
+  /** Lexical state. */
   int DEFAULT = 0;
+  /** Lexical state. */
   int WithinScript = 1;
+  /** Lexical state. */
   int WithinTag = 2;
+  /** Lexical state. */
   int AfterEquals = 3;
+  /** Lexical state. */
   int WithinQuote1 = 4;
+  /** Lexical state. */
   int WithinQuote2 = 5;
+  /** Lexical state. */
   int WithinComment1 = 6;
+  /** Lexical state. */
   int WithinComment2 = 7;
 
+  /** Literal token values. */
   String[] tokenImage = {
     "<EOF>",
     "\"<script\"",



Mime
View raw message