> Still, in my opinion it would be quite an interesting feature if > python could make the addition of other grammars as easily as adding a > new python module. I believe there is an intention to re-design the parsing stuff at some time in the future to make the parse tree more easily accessible and manipulable, so maybe something like this will be possible one day. > A new grammar module would basically be a map of the foreign language > to the python tokens. There's always going to be more to doing such a translation than just token-to-token mappings -- otherwise it would be possible to turn Java into Python with a few simple string substitutions. :-) > And a mechanism to deal with non-mappable features of the foreign > language. Yep, that's the really hard part! Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg@cosc.canterbury.ac.nz +--------------------------------------+
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4