Skip to content

Commit

Permalink
Parse and store requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
Maumagnaguagno committed Jul 23, 2019
1 parent 0ab39e9 commit 90406da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion PDDL.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,16 @@ def parse_domain(self, domain_filename):
tokens = self.scan_tokens(domain_filename)
if type(tokens) is list and tokens.pop(0) == 'define':
self.domain_name = 'unknown'
self.requirements = []
self.actions = []
while tokens:
group = tokens.pop(0)
t = group.pop(0)
if t == 'domain':
self.domain_name = group[0]
elif t == ':requirements':
pass # TODO
self.requirements = group[0]
# TODO raise exception for unknown requirements
elif t == ':predicates':
pass # TODO
elif t == ':types':
Expand Down

0 comments on commit 90406da

Please sign in to comment.