Parser for STRIPS Planning Tasks #
This file contains some general parsing functions and a parser for STRIPS planning tasks.
General Parsing Functionality #
@[reducible, inline]
In Certificate.Parser we need to parse certificates in a separate location,
hence we use a monadic transformer for combinatorial parsers on the IO monad.
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
- Validator.readLine s p = Validator.checkString s *> p <* Validator.parseEol
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instances For
Equations
- Validator.parseListNat = do let n ← Validator.parseNat let __discr ← Parser.take n Validator.parseNat match __discr with | { toList := l } => pure l
Instances For
def
Validator.parseCases
{α : Type}
(ps1 : List (String × Parser α))
(ps2 : List (Parser Unit × Parser α) := [])
:
Parser α
For each of the pairs (s, p) in ps1, try to parse the string s. If it succeeds,
run the parser p, otherwise proceed with the next pair in the list. If none of parsers for
s is successfull, continue with the list ps2. For each pair (p, p') in this list, try the
parser p, and if it succeed, run p' and return its result. If it fails continue with the next
pair. If all pairs fail, combine the strings in ps1 into one error message.
Equations
- One or more equations did not get rendered due to their size.
Instances For
STRIPS Parser #
Equations
- One or more equations did not get rendered due to their size.