kermit-parser 0.0.3

Parser for Kermit join queries
Documentation
  • Coverage
  • 100%
    11 out of 11 items documented1 out of 1 items with examples
  • Size
  • Source code size: 19.62 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 477.92 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 18s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • aidan-bailey/kermit
    7 1 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • aidan-bailey

kermit-parser

Datalog query parser for the Kermit workspace. Parses rules of the form

Head(…) :- Body1(…), Body2(…), …, BodyN(…).

into a JoinQuery AST. Built on winnow.

Syntax

  • Variables start with an uppercase ASCII letter: X, Name, Var1.
  • Atoms (ground constants) start with a lowercase ASCII letter: alice, edge.
  • Placeholders are the bare underscore _; they match any value without binding.

Identifiers after the first character may include ASCII alphanumerics and _.

AST types

  • JoinQueryhead: Predicate, body: Vec<Predicate>.
  • Predicatename: String, terms: Vec<Term>.
  • TermVar(String), Atom(String), Placeholder.

Parse via std::str::FromStr:

use kermit_parser::JoinQuery;
let q: JoinQuery = "path(X, Z) :- edge(X, Y), edge(Y, Z).".parse().unwrap();

Consumers

kermit-algos parses queries into variable orderings for Leapfrog Triejoin, and kermit-bench embeds queries in benchmark YAML definitions (see benchmarks/README.md).