public void ParseTreeEnumeratorShouldEnumerateMultipleTrees() { var parseTester = new ParseTester(new SimpleExpressionGrammar()); parseTester.RunParse("3+2*1+1"); var internalForestNode = parseTester.ParseEngine.GetParseForestRootNode(); var parseTreeEnumerable = new ParseTreeEnumerable(internalForestNode); var count = 0; foreach (var parseTree in parseTreeEnumerable) { count++; } Assert.AreEqual(4, count); }
public void InitializeTest() { _parseTester = new ParseTester(_grammar); }