I am currently using a Python 2.5 sample from the ANTLR website. I’m actually wondering if the grammar already produces semantics as well.If there is none, what can I do or what can I use(tools) for generating semantics for python after parsing it with ANTLR?
Share
There’s no tool to generate a language’s semantics, that’s something you have to implement yourself.
Now that you have parsed Python code, you can do some necessary processing first, output it as Python code again and use an existing implementation of the Python language for execution.