Added validation functions.

parent c212ed8b
from src.parser import Parser
from tests.parser import ParserWrapper
class ValidationNode(object):
pass
def validate(exp, result):
"""
Validate that exp =>* result.
"""
parser = ParserWrapper(Parser)
exp = parser.run([exp])
result = parser.run([result])
return validate_graph(exp, result)
def iter_preorder(exp, possibility):
"""
Traverse the possibility tree using pre-order traversal.
"""
pass
def validate_graph(exp, result):
"""
Validate that "exp" =>* "result".
"""
# TODO: Traverse the tree of possibility applications
return False
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment