2003-11-14  Per Bothner  <per@bothner.com>

	* XQuery.java (<init>):  New use StringValue.concat$V.

2003-11-09  Per Bothner  <per@bothner.com>

	* XQuery.java (PARSE_WITH_FOCUS):  New flag.
	(parse):  Check for PARSE_WITH_FOCUS.
	(applyWithFocus, applyWithFocus$X, evalToFocusProc, evalWithFocus,
	eval_with_focus$X):  New methods.

2003-11-08  Per Bothner  <per@bothner.com>

	* XQuery.java (parse):  Update to take a Lexer rather than an InPort.

2003-11-02  Per Bothner  <per@bothner.com>

	* XQParser.java (peekOperator):  Return if EOL_TOKEN and 0 nesting.
	This fixes parseUnionExpr and parseIntersectExceptExpr.
	(parseBinaryExpr):  Trivial tweak.

	* XQuery.java (parse, parseFile):  Combined to single 'parse' method.

2003-10-30  Per Bothner  <per@bothner.com>

	* XQuery.java (typeMap):  New static field.
	(getTypeFor):  Use typeMap for standard Schema types.

	* XQParser.java (IMPORT_SCHEMA_TOKEN):  New constant.
	(parse):  Report that 'import schema' is unimplemented.

2003-10-29  Per Bothner  <per@bothner.com>

	* XQParser.java (parse):  Use BeginExp.canonicalize(Expression[])).

2003-10-19  Per Bothner  <per@bothner.com>

	* XQuery.java (parse, parseFile):  Pass this to Compilation.

2003-10-16  Per Bothner  <per@bothner.com>

	* XQParser.java (peekOperator):  Recognize 'except' and 'intersect'.
	(makeBinary):  Handle OP_EXCEPT and OP_INTERSECT.
	(parseUnionExpr, parseIntersectExceptExpr):  Call peekOperator.

	* XQParser.java (parseExprSingle):  New method.
	Use it where appropriate.

	* XQParser.java (parseMaybePrimaryExpr):  Handle 'every' and 'some'.
	(parseQuantifiedExpr):  New method.

	* XQParser.java (setType):  New helper method
	(parseFLWRExpression):  Call parseOptionalTypeDeclaration and setType.
	(parseFLWRExpression):  Handle subsequence 'for/let' clauses.
	(parseFLWRExpression):  Detect 'order' and print "not implemented".

	* XQParser.java (tokenString):  New debug helper method.

2003-10-12  Per Bothner  <per@bothner.com>

	* XQParser.java (parse):  Use Compilation.mangleURI for namespaces
	of library module declaration and import.

2003-10-11  Per Bothner  <per@bothner.com>

	* XQParser.java (resolveQName, parserVariable):  New methods.
	(parseMaybePrimaryExpr):  Use parseVariable for '$' VarName.
	Set curToken before parseFLWRExpression.
	(parseFLWRExpression):  Use parseVariable.
	(parseFLWRExpression):  Use resolveQName and parseVariable.
	(parse):  For 'declare variable' use parseVariable.
	Check if 'local:' prefix and set privacy flag appropriately.
	(parseTypeSwitch):  Update typeswitch syntax - handling of 'as'.

2003-10-09  Per Bothner  <per@bothner.com>

	* XQParser.java	(parseFLWRExpression/3):  Inline into single caller.
	(parseFunctionDefinition):  make function static only if module is.
	* XQuery.java (parse, parseFile):  Revert change making modules static.

2003-10-08  Per Bothner  <per@bothner.com>

	* XQParser.java (peekOperator):  Handle ValueComp operators 'eq' ...
	by mapping them to GeneralComp operators '=' ... .

	* XQParser.java (parseUnaryExpr):  Provide implementation.

	* XQParser.java:  Initial support for modules.
	(IMPORT_MODULE_TOKEN, MODULE_NAMESPACE_TOKEN):  New constant.
	(peekOperand):  Recognize new compound tokens.
	(pushStandardNamespaces):  Define kawa and qexo prefixes.
	(parseMaybePrimaryExpr):  Better handling of function names.
	(parseFunctionDefinition):  Likewise.  Make functions static.
	'local' prefix sets private flag.
	(parse):  Recognize module declaration and module import.
	'declare function namespace' is now supported.
	(getRawToken):  Recognize ';'.
	* XQuery.java (KAWA_FUNCTION_NAMESPACE):  New constant.
	(parse):  XQuery modules are now static.
	(define, define_method):  New method overrides.
	(<init>):  Initialize qexo namespace.
	Don't define 'define'.

2003-09-28  Per Bothner  <per@bothner.com>

	* XQParser.java (getRawToken):  Add missing tokenBufferAppend.
	Fixes bug reported 09-28 by Weiqi Gao <weiqigao@networkusa.net>.

2003-09-18  Per Bothner  <per@bothner.com>

	* XQuery.java (<init>):  Add root function.
	* XQParser.java (parsePathExpr):  Handle non-relative path expressions.
	(parseRelativePathExpr):  Caller now does the parseStepExpr.
	* XQParser.java:  Add import of ClassType.

2003-09-14  Per Bothner  <per@bothner.com>

	* XQParser.java (parseNodeTest):  Support other axes.

	* XQParser.java (funcNamedChildren, funcNamedDescendants,
	funcNamedDescendantsOrSelf):  Remove no-longer-used static fields.

2003-09-11  Per Bothner  <per@bothner.com>

	* XQParser.java (skipSpaceOrComment):  Rename to skipSpace, taking
	an extra argument to indicate skipping past new line.
	(parseFLWRExpression):  Use renamed skipSpace.
	(skipSpace):  Use new skipSpace(true).
	(skipHSpace):  Replaced by skipSpace(false).
	(peekNonSpace, peekOperand, parseMaybePrimaryExpr, parse):
	Use new unary skipSpace.
	(parseSeparator):  Provide implementation.
	(parse):  Add missing parseSeparator calls.
	(parse):  Update to new xmlspace syntax.

2003-09-10  Per Bothner  <per@bothner.com>

	* XQParser.java (warnOldVersion):  New static variable.
	(DEFINE_FUNCTION_TOKEN):  Rename to DEFINE_VARIABLE_TOKEN.
	(DECLARE_FUNCTION_TOKEN):  Rename to DECLARE_VARIABLE_TOKEN.
	(peekOperand):  Recognize <declare function> amd <declare variable>.
	Also recognize (and if warnOldVersion warn) the <define ...> syntax.
	(parse):  Update to handle new syntax as well as old syntax.

	* XQParser.java (DOT_VARNAME, POSITION_VARNAME, LAST_VARNAME):  Change
	values to names don't need to be mangled.

	* XQParser.java (pushStandardNamespaces):  Define 'local' prefix.

	* XQParser.java (parseNodeTest, parseRelativePathExpr):  Simplify
	using ApplyExp constructor that takes a method or Procedure..

	* XQParser.java (parseMaybePrimaryExpr):  Do syntaxError instead of
	throw on syntax confusion.

	* XQParser.java (parseFLWRExpression):  Re-organize methods so we
	can parse and handle 'at' clause.

2003-09-04  Per Bothner  <per@bothner.com>

	* XQuery.java (parse, parseFile):  Change defaultCallConvention
	to new CALL_WITH_CONSUMER.

2003-08-03  Per Bothner  <per@bothner.com>

	* XQParser.java (parseNodeTest):  Handle self:: and parent:: axies.
	(parseNodeTest):  Handle '.' and '..' abbreviated steps.

	* XQParser.java (focusDefined):  Remove field.  Instead, just check
	whether DOT_VARNAME is in scope.
	(parseRelativePathExpr, parseStepQualifiers,
	parseFunctionDefinition):  Don't set/unset focusDefined.
	(DOT_VARNAME, POSITION_VARNAME, LAST_VARNAME):  New constants.
	(parseNodeTest):  Look for DOT_VARNAME to see if context is defined.
	(parseCheckNodeTest):  Remove - just use parseNodeTest directly.
	(parseMaybePrimaryExpr):  Re-write position() and last() to
	RerefenceExps using POSITION_VARNAME and LAST_VARNAME.
	(parseNodeTest):  Use new xxxAxis classes.
	(parseRelativePathExpr):  Second expression is now a 3-argument
	LambdaExp.  Pass it DOT_VARNAME, POSITION_VARNAME, and LAST_VARNAME.
	Handle '//' now exactly as specified in standard.
	Comment out some optimizations for now.
	Use new RelativeStep class instead of ValuesMap.
	(parseStepQualifiers):  Pass axis parameter, since handling of
	qualifiers depends on type of axis (forward, reverse, or none).
	Second expression is also now a 3-argument LambdaExp.
	Pass it DOT_VARNAME, POSITION_VARNAME, and LAST_VARNAME.

	* XQuery.java (<init>):  Don't define position() - it is now
	re-written at parse time to POSITION_VARNAME.

2003-08-01  Per Bothner  <per@bothner.com>

	* XQuery.java (XQUERY_FUNCTION_NAMESPACE):  Update URL.

	* XQParser.java (peekOperator):  Map 'union' to OP_UNION.
	(makeBinary):  Implement OP_UNION using UnionNodes class.

	* XQParserjava (makeBinary):  Return syntaxError if unimplemented op.
	Updates throws specifier to allow this.

	* XQParser.java (preserveBoundarySpace):  New field.
	(DECLARE_XMLSPACE_TOKEN):  New constant.
	(peekOperand):  Map 'declare' 'xmlspace' to DECLARE_XMLSPACE_TOKEN.
	(parseContent):  Skip boundary whitespace if appropriate.
	(parse):  Parse xmlspace declaration.

	* XQParser.java (parseFunctionDefinition):  Handle optional return
	type declaration using Convert.setCoercedReturnValue.

2003-07-26  Per Bothner  <per@bothner.com>

	* XQuery.java (<init>):  Add distinct-nodes function.

2003-07-23  Terje Pedersen  <terje@brassforum.com>

	* XQuery.java (<init>):  Define string-length, substring-before,
	substring-after, translate, string-pad, contains, starts-with,
	ends-with, string-join):  New standard functions.

2003-07-23  Per Bothner  <per@bothner.com>

	* XQParser.java (OP_IS, OP_ISNOT, OP_GRTGRT, OP_LSSLSS):  New tokens.
	(OP_xxx):  Renumber, at least for now.
	(getRawToken):  Recognize '>>' as OP_GRTGRT and '<<' as OP_LSSLSS.
	(peekOperator):  Recognis 'is' and 'isnot'.
	(makeBinary):  Handle new tokens.

	* XQParser.java (parseMaybePrimaryExpr):  Intern string literal.

2003-07-17  Per Bothner  <per@bothner.com>

	* XQParser.java (matchConstructorKeyword):  Fix bug reported
	07-17 by Craig.Munday@ecard.com.au.

2003-07-10  Per Bothner  <per@bothner.com>

	* XQParser.java (matchConstructorKeyword):  Add extra unread/read
	pair, in case 'next' is the only character of a name.

2003-06-27  Per Bothner  <per@bothner.com>

	* XQParser.java (XQParser):  Error handling improvements:  Better
	messages, plus special case for 'define QName ('.

2003-06-05  Per Bothner  <per@bothner.com>

	* XQuery.java (Prompter.apply1):  Prettier prompt format.

2003-05-31  Per Bothner  <per@bothner.com>

	* XQuery.java (getOutputConsumer):  Update return type.

2003-05-30  Per Bothner  <per@bothner.com>

	* XQParser.java (DEFINE_VARIABLE_TOKEN): New token constant.
	(peekOperand):  Recognize 'define variable'.
	(parse):  Handle DEFINE_VARIABLE_TOKEN.

2003-05-13  Per Bothner  <per@bothner.com>

	* XQParser.java:  Handle new KindType syntax of May '03 draft.
	(parseSimpleKindType, warnOldStyleKindTest. parseItemtype):  New.
	(parseElementType):  Handle new syntax.
	(parseDataType):  Handle new syntax.  Use OccurrenceType.

2003-05-10  Per Bothner  <per@bothner.com>

	* XQParser.java (checkNext):  Moved to Lexer, and made public.

	* XQParser.java (getrawToken):  In string literals, handle
	character and entity references, and doubled delimters.
	(appendNamedEntity):  Removed StringBuffer parameter; write to
	tokenBuffer instead.
	(parseEntityOrCharRef):  New method.
	(parseContent):  Use tokenBuffer instead of a new StringBuffer.
	Handle double-quated attributes delimiters.  Use parseEntityOrCharRef.

2003-05-08  Per Bothner  <per@bothner.com>

	* XQParser.java (skipComment):  Now handles (:new-style:) comments.
	(skipOldComment):  New method to handle {--old-style--} comments.
	(skipSpaceOrComment, getRawToken):  Handle either style of comment.
	(peekOperand): A NAME '(' followed by ':' is not an FNAME.
	* XQuery.java (Prompter.apply1):  Use new-style comment syntax.

	* XQParser.java (COLON_EQUAL_TOKEN):  New constant.
	(getRawToken):  If ':' is followed by '=' return COLON_EQUAL_TOKEN.
	If NCNAME ':' is followed by '=' return NCNAME_TOKEN, and back up.
	(parseFLWRExpression):  No need to check for NCNAME_COLON_TOKEN.

	* XQParser.java (parseEnclosedExpr):  More error-tolerant parsing.
	(parseIfExp):  Recover from missing 'then' or 'else'.
	(parseFLWRExpression):  Recover from ':=' / 'in' confusion.

	* XQuery.java (<init>):  Allow 'doc' as synonym for 'document'.
	New 'trace' method.

2003-04-21  Per Bothner  <per@bothner.com>

	* XQuery.java (parse, parseFile):  Do ResolveNames.
	* XQParser.java (parseMaybePrimaryExpr):  Remove now-redundant
	function-name lookup; the rewriteToInvocation call appears redundant
	given following Inlinecalls.

2003-04-19  Per Bothner  <per@bothner.com>

	* XQParser.java:  Update to use NameLookup.
	(parseStepQualifiers):  Defer NameLookup's push after addDeclaration.
	(parseFunctionDefinition):  Explicitly push declarations.

2003-04-18  Per Bothner  <per@bothner.com>

	* XQParser.java (mark, reset):  New methods.
	(matchConstructorKeyword):  Now handles context dependency correctly,
	parsing ahead using mark and reset if needed.
	(parseMaybePrimaryExpr):  Let matchConstructorKeyword check context.

2003-03-29  Per Bothner  <per@bothner.com>

	* XQParser.java (interpreter):  New field.
	* XQuery.java (getLexer):  Set XQParser's interpreter field.

	* XQuery.java (<init>):  Define lower-case, upper-case, substring.

	* XQuery.java (getTypeFor):  Handle type "string".
	* XQParser.java (parseDataType):  Use getTypeFor.

2003-03-15  Per Bothner  <per@bothner.com>

	* XQParser.java (parseElementConstructor):  The default namespace
	for an attribute is "", not null.

	* XQParser.java (parseNameSpec):  Don't bother passing the
	defaultNamespaceUri to parseNameTest as it isn't used.

2003-03-04  Per Bothner  <per@bothner.com>

	* XQParser.java (<init>):  New function node-name.

	* XQParser.java (matchConstructorKeyword):  New helper method.
	(parseMaybePrimaryExpr):  Implement computed constructors.

2003-03-02  Per Bothner  <per@bothner.com>

	* XQuery.java (<init>):  BaseUri moved to gnu.kawa.functions.

2003-02-26  Per Bothner  <per@bothner.com>

	* XQuery.java (<init>):  Explicitly specify field names for
	iterator-items and list-items.

2003-02-20  Per Bothner  <per@bothner.com>

	* XQParser.java (parseMaybePrimaryExpr):  Servlet handling of $request
	and $response even if Compilation.generateServletDefault isn't set.

2003-02-13  Per Bothner  <per@bothner.com>

	* XQuery.java (<init>):  Define base-uri function.

2003-02-11  Per Bothner  <per@bothner.com>

	* XQuery.java (getInstance): Move save/restore of current Environment
	from here ...
	(<init>):  .. to here.
	(registerEnvironment):  Add call to Environment.setCurrent.

2003-01-12  Per Bothner  <per@bothner.com>

	* XQuery.java (Prompter.apply1): Always emit readState character.
	* XQParser.java (pushNesting, popNesting):  New methods.
	(getRawRoken):  Push/pop nesting around string literal.
	(parseBinaryExpr):  Push/pop nesting around binary operator.
	(parseEnclosedExpr, parseTypeSwitch, parseMaybePrimaryExpr,
	parseIfExpr, parseFLWRExpression, parse):  Call pushNesting/popNesting.
	(parseElementConstructor):  Remove increment/decrement of nesting here.
	(syntaxError):  Read port's readState.

	* XQParser.java (syntaxError):  New overload takes paramter indicating
	number of columns to subtract from current position.
	(tokenWidth):  Return number of chars taken by curToken,
	(syntaxError):  Call tokenWidth.

	* XQParser.java (getRawRoken): Use syntaxError rather than error
	on seeing unrecognized character.

	* XQParser.java (parseMaybePrimaryExpr):  Do setProcedureName
	on function name in call.

	* XQParser,java (parseExprSequence):  Take new rightToken parameter
	so we can emit error on un-matched ')'.

	* XQParser.java (pushStandardNamespaces):  New method.
	(<init>(InPort)):  Call <init>(InPort,SourceMessages).
	(<init>(InPort,SourceMessage):  Call pushStandardNamespaces.

	* XQParser.java (parseOptionalTypeDeclaration):  New method.
	(parseDataType):  Make ClassType if unrecognized type name.
	(parseFunctionDefinition):  Call parseOptionalTypeDeclaration.

	* XQParser.java (parseFLWRExpression):  Remove unused sc local.

2002-11-23  Per Bothner  <per@bothner.com>

	* XQuery.java (<init>):  Declare iterator-items and list-items.

2002-11-20  Per Bothner  <bothner@bothner.com>

	* XQparser.java (parseMaybePrimaryExpr):  Check if function names
	a method invocation.

	* XQuery.java (<init>):  Recover from missing servlet classes.

2002-11-16  Per Bothner  <per@bothner.com>

	* XQParser.java (parseFunctionDefinition):  Parse QName function name.

	* XQParser.java, XQuery.java:  Use gnu.mapping.Symbol instead of
	gnu.xml.QName.

	* XQuery.java (XQUERY_FUNCTION_NAMESPACE):  New constant.
	* XQParser.java (defaultFunctionNamespace):  New field.
	(defaultNamespace):  Rename field to defaultElementNamespace.

2002-11-10  Per Bothner  <per@bothner.com>

	* XQParser.java (focusDefined):  New field.
	(parseCheckNodeTest):  New method, checks focusDefined.
	(parseStepExpr, parseMaybePrimaryExpr):  Call parseCheckNodeTest.
	(parseFunctionDefinition):  Clear and restore focusDefined.
	(parseRelativePathExpr, parseStepQualifiers):  Set focusDefined.

2002-11-05  Per Bothner  <per@bothner.com>

	* XQuery.java (parseFile): Take and use new 'immediate' parameter.

2002-10-22  Per Bothner  <per@bothner.com>

	* XQParser.java (DEFINE_TOKEN):  Remove constant.
	(DECLARE_NAMESPACE_TOKEN, DEFAULT_ELEMENT_TOKEN,
	DEFAULT_FUNCTION_TOKEN, DEFINE_FUNCTION_TOKEN):  New constants.
	(lookingAt):  New helper method to handle double-lexeme tokens.
	(peekOperand):  Use lookingAt.
	(parse):  Handle new tokens - and updated syntax.
	Warn about old syntax.

2002-07-28  Per Bothner  <per@bothner.com>

	* XQParser.java (parseDataType):  Handle 'text' and 'node'.
	(anyNodeTest, textNodeTest):  New static fields.
	(parseNodeTest):  Use anyNodeTest and textNodeTest.

2002-07-24  Per Bothner  <per@bothner.com>

	* XQuery.java (parse, parseFile0:  Update for Interpreter changed API.
	* XQParser.java (parser, parser):  Update Parser -> Compilation.

2002-07-02  Per Bothner  <per@bothner.com>

	* XQuery.java (<init>):  Define "index-of" and "last-index-of".

2002-06-26  Per Bothner  <per@bothner.com>

	* XQParser.java (parseFLWRExpression):  Add missing parser.pop.

2002-06-10  Per Bothner  <per@bothner.com>

	* XQParser.java (parseNodeTest):  Support descdendant-or-self axis.

2002-05-28  Per Bothner  <per@bothner.com>

	* XQuery.java (Prompter.appl1):  State-dependent comment syntax.
	* XQParser.java (parseMaybePrimaryExpr):  Change state around call to
	parseElementConstructor, so we get appropriate prompt syntax.

	* XQParser.java (parseFLWRExpression):  Increment/decrement nesting,
	around where expression, to force reading past eol.

2002-05-18  Per Bothner  <per@bothner.com>

	* XQuery.java (<init>):  Also load XStrings.

	* XQParser.java (skipSpaceOrComment):  New method.
	(peekNonSpace):  Call skipSpaceOrComment instead of skipSpace.
	(parseFLWRExpression):  Likewise.

2002-05-06  Per Bothner  <per@bothner.com>

	* XQuery.java (parseFile):  Remove unused variable.

	* XQParser.java (stringValue, booleanValue):  Make public.

	* XQParser.java (parseFLWRExpression):  Fix typo "let" -> "for".

2002-04-19  Per Bothner  <per@bothner.com>

	* XQuery.java (<init>):  Define "avg" and "sum".

2002-04-18  Per Bothner  <per@bothner.com>

	* XQParser.java (booleanValue):  New method.
	(parseBinaryExpr, parseIfExpr, parseFLWRExpression):
	Call booleanValue.

	* XQuery.java (isTrue):  New method.

2002-04-08  Per Bothner  <per@bothner.com>

	* XQParser.java (OP_NODE, OP_TEXT):  New constants.
	(peekOperand):  Check for "node(" and "text(".

	* XQParser.java (parseBinaryExpr):  Handle OP_OR.

	* XQParser.java (parseNodeTest):  Merge overloaded methods.
	Process OP_NODE and OP_TEXT.
	(parseMaybePrimaryExpr):  Process OP_NODE and OP_TEXT.

2002-03-07  Per Bothner  <per@bothner.com>

	* XQParser.java (parseNodeTest):  NamedChildren and NamedDescendant
	now take a single ElementType, not a namespace+localname pair.
	(parseRelativePathExpr):  Handle // followed by name and predicates.

	* XQuery.java (<init>):  Declare min, max, and position.

2002-03-02  Per Bothner  <per@bothner.com>

	* XQuery.java (parseFile):  Now throws IOException and SyntaxException.

	* XQuery.java (<init>):  HTTP module moved to slib package.

2002-02-16  Per Bothner  <per@bothner.com>

	* XQuery.java (<init>):  Don't print error if library class not found.

2002-02-05  Per Bothner  <per@bothner.com>

	* XQParser.java (parseNodeTest):  Take axis parameter.
	Handle child::, attribute::NAME, and descendant::NAME; else error.
	(parseRelativePathExpr):  Handle EXPR//NAME.
	(parseStepExpr):  Pass axis to parseNodeTest.

	* XQParser.java (parseFLWRExpression):  Allow ellding of 'return'
	if body is another 'let' or 'for'.

2002-01-31  Per Bothner  <per@bothner.com>

	* XQuery (<init>):  Also do loadClass of gnu.kawa.servlet.HTTP.

2002-01-29  Per Bothner  <per@bothner.com>

	* XQParser.java (stringValue):  New method.
	(parseContent, parseElementConstructor):  Coerce attributes to string.

	* XQuery.java (defineAll, loadClass):  Moved to Interpreter, and
	make non-static.
	(<init>):  Update to no longer explicitly pass environ to loadClass.

2002-01-24  Per Bothner  <per@bothner.com>

	* XQParser.java (parseElementConstructor):  Handle ATTR={EXPR} syntax.

2002-01-23  Per Bothner  <per@bothner.com>

	* XQParser.java (interactive): Moved to super-class Lexer.
	(<init>):  Don't aet interactive - let Shell do it instead.

	* XQParser.java (makeExprSequence):  AppendValues has moved.

2002-01-21  Per Bothner  <per@bothner.com>

	* XQuery.java (<init>):  Update for moved of class Document.
	Add definition for "unescaped-data".

2002-01-19  Per Bothner  <per@bothner.com>

	* XQuery.java:  Update for move of WriteTo class.

2002-01-13  Per Bothner  <per@bothner.com>

	* XQParser.java (parse):  Skip initial Unix script header #!/PROGRAM.

2002-01-07  Per Bothner  <per@bothner.com>

	* XQParser.java (parseContent):  Handle '{{' and '}}'.

2002-01-02  Per Bothner  <per@bothner.com>

	* XQuery.java (<init>):  Define 'number' and 'concat'.

2001-12-24  Per Bothner  <per@bothner.com>

	* XQuery.java (<init>):  Add new pre-defined functions.

	* XQParser.java: Add support for XQuery comments.
	(skipComment):  New method.
	(getRawToken):  Check for and skip comments.

	* XQParser.java (parseDataType):  Parse 'element' type.
	(parseElementType):  New method.

	* XQParser.java (parseTypeSwitch):  New method handle 'typeswitch'.
	(parseMaybePrimaryExpr):  Call it.

	* XQParser.java:  Fix parsing for 'where' in FLWR-expression.
	(OP_WHERE):  New constant.
	(peekOperator):  Recognize 'where'.
	(parseFLWRExpression):  Fix handling of 'where'.

	* XQParser.java (parseContent):  Handle char references.
	(appendNamedEntity):  New method to resolve char references.

	& XQParser.java (parseElementConstructor):  Handle abbreviated element.

	* XQParser.java:  Use case-sentive matching for keywords etc.
	* XQParser.java:  Use LambdaExp constructor taking a parameter count.

2001-11-24  Per Bothner  <per@bothner.com>

	* XQParser.java:  Set line number information various places.

	* XQParser.java (parseStepQualifiers, parseRelativePathExpr,
	parseFLWRExpression):  Add various optimizations.

2001-11-18  Per Bothner  <per@bothner.com>

	* XQParser.java:  Many changes to add line-and-column to expressions.
	(peekNonSpace):  New method.

	* XQParser.java (parseMaybePrimaryExpr):  Special handling for
	$request and $response.

	* XQuery.java (<init>):  Force Compilation.usingTailCalls to true.

2001-11-12  Per Bothner  <per@bothner.com>

	* XQParser.java:  Handle namespaces better.
	(NCNAME_COLON_TOKEN):  New token kind - NCNAME followed by ':'.
	(getrawtoken):  Improve parsing - can return NCNAME_COLON_TOKEN.
	(peekOperand):  Handle NCNAME_COLON_TOKEN.
	(parseNameTest):  New method.
	(parse):  Handle namespace declarations.

2001-11-06  Per Bothner  <per@bothner.com>

	* XQParser.java (interactive):  New flag.
	(syntaxError):  If interactive, skip to eol and throw SYnatxException

	* XQParser.java (makeBinary):  Redefine comparisons to use
	gnu.xquery.util.Compare, with new support for '=' and '!='.

	* XQuery.java:  Implement XQuery string using String, not FString.

	* XQPsrser.java (parseElementConstructor):  Better parsing of end tags.
	Handle end tag immediately followed by '=', not reading it as '>='.
	Complain if end tag name doesn't match start tag.
	(parseExprSequence):  Return syntaxError instead of throing Error.

	* XQuery.java (<init>):  Define "string" function.

2001-11-01  Per Bothner  <per@bothner.com>

	* XQParser.java (peekOperand):  Don't unread after EOF.

	* XQParser.java (parseNodeTest):  New method.
	(parseRelativePathExpr):  Don't check node-tests here.
	(parseStepQualifiers):  New method.
	(parseMaybePrimaryExpr):  Now handles node tests.

	* XQParser.java (parseMaybePrimaryExpr):  Fix indexes when checking
	for "let" or "for".

	* XQuery.java (<init>):  Define "true" and "false".

2001-10-17  Per Bothner  <per@bothner.com>

	* XQParser.java (parseRelativePathExpr):  Handle PATH/*, PATH/@ATTR,
	PATH/ATTR.  Update for changed/moved implementation.
	(parseNameSpec):  Intern name.

2001-10-02  Per Bothner  <per@bothner.com>

	* XQuery.java (parseFile):  Handle multiple top-level "statements".

	* XQuery.java (getNamespaceOf):  New method.

	* XQuery.java (<init>):  Define function "empty".

	* XQuery.java (registerEnvironment):  Explicitly setting current
	Environment is redundant, so don't.

	* XQParser.java (DEFINE_TOKEN):  New constant.
	(peekOperand):  Recognize 'define'.
	(parseMaybePrimaryExpr):  Search for matching function Declaration.
	(parseFunctionDefinition):  New method.
	(parse):  Handle 'define function'.

2001-09-29  Per Bothner  <per@bothner.com>

	* XQParser.java (parseContent):  Use Vector's 'addElement' method
	instead of 'add', for JDK 1.1.x compatibility.

2001-09-25  Per Bothner  <per@bothner.com>

	* XQParser.java (parseExprSequence):  New method.
	(parseMaybePrimaryExpr):  Call parseExprSequence after '('.
	(parse):  Call parseExprSequence.

2001-09-24  Per Bothner  <per@bothner.com>

	* XQParser.java (OP_INSTANCEOF, OP_RANGE_TO):  New constants.
	(instanceOf):  New static field.
	(peekOperator):  Map 'to', 'mul' and 'instanceof'.
	(peekOperand):  Special case for 'if' followed by '('.
	(makeFunctionExp):  Add overloads.
	(makeBinary):  Add implementations for OP_MUL, OP_DIV, OP_MOD,
	OP_LSS. OP_LEQ, OP_GRT, OP_GEQ and OP_RANGE_TO.
	(parseDataType):  New method.
	(parseBinarOp):  Special case for OP_INSTANCEOF and OP_AND.
	(parseMaybePrimaryExpr):  Handle 'if' expressions.
	(parseIfExpr):  New method.
	(parseFLWRExpression):  Call parseExpr instead of parsePrimaryExpr.

2001-08-16  Per Bothner  <per@bothner.com>

	* XQParser.java (FNAME_TOKEN):  New constant.
	(peekOperand):  Check for FuncName here.
	(parseMaybePrimaryExpr):  This we no longer check for FuncName here.
	Instead, we recognize FNAME_TOKEN.

	* XQParser.java (makeBinary):  Make static.
	(makeExprSequence):  New static helper method.
	(parseBinaryExpr):  Return on unexpected '</'.
	(parseRelativePathExpr):  Handle EXP/name.
	(parseContent):  Add missing getRawToken.
	(parseEnclosedExpr):  Handle an ExprSequence.
	(parseMaybePrimaryExpr):  Use makeExprSequence.
	Add explicit check for eof.
	Emit error message if we saw '</'.

	* XQParser.java (parseFLWRExpression):  Re-write to make 'for' work.
	* XQuery.java (parse):  Lexer's parse methods return null on eof.
	(<init>): Define new function string-value.

	* XQuery.java (<init>):  Set flag so module body will print values.
	(registerEnvironment): No longer need to do so here.

2001-07-18  Per Bothner  <per@bothner.com>

	New package gnu.xquery.lang.
	* XQuery.java:  New class, extends Interpreter.
	* XQParser.java:  New class, extends LispReader (for now).

