Skip to content

Commit 1e03b75

Browse files
apply formatting to parser, fix typo in project.toml and format robot-coffee domain
1 parent 821fb14 commit 1e03b75

5 files changed

Lines changed: 123 additions & 133 deletions

File tree

fond4ltlf/parser/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
# along with FOND4LTLf. If not, see <https://www.gnu.org/licenses/>.
1818
#
1919
"""This module contains the implementation of the parsers for the PDDL formalism."""
20+
2021
import inspect
2122
import os
2223

fond4ltlf/parser/lexer.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121

2222
class PDDLLexer(object):
23-
2423
reserved = {
2524
"define": "DEFINE_KEY",
2625
"domain": "DOMAIN_KEY",
@@ -53,13 +52,11 @@ class PDDLLexer(object):
5352
}
5453

5554
# List of token names. This is always required
56-
tokens = ("NAME", "VARIABLE", "LPAREN", "RPAREN", "HYPHEN", "EQUALS") + tuple(
57-
reserved.values()
58-
)
55+
tokens = ("NAME", "VARIABLE", "LPAR", "RPAR", "HYPHEN", "EQUALS") + tuple(reserved.values())
5956

6057
# Regular expression rules for simple tokens
61-
t_LPAREN = r"\("
62-
t_RPAREN = r"\)"
58+
t_LPAR = r"\("
59+
t_RPAR = r"\)"
6360
t_HYPHEN = r"\-"
6461
t_EQUALS = r"="
6562

@@ -113,4 +110,4 @@ def test(self, data):
113110
# Build the lexer and try it out
114111
m = PDDLLexer()
115112
m.build() # Build the lexer
116-
m.test("(and (and) (oneof (ciao) (come) ))") # Test it
113+
m.test("(and (and) (oneof (hello) (world) ))") # Test it

0 commit comments

Comments
 (0)