diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rwxr-xr-x | tool/transcode-tblgen.rb | 50 |
2 files changed, 50 insertions, 8 deletions
@@ -1,3 +1,11 @@ Sat Mar 20 13:26:09 2010 Tanaka Akira <[email protected]> * array.c (rb_ary_uniq_bang): the array is already unique if the @@ -179,7 +179,7 @@ class ActionMap if actions.length == 1 actions[0] else - actions = actions.find_all {|action| action != :nomap0 } if actions.length == 1 actions[0] else @@ -225,6 +225,45 @@ class ActionMap merge_rects(*mappings.map {|m| parse_to_rects(m) }, &block) end def self.expand(rects, &block) #numsing = numreg = 0 #rects.each {|min, max, action| if min == max then numsing += 1 else numreg += 1 end } @@ -547,7 +586,6 @@ End end PreMemo = {} - PostMemo = {} NextName = "a" def generate_node(name_hint=nil) @@ -571,16 +609,12 @@ End end } - if n = PostMemo[table] - return PreMemo[@tree] = n - end - if !name_hint name_hint = "fun_" + NextName NextName.succ! end - PreMemo[@tree] = PostMemo[table] = name_hint generate_lookup_node(name_hint, table) name_hint @@ -732,7 +766,7 @@ def transcode_compile_tree(name, from, map, valid_encoding=nil) } valid_encoding = ValidEncoding[from] if valid_encoding == nil if valid_encoding - am = ActionMap.merge(h, {valid_encoding => :undef}) {|prefix, as1, as2| a1 = as1.empty? ? nil : ActionMap.unambiguous_action(as1) a2 = as2.empty? ? nil : ActionMap.unambiguous_action(as2) if !a2 |