aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
Commit message (Collapse)AuthorAgeFilesLines
* * parse.y (BITSTACK_POP): workaround for bcc32 compiler's bug.ocean2005-01-051-1/+1
| | | | | | | | | | | shift assignment operator '>>=' for __int64 in struct may generate collapsed code. [ruby-dev:25342] * win32/win32.[ch]: failed to compile on bcc32 (and probably wince) [ruby-dev:25306] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: eliminate unused members in struct parser_params. ↵aamine2004-12-291-36/+52
| | | | | | | | | [ruby-dev:25258] (again) * parse.y: make parser_new() static. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (special_local_set): prevent the parser object from GC.nobu2004-12-201-1/+2
| | | | | | | fixed: [ruby-dev:25252] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (string_content): get rid of segfault at empty evstr.nobu2004-12-081-1/+1
| | | | | | | fixed: [ruby-dev:25113] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (convert_type): [ruby-core:03845]matz2004-11-291-0/+4
| | | | | | | | | | | | | | | * eval.c (rb_funcall_rescue): new function. * object.c (rb_Array): avoid using rb_respond_to(). * object.c (rb_Integer): ditto. * eval.c (get_backtrace): no conversion for nil. * parse.y (reduce_nodes): empty body should return nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (f_rest_arg): store rest args into invisible local variabenobu2004-11-181-1/+1
| | | | | | | in order to get rid of SEGV at ZSUPER. [ruby-dev:24913] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (proc_getpgrp): prohibit for $SAFE=2.matz2004-11-181-3/+3
| | | | | | | | | | | | | | [ruby-dev:24899] * process.c (get_pid): ditto. [ruby-dev:24904] * process.c (get_ppid): ditto. * array.c (rb_ary_delete): defer rb_ary_modify() until actual modification. [ruby-dev:24901] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_initialize_m): should raise exception instead ofmatz2004-11-171-2/+4
| | | | | | | | | | | | | compile error. [ruby-core:03755] * string.c (rb_str_splice): move rb_str_modify() after StringValue(), which may alter the receiver. [ruby-dev:24878] * error.c (rb_error_frozen): now raise RuntimeError instead of TypeError. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ascii.c, euc_jp.c, oniggnu.h, oniguruma.h, regcomp.c, regenc.c, regenc.h, ↵ksaito2004-11-041-15/+31
| | | | | | | | | | | regerror.c, regexec.c, reggnu.c, regint.h, regparse.c, regparse.h, sjis.c, utf8.c: imported Oni Guruma 3.4.0. * parse.y, re.c: Now mbclen() takes unsigned char as its argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y [ripper]: emit lexer-event values to the parser.aamine2004-10-311-60/+48
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval): NODE_XSTR should pass copy of literal string.matz2004-10-301-3/+14
| | | | | | | | | | | * array.c (rb_ary_update): a[n,m]=nil no longer works as element deletion. * enum.c (enum_sort_by): protect continuation jump in. [ruby-dev:24642] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (ripper_s_allocate): add prototype for Microsoft compiler.usa2004-10-291-0/+1
| | | | | | | * range.c (range_step, range_each): need cast. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_parser_append_print, rb_parser_while_loop): body nodenobu2004-10-291-4/+6
| | | | | | | can be empty. [ruby-dev:24628] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (lex_getline): should not touch ruby_debug_lines ifmatz2004-10-201-0/+2
| | | | | | | | | RIPPER is defined. [ruby-dev:24547] * string.c (str_gsub): reentrant check. [ruby-dev:24432] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (lex_getline): should update ruby_debug_lines.matz2004-10-201-3/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdocnobu2004-10-201-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y [ripper]: \n between two comments disappeared.aamine2004-10-091-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_mode_flags): preserve append mode flag.matz2004-10-061-1/+1
| | | | | | | | | | | | | | | | | [ruby-dev:24436] * io.c (rb_io_modenum_mode): do not use external output buffer. * string.c (rb_str_justify): differ pointer retrieval to prevent padding string modification. [ruby-dev:24434] * range.c (range_each_func): allow func to terminate loop by returning RANGE_EACH_BREAK. * range.c (member_i): use RANGE_EACH_BREAK. [ruby-talk:114959] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (local_vars): moved to struct parser_params.nobu2004-10-021-53/+95
| | | | | | | | | | | [ruby-dev:24391] * parser.y (stmts): remove suspicious NODE_BEGIN. [ruby-dev:24390] * node.h (NEW_DVAR): extra semicolon. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y [ripper]: missing ';'.aamine2004-09-271-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_parser_append_print): should handle prelude.matz2004-09-241-22/+26
| | | | | | | | | | | | | | | | | | | | | | [llama@u01.gate0] * parse.y (rb_parser_while_loop): ditto. * array.c (rb_ary_subseq): original object might be modified after sharing data creation. [ruby-dev:24327] * array.c (rb_ary_replace): ditto. * array.c (ary_make_shared): freeze shared array. [ruby-dev:24325] * struct.c (struct_members): always check struct size and size of members list in the class. [ruby-dev:24320] * string.c (rb_str_sub_bang): check if string is not modified during iteration. [ruby-dev:24315] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y [ripper]: on__scan event removed.aamine2004-09-221-8/+2
| | | | | | | | | | | | | | * parse.y [ripper]: event name is changed: on__XXX -> on_XXX. * ext/ripper/eventids2.c: ditto. * ext/ripper/ripper.rb.in: ditto. * ext/ripper/lib/ripper.rb: sync with ripper.rb.in. * ext/ripper/lib/ripper/tokenizer: ditto. * ext/ripper/lib/ripper/filter: new file. * sample/ripper/colorize.rb: new file. * sample/ripper/strip-comment.rb: new file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: remove global variables ruby_eval_tree andmatz2004-09-221-35/+40
| | | | | | | | | | | | | | ruby_eval_tree_begin. * array.c (rb_ary_collect_bang): element size might change during comparison. [ruby-dev:24300] * array.c (rb_ary_reject_bang): ditto. [ruby-dev:24300] * array.c (rb_ary_eql): ditto. [ruby-dev:24300] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y [ripper]: do not delay dispatching.aamine2004-09-201-54/+34
| | | | | | | * ext/ripper/lib/ripper/tokenizer.rb: sort tokens by right order. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y [ripper]: delayed heredocument events should be dispatched after EOF.aamine2004-09-201-4/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y [ripper]: adjust lineno and columns for multi-line strings.aamine2004-09-201-36/+72
| | | | | | | | | | | | | * parse.y [ripper]: delay heredocument events until seeing end-of-line. * parse.y [ripper]: event on__heredoc_contentn -> on__tstring_content. * ext/ripper/eventids2.c: ditto. * ext/ripper/lib/ripper.rb: sync with eventids2.c. * test/ripper/test_scanner_events.rb: test it. * ext/ripper/tools/generate-ripper_rb.rb: show basename of input. * ext/ripper/Makefile.dev: support objdir build. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y [ripper]: remove Ripper#pos.aamine2004-09-201-26/+1
| | | | | | | * parse.y [ripper]: Ripper#column should return the column of the current token. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y [ripper]: unify old_lex_p and token_head.aamine2004-09-201-126/+72
| | | | | | | | * test/ripper/test_scanner_events.rb: now \r\n is saved correctly. * parse.y: new macro lex_goto_eol() for next change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y [ripper]: adjust line number for heredoc. [ruby-dev:24272]aamine2004-09-201-1/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y [ripper]: spaces before heredoc marker was lost.aamine2004-09-191-0/+1
| | | | | | | | | | * keywords: rb_reserved_word() should be defined only in ruby core. * lex.c: sync with keywords. * ext/ripper/ripper.rb.in (parse): fix typo. * ext/ripper/lib/ripper.rb: sync with ripper.rb.in. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: add prototypes for Microsoft compiler.usa2004-09-171-0/+3
| | | | | | | | | | * ext/ripper/depend (parse.obj): lex.c exists at hdrdir. * {bcc32,win32,wince}/Makefile.sub (YACC, YFLAGS, parse.c): use bison. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_delete): element comparison might change arraymatz2004-09-171-543/+452
| | | | | | | | | | | | | | | | size. [ruby-dev:24273] * parse.y: make ruby parser reentrant. merge ripper parser to the real one. this change makes ruby require bison. * file.c (rb_file_truncate): clear stdio buffer before truncating the file. [ruby-dev:24191] * ext/digest/digest.c: use rb_obj_class() instead of CLASS_OF which might return singleton class. [ruby-dev:24202] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y [ripper]: Add rdoc.aamine2004-09-141-0/+51
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y [ripper]: space event is on__sp, not on__lwsp. [ruby-dev:24257]aamine2004-09-141-2/+2
| | | | | | | | | | | | | | | | | | * ext/ripper/eventids2.c: ditto. * ext/ripper/lib/ripper.rb: ditto. * ext/ripper/depend (ripper.o): No action is needed. [ruby-dev:24260] * ext/ripper/depend: Borland make does not accept pipes in Makefile rules. [ruby-dev:24589] * ext/ripper/depend: separate rules for developpers. * ext/ripper/Makefile.dev: new file. * ext/ripper/MANIFEST: add Makefile.dev. * ext/ripper/tools/generate-eventids1.rb: read from file, not stdin. * ext/ripper/extconf.rb: clean ripper.E. * ext/ripper/tools/generate-ripper_rb.rb: #include ids1/ids2 function was lost. * ext/ripper/tools/generate-ripper_rb.rb: SCANNER_EVENTS wrongly contained parser events. * ext/ripper/lib/ripper.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: fix file header.aamine2004-09-121-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: ripper merged.aamine2004-09-121-110/+2703
| | | | | | | | * lex.c: ditto. * keywords: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (rb_big_and): protect parameters from GC.matz2004-08-281-1/+1
| | | | | | | | | | | | [ruby-talk:110664] * error.c (exc_equal): exceptions are equal if they share same class, message and backtrace. [ruby-talk:110354] * error.c (name_err_mesg_equal): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (stmt): not to show same error messages twice.nobu2004-07-171-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_min_by): new method Enum#min_by. added Enum#max_bymatz2004-07-141-5/+4
| | | | | | | as well. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (primary): should not be NULL. [ruby-core:03098]nobu2004-06-301-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_yield_0, proc_invoke, proc_arity): allow passing a blocknobu2004-05-251-3/+72
| | | | | | | | | to a Proc. [ruby-dev:23533] * parse.y (block_par, block_var): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * node.h (NEW_DSTR): adjust list length.nobu2004-05-181-0/+1
| | | | | | | * parse.y (literal_concat): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: typo fix(tWORD_BEG -> tWORDS_BEG).eban2004-05-171-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (setup_domain_and_type): honor duck typing.matz2004-05-171-1/+1
| | | | | | | | | [ruby-dev:23522] * ext/socket/socket.c (sock_s_getnameinfo): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (string_content): turn off NODE_NEWLINE flag to avoidmatz2004-05-071-4/+11
| | | | | | | | | | | | | | | | | | | | | | | unnecessary line trace for inlined expression. (ruby-bugs PR#1320) * numeric.c (flo_to_s): tweak output string based to preserve decimal point and to remove trailing zeros. [ruby-talk:97891] * string.c (rb_str_index_m): use unsigned comparison for T_FIXNUM search. [ruby-talk:97342] * hash.c (rb_hash_equal): returns true if two hashes have same set of key-value set. [ruby-talk:97559] * hash.c (rb_hash_eql): returns true if two hashes are equal and have same default values. * string.c (rb_str_equal): always returns true or false, never returns nil. [ruby-dev:23404] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (stmt, arg, aref_args): should not make sole splat intonobu2004-04-231-2/+6
| | | | | | | array, in aref_args other than aref with op_asgn. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (aref_args): should pass expanded list. [ruby-core:02793]nobu2004-04-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (assoc_list): {a: 1, b: 2} should be allowed. [ruby-dev:23328]aamine2004-04-051-3/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_require_safe): preserve old ruby_errinfo.matz2004-03-201-15/+30
| | | | | | | | | | | | | [ruby-talk:95409] * eval.c (rb_f_raise): should not clear backtrace information if exception object already have one. * parse.y (assoc_list): allow {sym: val} style Hash. [Ruby2] this change is done by Nobuyoshi Nakada <nobu@ruby-lang.org>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (method_hash): new method. [ruby-talk:93968]matz2004-03-031-1/+4
| | | | | | | | | | | | | | | * eval.c (proc_eq): do not compare dyna_vars. * eval.c (proc_hash): new method. * eval.c (rb_yield_0): protect break/return from within orphan (or lambda) Proc object. * parse.y (yylex): should not allow symbol for invalid global variable (e.g. `:$-)`). [ruby-core:02518] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e