public Parser onStatement() {
        if (onStatementParser == null) {
           FutureParser future = scoped("onStatement");
           onStatementParser = future;
           future.setParser(
               sequence(
                   token("ON"),
                   choice(
                       literal(),
                       identifier()
                   ),
                   optional(
                       sequence(
                           token("AND"),
                           token("EVERY"),
                           choice(
                               literal(),
                               identifier()
                           )
                       )
                   ),
                   optional(
                       sequence(
                           token("UNTIL"),
                           choice(
                               literal(),
                               identifier()
                           )
                       )
                   ),
                   choice(
                       nestedStatements(),
                       sequence(
                           token("NEXT"),
                           token("SENTENCE")
                       )
                   ),
                   optional(
                       sequence(
                           choice(
                               token("ELSE"),
                               token("OTHERWISE")
                           ),
                           choice(
                               nestedStatements(),
                               sequence(
                                   token("NEXT"),
                                   token("SENTENCE")
                               )
                           )
                       )
                   )
               )
           );
        }

        return onStatementParser;
    }