prolog library

This package contains a simple grammar and evaluator for Prolog based on this blog post: https://curiosity-driven.org/prolog-interpreter.

The code is reasonably complete to run and evaluate reasonably complex programs from the console or the web browser.

Classes

Conjunction
Database
Node
PrologGrammarDefinition
Prolog grammar definition.
PrologParserDefinition
Prolog parser definition.
Rule
Term
True
Value
Variable

Constants

argumentEquality → const Equality<List<Node>>

Properties

rulesParser → Parser<List<Rule>>
The standard prolog parser to read rules.
final
termParser → Parser<Term>
The standard prolog parser to read queries.
final

Functions

mergeBindings(Map<Variable, Node>? first, Map<Variable, Node>? second) Map<Variable, Node>?
newBindings() Map<Variable, Node>