* tool/transcode-tb (ActionMap#each_firstbyte):

if :asis collides other mappings, use another.

* tool/transcode-tb (ActionMap#generate_info):
  add :asis for ASIS.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2009-04-26 13:25:09 +00:00
parent 0881a39acd
commit b6285a01fb
2 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,11 @@
Sun Apr 26 22:17:02 2009 NARUSE, Yui <naruse@ruby-lang.org>
* tool/transcode-tb (ActionMap#each_firstbyte):
if :asis collides other mappings, use another.
* tool/transcode-tb (ActionMap#generate_info):
add :asis for ASIS.
Sun Apr 26 21:59:43 2009 NARUSE, Yui <naruse@ruby-lang.org> Sun Apr 26 21:59:43 2009 NARUSE, Yui <naruse@ruby-lang.org>
* transcode.c (ASIS): added for multi byte direct map. * transcode.c (ASIS): added for multi byte direct map.

View File

@ -237,7 +237,10 @@ class ActionMap
else else
ss.each_firstbyte {|byte, rest| ss.each_firstbyte {|byte, rest|
h[byte] ||= {} h[byte] ||= {}
if h[byte][rest] if h[byte][rest].nil?
elsif action == :asis
next
elsif h[byte][rest] != :asis
raise "ambiguous %s or %s (%02X/%s)" % [h[byte][rest], action, byte, rest] raise "ambiguous %s or %s (%02X/%s)" % [h[byte][rest], action, byte, rest]
end end
h[byte][rest] = action h[byte][rest] = action
@ -316,6 +319,8 @@ class ActionMap
case info case info
when :nomap when :nomap
"NOMAP" "NOMAP"
when :asis
"ASIS"
when :undef when :undef
"UNDEF" "UNDEF"
when :invalid when :invalid