public Parser xmlGenerateStatement() {
        if (xmlGenerateStatementParser == null) {
           FutureParser future = scoped("xmlGenerateStatement");
           xmlGenerateStatementParser = future;
           future.setParser(
               sequence(
                   token("XML"),
                   token("GENERATE"),
                   identifier(),
                   token("FROM"),
                   identifier(),
                   optional(
                       sequence(
                           token("COUNT"),
                           optional(
                               token("IN")
                           ),
                           identifier()
                       )
                   ),
                   optional(
                       sequence(
                           optional(
                               token("ON")
                           ),
                           token("EXCEPTION"),
                           statement()
                       )
                   ),
                   optional(
                       sequence(
                           token("NOT"),
                           optional(
                               token("ON")
                           ),
                           token("EXCEPTION"),
                           statement()
                       )
                   ),
                   optional(
                       token("END-XML")
                   )
               )
           );
        }

        return xmlGenerateStatementParser;
    }