blob: eb350d77c7bbfe6fd20f5ccf87b36d52602d69a4 [file] [log] [blame]
from plyxproto.logicparser import *
import ply.lex as lex
import ply.yacc as yacc
test_1 = "<true>"
test_2 = "<a | b>"
test_3 = "<exists a: x=y>"
test_4 = "<forall a: exists b: x.b=y.b>"
test_5 = "<forall a: {{ a.endswith('good') }}>"
test_6 = "< *doit(foo) >"
DEBUG = 0
lexer = lex.lex(module=FOLLexer(), debug=DEBUG)
parser = yacc.yacc(module=FOLParser(), start='goal', debug=DEBUG)
for x, v in globals().items():
if x.startswith('test_'):
print parser.parse(v, lexer=lexer, debug=DEBUG)