README tweaks; added CQLGenerator script
[cql-java-moved-to-github.git] / README
diff --git a/README b/README
index 6d123c7..9fa8487 100644 (file)
--- a/README
+++ b/README
@@ -1,13 +1,15 @@
-$Id: README,v 1.3 2002-10-25 07:38:16 mike Exp $
+$Id: README,v 1.9 2002-11-02 01:24:41 mike Exp $
 
 cql-java -- a free CQL compiler for Java
 
 
 This project provides a set of classes for representing a CQL parse
-tree (CQLBooleanNode, CQLTermNode, etc.) and a Compiler class which
+tree (CQLBooleanNode, CQLTermNode, etc.) and a CQLCompiler class which
 builds a parse tree given a CQL query as input.  It also provides
-compiler back-ends to render out the parse tree either as XCQL or
-Yaz-style Prefix Query Format (PQF).
+compiler back-ends to render out the parse tree as XCQL (the XML
+representation), as PQF (Yaz-style Prefix Query Format) and as CQL
+(i.e. decompiling the parse-tree).  Oh, and there's a random query
+generator, too.
 
 CQL is "Common Query Language", a new query language designed under
 the umbrella of the ZING initiative (Z39.59-International Next
@@ -42,7 +44,7 @@ Library:
        // Parsing a CQL query
        CQLParser parser = new CQLParser();
        CQLNode root = parser.parse("title=dinosaur");
-       System.out.println(root.toXCQL(0));
+       System.out.print(root.toXCQL(0));
        System.out.println(root.toCQL());
        System.out.println(root.toPQF(qualSet));
        // ... where `qualSet' specifies CQL-qualfier => Z-attr mapping
@@ -51,8 +53,8 @@ Library:
 DESCRIPTION
 -----------
 
-Se the automatically generated class documentation in the "doc"
-subdirectory.  (### It's not there yet, of course)
+See the automatically generated class documentation in the "doc"
+subdirectory.  (It's not all there yet, but it's coming.)
 
 
 AUTHOR
@@ -70,9 +72,61 @@ licence to use.  Be good.  Assume I'm going with the GPL (most
 restrictive) until I say otherwise.
 
 
+TESTING
+-------
+
+Ways of testing the parser and other components include:
+
+* Generate a random tree with CQLGenerate, take a copy, and
+  canonicalise it with CQLparser -c.  Since the CQLGenerate output is
+  in canonical form anyway, the before-and-after versions should be
+  identical.
+
+* ... others :-)
+
+
 SEE ALSO
 --------
 
 Adam Dickmeiss's CQL compiler, written in C.
 Rob Sanderson's CQL compiler, written in Python.
-All the other free CQL compilers everyone's going to write.
+All the other free CQL compilers everyone's going to write  :-)
+
+
+TO DO
+-----
+
+* ### Fix bug where "9x" is parsed as two tokens, a NUMBER and a
+  WORD.  (And why is "x9" OK?)
+
+* Allow CQLGenerate test-harness to take some of its configuration
+  parameters on the command-line as well as or instead of a file.
+
+* Some niceties for the cql-decompiling back-end:
+       * don't emit redundant parentheses.
+       * don't put spaces around relations that don't need them.
+
+* Write pqn-generating back-end (will need to be driven from a
+  configuation file specifying how to represent the qualifiers,
+  relations, relation modifiers and wildcard characters as z39.50
+  attributes.)
+
+* Consider the utility of yet another back-end that translates a
+  CQLNode tree into a Type-1 query tree using the JZKit data
+  structures.  That would be nice so that CQL could become a JZKit
+  query-type; but you could achieve the same effect by generating PQN,
+  and running that through JZKit's existing PQN-to-Type-1 compiler.
+
+* Refinements to random query generator:
+       * Generate relation modifiers
+       * Proximity support
+       * Don't always generate qualifier/relation for terms
+       * Better selection of qualifier (configurable?)
+       * Better selection of terms (from a dictionary file?)
+       * Introduce wildcard characters into generated terms
+       * Generate multi-word terms
+
+* Write fuller "javadoc" comments.
+
+* Write generic test suite.
+