def test_literal(self): eq_(eval(parse_text(literal('if'), 'if')), True) assert_raises(NoSolutionFound, eval, parse_text(literal('if'), 'ssf'))
defines = in_module(sexpression_module, define(atom, function( ([x], integer(x)), ([x], dqstring(x)), ([x], symbol(x)) )), define(bracket_expression, function( ([exp_list], and_p(char('('), spaces0(_), from_sexp(sexpression_list)(exp_list), spaces0(_), char(')'))), ([exp_list], and_p(char('['), spaces0(_), from_sexp(sexpression_list)(exp_list), spaces0(_), char(']'))))), define(punct_expression, function( ([L(quote, exp)], and_p(char("'"), from_sexp(sexpression)(exp))), ([L(quasiquote, exp)], and_p(char("`"), from_sexp(sexpression)(exp))), ([L(unquote_splice, exp)], and_p(literal(",@"), from_sexp(sexpression)(exp))), ([L(unquote, exp)], and_p(char(","), from_sexp(sexpression)(exp))))), define(sexpression_list, function( ([Cons(exp, exp_list)], and_p(from_sexp(sexpression)(exp), from_sexp(maybe_spaces)(), from_sexp(sexpression_list)(exp_list))), ([nil], null))), define(sexpression1, function( ([exp], and_p(spaces0(_), from_sexp(sexpression_list)(exp), spaces0(_))))), define(maybe_spaces, function( ([], or_p(if_p(and_p(not_lead_chars('([])'), not_follow_chars('([])'), not_p(eoi)), spaces(_)), spaces0(_) ) ) ) ), define(sexpression, function(