Class DelpParser

java.lang.Object
org.tweetyproject.commons.Parser<DefeasibleLogicProgram,Formula>
org.tweetyproject.arg.delp.parser.DelpParser
All Implemented Interfaces:
DelpParserConstants

public class DelpParser extends Parser<DefeasibleLogicProgram,Formula> implements DelpParserConstants
This class implements a parser for defeasible logic programs. The BNF for defeasible logic program files is given by (start symbol is THEORY)
 THEORY                 ::== (EXPRESSION)+
 EXPRESSION             ::== FACT | STRICTRULE | DEFEASIBLERULE
 FACT                   ::== LITERAL + "."
 STRICTRULE             ::== LITERAL + "<-" + RULEBODY + "."
 DEFEASIBLERULE         ::== LITERAL + "-<" + RULEBODY + "."
 RULEBODY               ::== LITERAL | LITERAL + "," + RULEBODY
 LITERAL                ::== "~" + ATOM | ATOM
 ATOM                   ::== PREDICATE | PREDICATE + "(" + TERMLIST + ")"
 TERMLIST               ::== TERM | TERM + "," + TERMLIST
 TERM                   ::== VARIABLE | CONSTANT | QUOTED_STRING

 PREDICATE is a sequence of symbols from {a,...,z,A,...,Z,0,...,9,_,-} with a letter at the beginning.
 VARIABLE is a sequence of symbols from {a,...,z,A,...,Z,0,...,9,_,-} with an uppercase letter at the beginning.
 CONSTANT is  a sequence of symbols from {a,...,z,A,...,Z,0,...,9,_,-} with an lowercase letter at the beginning.
 QUOTED_STRING is all characters between double quotes.