summaryrefslogtreecommitdiff
path: root/parse.y
AgeCommit message (Collapse)Author
2008-09-23* include/ruby/node.h, node.h: move node.h from include path.ko1
This change stop to install node.h beacuase of saving ABI (node.h will be changed. Extensions should not depends on this file). * blockinlining.c, class.c, compile.c, debug.h, enum.c, gc.c, iseq.c, parse.y, ruby.c, signal.c, variable.c, vm.c, vm_core.h, vm_dump.c: ditto. * ext/ripper/depend: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23* common.mk: clean upko1
- remove blockinlining.$(OBJEXT) to built - make ENCODING_H_INCLDUES variable (include/ruby/encoding.h) - make VM_CORE_H_INCLUDES variable (vm_core.h) - simplify rules. - make depends rule to output depend status using gcc -MM. * include/ruby/mvm.h, include/ruby/vm.h: rename mvm.h to vm.h. * include/ruby.h: ditto. * load.c: add inclusion explicitly. * enumerator.c, object.c, parse.y, thread.c, vm_dump.c: remove useless inclusion. * eval_intern.h: cleanup inclusion. * vm_core.h: rb_thread_t should be defined in this file. * vm_evalbody.c, vm_exec.c: rename vm_evalbody.c to vm_exec.c. * vm.h, vm_exec.h: rename vm.h to vm_exec.h. * insnhelper.h, vm_insnhelper.h: rename insnhelper.h to vm_insnhelper.h. * vm.c, vm_insnhelper.c, vm_insnhelper.h: - rename vm_eval() to vm_exec_core(). - rename vm_eval_body() to vm_exec(). - cleanup include order. * vm_method.c: fix comment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-19* parse.y: strings which contain only US-ASCII don't force to havenaruse
US-ASCII encoding. [ruby-dev:36400] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-13* include/ruby/oniguruma.h (onigenc_get_prev_char_head): add endakr
argument. * include/ruby/encoding.h (rb_enc_prev_char): ditto. * regenc.c (onigenc_get_prev_char_head): add end argument. * regparse.c: follow the interface change. * regexec.c: ditto. * string.c: ditto. * parse.y: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06* parse.y (f_block_optarg): allow default for block parameters asmatz
long as the value is primary. a patch from Eric Mahurin <eric.mahurin at gmail.com> in [ruby-core:16880]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06* parse.y (yylex): "1.upto 2 {|i| p i }" should be syntax error.matz
[ruby-dev:36008] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-05* include/ruby/ruby.h (DBL2NUM): renamed from DOUBLE2NUM.matz
a patch from Tadashi Saito <shiba at mail2.accsnet.ne.jp> in [ruby-dev:36102]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-03* parse.y (parser_encoding_name): defined.akr
(parser_tokadd_mbchar): show encoding in the message of "invalid multibyte char" error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-30* parse.y (struct token_info): constified.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-30* parse.y (token_info_get_column, token_info_has_nonspaces),nobu
(token_info_push, token_info_pop): constified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-30* parse.y (token_info_push): -w warns indentation level mismatch.matz
based on a patch from Yukina Yamano presented at RubyKaigi'07. See <http://jp.rubyist.net/RubyKaigi2007/Log0609-LT06.html> and <http://www.logic-junction.com/products/rubyend.html> (Japanese). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-30* parse.y: remove include pragma for "ruby/intern.h".ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25* parse.y (YYSTYPE): struct RVarmap has been no longeryugui
defnied. see also r11717 by matz. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-14* include/ruby/encoding.h (rb_enc_ispunct): added.nobu
* common.mk (COMMONOBJS), inits.c (rb_call_inits): id.c is now included from parse.c. * id.c (Init_id), id.h (ruby_method_ids): added IDs used by VM. * parse.y (global_symbols): added rooms for VM IDs. * parse.y (rb_intern3, rb_id2str): single puctuation symbol is now same as char code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-14* parse.y (union tmpyystype): no longer needed, since YYSTYPE isnobu
defined in parse.h now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10* configure.in,parse.y: removed garbage spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-04* parse.y (deferred_nodes, compstmt, arg, fixup_nodes, range_op): fixnobu
up fixnum range literal in conditional as automagical line number comparison. [ruby-core:12124], [ruby-dev:35731] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-02* parse.y (yylex): 8 and 9 in octal integer should cause compilenobu
error. [ruby-dev:35729] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-01* parse.y (parser_yylex): removed an useless conditional, and magicyugui
comment are ignored unless at the first of line. * test/ruby/test_m17n.rb (test_magic_comment_vim): added. * test/ruby/test_m17n.rb (test_magic_comment_at_variaous_positions): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-30* parse.y (magic_comment_encoding): remove meaningless null check.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-30* parse.y (vtable_free): remove meaningless null check.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-08* thread.c (rb_set_coverages, rb_reset_coverages): enable and disablemame
coverage measurement. * thread.c (rb_get_coverages): rename and move from vm.c. * vm.c (rb_vm_get_coverages): ditto. * iseq.c (prepare_iseq_build): ditto. * thread.c (clear_coverage): ditto. * parse.y (coverage): ditto. * ext/coverage/coverage.c: use above functions, add new method Coverage.start and fix rdoc . git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-08* thread.c (rb_enable_coverages): hide coverage array by setting 0 tomame
klass during measurement. * parse.y (coverage, yycompile0): ditto. * iseq.c (prepare_iseq_build): use rb_hash_lookup instead of rb_hash_aref. * thread.c (rb_coverage_result): restore klass of coverage array and return it. * theaad.c (update_coverage): chcek whether its klass is 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-03* include/ruby/intern.h: remove prototypes about coverage.mame
* iseq.c (prepare_iseq_build): add prototype. * parse.y (coverage): ditto. * thread.c (clear_coverage): ditto. * thread.c (update_coverage): use rb_sourceline. * thread.c (rb_get_coverages): rename and move to vm.c. * vm.c (rb_vm_get_coverages): ditto. * ext/coverage/coverage.c: add rdoc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-03* ext/coverage/coverage.c, ext/coverage/extconf.rb: eliminatemame
COVERAGE__ and introduce coverage.so instead. How to measure coverage: (1) require "coverage.so", (2) require or load Ruby source file, and (3) Coverage.result will return the same hash as COVERAGE__. [ruby-dev:35324] * thread.c (rb_enable_coverages): start coverage measurement by using rb_add_event_hook. * thread.c (rb_get_coverages): returns current results of coverage measurement. * include/ruby/intern.h: add prototype for above two functions. * vm_core.h, vm.c: add field of coverages to rb_vm_t. * insns.def (trace): remove special handling for COVERAGE__. * iseq.c (prepare_iseq_build): switch COVERAGE__ to rb_get_coverages(). * parse.y (coverage): ditto. * thread.c (clear_coverage): ditto. * lib/coverage.rb: use coverage.so instead of COVERAGE__. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01* Add coverage measurement constant COVERAGE__. This constant is notmame
for casual use. Usage: (1) assign {} to COVERAGE__, (2) require or load Ruby source file, and (3) COVERAGE__["sourcefilepath"] will return an array whose elements represent number of executions per line of source code. * vm_core.h: add field of coverage array to iseq. * iseq.c (prepare_iseq_build): ditto. * insns.def (trace): update coverage array. * parse.y (coverage): create and initialize coverage array. * compile.h (ADD_TRACE): add trace instruction to update covearge array. * thread.c (clear_coverage): delete coverage array when forking. Otherwise, double count of coverage may occur. * lib/coverage.rb: sample coverage measurement tool. * error.c: distinguish explicitly between parse_in_eval and mild_compile_error. * load.c: ditto. * vm_eval.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01 * include/ruby/ruby.h (enum ruby_special_consts): ISO C forbidsshyouhei
comma at end of enumerator list * include/ruby/ruby.h (enum ruby_value_type): ditto. * eval_intern.h (enum): ditto. * vm_core.h (enum rb_thread_status): ditto. * parse.y (enum lex_state_e): ditto. * parse.y (enum string_type): ditto. * process.c (enum): ditto. * ruby.c (enum dump_flag_bits): ditto. * ruby.c (enum disable_flag_bits): ditto. * compile.c (iseq_link_element): ditto * debug.c (union): ditto. * cont.c (enum context_type): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-27* parse.y (primary): empty not should call '!' on nil.matz
cf [ruby-dev:35227] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-25* parse.y (primary): not operand might be empty. [ruby-dev:35227]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-25* parse.y (primary): make functional-style not operator to actmatz
like function. see <http://d.hatena.ne.jp/ku-ma-me/20080624/p1>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-21* parse.y (call_args2, open_args): removed.nobu
* parse.y (parser_yylex): unified warnings at space between method name and argument parenthese. [ruby-dev:33943] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-09* include/ruby/ruby.h (CONST_ID): constant ID cache for non-gcc.nobu
* *.c: no cache in init functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-19* parse.y (assignable_gen): when "self = 1" was evalueted, unnecessarymame
error message was output, which might cause null pointer access. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-17* parse.y (ripper_warnS): now unused.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-15 * parse.y (ripper_warningS): now used.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-15* object.c (rb_cstr_to_dbl): no need for forceful warning whenmatz
converting to float. overflow is a nature of float values. * parse.y (parser_yylex): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-08* parse.y (arg): operator assignment "a += b rescue c" should bematz
parsed as "a += (b rescue c)" just like normal assignment. [ruby-talk:301000] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-08test/ruby/test_continuation.rb: remove duplicated test.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-12* eval.c (ruby_exec_node, ruby_run_node), ruby.c (process_options):nobu
use iseq instead of NODE. * gc.c (source_filenames): removed. * include/ruby/intern.h, parse.y (yycompile, parser_mark, parser_free, ripper_initialize): rb_source_filename() is no longer used. * compile.c, compile.h (ERROR_ARGS), parse.y (node_newnode, fixpos, parser_warn, e_option_supplied, warn_unless_e_option, range_op, cond0): nd_file is no longer used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-24* parse.y (debug_lines): Always prepare a new array for eachknu
file's SCRIPT_LINES__ storage, instead of appending source lines every time a file is re-loaded; submitted by Rocky Bernstein in #18517. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-18* parse.y (literal_concat_gen): bail out at different encoding.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-04* parse.y (parser_yylex): disallow non digits '0o' expression.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-29* time.c (time_strftime): format should be ascii compatible.matz
* parse.y (rb_intern3): non ASCII compatible symbols. * re.c (rb_reg_regsub): add encoding check. * string.c (rb_str_chomp_bang): ditto. * test/ruby/test_utf16.rb (TestUTF16::test_chomp): raises exception. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-29* parse.y (opt_block_param): command can start just after block paramnobu
definition. [ruby-list:44479] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-26* parse.y (value_expr_gen): removed inappropriate warning.nobu
[ruby-core:15660] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-26* parse.y (tokadd_escape): refactored. [ruby-core:15657]akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-18* include/ruby/node.h (NODE_FL_NEWLINE): renamed from NODE_NEWLINEmatz
to denote its a flag. [ruby-core:15529] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-17* encoding.c (ENC_CODERANGE_AND): added.naruse
* string.c (rb_str_plus, srb_str_times): keep coderange. * parse.y (STR_NEW0) use rb_usascii_str_new. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-15* parse.y (reg_compile_gen): reg_fragment_setenc might not raise annobu
exception before rb_reg_compile. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-14* parse.y (reg_compile_gen): appends error message fromnobu
rb_reg_compile() to one from reg_fragment_setenc(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e