summaryrefslogtreecommitdiffstats
path: root/parse.y
Commit message (Collapse)AuthorAgeFilesLines
* * array.c (rb_ary_cycle): typo in rdoc. a patch from Yuguimatz2007-09-061-13/+16
| | | | | | <yugui@yugui.sakura.ne.jp>. [ruby-dev:31748] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (f_norm_arg, f_arg_item): not croak already erred names.nobu2007-08-301-2/+2
| | | | | | | [ruby-dev:31687] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (assignable_gen): ignore already erred names.nobu2007-08-301-2/+4
| | | | | | | | * parse.y (shadowing_lvar_gen): always make new block local variable when shadowing outer local variable. [ruby-dev:31507] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (aref_args): args may not be a list. [ruby-dev:31592]nobu2007-08-291-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_prepare): set parser encode too when BOM exists.nobu2007-08-281-3/+9
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y, re.c: re-applied revision 13092.nobu2007-08-251-8/+8
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c: provide basic features for M17N.matz2007-08-251-90/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * parse.y: encoding aware parsing. * parse.y (pragma_encoding): encoding specification pragma. * parse.y (rb_intern3): encoding specified symbols. * string.c (rb_str_length): length based on characters. for older behavior, bytesize method added. * string.c (rb_str_index_m): index based on characters. rindex as well. * string.c (succ_char): encoding aware succeeding string. * string.c (rb_str_reverse): reverse based on characters. * string.c (rb_str_inspect): encoding aware string description. * string.c (rb_str_upcase_bang): encoding aware case conversion. downcase, capitalize, swapcase as well. * string.c (rb_str_tr_bang): tr based on characters. delete, squeeze, tr_s, count as well. * string.c (rb_str_split_m): split based on characters. * string.c (rb_str_each_line): encoding aware each_line. * string.c (rb_str_each_char): added. iteration based on characters. * string.c (rb_str_strip_bang): encoding aware whitespace stripping. lstrip, rstrip as well. * string.c (rb_str_justify): encoding aware justifying (ljust, rjust, center). * string.c (str_encoding): get encoding attribute from a string. * re.c (rb_reg_initialize): encoding aware regular expression * sprintf.c (rb_str_format): formatting (i.e. length count) based on characters. * io.c (rb_io_getc): getc to return one-character string. for older behavior, getbyte method added. * ext/stringio/stringio.c (strio_getc): ditto. * io.c (rb_io_ungetc): allow pushing arbitrary string at the current reading point. * ext/stringio/stringio.c (strio_ungetc): ditto. * ext/strscan/strscan.c: encoding support. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c, insns.def, parse.y: fix massign order. This changeko12007-08-231-1/+1
| | | | | | | | | | | | | causes performance problem. Try vm1_swap benchmark. [ruby-dev:31522] * insns.def, insnhelper.ci: move process body of expandarray insn to vm_expandarray(). * bootstraptest/test_knownbug.rb, bootstraptest/test_massign.rb: move a solved test. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (f_norm_arg): ripper has no shadowing check.nobu2007-08-231-1/+4
| | | | | | | * parse.y (f_block_arg): dispatch blkarg_mark. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (f_norm_arg): check also nested arguments. [ruby-dev:31502]nobu2007-08-231-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (reg_compile_gen): obtain error info from errinfo.nobu2007-08-181-1/+2
| | | | | | | | | * re.c (rb_reg_error_desc): make RegexpError for initialization error. * re.c (rb_reg_compile): return nil and set errinfo if error. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: remove "//" type comment.ko12007-08-151-2/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: fix rules around f_margs. "make test" passes all tests.ko12007-08-151-5/+5
| | | | | | | | * bootstraptest/test_block.rb: add some tests for above. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (internal_id_gen): internal ID must be bigger thannobu2007-08-091-0/+1
| | | | | | | tLAST_TOKEN. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (stmt): check if rhs has value before assignment insteadnobu2007-08-091-50/+61
| | | | | | | | | inside node_assign_gen(). [ruby-dev:31293] * parse.y (call_bin_op_gen, call_uni_op_gen): split call_op_gen. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (f_marg_list): renamed from f_marg_head.nobu2007-08-091-10/+10
| | | | | | | | * parse.y (f_margs): allow multiple mandatory arguments after a splat. [ruby-dev:31153] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (value_expr_gen): fix to cause "void value expression"ko12007-08-061-4/+1
| | | | | | | | | | when jump expression such as "next" are shown on value_expr(). [ruby-dev:31119] * bootstraptest/test_syntax.rb: fix to above change. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: fix a f_marg rule. [ruby-dev:31160]ko12007-08-061-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (reg_compile_gen): set error if failed to compile regexpnobu2007-08-021-6/+19
| | | | | | | | | | | literal. [ruby-dev:31336] * re.c (rb_reg_compile): should not use regexp which could not get initialized. [ruby-dev:31333] return error message to let the parser know it. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (value_expr_gen): warn for empty expression ().matz2007-07-231-3/+8
| | | | | | [ruby-dev:31252] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (stmt, mlhs_node, lhs, arg, var_ref): return dummynobu2007-07-201-19/+17
| | | | | | | | | | NODE_BEGIN after errors. [ruby-dev:31100], [ruby-dev:31118] * parse.y (remove_begin): make empty NODE_BEGIN to NODE_NIL, instead of null. [ruby-dev:31252], [ruby-dev:31263] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_parser_append_print, rb_parser_while_loop): moved checknobu2007-07-181-2/+6
| | | | | | | | | | for node to the head. * ruby.c (proc_options): do nothing for -p/-n options if tree is null. submitted by Yusuke ENDOH <mame AT tsg.ne.jp> at [ruby-dev:31243]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (bvar): semicolon was lost for ripper description.matz2007-07-131-1/+1
| | | | | | [ruby-dev:31140] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (ripper_warningS): unused in ripper right now.nobu2007-07-131-0/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (debug_lines): use rb_hash_lookup() to get rid ofnobu2007-07-131-1/+1
| | | | | | | call of Hash#default. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (dsym): convert also literals containing NUL tonobu2007-07-131-6/+3
| | | | | | | symbol. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (program, stmt, primary): reduced duplicated code.nobu2007-07-131-12/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: fix node construction (around f_margs).ko12007-07-071-4/+4
| | | | | | | | | | [ruby-dev:31143] * bootstraptest/test_block.rb: add a test for above. * insnhelper.ci: fix indent. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (keyword_to_name): constified.nobu2007-07-061-2/+2
| | | | | | | * ext/ripper/eventids2.c (token_to_eventid): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (f_marg): wrap f_norm_arg assignment node with NODE_LIST.nobu2007-07-061-1/+1
| | | | | | | [ruby-dev:31141] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (mlhs_basic): use mlhs_post after tSTAR.akr2007-07-051-1/+1
| | | | | | | [ruby-dev:31109] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/{intern,ruby}.h, compile.[ch], error.c, eval.c,nobu2007-07-051-129/+133
| | | | | | | | | eval_load.c, gc.c, iseq.c, main.c, parse.y, re.c, ruby.c, yarvcore.[ch] (ruby_eval_tree, ruby_sourcefile, ruby_sourceline, ruby_nerrs): purge global variables. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_parse_string): fix indent.nobu2007-07-051-10/+10
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (global_symbols.last_id): reduce unused ID numbers.nobu2007-07-051-6/+6
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/st.h, st.c (st_init_table, st_init_table_with_size):nobu2007-07-051-2/+2
| | | | | | | constified. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (mlhs_inner): new rule. [ruby-dev:31132]akr2007-07-041-3/+14
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_yylex): return non-valid token for an invalidnobu2007-06-291-0/+1
| | | | | | | | instance/class variable name. a patch from from Yusuke ENDOH <mame AT tsg.ne.jp>. [ruby-dev:31095] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (stmts): fix for ripper.nobu2007-06-291-5/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: fix to show line number of blank block.ko12007-06-291-0/+3
| | | | | | | | [ruby-dev:31093] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (assoc_list): remove expanded hash literal (no splat).matz2007-06-291-11/+0
| | | | | | | * lib/webrick/httpstatus.rb (WEBrick::HTTPStatus::EOFError): adapt to new syntax. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (dsym): return non-null NODE even if yyerror(). based on anobu2007-06-291-0/+1
| | | | | | | patch from from Yusuke ENDOH <mame AT tsg.ne.jp>. [ruby-dev:31085] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (assoc_list): odd number check only for NODE_ARRAY.matz2007-06-281-1/+1
| | | | | | [ruby-dev:31082] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_intern2): unconstify cast.usa2007-06-271-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_intern2): don't allocate a string object at first.akr2007-06-271-3/+10
| | | | | | | [ruby-dev:31064] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/node.h, parse.y, gc.c, iseq.c: remove NODE_CREF.ko12007-06-271-1/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insnhelper.ci, vm.c: complete block parameter support.ko12007-06-251-3/+1
| | | | | | | | | | | post arguments, optional arguments, block argument. * compile.c, parse.y: fix {|a|} parameter. * insnshelper.ci, insns.def: revert caller_setup_args() option (need_block_check) parameter. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c: remove ruby_current_node and change eval() prototype.ko12007-06-241-1/+0
| | | | | | | | | | | fix to use rb_sourcefile/line() instead of ruby_sourcefile/line. * error.c, eval_error.ci, eval_load.c, eval_safe.ci, gc.c, include/ruby/intern.h, parse.y, process.c, ruby.c: ditto. * vm.c: fix spaces. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c: some refactoring.ko12007-06-241-28/+0
| | | | | | | | | | | | | | * rename th_* to vm_*. * remove unused variables functions. * add prototypes. * blockinlining.c, compile.c, cont.c, eval.c, eval_intern.h, eval_jump.h, eval_load.c, inits.c, insns.def, iseq.c, parse.y, proc.c, process.c, signal.c, thread.c, vm.c, vm_dump.c, vm_evalbody.ci, yarvcore.c, yarvcore.h: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_intern2): ID_JUNK test based on len, not by NUL.matz2007-06-211-2/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_intern2): name may not be NUL-terminated.nobu2007-06-211-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e