public Parser replacingAllLeadingFirstOrTrailingPhrase() {
        if (replacingAllLeadingFirstOrTrailingPhraseParser == null) {
           FutureParser future = scoped("replacingAllLeadingFirstOrTrailingPhrase");
           replacingAllLeadingFirstOrTrailingPhraseParser = future;
           future.setParser(
               sequence(
                   choice(
                       token("ALL"),
                       token("LEADING"),
                       token("FIRST"),
                       token("TRAILING")
                   ),
                   star(
                       sequence(
                           choice(
                               identifier(),
                               literal()
                           ),
                           token("BY"),
                           choice(
                               identifier(),
                               literal()
                           ),
                           star(
                               locationPhrase()
                           )
                       )
                   )
               )
           );
        }

        return replacingAllLeadingFirstOrTrailingPhraseParser;
    }