Am 01.10.2013 23:19, schrieb F. B.:
In any case, regarding a possible construction
of our own translator, I would suggest to use Nuitka still, then compile
its C++ result to XML using *gccxml*, applying transformation rules to the
XML-equivalent C++ code, and then transforming back to C++.
That would give us Python -> AST -> C++ -> XML -> XML transformation -> C++.
Sounds horribly indirect and fragile to me.
I'd do the transformations at the Python AST level.
1) Probably no more complicated than what's available for XML
2) No C++ knowledge required to hack on the transforms (to know what
kind of transforms are valid in C++ and what aren't), Python knowledge
is sufficient
3) No XML knowledge required to hack on the transforms (to know how to
implement a transform), Python knowledge is sufficient
So we get Python -> AST -> AST transform -> C++.
We could even do Python -> AST -> execution. It's not very nice (very
debugging-unfriendly because you don't have line numbers corresponding
to the actual sources in stack traces and error outputs), but it's
shortcutting the C++ -> XML -> C++ detour.
Plus, XML sucks anyway ;-P
(for example, you can't directly encode circular references in it, you
need DTD-dependent hacks for that)
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.