-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Guido van Rossum wrote: > I'm curious about the focus on ASTs that seems apparent in this > subthread (though I may easily be misreading between the lines :-). > I've always been more inclined to edit the text and re-parse from > there, as it puts the author in control of formatting, comments etc., > and this is how most "real-world" environments work. (Not that that > necessarily makes it better, but neither is the opposite true.) Is > someone willing to write up a brief comparison between the two > approaches?
At the moment, I'm using AST to parse Python modules, which saves me from implementing my own parser. For now, it's only one-way. AST (or information gained from it) is not getting used to write anything back. For now, the information is being used to populate a class browser TreeView. However, I'm trying to keep the implementation open to the idea that in the future Develop might manipulate Python programs at below the Module level. The pretty printer (btw, I found some good beginnings of one at http://trac.pocoo.org/browser/jinja/trunk/jinja/translators/python.py) would probably more likely be used for implementing an eToys-style click-and-drag programming environment for the younger kids on top of Develop. - -- Regards, Andrew Clunis -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF9IyMALkUMXSNow8RAidKAJ4q33SZuzkWqzrHfoe88maLtPjsWgCfXZgW KnJI6a0RhAW0/RCpzOhjgt0= =2gh6 -----END PGP SIGNATURE----- _______________________________________________ Sugar mailing list [email protected] http://mailman.laptop.org/mailman/listinfo/sugar
