package io.jenetics.incubator.grammar;

import java.util.List;
import java.util.Random;

import io.jenetics.incubator.grammar.SymbolIndex;
import io.jenetics.incubator.grammar_old.Grammar;
import io.jenetics.incubator.grammar_old.Grammar.Terminal;

@FunctionalInterface
public interface SentenceGenerator {

	List<Terminal> generate(final Grammar grammar, final SymbolIndex index);

	default List<Terminal> generate(final Grammar grammar, final Random random) {
		return generate(grammar, random::nextInt);
	}

}

@@ -59,33 +59,8 @@
 ist;
-%0Aimport java.util.Random;
 %0A%0Aim
@@ -98,119 +98,11 @@
 mar.
-SymbolIndex;%0Aimport io.jenetics.incubator.grammar_old.Grammar;%0Aimport io.jenetics.incubator.grammar_old.Grammar
+Cfg
 .Ter
@@ -195,39 +195,31 @@
 erate(final 
-Grammar grammar
+Cfg cfg
 , final Symb
@@ -239,134 +239,6 @@
 );%0A%0A
-%09default List%3CTerminal%3E generate(final Grammar grammar, final Random random) %7B%0A%09%09return generate(grammar, random::nextInt);%0A%09%7D%0A%0A
 %7D%0A

Move 'SentenceGenerator' to 'grammar' package.