summaryrefslogtreecommitdiff
path: root/parse.y
AgeCommit message (Collapse)Author
2008-10-18* parse.y (opt_block_arg): allow trailing comma after usualmatz
arguments. not after block argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-17* common.mk (ID_H_TARGET): phony target to update id.h.nobu
* tool/ifchange, win32/ifchange.bat: --timestamp option added. * tool/generic_erb.rb: --timestamp, --output and --if-change options added. * template/id.h.tmpl: moved from id.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14* parse.y (parser_yylex): allow reserved word to be keyword argument.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-13* parse.y (token_info_pop): show source filename. [ruby-dev:36710]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-11* parse.y (parser_prepare): use utf-8 encoding directly.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-10* parse.y: optimize 'for' statement when one variable given.ko1
* benchmark/bm_loop_for.rb: added. * benchmark/bm_loop_times.rb: modified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-10* parse.y (comment_at_top): needed for ripper too.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-10* parse.y (magic_comment_encoding): warns when ignored.nobu
* parse.y (parser_magic_comment): replaces '-' with '_'. * parse.y (parser_yylex): allows magic comments indented and the second line or later. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-09 * include/ruby/ruby.h: embeds the elements of an array into itsyugui
struct RArray for # of elements <= 3. * array.c: ditto. * gc.c (gc_mark_children): following the change of struct RArray. * ext/tk/tcltklib.c (ip_ruby_cmp): ditto. * parse.y (coverage): ditto. * proc.c (curry): ditto. * .gdbinit: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-30* parse.y (stmt): returns non zero. [ruby-dev:36633]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-29* parse.y (token_info_push, token_info_pop): do nothing for evalednobu
source. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-26* parse.y (primary, brace_block): fix for line number.nobu
* proc.c (rb_proc_location, rb_method_location): new methods {Proc,Method,UnboundMethod}#source_location. [ruby-core:18452] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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