ruby-cvs:21309
From: akr ruby-lang.org
Date: Sun, 2 Dec 2007 01:56:20 +0900 (JST)
Subject: [ruby-cvs:21309] Ruby:r14072 (trunk): * include/ruby/intern.h (rb_uv_to_utf8): declared.
akr 2007-12-02 01:56:19 +0900 (Sun, 02 Dec 2007)
New Revision: 14072
Modified files:
trunk/ChangeLog
trunk/include/ruby/intern.h
trunk/pack.c
trunk/parse.y
trunk/re.c
trunk/test/ruby/test_m17n.rb
trunk/test/ruby/test_unicode_escape.rb
Log:
* include/ruby/intern.h (rb_uv_to_utf8): declared.
* re.c (rb_reg_preprocess): new function for dynamic regexp with
\u{} such as Regexp.new("\\u{6666}").
(rb_reg_prepare_re): preprocess regexp for recompiling.
(read_escaped_byte): new function.
(unescape_escaped_nonascii): new function.
(append_utf8): new function.
(unescape_unicode_list): new function.
(unescape_unicode_bmp): new function.
(unescape_nonascii): new function.
(rb_reg_initialize): preprocess regexp.
* pack.c (rb_uv_to_utf8): renamed from uv_to_utf8.
* parse.y (STR_NEW3): take func instead of has8 and hasmb.
(parser_str_new): use default coderange mechanism except for regexp.
(parser_tokadd_utf8): copy regexp source as-is.
(parser_read_escape): UTF-8 stuff removed.
(parser_tokadd_escape): has8bit and hasmb removed.
(parser_tokadd_string): fix 8-bit single byte character with \u.
(parser_parse_string): has8bit and hasmb removed.
(parser_here_document): has8bit and hasmb removed.
(parser_yylex): call parser_tokadd_utf8 instead of read_escape for
UTF-8 character.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/parse.y?r1=14072&r2=14071
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14072&r2=14071
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_unicode_escape.rb?r1=14072&r2=14071
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/re.c?r1=14072&r2=14071
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_m17n.rb?r1=14072&r2=14071
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/pack.c?r1=14072&r2=14071
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/include/ruby/intern.h?r1=14072&r2=14071