diff --git a/mtl/ast.py b/mtl/ast.py index b73df21..736a9d1 100644 --- a/mtl/ast.py +++ b/mtl/ast.py @@ -103,7 +103,7 @@ class _Top(AST): __slots__ = () def __repr__(self): - return "1" + return "TRUE" def __invert__(self): return BOT @@ -113,7 +113,7 @@ class _Bot(AST): __slots__ = () def __repr__(self): - return "0" + return "FALSE" def __invert__(self): return TOP diff --git a/mtl/hypothesis.py b/mtl/hypothesis.py index 07ebc35..07d378a 100644 --- a/mtl/hypothesis.py +++ b/mtl/hypothesis.py @@ -7,7 +7,7 @@ GRAMMAR = { 'phi': ( ('Unary', 'phi'), ('(', 'phi', 'Binary', 'phi', ')'), - ('AP', ), ('0', ), ('1', ) + ('AP', ), ('FALSE', ), ('TRUE', ) ), 'Unary': (('~', ), ('G', 'Interval'), ('F', 'Interval'), ('X', )), 'Interval': (('', ), ('[1, 3]', )), diff --git a/mtl/parser.py b/mtl/parser.py index eedb03a..e0d5dd9 100644 --- a/mtl/parser.py +++ b/mtl/parser.py @@ -40,8 +40,8 @@ const_or_unbound = const / "inf" / id AP = ~r"[a-z][a-z\d]*" -bot = "False" -top = "True" +bot = "FALSE" +top = "TRUE" id = ~r"[a-z\d]+" const = ~r"[-+]?(\d*\.\d+|\d+)"