sine-patre/fol/__init__.py

26 lines
410 B
Python

from fol import lexer
from fol import parser
from fol import pretty
from fol import cnf
from fol.unify import unify
def p(text):
return parse(text)
def parse(text):
lex = lexer.Lexer()
lex.scan(text)
p = parser.Parser(lex)
root = p.parse()
return root
def term(text):
lex = lexer.Lexer()
lex.scan(text)
p = parser.Parser(lex)
root = p.parse_term()
return root