summaryrefslogtreecommitdiff
path: root/parse.y
AgeCommit message (Collapse)Author
2007-12-30* parse.y (program, yycompile0): too early to drop lex_lastline innobu
rules. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-30* parse.y (program): clear input strings after all process.nobu
* parse.y (parser_nextc, parser_yylex): should not drop lex_lastline while lex_p is valid. [ruby-dev:32896] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-27* parse.y, transcode_data.h, transcode.c: change "illegal" toakr
"invalid" in a context which doesn' t against a law. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25* parse.y (struct parser_params): make parser_ruby_sourcefile commonakr
field. it is used by node_newnode. new field parser_ruby_sourcefile_string for ripper. (parser_initialize): initialize parser_ruby_sourcefile in ripper. (ripper_initialize): initialize parser_ruby_sourcefile_string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24* parse.y (rb_id2str): fill klass of returned string as rb_cString.akr
some strings are allocated before rb_cString is created. This prevents a "called on terminated object" error by ObjectSpace.each_object(Module) {|m| p m.name }. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22* include/ruby/encoding.h, encoding.c, re.c, io.c, parse.y, numeric.c,akr
ruby.c, transcode.c: rename rb_ascii_encoding. to rb_ascii8bit_encoding. rb_ascii_encoding is ambiguous with ASCII-8BIT and US-ASCII. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22* parse.y (reg_named_capture_assign_iter): allows non-ascii names andnobu
get rid of reserved word IDs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22* parse.y (reg_named_capture_assign_iter): just ignore thematz
captures that do not have valid local variable name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22* parse.y (reg_named_capture_assign_iter): captured name shouldmatz
not be reserved word. a patch from Keita Yamaguchi <keita.yamaguchi AT gmail.com> in [ruby-dev:32675]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21 * parse.y (parser_str_new, rb_intern3): rb_default_encoding() renamed.usa
* ext/nkf/nkf.c (rb_nkf_putchar): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21* parse.y (command): block from cmd_brace_block was ignored.matz
[ruby-dev:32644] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21* encoding.c (rb_enc_init): use enc_register_at() directly.nobu
* encoding.c (rb_utf8_encoding): returns utf-8 encoding. * include/ruby/encoding.h (rb_utf8_encoding): prototyped. * parse.y (UTF8_ENC): uses rb_utf8_encoding(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21* keywords, parse.y (__ENCODING__): represent script encoding.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21* regerror.c, string.c, io.c, lib/getoptlong.rb, lib/net/imap.rb,akr
compile.c, sprintf.c, parse.y, ext/win32ole/win32ole.c, ext/tk/sample/demos-en/entry3.rb, ext/tk/lib/tcltk.rb, ext/openssl/ossl_bn.c, numeric.c, vm.c, benchmark/bm_so_meteor_contest.rb, bignum.c, ruby.c: don't "illegal" for non law violation context. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-19* parse.y (reg_named_capture_assign_iter): get rid of creatingnobu
unnecessary ID. * parse.y (rb_enc_symname2_p): check for non-nul-terminated string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-19* parse.y (reg_named_capture_assign_iter): remove C99 dependency.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-18* parse.y (arg tMATCH arg): call reg_named_capture_assign_gen if regexpakr
literal is used. (reg_named_capture_assign_gen): assign the result of named capture into local variables. [ruby-dev:32588] * re.c: document the assignment by named captures. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-18* parse.y (op_tbl): remove duplication to avoid symbol aliases.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-17* parse.y (parser_encode_length): chomp eol style modifiers.nobu
* parse.y (parser_magic_comment): ditto. * parse.y (set_file_encoding): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-12* re.c, regerror.c, string.c, parse.y, ruby.c, file.c:akr
use capital letter for \xHH notation. [ruby-dev:32511] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-12* parse.y (expr): 'not' and '!' should act as conditionalmatz
expression. [ruby-dev:32548] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-10* parse.y (shadowing_lvar_gen): no duplicate error for "_".matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-09* parse.y (parser_yylex): wrong token was generated. [ruby-dev:32498]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-09* re.c (rb_reg_expr_str): use \xHH instead of \OOO.akr
* regerror.c (to_ascii): ditto. (onig_snprintf_with_pattern): ditto. (onig_snprintf_with_pattern): ditto. * string.c (rb_str_inspect): ditto. (rb_str_dump): ditto. * parse.y (parser_yylex): ditto. * ruby.c (proc_options): ditto. * file.c (rb_f_test): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-09* parse.y (expr): redefinable not (!) operator.matz
* parse.y (arg): ditto. * object.c (rb_obj_not): new method "!". * object.c (rb_obj_not_equal): new method "!=". * object.c (rb_obj_not_match): new method "!~". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-09* parse.y (parser_magic_comment): delimits with a semicolon.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-08* re.c (rb_reg_check_preprocess): new function for validating regexpakr
fragment. * parse.y (regexp): invoke reg_fragment_check. (reg_fragment_check): defined. (reg_fragment_check_gen): defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-08* encoding.c (rb_enc_mbclen): make it never fail.akr
(rb_enc_nth): don't check the return value of rb_enc_mbclen. (rb_enc_strlen): ditto. (rb_enc_precise_mbclen): return needmore(1) if e <= p. (rb_enc_get_ascii): new function for extracting ASCII character. * include/ruby/encoding.h (rb_enc_get_ascii): declared. * include/ruby/regex.h (ismbchar): removed. * re.c (rb_reg_expr_str): use rb_enc_get_ascii. (unescape_escaped_nonascii): use rb_enc_precise_mbclen to determine the termination of escaped non-ASCII character. (unescape_nonascii): use rb_enc_precise_mbclen. (rb_reg_quote): use rb_enc_get_ascii. (rb_reg_regsub): use rb_enc_get_ascii. * string.c (rb_str_reverse) don't check the return value of rb_enc_mbclen. (rb_str_split_m): don't call rb_enc_mbclen with e <= p. * parse.y (is_identchar): use ISASCII. (parser_ismbchar): removed. (parser_precise_mbclen): new macro. (parser_isascii): new macro. (parser_tokadd_mbchar): use parser_precise_mbclen to check invalid character precisely. (parser_tokadd_string): use parser_isascii. (parser_yylex): ditto. (is_special_global_name): don't call is_identchar with e <= p. (rb_enc_symname_p): ditto. [ruby-dev:32455] * ext/tk/sample/tkextlib/vu/canvSticker2.rb: remove coding cookie because the encoding is not UTF-8. [ruby-dev:32475] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-07* parse.y (arg): typo fixed ("!" -> "|") in the ripper code.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-07* parse.y (arg): tUPLUS no longer works as identity operation anymatz
more. inspired by [ruby-talk:265532]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-05* parse.y (rb_intern3): fix to changing encoding to default, andnobu
uncommented r13835, which is rare but not impossible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-05* parse.y (yycompile): get rid of tracing while parsing.nobu
[ruby-dev:31351] * thread.c (ruby_suppress_tracing): added a new parameter, which directs to call func always. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-02* parse.y (parser_tokadd_mbchar): fix for ASCII chars. [ruby-dev:32432]nobu
* parse.y (parser_parse_string, parser_here_document): prevent false error messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-02* parse.y (parser_tokadd_mbchar): check insufficient multibyte char.nobu
[ruby-dev:32429] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-02* parse.y (regexp): fix /#{}\xa1\xa2/e to be EUC-JP. akr
(reg_fragment_setenc_gen): extracted from reg_compile_gen. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-01* include/ruby/intern.h (rb_uv_to_utf8): declared.akr
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@14072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-01* encoding.c: rename primary_encoding -> default_external (encoding).matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-30* parse.y (newline_node): always remove NODE_BEGIN.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-29* parse.y (stmt): remove unnecessary NODE_BEGIN. [ruby-core:13814]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-27* include/ruby/encoding.h, encoding.c, re.c, string.c, parse.y: akr
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@14027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-23* re.c (REG_CASESTATE): unused macro removed.akr
(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: svn+ssh://ci.ruby-lang.org/ruby/trunk@14002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20* include/ruby/ruby.h: rename RFloat#double_value -> float_value.ko1
* numeric.c, parse.y: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20* parse.y (parser_read_escape): has8bit flag may be set with controlnobu
escape. [ruby-core:13722] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20* parse.y (parser_prepare): set begging after BOM if exists.nobu
[ruby-core:13718] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-19* parse.y (parser_yylex): should clear parser->tokp as well.matz
[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: svn+ssh://ci.ruby-lang.org/ruby/trunk@13966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-18* parse.y (parser_read_escape): disallow control and meta modifiersnobu
for non-ASCII characters. [ruby-core:13685] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-13* include/ruby/ruby.h: introduce 2 macros:ko1
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@13913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-13* common.mk (parse.c), ext/ripper/depend (ripper.c): process afternobu
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@13908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-10* parse.y: use ASCII encoding for string literals that aredavidflanagan
7-bit clean, fixing regression from my previous patch git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-09* parse.y (parser_nextc): added single line read forward buffer.nobu
* parse.y (parser_yylex): adjust line number for fluent interface. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e