@SafeVarargs
	public static <T> Rule<T> R(
		final NonTerminal<T> start,
		final Element<T>... elements
	) {
		return new Rule<>(
			start,
			Stream.of(elements)
				.map(expression -> switch (expression) {
					case Expression<T> e -> e;
					case Symbol<T> s -> new Expression<>(List.of(s));
				})
				.toList()
		);
	}
Factory method for creating a new rule. The {@code elements} array doesn't
allow {@link Rule} objects.

@since 8.2

@param start the start symbol of the rule
@param elements the list of alternative rule expressions
@throws NullPointerException if one of the arguments is {@code null}
@param <T> the terminal symbol value type
@return a new rule
jenetics.ext/src/main/java/io/jenetics/ext/grammar/Cfg.java