aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
Commit message (Collapse)AuthorAgeFilesLines
* * 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
* * parse.y (rparen): ignore preceding newlines to right parentheses.nobu2004-02-121-14/+17
| | | | | | | (ruby-bugs:PR#1221) [ruby-dev:22858] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (reduce_nodes): remove tail returns. [ruby-talk:90934]nobu2004-02-031-16/+76
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (block_append, new_evstr, void_expr0): remove no longer usednobu2004-02-021-4/+0
| | | | | | | labels. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (opt_rescue): use NODE_ERRINFO() instead ofmatz2004-01-221-2/+2
| | | | | | | | | | | NODE_GVAR("$!"), to avoid confusion from variable aliasing. [ruby-talk:90074] * version.c (Init_version): remove obsolete constants VERSION etc. [ruby-dev:22643] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (string_content): reset lexical states at the beginning ofnobu2004-01-221-0/+4
| | | | | | | string contents. [ruby-list:39061] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (newline_node): do not use NODE_NEWLINE node anymore,matz2004-01-211-58/+11
| | | | | | | | | | | | | | | | use NEWLINE flag instead. * ext/socket/socket.c (sock_gethostbyname): returns host if ai_canonname is NULL. (ruby-bugs PR#1243) * parse.y (block_append): update nd_end for "real" head node. [ruby-list:39058] * marshal.c (w_class): should not dump singleton class. [ruby-dev:22631] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (primary): allow no "when" case. [ruby-dev:22578]matz2004-01-131-0/+4
| | | | | | | | | * ruby.h (rb_class_of): reduce branch. [ruby-dev:22577] * ruby.h (rb_type): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (primary): fix position after FCALL. [ruby-dev:22574]nobu2004-01-121-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add RDoc documentation for stuff in object.cdave2003-12-281-0/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (arg): should return 0 after error. [ruby-dev:22360]nobu2003-12-241-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (ieeefp.h), numeric.c: needed for finite() onnobu2003-12-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Solaris. [ruby-core:01921] * file.c (rb_stat_inspect): adjust format specifier. * parse.c (arg_prepend): nodetype() is for debug use. * ruby.h (ISASCII, etc): cast to int to get rid of warning. * ruby.h (alloca.h): include even in GCC. [ruby-core:01925] * ext/bigdecimal/bigdecimal.c (GetVpValue): adjust format specifier. * ext/bigdecimal/bigdecimal.c (BigDecimal_prec, BigDecimal_coerce, BigDecimal_divmod): use rb_assoc_new() to suppress memory usage. * ext/bigdecimal/bigdecimal.c (BigDecimal_split): ditto. * ext/dl/sym.c (rb_dlsym_guardcall): guard itself should be volatile. * ext/iconv/iconv.c (iconv_convert): ensure actual parameter with format specifier. * ext/pty/pty.c (MasterDevice, SlaveDevice, deviceNo): do not define unless used. * ext/pty/pty.c (getDevice): get rid of warning. * ext/socket/socket.c (port_str, sock_s_getaddrinfo, sock_s_getnameinfo): FIX2INT() now returns long. * ext/socket/socket.c (init_inetsock_internal): uninitialized variable. * ext/syck/rubyext.c (syck_parser_assign_io): add prototype. * ext/syck/rubyext.c (rb_syck_mktime, yaml_org_handler): use ISDIGIT() instead of isdigit() to avoid warnings and for platforms which don't support non-ascii charater. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (exc_list): allow expanding list. [ruby-dev:22134]nobu2003-12-041-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (AC_PROG_YACC): AC_DEFINE(OLD_YACC) if Yacc is foundmatz2003-12-031-0/+9
| | | | | | | | | | | | | instead of Bison or byacc. * parse.y: If OLD_YACC is defined, ensure that YYMAXDEPTH is at least 10000 (Bison's default) since some old versions of Yacc define it as low as 150 by default, which is too low for Ruby to parse some files, such as date/format.rb. Among other issues, the parse problem causes "make test" to fail. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (primary): allow newlines just before right argumentnobu2003-11-241-1/+1
| | | | | | | parenthesis. (ruby-bugs:PR#1221) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (primary): primary_value may be 0 when syntax error.nobu2003-11-091-1/+1
| | | | | | | [ruby-talk:84893] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (logop): left may be NULL. [ruby-talk:84539]matz2003-10-301-2/+1
| | | | | | | | | * eval.c (rb_eval): NODE_CASE nd_head may be NULL. * eval.c (rb_eval): remove never occurred NODE_WHEN branch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (proc_invoke): single array value to normal Proc#callmatz2003-10-291-1/+16
| | | | | | | | (i.e. not via lambda call), should be treated just like yield. [ruby-dev:21726] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (ret_args): node may be NULL. [ruby-talk:84530]matz2003-10-291-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (new_yield): remove magic argument rule; "yield [1,2]"matz2003-10-281-16/+1
| | | | | | | | should yield single array of two elements, not two values. [ruby-dev:21726] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: integrate operations for stack_type. [ruby-dev:21681]nobu2003-10-231-16/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_object): dump extended modules as well.matz2003-10-151-1/+2
| | | | | | | | | | | | * marshal.c (r_object0): TYPE_USRMARSHAL should restore extended modules before invoking marshal_load. these two fixes are done by Masatoshi Seki <m_seki@mva.biglobe.ne.jp>. * parse.y (yylex): argument parentheses preceded by spaces should be warned; not error. [ruby-talk:84103] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (stmt): should not expand mrhs if lhs is solely starred.nobu2003-10-061-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (stmt): rhs of multiple assignment should not bematz2003-10-061-2/+2
| | | | | | | expanded using "to_a". [ruby-dev:21527] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (stmt): END in method should cause warning.matz2003-10-061-2/+2
| | | | | | | [ruby-dev:21519] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_object): instance variable dump do not cause errormatz2003-10-041-3/+11
| | | | | | | | | | | | | | | | | | | | | | for objects that cannot be dumped, if they traversed from marshal_dump. they are just ignored. * gc.c (Init_stack): cast "space" (doble value) into unsigned int. should run on PowerPC. * eval.c (rb_eval): should not execute else part if any exception is caught. [ruby-dev:21482] * parse.y (f_args): should allow unparenthesized block argument. * parse.y (f_rest_arg): should allow unparenthesized rest argument. * lib/irb/ruby-lex.rb (RubyLex::identify_identifier): support 'class ::Foo' syntax. [ruby-talk:83514] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (str_xquote): do not prepend escapes innobu2003-09-241-1/+1
| | | | | | | backqoute literals. [ruby-list:38409] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (tokadd_string, parse_string, yylex): escaped terminatornobu2003-09-171-46/+8
| | | | | | | is now interpreted as is. [ruby-talk:82206] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (assignable): call rb_compile_error(), not rb_bug().matz2003-09-061-1/+1
| | | | | | | [ruby-core:01523] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (tokadd_string): newlines have no special meanings innobu2003-09-041-1/+4
| | | | | | | | %w/%W, otherwise they are ignored only when interpolation is enabled. [ruby-dev:21325] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (aref_args): forgot to call NEW_SPLAT(). reported bymatz2003-09-011-1/+1
| | | | | | | | | | Dave Butcher. * eval.c (Init_Thread): protect thgroup_default. suggested by Guy Decoux in [ruby-talk:80623] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e