2 ms·
Am I right in saying that a tool like ANTLR would take care of most of these steps? Although I'd love to learn compiler theory someday and do everything myself,
by jstevens85 17y ago
Am I right in saying that a tool like ANTLR would take care of most of these steps? Although I'd love to learn compiler theory someday and do everything myself, I'm constrained by time right now. What tools, frameworks could help speed this thing up for a beginner?
- scott_s 17y agoIn order to use the tools, I think you'll need to understand some basic compiler theory. I can't say for certain, since I only looked at various compiler-related tools after taking a compilers course. But any tool is going to introduce some incidental complexity, and it's having a grasp of the basics that will let you realize "Oh, this is just how the tool does ___." The good news is that the basics of compilers theory and implementation isn't that difficult. You should be able to learn a lot just through some Googling and some time spent on Wikipedia pages. With that said, a tool such as ANTLR should handle all of step 2, and part of step 3. The biggest step, though, is step 1, and that's all you. Since you're a math person, think of this in terms of functions. You need to write a function that takes Basic code and produces semantically equivalent JavaScript code. The bulk of the work is in determining the semantic JavaScript equivalents to all Basic constructs. This also implies that you need to have a deep understanding of the semantics of both languages. edit: It just occurred to me that I don't know if you want to do this for your own edification, or for a practical purpose. If you have a practical reason, there's probably an easier solution.