1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* tool/transcode-tblgen.rb (transcode_generate_node): code

argument removed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-08-06 13:42:21 +00:00
parent 7d072e2ba4
commit e22b3b773d
3 changed files with 13 additions and 16 deletions

View file

@ -1,3 +1,8 @@
Wed Aug 6 22:40:48 2008 Tanaka Akira <akr@fsij.org>
* tool/transcode-tblgen.rb (transcode_generate_node): code
argument removed.
Wed Aug 6 21:25:45 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> Wed Aug 6 21:25:45 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* gc.c (chain_finalized_object): deletes finalizers to be invoked from * gc.c (chain_finalized_object): deletes finalizers to be invoked from

View file

@ -185,9 +185,7 @@ fun_so_to_utf_32le(const unsigned char* s, unsigned char* o)
map["{d8-db}{00-ff}{dc-df}{00-ff}"] = :func_so map["{d8-db}{00-ff}{dc-df}{00-ff}"] = :func_so
map["{dc-df}{00-ff}"] = :invalid map["{dc-df}{00-ff}"] = :invalid
map["{d8-db}{00-ff}{00-db,e0-ff}{00-ff}"] = :invalid map["{d8-db}{00-ff}{00-db,e0-ff}{00-ff}"] = :invalid
code = '' transcode_generate_node(ActionMap.parse(map), "from_UTF_16BE", [])
transcode_generate_node(ActionMap.parse(map), code, "from_UTF_16BE", [])
code
%> %>
static const rb_transcoder static const rb_transcoder
@ -212,10 +210,8 @@ rb_from_UTF_16BE = {
map["ed{a0-bf}"] = :invalid map["ed{a0-bf}"] = :invalid
map["f0{80-8f}"] = :invalid map["f0{80-8f}"] = :invalid
map["f4{90-bf}"] = :invalid map["f4{90-bf}"] = :invalid
code = ''
am = ActionMap.parse(map) am = ActionMap.parse(map)
transcode_generate_node(am, code, "to_UTF_16BE", [0x00..0xff, 0x80..0xbf, 0x80..0xbf, 0x80..0xbf]) transcode_generate_node(am, "to_UTF_16BE", [0x00..0xff, 0x80..0xbf, 0x80..0xbf, 0x80..0xbf])
code
%> %>
static const rb_transcoder static const rb_transcoder
@ -230,9 +226,7 @@ rb_to_UTF_16BE = {
map["{00-ff}{d8-db}{00-ff}{dc-df}"] = :func_so map["{00-ff}{d8-db}{00-ff}{dc-df}"] = :func_so
map["{00-ff}{dc-df}"] = :invalid map["{00-ff}{dc-df}"] = :invalid
map["{00-ff}{d8-db}{00-ff}{00-db,e0-ff}"] = :invalid map["{00-ff}{d8-db}{00-ff}{00-db,e0-ff}"] = :invalid
code = '' transcode_generate_node(ActionMap.parse(map), "from_UTF_16LE", [])
transcode_generate_node(ActionMap.parse(map), code, "from_UTF_16LE", [])
code
%> %>
static const rb_transcoder static const rb_transcoder
@ -254,9 +248,7 @@ rb_to_UTF_16LE = {
map["00{11-ff}{00-ff}{00-ff}"] = :invalid map["00{11-ff}{00-ff}{00-ff}"] = :invalid
map["0000{d8-df}{00-ff}"] = :invalid map["0000{d8-df}{00-ff}"] = :invalid
map["{01-ff}{00-ff}{00-ff}{00-ff}"] = :invalid map["{01-ff}{00-ff}{00-ff}{00-ff}"] = :invalid
code = '' transcode_generate_node(ActionMap.parse(map), "from_UTF_32BE", [])
transcode_generate_node(ActionMap.parse(map), code, "from_UTF_32BE", [])
code
%> %>
static const rb_transcoder static const rb_transcoder
@ -278,9 +270,7 @@ rb_to_UTF_32BE = {
map["{00-ff}{00-ff}{00-ff}{01-ff}"] = :invalid map["{00-ff}{00-ff}{00-ff}{01-ff}"] = :invalid
map["{00-ff}{00-ff}{11-ff}00"] = :invalid map["{00-ff}{00-ff}{11-ff}00"] = :invalid
map["{00-ff}{d8-df}0000"] = :invalid map["{00-ff}{d8-df}0000"] = :invalid
code = '' transcode_generate_node(ActionMap.parse(map), "from_UTF_32LE", [])
transcode_generate_node(ActionMap.parse(map), code, "from_UTF_32LE", [])
code
%> %>
static const rb_transcoder static const rb_transcoder

View file

@ -415,9 +415,11 @@ End
tree_code + "\n" + transcoder_code tree_code + "\n" + transcoder_code
end end
def transcode_generate_node(am, code, name_hint=nil, ranges=[]) def transcode_generate_node(am, name_hint=nil, ranges=[])
STDERR.puts "converter for #{name_hint}" if VERBOSE_MODE STDERR.puts "converter for #{name_hint}" if VERBOSE_MODE
code = ''
am.generate_node(code, name_hint, ranges) am.generate_node(code, name_hint, ranges)
code
end end
def transcode_register_code def transcode_register_code