diff options
Diffstat (limited to 'tool/transcode-tblgen.rb')
-rwxr-xr-x | tool/transcode-tblgen.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tool/transcode-tblgen.rb b/tool/transcode-tblgen.rb index dc1f6ea911..b25901d375 100755 --- a/tool/transcode-tblgen.rb +++ b/tool/transcode-tblgen.rb @@ -753,13 +753,13 @@ def import_ucm(path) from_ucs = [] File.foreach(File.join($srcdir, "ucm", path)) do |line| uc, bs, fb = nil - if /^<U(\h+)>\s*([\+\hx\\]+)\s*\|(\d)/ =~ line + if /^<U([0-9a-fA-F]+)>\s*([\+0-9a-fA-Fx\\]+)\s*\|(\d)/ =~ line uc = $1.hex bs = $2.delete('x\\') fb = $3.to_i next if uc < 128 && uc == bs.hex - elsif /^([<U\h>+]+)\s*([\+\hx\\]+)\s*\|(\d)/ =~ line - uc = $1.scan(/\h+>/).map(&:hex).pack("U*").unpack("H*")[0] + elsif /^([<U0-9a-fA-F>+]+)\s*([\+0-9a-fA-Fx\\]+)\s*\|(\d)/ =~ line + uc = $1.scan(/[0-9a-fA-F]+>/).map(&:hex).pack("U*").unpack("H*")[0] bs = $2.delete('x\\') fb = $3.to_i end |