summaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-26 13:25:09 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-26 13:25:09 +0000
commit777c450ecf556c0688a5c314dbc8b4152c43537a (patch)
treeffa466f109290de98efa81e3b2603f901fd44eaf /tool
parentf9c4602ec9d807b26e88476ab9a8b3e5e94e541f (diff)
downloadruby-777c450ecf556c0688a5c314dbc8b4152c43537a.tar.gz
ruby-777c450ecf556c0688a5c314dbc8b4152c43537a.tar.xz
ruby-777c450ecf556c0688a5c314dbc8b4152c43537a.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@23295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rw-r--r--tool/transcode-tblgen.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/tool/transcode-tblgen.rb b/tool/transcode-tblgen.rb
index 266b5a850..83fc198da 100644
--- a/tool/transcode-tblgen.rb
+++ b/tool/transcode-tblgen.rb
@@ -237,7 +237,10 @@ class ActionMap
else
ss.each_firstbyte {|byte, rest|
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]
end
h[byte][rest] = action
@@ -316,6 +319,8 @@ class ActionMap
case info
when :nomap
"NOMAP"
+ when :asis
+ "ASIS"
when :undef
"UNDEF"
when :invalid