Skip to main content

Module parser

Module parser 

Source
Expand description

Recursive-descent parser for PDDL domain and problem files.

Consumes a token stream from the crate::lexer and produces the AST defined in crate::ast. The parser handles all PDDL features encountered in IPC benchmarks (1998–2014), including:

  • Typing and type hierarchies (:types, either)
  • Durative actions with temporal conditions/effects
  • Numeric fluents, action costs, and metrics
  • ADL quantifiers (forall, exists) and conditional effects (when)
  • PDDL3 trajectory constraints and preferences
  • Legacy PDDL 1.2 :vars in actions

§Entry points

FunctionInputOutput
parse_domain_strraw PDDL stringDomain
parse_problem_strraw PDDL stringProblem
parse_domainpre-tokenized &[Token]Domain
parse_problempre-tokenized &[Token]Problem

Functions§

parse_domain
Parse a pre-tokenized PDDL domain.
parse_domain_str
Tokenize and parse a PDDL domain from a raw source string.
parse_problem
Parse a pre-tokenized PDDL problem.
parse_problem_str
Tokenize and parse a PDDL problem from a raw source string.