- java.lang.Object
-
- org.antlr.v4.runtime.Recognizer<org.antlr.v4.runtime.Token,org.antlr.v4.runtime.atn.ParserATNSimulator>
-
- org.antlr.v4.runtime.Parser
-
- org.logicng.io.parsers.ParserWithFormula
-
- Direct Known Subclasses:
LogicNGPropositionalParser,LogicNGPseudoBooleanParser
public abstract class ParserWithFormula extends org.antlr.v4.runtime.ParserAbstract super class for parsers which have a formula factory and return a formula.- Since:
- 1.4.0
- Version:
- 1.4.0
-
-
Field Summary
Fields Modifier and Type Field Description protected FormulaFactoryf
-
Constructor Summary
Constructors Constructor Description ParserWithFormula(org.antlr.v4.runtime.TokenStream input)Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract FormulagetParsedFormula()Returns the parsed formula.voidsetFormulaFactory(FormulaFactory f)Sets the LogicNG formula factory for this parser-
Methods inherited from class org.antlr.v4.runtime.Parser
addContextToParseTree, addParseListener, compileParseTreePattern, compileParseTreePattern, consume, createErrorNode, createTerminalNode, dumpDFA, dumpDFA, enterOuterAlt, enterRecursionRule, enterRecursionRule, enterRule, exitRule, getATNWithBypassAlts, getBuildParseTree, getContext, getCurrentToken, getDFAStrings, getErrorHandler, getExpectedTokens, getExpectedTokensWithinCurrentRule, getInputStream, getInvokingContext, getNumberOfSyntaxErrors, getParseInfo, getParseListeners, getPrecedence, getRuleContext, getRuleIndex, getRuleInvocationStack, getRuleInvocationStack, getSourceName, getTokenFactory, getTokenStream, getTrimParseTree, inContext, isExpectedToken, isMatchedEOF, isTrace, match, matchWildcard, notifyErrorListeners, notifyErrorListeners, precpred, pushNewRecursionContext, removeParseListener, removeParseListeners, reset, setBuildParseTree, setContext, setErrorHandler, setInputStream, setProfile, setTokenFactory, setTokenStream, setTrace, setTrimParseTree, triggerEnterRuleEvent, triggerExitRuleEvent, unrollRecursionContexts
-
Methods inherited from class org.antlr.v4.runtime.Recognizer
action, addErrorListener, getATN, getErrorHeader, getErrorListenerDispatch, getErrorListeners, getGrammarFileName, getInterpreter, getRuleIndexMap, getRuleNames, getSerializedATN, getState, getTokenErrorDisplay, getTokenNames, getTokenType, getTokenTypeMap, getVocabulary, removeErrorListener, removeErrorListeners, sempred, setInterpreter, setState
-
-
-
-
Field Detail
-
f
protected FormulaFactory f
-
-
Method Detail
-
setFormulaFactory
public void setFormulaFactory(FormulaFactory f)
Sets the LogicNG formula factory for this parser- Parameters:
f- the LogicNG formula factory
-
getParsedFormula
public abstract Formula getParsedFormula()
Returns the parsed formula.- Returns:
- the parsed formula
-
-