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

TestAccepts08() private method

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

			Assert.IsTrue(h.Accepts(Sentence.FromLetters("")));
			//Assert.IsTrue(h.Accepts(Sentence.FromWords("x4")));
			//Assert.IsTrue(h.Accepts(Sentence.FromWords("x4 x0 x4")));
		}