From: matz@... (Yukihiro Matsumoto) Date: 1999-07-14T16:22:36+09:00 Subject: [ruby-talk:00492] Syntax tree (Re: Some questions concerning GC in Ruby extensions) Hi, This is the second part of the answers to your questions, mostly concerning syntax tree nodes. In message "[ruby-talk:00490] Some questions concerning GC in Ruby extensions" on 99/07/14, Clemens Hintze writes: |Concerning Ruby's syntax tree... | | 7. Are there any docs, that explain the format of that tree a | little bit? In English? No, sorry. In Japanese? No. The format is written in node.h. The source is the perfect document as I said before. :-) # even bugs are described there. | 8. How flexible is that syntax tree? | | 8.a. Would it, for example, be possible to transfer another | language, let us say Smalltalk, to such a syntax tree, | and let the Ruby VM work with it (in principle)? It highly depends on Ruby. Node types were added ad hoc. | 8.b. Could I store that syntax tree in some format, so that | later, I could reload it and start evaluation again? No. | 8.c. Are there any functions, that deals with the syntax tree | (like: traversing, add a node, delete one, ...) No. The syntax tree is not opened for users. Tree structures may change dramatically in the future version. It's very possible since tree traversing is major perfomance bottleneck. I suggest you to leave it blackbox. matz.