Hi Matt, 2011/5/22 mattschinkel <[email protected]>: > Jeop, I've looked at JAT a bit more. Obviously I don't understand your > large amount of code, this would require C experience and I have none. > I did notice that you have no C code in the grammer within {....}. > This would have put your C code inline with the output lexer/parser > files. Is there a reson you did not? I did use this for INCLUDE_STMT, since it was the only way to resolve the issue at hand. In general I did not use it for a few reasons: - Antlr-works is a usefull Java-based tool for debugging the grammar files. Including C code limits the use of this tool (I don't recall exactly to which extend though). - Such code is usefull to keep overview by having all stuff (grammar, action) together in one file. This will only work if size of this file is limited. The JAL grammar plus required code is too large to keep overview in one file. - Such code generates target code (that is: antlr target code = jat source code) that has a one-on-one relationship to the rule, without any additional context. Although this is how I started off, this turned out to be too simple e.g. to handle variable declarations. This is why newer code generally fills variables based on the tree-nodes and, when this is done, generates code based on the variables. The older code generates code while parsing the tree nodes (see also refactoring-remark in 'implementation of JAT.docx').
> I'm sure you did great work on JAT, but I just don't have enouf > knowledge of C. I don't think I'll be able to continue your JAT > project. I'll have to start from scratch and learn C and Antlr as I > go. JAT requires knowledge of C, profound knowledge of the JAL language and its internal structure. And you need some knowledge on the use of Antrl. It is wise to take one at the time... Joep -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
