public override Conjunct VisitStatement([NotNull] PropositionalLogicGrammarParser.StatementContext context) { var neg = Visit(context.result()).Negation(); Debug.WriteLine("\nAddin neg "); neg.Print(); var res = new Conjunct(neg); foreach (var expr in context.expression()) { var addon = Visit(expr); Debug.WriteLine("\nAdding "); addon.Print(); res = res.Add(addon); Debug.WriteLine("\nres now is "); res.Print(); } return(res); }
/// <summary> /// Exit a parse tree produced by <see cref="PropositionalLogicGrammarParser.statement"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitStatement([NotNull] PropositionalLogicGrammarParser.StatementContext context) { }
/// <summary> /// Visit a parse tree produced by <see cref="PropositionalLogicGrammarParser.statement"/>. /// <para> /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/> /// on <paramref name="context"/>. /// </para> /// </summary> /// <param name="context">The parse tree.</param> /// <return>The visitor result.</return> public virtual Result VisitStatement([NotNull] PropositionalLogicGrammarParser.StatementContext context) { return(VisitChildren(context)); }