blob: e924e54cf7a7e8fbc1f01e4c6475bd7418d47ebb [file] [log] [blame]
Sapan Bhatia64c72512017-06-23 02:32:45 -07001from plyxproto.logicparser import *
2import ply.lex as lex
3import ply.yacc as yacc
4
5test_1 = "true"
6test_2 = "a | b"
7test_3 = "exists a: x=y"
8test_4 = "forall a: exists b: x.b=y.b"
9test_5 = "forall a: {{ a.endswith('good') }} "
10
11DEBUG = 0
12
13lexer = lex.lex(module=FOLLexer(), debug=DEBUG)#, optimize=1)
14parser = yacc.yacc(module=FOLParser(), start='goal', debug=DEBUG)
15
16for x,v in globals().items():
17 if x.startswith('test_'):
18 print parser.parse(v, lexer = lexer, debug=DEBUG)