|Re: Generating code for Boolean expressions [message #1206369 is a reply to message #1205877]
||Sun, 24 November 2013 03:10
| David Paz
Registered: November 2013
Thanks for the quick reply. I already got that, maybe I did not explain my self well. My problem is when generating the code for each term or expression part, since it can not be traverse easily. I see the generation for it more like a visitor, which need to traverse the AST down until terminals.
In the mean while I found this post from you advising the dispatch mechanism. With it, I think it can be achieved the polymorphic behavior I want, just call a generate method and let each class of the language to generate its corresponding bits of code.
I will give it a try and let you know if succeeded.
Thanks again, for your time.
Powered by FUDForum
. Page generated in 0.02198 seconds