summaryrefslogtreecommitdiffstats
path: root/parse.y
Commit message (Collapse)AuthorAgeFilesLines
* * parse.y (debug_lines): calls rb_intern() once.nobu2009-01-211-2/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_parse_in_main): fixed typo.nobu2009-01-161-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): decrement parse_in_eval to recognizeko12009-01-151-1/+2
| | | | | | | | | | | | parsing main or normal eval script. * compile.c (rb_parse_in_main): return 1 if parsing main script. (if parse_in_eval is negative value, it means main script) * parse.y (yycompile0): check rb_parse_in_main() to accumulate script text. Bug #848 [ruby-core:20450] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (command): moved return/break/next from command_call formatz2009-01-151-24/+25
| | | | | | | | better error message. * parse.y (call_args): void value check added. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (stmt): explicit error for "Object::Far += foo 1" justmatz2009-01-151-0/+5
| | | | | | as "Object::Far += 1". git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c (Init_VM): create and define TOPLEVEL_BINDING at first.ko12008-12-271-0/+1
| | | | | | | | | | | | | | | | | | * vm.c (vm_set_main_stack, rb_iseq_eval_main): added. * parse.y (rb_parser_compile_file): fix to check parse_in_eval flag. * eval.c (ruby_exec_node): use rb_iseq_eval_main() instead of rb_iseq_eval(). * iseq.c (rb_iseq_new_main), vm_core.h: added. main script (specified by -e or script name) should be run under TOPLEVEL_BINDING using Kernel#eval. Above changes simulate Kernel#eval behaviour. [ruby-dev:37240] * compile.c (make_name_for_block): skip iseq except block type. this fix is needed for [ruby-dev:37240], and also fixes [ruby-dev:35392]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_external_str_new_with_enc): set ASCII-8BIT ifmatz2008-12-231-7/+2
| | | | | | encoding is US-ASCII and string contains 8bit characters. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (gettable_gen): the encoding of __FILE__ should bematz2008-12-221-1/+7
| | | | | | | | | | rb_filesystem_encoding(). [ruby-list:45733] * parse.y (gettable_gen): __FILE__ should be ASCII-8BIT when filesystem encoding is US-ASCII and __FILE__ contains non 7bit characters. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (stmt): returns dispatched result.nobu2008-12-161-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (primary): also in ripper, saves in_def before restoring.nobu2008-12-161-16/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (block_call): block should not be given to yield.matz2008-12-161-1/+6
| | | | | | [ruby-core:20583] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* must be typos.tadf2008-12-121-5/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (yycompile0): ruby_eval_tree_begin is always 0 whennobu2008-12-121-10/+2
| | | | | | | ruby_eval_tree is 0. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each), gc.c (assign_heap_slot),nobu2008-12-091-4/+4
| | | | | | | | | | | | | (gc_mark_children), parse.y (vtable_alloc, vtable_free, vtable_add), proc.c (proc_to_s), thread.c (terminate_i, rb_thread_terminate_all), (thread_start_func_2, blocking_region_begin, blocking_region_end), (rb_thread_kill), thread_pthread.c (native_thread_create), (ubf_pthread_cond_signal), vm.c (check_env, thread_free), vm_dump.c (vm_env_dump_raw, vm_stack_dump_each, vm_thread_dump_state), (vm_call0): use void pointer for %p. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (expr): keyword_not can continue across newline.nobu2008-12-031-3/+3
| | | | | | | [ruby-core:20252] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_yylex): check EOF explicitly.mame2008-10-281-11/+11
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (lambda): need to adjust lpar_beg for both of the parser andnobu2008-10-241-1/+1
| | | | | | | ripper. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (lambda): need to adjust lpar_beg for ripper as well. matz2008-10-241-2/+2
| | | | | | [ruby-dev:36702] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (f_larglist): should not allow semicolon separated localmatz2008-10-221-1/+1
| | | | | | | | variable declarations if formal argument list is not surrounded by parentheses, mostly because semicolon outside of parentheses appears to terminate the expression. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (arg_concat_gen): concat target node should be NODE_ARRAY.ko12008-10-211-3/+3
| | | | | | | | | [ruby-core:19413] * bootstraptest/test_method.rb: add tests. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (opt_block_arg): allow trailing comma after usualmatz2008-10-181-0/+4
| | | | | | arguments. not after block argument. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * common.mk (ID_H_TARGET): phony target to update id.h.nobu2008-10-171-0/+1
| | | | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/trunk@19822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_yylex): allow reserved word to be keyword argument.matz2008-10-141-10/+10
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (token_info_pop): show source filename. [ruby-dev:36710]naruse2008-10-131-2/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_prepare): use utf-8 encoding directly.nobu2008-10-111-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: optimize 'for' statement when one variable given.ko12008-10-101-6/+17
| | | | | | | | | * benchmark/bm_loop_for.rb: added. * benchmark/bm_loop_times.rb: modified. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (comment_at_top): needed for ripper too.nobu2008-10-101-4/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (magic_comment_encoding): warns when ignored.nobu2008-10-101-9/+28
| | | | | | | | | | * parse.y (parser_magic_comment): replaces '-' with '_'. * parse.y (parser_yylex): allows magic comments indented and the second line or later. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: embeds the elements of an array into itsyugui2008-10-091-1/+1
| | | | | | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@19723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (stmt): returns non zero. [ruby-dev:36633]nobu2008-09-301-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (token_info_push, token_info_pop): do nothing for evalednobu2008-09-291-1/+4
| | | | | | | source. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (primary, brace_block): fix for line number.nobu2008-09-261-0/+4
| | | | | | | | * proc.c (rb_proc_location, rb_method_location): new methods {Proc,Method,UnboundMethod}#source_location. [ruby-core:18452] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/node.h, node.h: move node.h from include path.ko12008-09-231-1/+1
| | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@19500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * common.mk: clean upko12008-09-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | - 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: http://svn.ruby-lang.org/repos/ruby/trunk@19466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: strings which contain only US-ASCII don't force to havenaruse2008-09-191-4/+2
| | | | | | US-ASCII encoding. [ruby-dev:36400] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.h (onigenc_get_prev_char_head): add endakr2008-09-131-2/+2
| | | | | | | | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@19332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (f_block_optarg): allow default for block parameters asmatz2008-09-061-1/+104
| | | | | | | long as the value is primary. a patch from Eric Mahurin <eric.mahurin at gmail.com> in [ruby-core:16880]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (yylex): "1.upto 2 {|i| p i }" should be syntax error.matz2008-09-061-15/+13
| | | | | | [ruby-dev:36008] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (DBL2NUM): renamed from DOUBLE2NUM.matz2008-09-051-1/+1
| | | | | | | a patch from Tadashi Saito <shiba at mail2.accsnet.ne.jp> in [ruby-dev:36102]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_encoding_name): defined.akr2008-09-031-1/+2
| | | | | | | | (parser_tokadd_mbchar): show encoding in the message of "invalid multibyte char" error. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (struct token_info): constified.nobu2008-08-301-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (token_info_get_column, token_info_has_nonspaces),nobu2008-08-301-6/+6
| | | | | | | (token_info_push, token_info_pop): constified. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (token_info_push): -w warns indentation level mismatch.matz2008-08-301-25/+183
| | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@18945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: remove include pragma for "ruby/intern.h".ko12008-08-301-1/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (YYSTYPE): struct RVarmap has been no longeryugui2008-08-251-1/+0
| | | | | | | defnied. see also r11717 by matz. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/encoding.h (rb_enc_ispunct): added.nobu2008-08-141-36/+59
| | | | | | | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/trunk@18614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (union tmpyystype): no longer needed, since YYSTYPE isnobu2008-08-141-11/+2
| | | | | | | defined in parse.h now. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in,parse.y: removed garbage spaces.nobu2008-08-101-6/+6
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (deferred_nodes, compstmt, arg, fixup_nodes, range_op): fixnobu2008-08-041-14/+43
| | | | | | | | up fixnum range literal in conditional as automagical line number comparison. [ruby-core:12124], [ruby-dev:35731] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (yylex): 8 and 9 in octal integer should cause compilenobu2008-08-021-1/+3
| | | | | | | error. [ruby-dev:35729] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e