Replies: 2 comments 8 replies
-
What do you mean with 'tree datatype'? The |
Beta Was this translation helpful? Give feedback.
1 reply
-
That's what Transformers are for. But it's your responsibility to make sure the resulting tree has the exact right structure. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, today I tried to understand the 'Python 3 to Python 2 converter' and TemplateConf, TemplateTranslator.
I want to reconstruct the source code based on a given parsing tree. This works so far. The question that is bothering me is how to translate the tree of one grammar to the tree of another grammar.
Is there any way to cast a string into a 'tree datatype'?
I basically just want to replace a few nodes + tokens to match the other grammar.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions