type token =
    XQNAME of (Namespace.uqname)
  | XNCNAME of (Namespace.ncname)
  | XSTRING of (Datatypes.xs_string)
  | XMLPI
  | XVERSION
  | XSDDECL
  | XSINGLEQUOTE
  | XDOUBLEQUOTE
  | XDECLNAME of (string)
  | XENCODING of (Conf.encoding_kind)
  | DOCTYPE
  | DOCTYPECLOSE
  | DOCTYPE_SYSTEM
  | DOCTYPE_PUBLIC
  | DTDDECLOPEN
  | DTDDECLCLOSE of (string)
  | S
  | LOPENINGTAG
  | LCLOSINGTAG
  | ROPENINGTAG
  | RCLOSINGTAG
  | REMPTYELEMENT
  | TEXTLCLOSINGTAG of (Datatypes._untyped)
  | TEXTLOPENINGTAG of (Datatypes._untyped)
  | TEXTLCURLY of (Datatypes._untyped)
  | OPENINGPI of (Namespace.ncname)
  | CLOSINGPI
  | LOPENINGCOMMENT
  | TEXTCLOSINGPI of (Datatypes._untyped)
  | TEXTRCLOSINGCOMMENT of (Datatypes._untyped)
  | TEXTOPENINGPI of (Datatypes._untyped * Namespace.ncname)
  | TEXTLOPENINGCOMMENT of (Datatypes._untyped)
  | ATTRIBUTETEXT of (Datatypes._untyped)
  | ATTRIBUTETEXTLCURLY of (Datatypes._untyped)
  | TEXTCHARREF of (Datatypes._untyped * int)
  | TEXTENTITYREF of (Datatypes._untyped * string)
  | NAMESPACE
  | DECLARENAMESPACE
  | DEFAULTELEMENT
  | DEFAULTFUNCTION
  | DEFINEKEY
  | DEFINEFUNCTION
  | DEFINESIGNATURE
  | DEFINEGLOBAL
  | IMPORTSCHEMA
  | DEFINETYPE of (Namespace.uqname)
  | DEFINEELEMENT of (Namespace.uqname)
  | DEFINEATTRIBUTE of (Namespace.uqname)
  | DOCUMENTOF
  | ELEMENT
  | ELEMENTOF
  | ATTRIBUTE
  | DOCUMENT
  | EMPTY
  | TYPE
  | NONE
  | QUESTION
  | NODE
  | ITEM
  | TEXTNODE
  | ATOMIC
  | NUMERIC
  | STABLE
  | ASCENDING
  | DESCENDING
  | EMPTYGREATEST
  | EMPTYLEAST
  | OR
  | AND
  | STAR
  | MULT
  | DIV
  | IDIV
  | MOD
  | MINUS
  | PLUS
  | IN
  | SATISFIES
  | RETURN
  | THEN
  | ELSE
  | TO
  | WHERE
  | END
  | INTERSECT
  | UNION
  | EXCEPT
  | PRECEDES
  | FOLLOWS
  | CASE
  | INSTANCEOF
  | DEFAULT
  | IF
  | TYPESWITCH
  | STABLESORTBY
  | SORTBY
  | ORDERBY
  | ASSERTAS
  | CASTAS
  | TREATAS
  | VALIDATEAS
  | SOME
  | EVERY
  | FOR
  | LET
  | AS
  | AT
  | INSERT
  | DELETE
  | ASFIRST
  | ASLAST
  | INTO
  | BEFORE
  | AFTER
  | UPDATE
  | NCNAME of (Namespace.ncname)
  | QNAME of (Namespace.uqname)
  | AXIS of (Xquery_ast.axis)
  | PROCESSINGINSTRUCTIONLPAR
  | COMMENTLPAR
  | TEXTLPAR
  | NODELPAR
  | COLON
  | LTCOLON
  | BACKSLASHSLASH
  | SLASH
  | SLASHSLASH
  | DOT
  | DOTDOT
  | EQ
  | EQUALS
  | NE
  | NOTEQUALS
  | IS
  | ISNOT
  | LTE
  | GTE
  | LTEQUALS
  | GTEQUALS
  | COLONEQUALS
  | LTOP
  | GTOP
  | LT
  | GT
  | BAR
  | ATSIGN
  | COMMA
  | AMPERSAND
  | SEMICOLON
  | LPAR
  | RPAR
  | RPARLPAR
  | LBRACK
  | RBRACK
  | LCURLY
  | RCURLY
  | DOLLAR
  | FUNCTIONNAMELPAR of (Namespace.uqname)
  | DECIMAL of (Num.num)
  | INT of (Decimal._int)
  | DOUBLE of (float)
  | STRING of (string)
  | EOF

val xml_document :
  (Lexing.lexbuf  -> token) -> Lexing.lexbuf -> Xml_ast.xml_document
val test :
  (Lexing.lexbuf  -> token) -> Lexing.lexbuf -> Tokens.tokens
val expr :
  (Lexing.lexbuf  -> token) -> Lexing.lexbuf -> Xquery_ast.expr
val update :
  (Lexing.lexbuf  -> token) -> Lexing.lexbuf -> Xquery_ast.update
val querymodule :
  (Lexing.lexbuf  -> token) -> Lexing.lexbuf -> Xquery_ast.query_module
