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