Crate gdl_parser

Source
Expand description

This crate provides a function for parsing a GDL description to an AST. To get an AST, call the parse function with the string representing the description. The AST is based off the AST used in GGP Base.

Modules§

Structs§

  • A GDL constant
  • A GDL description. Contains a vector of Clauses, which are the top-level statements in a GDL description.
  • A distinct literal
  • A function term
  • A not literal
  • An or literal
  • A proposition is a Relation with no body; it only has a name.
  • A GDL relation
  • A GDL rule contains a head Sentence that is implied by all the Literals in the body
  • A variable term

Enums§

  • A top level statement in GDL. The only types of top level statements are Rules and Sentences
  • A GDL literal
  • A GDL sentence is like a Rule without a body. The two types of Sentences are Relations and Propositions
  • A GDL term is either a variable, a function, or a constant

Functions§

  • Parse a GDL string to a Description. Panics if the description is invalid.