public void TestGetNullable05() {
var productions = new HashSet<Production> {
CFGParser.Production("<S> -> <A>"),
CFGParser.Production("<S> -> <B>"),
CFGParser.Production("<A> -> ε"),
CFGParser.Production("<A> -> 'a'"),
CFGParser.Production("<A> -> <B>"),
CFGParser.Production("<B> -> ε"),
CFGParser.Production("<B> -> 'b'"),
CFGParser.Production("<B> -> <A>"),
};
var result = (Dictionary<Nonterminal, double>)nullableClass.InvokeStatic("GetNullable", new object[] { productions });
Assert.IsTrue(result.Count == 3);
Helpers.AssertNear(0.5, result[Nonterminal.Of("S")]);
Helpers.AssertNear(0.5, result[Nonterminal.Of("A")]);
Helpers.AssertNear(0.5, result[Nonterminal.Of("B")]);
}