Class DatalogParser

java.lang.Object
edu.harvard.seas.pl.abcdatalog.parser.DatalogParser

public final class DatalogParser extends Object
A recursive descent parser for Datalog.

A Datalog program is a set of clauses, where each clause is in the form "a0 :- a1, ..., an." or "a0." and each ai is an atom of the form "pi" or "pi(t1, ..., tki)" for ki > 0 such that pi is a predicate symbol and each tj for 0 invalid input: '<' j invalid input: '<'= ki is a term (i.e. a constant or variable). Any variable in a0 must appear in at least one of ai, ..., an. Identifiers can contain letters, digits and underscores. Identifiers that begin with an upper case letter or an underscore are parsed as variables.