pub enum Token {
Show 81 variants
Colon,
OpenBracket,
CloseBracket,
OpenParen,
CloseParen,
Define,
Problem,
Objects,
Domain,
ProblemDomain,
Requirements,
Types,
Constants,
Predicates,
Functions,
Action,
DurativeAction,
Parameters,
Duration,
Precondition,
Condition,
Effect,
Init,
Goal,
And,
Not,
Either,
Assign,
ScaleUp,
ScaleDown,
Increase,
Decrease,
Forall,
At,
Over,
All,
Start,
End,
Integer(i64),
Float(f64),
Plus,
Times,
Divide,
Equal,
Strips,
Typing,
DisjunctivePreconditions,
Equality,
ExistentialPreconditions,
UniversalPreconditions,
QuantifiedPreconditions,
ConditionalEffects,
ActionExpansions,
ForeachExpansions,
DagExpansions,
DomainAxioms,
SubgoalsThroughAxioms,
SafetyConstraints,
ExpressionEvaluation,
Fluents,
OpenWorld,
TrueNegation,
Adl,
Ucpop,
NumericFluents,
DurativeActions,
DurativeInequalities,
ContinuousEffects,
NegativePreconditions,
DerivedPredicates,
TimedInitialLiterals,
Preferences,
Constraints,
ActionCosts,
GoalUtilities,
Time,
Id(String),
Var(String),
Dash,
Comment,
Package,
}
Expand description
All of the possible tokens in a PDDL file
Variants§
Colon
A colon :
OpenBracket
An open bracket [
CloseBracket
A close bracket ]
OpenParen
An open parenthesis (
CloseParen
A close parenthesis )
Define
The define
keyword
Problem
The problem
keyword
Objects
The :objects
keyword
Domain
The domain
keyword (without the colon, used in the domain file to define the domain)
ProblemDomain
The :domain
keyword (with the colon, used in the problem file to specify the domain)
Requirements
The :requirements
keyword
Types
The :types
keyword
Constants
The :constants
keyword
Predicates
The :predicates
keyword
Functions
The :functions
keyword
Action
The :action
keyword
DurativeAction
The :durative-action
keyword
Parameters
The :parameters
keyword
Duration
The :duration
keyword
Precondition
The :precondition
keyword
Condition
The :condition
keyword
Effect
The :effect
keyword
Init
The :init
keyword
Goal
The :goal
keyword
And
The and
keyword
Not
The not
keyword
Either
The either
keyword
Assign
The assign
keyword
ScaleUp
The scale-up
keyword
ScaleDown
The scale-down
keyword
Increase
The increase
keyword
Decrease
The decrease
keyword
Forall
The forall
keyword
At
The at
keyword
Over
The over
keyword
All
The all
keyword
Start
The start
keyword
End
The end
keyword
Integer(i64)
A number (positive or negative, e.g. 1
or -1
)
Float(f64)
A floating point number (e.g. 1.0
)
Plus
The +
operator
Times
The *
operator
Divide
The -
operator
Equal
The =
operator
Strips
The :strips
requirement (PDDL 1)
Typing
The :typing
requirement (PDDL 1)
DisjunctivePreconditions
The :negative-preconditions
requirement (PDDL 1)
Equality
The :disjunctive-preconditions
requirement (PDDL 1)
ExistentialPreconditions
The :existential-preconditions
requirement (PDDL 1)
UniversalPreconditions
The :universal-preconditions
requirement (PDDL 1)
QuantifiedPreconditions
The :quantified-preconditions
requirement (PDDL 1)
ConditionalEffects
The :conditional-effects
requirement (PDDL 1)
ActionExpansions
The :action-expansions
requirement (PDDL 1)
ForeachExpansions
The :foreach-expansions
requirement (PDDL 1)
DagExpansions
The :dag-expansions
requirement (PDDL 1)
DomainAxioms
The :domain-axioms
requirement (PDDL 1)
SubgoalsThroughAxioms
The :subgoals-through-axioms
requirement (PDDL 1)
SafetyConstraints
The :safety-constraints
requirement (PDDL 1)
ExpressionEvaluation
The :expression-evaluation
requirement (PDDL 1)
Fluents
The :fluents
requirement (PDDL 1)
OpenWorld
The :open-world
requirement (PDDL 1)
TrueNegation
The :true-negation
requirement (PDDL 1)
Adl
The :adl
requirement (PDDL 1)
Ucpop
The :ucpop
requirement (PDDL 1)
NumericFluents
The :numeric-fluents
requirement (PDDL 2.1)
DurativeActions
The :durative-actions
requirement (PDDL 2.1)
DurativeInequalities
The :durative-inequalities
(or, as a typo, :duration-inequalities
) requirement (PDDL 2.1)
ContinuousEffects
The :continuous-effects
requirement (PDDL 2.1)
NegativePreconditions
The :negative-preconditions
requirement (PDDL 2.1)
DerivedPredicates
The :derived-predicates
requirement (PDDL 2.2)
TimedInitialLiterals
The :timed-initial-literals
requirement (PDDL 2.2)
Preferences
The :preferences
requirement (PDDL 3)
Constraints
The :constraints
requirement (PDDL 3)
ActionCosts
The :action-costs
requirement (PDDL 3.1)
GoalUtilities
The :goal-utilities
requirement (PDDL 3.1)
Time
The :time
requirement (PDDL+)
Id(String)
A PDDL identifier (a sequence of letters, digits, underscores, and hyphens, starting with a letter)
Var(String)
A PDDL variable (a sequence of letters, digits, underscores, and hyphens, starting with a question mark)
Dash
A dash (-
) character that can represent a minus sign or a hyphen
Comment
A comment (a semicolon followed by any characters). The comment is ignored.
Package
A package declaration (a sequence of characters enclosed in parentheses, starting with in-package
). The package name is ignored.
Trait Implementations§
Source§impl<'s> Logos<'s> for Token
impl<'s> Logos<'s> for Token
Source§type Error = ParserError
type Error = ParserError
#[logos(error = MyError)]
. Defaults to ()
if not set.Source§type Extras = ()
type Extras = ()
Extras
for the particular lexer. This can be set using
#[logos(extras = MyExtras)]
and accessed inside callbacks.Source§type Source = str
type Source = str
str
,
unless one of the defined patterns explicitly uses non-unicode byte values
or byte slices, in which case that implementation will use [u8]
.Source§fn lex(lex: &mut Lexer<'s, Self>)
fn lex(lex: &mut Lexer<'s, Self>)
Lexer
. The implementation for this function
is generated by the logos-derive
crate.Source§impl<'a> Parser<TokenStream<'a>, &'a str, ParserError> for Token
impl<'a> Parser<TokenStream<'a>, &'a str, ParserError> for Token
Source§fn parse(
&mut self,
input: TokenStream<'a>,
) -> IResult<TokenStream<'a>, &'a str, ParserError>
fn parse( &mut self, input: TokenStream<'a>, ) -> IResult<TokenStream<'a>, &'a str, ParserError>
Result
containing
either the remaining input and the output value, or an error