summaryrefslogtreecommitdiff
path: root/tool/transcode-tblgen.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-15 15:42:30 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-15 15:42:30 +0000
commit6eb3843b178c5bca28a3c8d73b8af5f58de21e22 (patch)
tree43f2e7802ee8ffd52e4f27952d3fffbb3978db38 /tool/transcode-tblgen.rb
parent69029b90fea8a6b7e5607ead5e2184da30db9e76 (diff)
* transcode_data.h (STR1_LENGTH): defined.
(makeSTR1LEN): defined. * tool/transcode-tblgen.rb: use makeSTR1LEN. generate STR1 for 4 to 259 bytes. * transcode.c (rb_transcoding): new field: output_index. (transcode_restartable0): use STR1_LENGTH. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/transcode-tblgen.rb')
-rw-r--r--tool/transcode-tblgen.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/tool/transcode-tblgen.rb b/tool/transcode-tblgen.rb
index 05ee5d3..50b4908 100644
--- a/tool/transcode-tblgen.rb
+++ b/tool/transcode-tblgen.rb
@@ -307,7 +307,7 @@ class ActionMap
n = str_name(bytes)
@bytes_code.insert_at_last(1 + len,
"\#define #{n} makeSTR1(#{size})\n" +
- " #{len}," + bytes.gsub(/../, ' 0x\&,') + "\n\n")
+ " makeSTR1LEN(#{len})," + bytes.gsub(/../, ' 0x\&,') + "\n\n")
n
end
end
@@ -336,7 +336,7 @@ class ActionMap
"o3(0x#$1,0x#$2,0x#$3)"
when /\A(f[0-7])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])\z/i
"o4(0x#$1,0x#$2,0x#$3,0x#$4)"
- when /\A([0-9a-f][0-9a-f]){0,255}\z/i
+ when /\A([0-9a-f][0-9a-f]){4,259}\z/i
gen_str(info.upcase)
when /\A\/\*BYTE_LOOKUP\*\// # pointer to BYTE_LOOKUP structure
$'.to_s