I am using grako utility of python to parse my OIL file to AST. but i want to re generate the source code back from the AST after modifying the AST. Is grako is having feature to do this or else any other utility in python is available for this source code re generation.
Grako-style code generation is done through in-line templates using string.Formatter.
Look into the grako.codegen and grako.model modules/packages, and take a look at the examples/antlr2grako example.
Code generation is one of the least documented parts of Grako (in the README), but it is all there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With