aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
Commit message (Collapse)AuthorAgeFilesLines
* * parse.y (assign_in_cond): also should warn assignment to dvar innobu2009-09-231-0/+1
| | | | | | | conditional. [ruby-dev:39363] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each), parse.y (stmt, arg): arg_concat()nobu2009-09-181-2/+2
| | | | | | | on op_asgn was inversed. [ruby-core:25629] [Bug #2050] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * debug.c, parse.y: fixed types.nobu2009-09-141-74/+70
| | | | | | | * node.h (nd_line): limit to int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_char_to_option_kcode): ASCII-8BIT should also delay.naruse2009-09-101-2/+7
| | | | | | | * re.c (parser_regx_options): return rb_ascii8bit_encindex on ASCII-8BIT. [ruby-dev:39300] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Only 1 kcode effects options [ruby-core:25411]naruse2009-09-091-1/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_data_type_struct): constified dsize.nobu2009-09-091-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (literal_concat_gen): concat body from dstr instead ofnobu2009-09-031-1/+3
| | | | | | | nd_next. [ruby-core:25284] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (fname): removed duplication.nobu2009-09-031-4/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* *regparse.c (CC_DUP_WARN): use rb_compile_warn if ScanEnv has sourcenaruse2009-08-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | information. [ruby-dev:39105] *re.c (rb_reg_compile): add sourcefile and sourceline to the arguments. *re.c (make_regexp): ditto. *re.c (rb_reg_initialize): ditto. *re.c (rb_reg_initialize_str): ditto. *re.c (rb_reg_compile): ditto. *regcomp.c (onig_compile): ditto. *regint.h (onig_compile): ditto. *re.c (reg_compile_gen): follow above. *re.c (rb_reg_to_s): ditto. *re.c (make_regexp): ditto. *re.c (rb_reg_initialize): ditto. *re.c (rb_reg_initialize_str): ditto. *re.c (rb_reg_new_str): ditto. *re.c (rb_enc_reg_new): ditto. *re.c (rb_reg_initialize_m): ditto. *re.c (rb_reg_init_copy): ditto. *regcomp.c (onig_new): ditto. *regcomp.c (onig_compile): set sourcefile and sourceline to scan_env. *regparse.h (ScanEnv): add sourcefile and sourceline. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_enc_symname2_p): not depend on nul terminator.nobu2009-08-301-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (reduce_nodes_gen): preserve NODE_FL_NEWLINE flag duringmame2009-08-201-0/+4
| | | | | | node reducing. [ruby-core:24463] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (ENABLE_SELECTOR_NAMESPACE): defaulted to 0.nobu2009-08-201-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (ivar2_hash_type): disabled for now.nobu2009-08-201-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (lex_get_str, lex_io_gets, rb_parser_compile_string):nobu2009-08-171-15/+36
| | | | | | | must be ascii compatible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (yylex): should dispatch scan-event even when followsnobu2009-08-161-1/+0
| | | | | | | just after delayed-token. [ruby-dev:37855] [Bug #1071] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (fname, string_dvar, sym, dsym, f_arglist): removednobu2009-08-151-13/+7
| | | | | | | duplications. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (literal_concat0): tail can be nil. [ruby-dev:38980]nobu2009-08-021-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (literal_concat_gen): reduced unnecessary node at stringnobu2009-07-311-1/+7
| | | | | | | literal concatenation with empty head dstr. [ruby-dev:38968] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (literal_concat_gen): NODE_DSTR was incorrectly handled asmame2009-07-301-3/+1
| | | | | | | | | | NODE_STR. [ruby-dev:38968] * bootstraptest/test_syntax.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (regexp): regexp literal at the top of dstr is still needed even ↵naruse2009-07-281-1/+1
| | | | | | if it is empty. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h (struct rb_iseq_t): add a new field line_no. This fieldmame2009-07-221-4/+0
| | | | | | | | | | | | | | | | represents line number from which the original code of the iseq starts. [ruby-dev:38698] * iseq.c, compile.c: ditto. * parse.y: line number hack (for Proc#source_location) is no longer needed. * test/ruby/test_settracefunc.rb: line number of set_trace_func is now compatible with 1.8's. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (compile_dstr_fragments): reduced needless literal.nobu2009-07-201-6/+6
| | | | | | | | | * parse.y (xstring, regexp, dsym, literal_concat, evstr2dstr): literal at the top of dstr is no longer needed if it is empty, since concatstrings and toregexp always create new strings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * id.c (Init_id), vm.c (vm_exec): @#__ThrowState__ is no longernobu2009-07-161-1/+0
| | | | | | | used. [ruby-dev:38760] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_data_type): typed.nobu2009-07-091-16/+46
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_yylex): fixed wrong variable.nobu2009-07-011-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_set_encode): show the erred file name instead ofnobu2009-06-241-2/+12
| | | | | | | the file that requires it. [ruby-core:24006] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Tue Jun 16 16:09:59 2009 TAKANO Mitsuhiro (takano32) <tak@no32.tk>takano322009-06-161-2/+2
| | | | | | | | | * parse.y (parser_read_escape, parser_tokadd_escape): replace scan_oct as ruby_scan_oct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (struct parser_params): lex_gets_ptr should be long.nobu2009-05-271-13/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_yyerror): get rid of possible overflow.nobu2009-05-261-2/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (rb_parse_in_eval): returns true in true eval, not innobu2009-05-171-3/+4
| | | | | | | | | main. [ruby-dev:38382] * parse.y (program): inherits dvars in eval or main. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (magic_comment_encoding): ignores unused emacs-stylenobu2009-05-161-2/+0
| | | | | | | encoding comment, as like Vim styles. [ruby-core:23470] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * defs/keywords (reserved_word): made inline function static.nobu2009-05-161-0/+8
| | | | | | | | | [ruby-core:23210] * parse.y (rb_reserved_word): ordinary function for ripper. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (magic_comment_encoding): use rb_compile_warning() tonobu2009-05-161-2/+2
| | | | | | | show the currently parsing file name. [ruby-core:23469] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: add semicolons to some grammar rules not terminatedmatz2009-05-111-0/+11
| | | | | | with them. a patch from Dave B in [ruby-core:23422]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c, dln.c, parse.y, re.c, ruby.c, sprintf.c, strftime.c,nobu2009-03-171-7/+7
| | | | | | | | string.c, util.c, variable.c: use strlcpy, memcpy and snprintf instead of strcpy, strncpy and sprintf. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * util.c (ruby_scan_oct, ruby_scan_hex): use size_t.nobu2009-03-141-12/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (stack_type): uses VALUE which is able to be storednobu2009-03-111-7/+3
| | | | | | | parser stack. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* stripped trailing spaces.nobu2009-02-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (debug_lines): calls rb_intern() once.nobu2009-01-211-2/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_parse_in_main): fixed typo.nobu2009-01-161-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/ruby/trunk@20905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (stmt): returns dispatched result.nobu2008-12-161-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/ruby/trunk@20770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* must be typos.tadf2008-12-121-5/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e