| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
(reg_fragment_setenc_gen): extracted from reg_compile_gen.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
rename ENC_CODERANGE_SINGLE to ENC_CODERANGE_7BIT.
rename ENC_CODERANGE_MULTI to ENC_CODERANGE_8BIT.
Because single byte 8bit character, such as Shift_JIS 1byte katakana,
is represented by ENC_CODERANGE_MULTI even if it is not multi byte.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
| |
(rb_reg_prepare_re): check encoding difference.
(rb_reg_initialize): check 8bit byte.
* parse.y (parser_tokadd_escape): fix has8bit.
[ruby-dev:32113]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* numeric.c, parse.y: ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
escape. [ruby-core:13722]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
[ruby-core:13718]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ruby-dev:32250]
* parse.y: remove NEED_ASSOC that break test_parser_events.
* parse.y (parser_yylex): should not decrement line numbers at the
end of file.
* file.c (rb_find_file_ext): search .rb files first through in the
loadpath.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
for non-ASCII characters. [ruby-core:13685]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RFLOAT_VALUE(v), DOUBLE2NUM(dbl).
Rename RFloat#value -> RFloat#double_value.
Do not touch RFloat#double_value directly.
* bignum.c, insns.def, marshal.c, math.c, numeric.c, object.c,
pack.c, parse.y, process.c, random.c, sprintf.c, string.c,
time.c: apply above changes.
* ext/dl/mkcallback.rb, ext/json/ext/generator/generator.c:
ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bison with sed. [ruby-dev:32204]
* ruby.c (proc_options): use yydebug in cmdline_options.
* ruby.c (process_options): set yydebug flag of parser.
* parse.y (yydebug): moved into struct parser_params.
* parse.y (rb_parser_get_yydebug, rb_parser_set_yydebug): parser
generic methods.
* */Makefile.sub (parse.c): moved to common.mk.
* tool/ytab.sed: comment out yydebug definition, and substitute
yyerror with parser_yyerror.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
7-bit clean, fixing regression from my previous patch
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* parse.y (parser_yylex): adjust line number for fluent interface.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
delete unused #if 0 code regions from previous patch
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
also modifications for better coderange detection
* test/ruby/test_unicode_escapes.rb: test cases
* test/ruby/test_mixed_unicode_escapes.rb: mixed encoding test cases
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
correct interning of multi-byte symbols. Without this patch
:x==:x is false when x is a multi-byte character.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
version" warning. when I added this warning, I had a plan to
reimplement the parser that is simpler than the current one.
since we abandoned the plan, warning no longer required.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
[ruby-core:13036]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
labels inside switch block.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
continuation from previous one to support fluent interface.
[experimental]
* misc/ruby-mode.el (ruby-calculate-indent): support fluent dot.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
fixes test failure at [test/ruby/test_stringchar.rb:72]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* parse.y (parser_yylex): fix encoding of single character literal.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
[ruby-core:12850]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
matching rule.
* re.c (rb_reg_initialize): always set encoding of Regexp.
* re.c (rb_reg_initialize_str): fix enconding for non 7bit-clean
strings.
* re.c (rb_reg_initialize_m): use ascii encoding for 'n' option.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* parse.y (rb_parser_encoding): added.
* ruby.c (proc_options): added -E and --encoding options.
* ruby.c (process_options): set primary encoding from command line
option if set, or source encoding.
* include/ruby/encoding.h (rb_enc_from_encoding,
rb_get_primary_encoding, rb_set_primary_encoding): prototypes.
* include/ruby/node.h (rb_parser_encoding): prototype.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
matches to current encoding.
* re.c (char_to_option, rb_char_to_option_kcode): 'n' is not kcode
option now.
* re.c (rb_reg_to_s, rb_reg_error_desc): copy encoding rather than
append as an option.
* re.c (make_regexp, rb_reg_prepare_re): use encoding of Regexp and
String instead of kcode.
* re.c (rb_reg_initialize): set fixed option if none is set.
* re.c (rb_reg_regcomp): ditto.
* re.c (rb_reg_equal): check if encodings are equal.
* re.c (rb_reg_initialize_m): encoding option is obsolete.
* re.c (rb_kcode, rb_get_kcode, rb_set_kcode): removed.
* re.c (Init_Regexp): removed Regexp#kcode method.
* ruby.c (proc_options): allow long encoding name.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
David Flanagan <david AT davidflanagan.com> [ruby-core:12629]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
/coding[:=] ?/, a la Python PEP-263, so that VIM comments like
"# vim: set fileencoding=<encoding name>" should be recognized.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
* trunk/parse.y (set_file_encoding): special file encoding handling.
* trunk/parse.y (parser_yylex): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
[ruby-dev:31980]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
non-empty.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bits.
* parse.y (parser_tokadd_string): check code-range.
* parse.y (parser_parse_string, parser_here_document): ditto.
* parse.y (parser_set_encode): check if valid encoding.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
* parse.y (yycompile): use encoding of the source as default.
* ruby.c (proc_options, load_file): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
US-ASCII encoding.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
flags.
* encoding.c (rb_enc_check): allow ASCII compatible strings.
* parse.y (rb_intern_str): use ASCII encoding for ASCII string.
* string.c (rb_enc_str_coderange): check for code-range.
* string.c (rb_str_modify): clear code-range flags.
* string.c (rb_str_hash, rb_str_eql): ASCII compatible strings are
comparable.
* include/ruby/encoding.h: added code-range flags.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* parse.y (parser_tokadd_string, parser_parse_string,
parser_here_document, parser_yylex): set encoding to US-ASCII.
* parse.y (rb_enc_symname_p): check if valid with encoding.
* parse.y (rb_intern3): let symbols have encoding.
* string.c (rb_str_hash): add encoding index.
* string.c (rb_str_comparable, rb_str_equal, rb_str_eql): check if
compatible encoding.
* string.c (sym_inspect): made encoding aware.
* insns.def (opt_eq): compare with encoding.
* include/ruby/encoding.h (rb_enc_asciicompat): check if ASCII
compatible.
* include/ruby/encoding.h (rb_enc_get_index): added prototype.
* include/ruby/intern.h (rb_str_comparable, rb_str_equal): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
[ruby-dev:31848]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
input. [ruby-dev:31816]
* parse.y (rb_intern_str): prevent str from optimization.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* parse.y (ripper): rename event: restparam -> rest_param.
* parse.y (ripper): rename event: constpath_* -> const_path_*.
* parse.y (ripper): rename event: topconst_* -> top_const_*.
* parse.y (ripper): rename event: iter_block -> method_add_block.
* parse.y (ripper): support block local parameter declaration.
* parse.y (ripper): introduce new macro params_new.
* ext/ripper/lib/ripper/sexp.rb: should not dispose event arguments whose name ends with "_new" but arity != 0.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
ripper must be placed at each same location.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* ruby.c (load_file): make new parse instance after processing shebang
line options.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
Kirill A. Shutemov <k.shutemov AT gmail.com> [ruby-core:12154].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
| |
input. [ruby-dev:31775]
* parse.y (rb_id2str): ditto.
* marshal.c (w_float): use snprintf instead of sprintf.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|