public
Description: ruby2ruby code for my rubyconf08 talk
Homepage:
Clone URL: git://github.com/mchung/ruby2ruby_rubyconf08.git
100644 18 lines (13 sloc) 0.596 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# A small tribute to Guy Decoux, an early Ruby programmer who once walked the
# Ruby parse tree to answer a simple operator precedence question posed by Matz.
 
# Read Matz’s question [1] and Guy’s [2] answer. Today, we can answer the same
# question with the following code:
 
# [1] http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/2462
# [2] http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/2464
 
if $0 == __FILE__
  require 'rubygems'
  require 'parse_tree'
  require 'parse_tree_extensions'
  require 'yaml'
 
  y ParseTree.new.parse_tree_for_string("a b c, d")
end