Class CParser


  • public class CParser
    extends net.sf.tweety.commons.Parser<CActionDescription,​net.sf.tweety.commons.Formula>
    This class implements a parser for an Action Description in C. The BNF is given by: (starting symbol is DESC)

    DESC ::== ":- signature" "\n" SIGNATURE "\n" ":- laws" "\n" LAWS
    where SIGNATURE is parsed by CSignatureParser and LAWS is parsed by CLawParser.
    Author:
    Sebastian Homann
    • Constructor Detail

      • CParser

        public CParser()
    • Method Detail

      • parseFormula

        public net.sf.tweety.commons.Formula parseFormula​(Reader reader)
                                                   throws IOException,
                                                          net.sf.tweety.commons.ParserException
        Specified by:
        parseFormula in class net.sf.tweety.commons.Parser<CActionDescription,​net.sf.tweety.commons.Formula>
        Throws:
        IOException
        net.sf.tweety.commons.ParserException
      • parseFormula

        public net.sf.tweety.commons.Formula parseFormula​(String formula)
                                                   throws net.sf.tweety.commons.ParserException,
                                                          IOException
        Overrides:
        parseFormula in class net.sf.tweety.commons.Parser<CActionDescription,​net.sf.tweety.commons.Formula>
        Throws:
        net.sf.tweety.commons.ParserException
        IOException