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 (string)
  | DOCTYPE
  | DOCTYPECLOSE
  | DOCTYPE_SYSTEM
  | DOCTYPE_PUBLIC
  | DTDDECLOPEN
  | DTDDECLCLOSE
  | S
  | LOPENINGTAG
  | LCLOSINGTAG
  | ROPENINGTAG
  | RCLOSINGTAG
  | REMPTYELEMENT
  | TEXTLCLOSINGTAG of (Datatypes.xdt_untyped)
  | TEXTLOPENINGTAG of (Datatypes.xdt_untyped)
  | TEXTLCURLY of (Datatypes.xdt_untyped)
  | OPENINGPI of (Namespace.ncname)
  | CLOSINGPI
  | LOPENINGCOMMENT
  | TEXTCLOSINGPI of (Datatypes.xdt_untyped)
  | TEXTRCLOSINGCOMMENT of (Datatypes.xdt_untyped)
  | TEXTOPENINGPI of (Datatypes.xdt_untyped * Namespace.ncname)
  | TEXTLOPENINGCOMMENT of (Datatypes.xdt_untyped)
  | ATTRIBUTETEXT of (Datatypes.xdt_untyped)
  | ATTRIBUTETEXTLCURLY of (Datatypes.xdt_untyped)
  | TEXTCHARREF of (Datatypes.xdt_untyped * int)
  | TEXTENTITYREF of (Datatypes.xdt_untyped * string)
  | PEREF of (Namespace.ncname)
  | PERCENT
  | NMTOKEN of (Namespace.ncname)
  | REQUIRED
  | IMPLIED
  | FIXED
  | PCDATA
  | ELEMENTDECL
  | ATTLISTDECL
  | ENTITYDECL
  | NOTATIONDECL
  | BEGINDECL
  | ENDDECL
  | BODYDECL
  | 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
  | CASTABLEAS
  | TREATAS
  | VALIDATEAS
  | SOME
  | EVERY
  | FOR
  | LET
  | AS
  | AT
  | INSERT
  | REPLACE
  | DELETE
  | ASFIRST
  | ASLAST
  | VALUEOF
  | INTO
  | WITH
  | 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._integer)
  | 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 statement :
  (Lexing.lexbuf  -> token) -> Lexing.lexbuf -> Xquery_ast.statement
val querymodule :
  (Lexing.lexbuf  -> token) -> Lexing.lexbuf -> Xquery_ast.query_module
