Skip to main content

Crate kermit_parser

Crate kermit_parser 

Source
Expand description

Datalog query parser for Kermit.

Parses queries in the form Head :- Body1, Body2, ... . into a JoinQuery AST. Built on the winnow parser combinator library.

§Syntax

  • Variables start with an uppercase letter: X, Name
  • Atoms (constants) start with a lowercase letter: alice, edge
  • Placeholders are the anonymous wildcard _
path(X, Z) :- edge(X, Y), edge(Y, Z).

Structs§

JoinQuery
A parsed Datalog join query of the form Head :- Body1, Body2, ... .
Predicate
A Datalog predicate application, e.g. edge(X, Y).

Enums§

Term
A single term in a Datalog predicate.