/** * A {@link Parser} that runs {@code this} for 1 ore more times separated and optionally terminated by {@code * delim}. For example: {@code "foo;foo;foo"} and {@code "foo;foo;"} both matches {@code foo.sepEndBy1(semicolon)}. * * <p>The return values are collected in a {@link List}. */ public final Parser<List<T>> sepEndBy1(final Parser<?> delim) { return next(first -> new DelimitedParser<T>(this, delim, ListFactory.arrayListFactoryWithFirstElement(first))); }