Off topic: CPython is around 3x faster than Jython compiling the User Guide:
$ time jython asciidoc.py doc/asciidoc.txt
real 0m53.406s
user 1m2.240s
sys 0m7.132s
$ time asciidoc doc/asciidoc.txt
real 0m21.821s
user 0m20.469s
sys 0m1.168s
On 28/02/12 13:25, Lex Trotman wrote:
[...]
I poked around and *suspect* that the error was introduced with this
changeset:
http://code.google.com/p/asciidoc/source/detail?r=66543730504e5dc07a56fcd89b238ef784cdeac4
which uses the Python compiler to remove eval()s.
I would like AsciiDoc to work with Jython so if anyone can figure out
exactly what's causing it and come up with at patch that would be great.
Hi Stuart,
Perhaps one solution would be to use the parser module instead of the
compiler module, this is messier and harder to use since you have to
refer to the detailed grammar, but is available for all Python 2
versions. I don't think the grammar for "safe" literal structures (ie
expr) has changed across Python versions so the result should be
portable.
literal_eval() would need to be re-written to use the output of the
parser module, but that should be fairly mechanical.
Cheers
Lex
Cheers, Stuart
Thanks.
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/asciidoc?hl=en.
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/asciidoc?hl=en.