On Wed, May 25, 2016 at 6:28 PM, Nils Bruin <nbr...@sfu.ca> wrote:
> In that case it might be worth considering if we can integrate our preparser
> steps into the lib2to3.refactor framework:

I'm by far not an expert on parsers, but I think forking that 2to3
part in the standard library could work (i.e. a lot of careful work,
but then it's much more robust). Internally, I think this tool works
by being able to parse both python versions into a syntax tree --
that's done in a .c file, such that this grammar definition is being
compiled to run quickly. Then, there are many python files in fixes/
which are doing the transformations of the parsed tree. There is also
a fix_print.py, which would need that little bit of patching to handle
the case of tuples vs. concatenated strings better. SageMath specific
transformations would be additional fix_*.py transformations.

-- h

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to