Patrick Wright wrote: > The DLR Trees are essentially the DLR representation of programs so > every language that targets DLR produces the DLR Trees. ToyScript's > design is similar to that of all the other DLR based languages, such > as IronPython or IronRuby in the sense that it first parses into its > own AST and then generates the DLR trees. At one point ToyScript > (being very simple language) parsed directly into the DLR trees, but > we changed that to behave more like the other DLR based languages, > even though for ToyScript it is not strictly necessary."
Yeah, I'd like to hear what others on this list think about this model. As I understand it (and I may have heard wrong), most of the "big" DLR languages currently don't generate straight up DLR trees, or they partially generate such trees but have to go outside the available structure quite a bit. From discussions on the IronRuby list, it also sounds like they're adding many permutations of different types of logic into individual tree node types: """ 293085: (tomat) Fixes RubyForge bug #14425. Ruby allows jump statements (return, redo, retry, break and next) to appear in Boolean expressions as right operands. Examples: def foo x x and return ‘true’ x or return ‘false’ ‘Unreachable’ end foo true # “true” foo false # “false” This shelveset changes the grammar to support this feature and adds AST node ConditionalJumpExpression that represents <condition> and/or <jump-statement> expression. Also adds a unit test of the node. """ In a perfect world, I could see that a common "abstract semantic tree" you could convert a language AST into would be a great intermediate, and if it were possible to take that tree in all cases and compile it (potentially optimized), it would certainly make the process of language implementation easier. However, and this is with my limited knowledge of how these trees actually map to language features, this seems like a very naive or at least extremely optimistic goal. Opinions? Anyone have a deeper understanding of the DLR's abstract semantic trees and how they fit into the whole system? - Charlie --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to jvm-languages@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en -~----------~----~----~----~------~----~------~--~---