You could have written a custom TreeAdaptor to build the javac tree. Or was that simply not possible / too tedious?
On Nov 13, 2008, at 19:23 , Yang Jiang wrote: > That is because we are talking about two kinds of tree here. > The one build by Antlr's tree construction mechanisms is different > than the one needed by javac. > > Of course you could build an Antlr tree, but that's how far a > grammar can go. But if you want to > take advantages of javac's code validation, code generation etc., > you have to build a javac tree > to hook into the javac's system. > > Yang > > Simon wrote: >> Why do they not use the tree construction mechanisms available in >> Antlr? As far as I can tell, they build the tree by using custom >> actions. The link to the full grammar is shown below: >> >> http://hg.openjdk.java.net/compiler-grammar/compiler-grammar/langtools/file/e37d7d5df672/src/share/classes/com/sun/tools/javac/antlr/Java.g >> >> When would you choose not to use the tree construction mechanisms? >> >> Simon >> >> On Nov 10, 2008, at 21:45 , Terence Parr wrote: >> >> >>> http://openjdk.java.net/projects/compiler-grammar/ >>> >>> Direct link to the grammar: >>> >>> http://openjdk.java.net/projects/compiler-grammar/antlrworks/Java.g >>> >>> USF MSCS student Yang Jiang built this as an intern for Sun. >>> >>> Terence >>> >>> List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest >>> Unsubscribe: >>> http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address >>> >> >> >> List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest >> Unsubscribe: >> http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address >> >> List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" 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/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---
