What would happen when lisp meets prolog in python? Dao and Dinpy arises!

Simeon Chaos simeon.chaos at gmail.com
Sun Nov 6 00:45:39 EDT 2011


Dao is the new generation programming system implemented by a
functional logic solver,
unifying code with data, grammar with program, logic with functional,
compiling with running.

Would you please to have a look at my dao and dinpy?
http://pypi.python.org/pypi/daot
https://github.com/chaosim/dao

The feature of dao and dinpy:
* Mix functional and logic programming like prolog and lisp in python.
* A most powerful parser is provided, which have the power all of the
other parsers do not have. below is the list of some parser and
algorithms: parsec(haskell), packrat, earley parser, glr parser,
antlr, lex/yacc.
  What's the magic behind the dao? See samples\sexpression.py and
testsexpression.py for a sample.

  this is the key tips to the dao's dynamic grammar, which will become
a most powerful tool:

  (sexpression, function(
     # dynamic grammar arises!
    ([Result], and_p(char('{'), sexpression(Expr2), char('}'),
                     setvalue(Result,
eval_(pycall(sexpression2daoexpression, Expr2))))),

    ([Expr], atom_expression(Expr)),
    ([Expr], bracketExpression(Expr)),
    ([Expr], puncExpression(Expr))),

  # the kernel of dynamic grammar
  (eval_parse_result, function(
    ([Result], and_p(sexpression(Expr2), eoi,
          is_(Result, eval_(pycall(sexpression2daoexpression,
Expr2))))))),



More information about the Python-list mailing list