CFGLibTest.Unit.TestCFGToCNF.TestAccepts09 C# (CSharp) Method

TestAccepts09() private method

private TestAccepts09 ( ) : void
return void
		public void TestAccepts09() {
			var productions = new HashSet<Production> {
				CFGParser.Production("<S> -> ε"),
				// CFGParser.Production("<S> -> 'x'"),
				CFGParser.Production("<S> -> <S> <S> <S>"),
			};
			Grammar g = new Grammar(productions, Nonterminal.Of("S"));
			CNFGrammar h = g.ToCNF();

			Assert.IsTrue(h.Accepts(Sentence.FromLetters("")));
		}