Skip to main content

Module lexer

Module lexer 

Source
Expand description

Tokenizer for PDDL S-expressions.

Converts raw PDDL source text into a flat vector of Tokens, each carrying a TokenKind and a Span for error reporting.

Token conventions:

  • : prefix → TokenKind::Keyword (e.g. :requirements, :typing)
  • ? prefix → TokenKind::Variable (e.g. ?x, ?duration)
  • ; → line comment (skipped entirely)
  • All symbols and keywords are lowercased during tokenization.

Structs§

Token
A single token produced by the lexer, pairing a TokenKind with its source Span.

Enums§

TokenKind
The kind of a lexed PDDL token.

Functions§

tokenize
Tokenize a PDDL source string into a flat vector of Tokens.