public override Conjunct VisitLiteral([NotNull] PropositionalLogicGrammarParser.LiteralContext context) { var l = new Literal(context.GetText(), false); _usedVars.Add(new Literal(l)); var d = new Disjunct(l); var ans = new Conjunct(d); Debug.WriteLine("\nLiteral: "); ans.Print(); return(ans); }
/// <summary> /// Enter a parse tree produced by the <c>Literal</c> /// labeled alternative in <see cref="PropositionalLogicGrammarParser.expression"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void EnterLiteral([NotNull] PropositionalLogicGrammarParser.LiteralContext context) { }
/// <summary> /// Visit a parse tree produced by the <c>Literal</c> /// labeled alternative in <see cref="PropositionalLogicGrammarParser.expression"/>. /// <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 VisitLiteral([NotNull] PropositionalLogicGrammarParser.LiteralContext context) { return(VisitChildren(context)); }