propogate TRUE/FALSE encoding changes

This commit is contained in:
Marcell Vazquez-Chanlatte 2018-09-08 00:47:45 -07:00
parent a72a1a1665
commit fb2e79b807
3 changed files with 5 additions and 5 deletions

View file

@ -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

View file

@ -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]', )),

View file

@ -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+)"