summaryrefslogtreecommitdiff
path: root/parse.y
AgeCommit message (Collapse)Author
2002-09-20literal_append: remove.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-20* parse.y (block_append): eliminate unused literal nodes.nobu
* parse.y (literal_concat): refined literal concatination. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-13* eval.c (rb_eval): avoid uninitialized global/class variablenobu
warnings at `||='. [ruby-dev:18278] * parse.y (stmt, arg): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-10* parse.y (nextc): restore line number after here documents.nobu
(ruby-bugs-ja:PR#331) * parse.y (heredoc_restore): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-06* parse.y (rb_gc_mark_parser): ruby_eval_tree is marked in eval.c.aamine
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-06* parse.y (rb_gc_mark_parser): should mark lex_input and ruby_debug_lines.aamine
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-06* parse.y (rb_gc_mark_parser): should mark parse.y global variables.aamine
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-06* parse.y: should not use non-NODE VALUEs in the semantic stack.aamine
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-05* gc.c (gc_sweep): should mark parser.aamine
* parse.y (rb_gc_mark_parser): new function. * intern.h (rb_gc_mark_parser): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-04* class.c (rb_make_metaclass): obj.meta.super.meta should be equalmatz
to obj.meta.meta.super (ruby-bugs-ja:PR#324). * parse.y (yylex): the warning message "invalid character syntax" was never issued. * marshal.c (r_bytes): do not use alloca (ruby-bugs:PR#382). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-02* gc.c (gc_sweep): does reclaim nodes in also compile time, if we can.aamine
* ruby.c (load_file): omit GC if we can. * parse.y (ruby_parser_stack_on_heap): new function. * intern.h (ruby_parser_stack_on_heap): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-21*.c: Int vs Long cleanupmichal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-15* eval.c (ruby_current_node) : added to set sourceline on demand.nobu
* eval.c (error_pos, error_print, rb_longjmp, assign): set source file/line. * eval.c (rb_eval): store current node instead of file/line, and preserve it at return. * eval.c (module_setup): ditto. * eval.c (struct thread): store node instead of file/line. * eval.c (rb_thread_raise): ditto. * intern.h (ruby_current_node): added. * intern.h (ruby_set_current_source): added. * parse.y (stmt, arg): not fix position of assignment. * parse.y (node_assign): ditto. * parse.y (yycompile): clear current node. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-01* parse.y (tokadd_string): ignore backslashed spaces in %w.matz
* enum.c (enum_find): do not use rb_eval_cmd(); should not accept a string for if_none. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-26* random.c: replace with Mersenne Twister RNG.matz
* eval.c (jump_tag_but_local_jump): preserve retval in LocalJumpError exceptions. * parse.y (command): no more check for "super outside of method". * eval.c (rb_mod_define_method): should set last_class and last_func in the block->frame. * eval.c (error_handle): should handle TAG_THROW as well. * parse.y (yylex): new decimal notation '0d4567'. * parse.y (yylex): new octal notation '0o777'. * parse.y (string_content): every string_content node should return string only. use NODE_EVSTR to coercing. * eval.c (rb_eval): NODE_EVSTR support. * re.c (rb_reg_quote): avoid unnecessary string allocation. * string.c (get_pat): quote metachracters before compiling a string into a regex. * string.c (rb_str_split_m): special treatment of strings of size 1, but AWK emulation. now uses get_pat(). * string.c (rb_str_match_m): quote metacharacters. * string.c (rb_str_match2): ditto. * ext/socket/socket.c (sock_addrinfo): make all 3 versions of getaddrinfo happy. [ruby-core:00184] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-26* parse.y (yylex): modify to accept a code like "m (a){...}".aamine
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-17* parse.y (yylex): fix typo.aamine
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-15* parse.y (heredoc_identifier): modify typo.aamine
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-13* parse.y (literal_concat_string): wrong optimization.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-04* parse.y: remove useless function str_extend_p().aamine
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-02object.c: rb_Integer reformat, nil#to_f added to rb_define_method.michal
parse.y: Clean unused vars. range.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-28* re.c (rb_reg_expr_str): need to process backslashes properly.matz
* object.c (rb_any_to_a): declare Object#to_a to be obsolete. * object.c (rb_Array): do not convert nil into [] automagically. * object.c (rb_Integer): use "to_int" instead of "to_i". [experimental] * object.c (nil_to_f): new method. * object.c (rb_Integer): Symbols and nil should cause error. * object.c (rb_Float): nil should cause error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-27missing ;nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-26* parse.y (literal_concat_string): non-string last expression innobu
#{} was ignored when followed by literal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-26* parse.y (words, qwords): word list literal rules.nobu
* parse.y (parse_string): ditto. * parse.y (yylex): %W: word list literal with interpolation. [new] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-25* parse.y (string1, xstring, regexp): moved lex_strnestnobu
initialization to string_contents/xstring_contents. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-24* parse.y (string_dvar): allow back references in interpolation.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-24* parse.y (yylex): __END__ should not be effective withinmatz
string literals. * parse.y (here_document): should be aware of __END__ within here documents. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-24* eval.c (rb_eval): NODE_EVSTR is no longer used.nobu
* eval.c (eval): not enforce to make assigned variables dynamic. * parse.y (string): split rules to strings/xstring/regexp to allow arbitrary statements inside string interpolation. * parse.y (here_document): splitted into three phases. * parse.y (literall_append, literal_concat): added. append/concatinate string literals. * sample/test.rb (valid_syntax): adjust line number for BEGIN. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-18* parse.y (yylex): ? followed by successive word charaters isnobu
ternary operator not numeric literal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-18* parse.y (yylex): commands after break/next/rescue can takenobu
arguments. (ruby-bugs-ja:PR#265) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-18* parse.y (yylex): obsolete '?<whitespace>'; use '?\s', '?\n',matz
etc, instead. * parse.y (yylex): no here document after a dot. * parse.y (yylex): should have set lex_state after '`'. * parse.y (yylex): should have set lex_state properly after tOP_ASGN. * bignum.c (rb_big2dbl): return canonical HUGE_VAL for infinity. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-18* parse.y (yylex): should pushback proper char after '<<'.nobu
* parse.y (range_op, cond0, cond): get rid of doubled warnings. * parse.y (value_expr): reduce recursion level. * parse.y (logop): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-14* parse.y (read_escape): deny zero-width hexadecimal character.nobu
(ruby-bugs-ja:PR#260) * parse.y (tokadd_escape): ditto. * regex.c (re_compile_pattern): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-13* eval.c (svalue_to_avalue): v may be Qundef. This fix wasmatz
suggested by Guy Decoux. * hash.c (rb_hash_s_create): use rb_hash_aset() instead of calling st_insert() directly, to dup&freeze string keys. * parse.y (yylex): proper error message for "@@0". * parse.y (yylex): paren to parse_string() must be zero for unparenthesized strings. * parse.y (str_extend): broken string when unterminated "#{". * enum.c (enum_sort_by): had a bug in 1 element enumeration. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-12* parse.y (yylex): 'do' should return kDO_BLOCK on EXPR_ENDARG.matz
* parse.y (singleton): "def (()).a end" dumped core. * parse.y (range_op): node may be null. * parse.y (match_gen): ditto. * parse.y (arg): void value check for "..", "...", "!", and "not". * parse.y (match_gen): void value check for "=~". * parse.y (value_expr): check NODE_AND and NODE_OR recursively. * parse.y (cond0): void value check added for conditionals. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-11* parse.y (stmt): fix typo.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-11* parse.y (%%): remove '%%' line on the end of the file(parse error).eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-11* eval.c (rb_eval): ruby_frame->last_func may be null, if it'smatz
called outside of a method. * parse.y (arg): use INT2NUM, not INT2FIX for tUMINUS. * parse.y (arg): unnecessary negative tPOW treatment. * parse.y (tokadd_escape): wrong backslash escapement. * parse.y (stmt,arg): too much void value check. * parse.y (stmt,arg): need to check void value on rules which does not use node_assign(). * ext/socket/socket.c (ipaddr): need not to taint hostnames. * range.c (range_include): should be based on "<=>", whereas member? still is based on "each". * range.c (range_min,range_max): redefine methods based on "<=>". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-10* numeric.c (fix_lshift): negative shift count means right shift.nobu
* numeric.c (fix_rshift): return -1 when left side operand is negative. * parse.y (yylex): `0_' should be an error. (ruby-bugs-ja:PR#239) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-05Trivial: GCC3.1 fix (not worth to mention in ChangeLog)michal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-04* string.c (rb_str_aset): should raise error if an indexing stringmatz
is not found in the receiver. * sprintf.c (rb_f_sprintf): "%d" should convert objects into integers using Integer(). * lib/tempfile.rb (Tempfile::size): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-02* parse.y (here_document): check if identifier is terminated.nobu
(ruby-bugs-ja:PR#239) * parse.y (yylex): should pushback proper char after '**'. (ruby-bugs-ja:PR#240) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-29* parse.y: yyparse #defines moved from intern.hmatz
* ruby.c (proc_options): access prefixed "ruby_yydebug". * applied modifies to pacify some of gcc -Wall warnings. * parse.y (arg): no more ugly hack for "**", so that "-2**2" to be parsed as "(-2)**2", whereas "- 2**2" or "-(2)**2" to be parsed as "-(2**2)". * parse.y (yylex): '-2' to be literal fixnum. [new] * time.c (time_succ): new method for Range support. * time.c (time_arg): nil test against v[6] (usec). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-28 * array.c: fixed format string for 'long' args (%d -> %ld).michal
* class.c: ditto. * eval.c: ditto. * numeric.c: ditto. * pack.c: ditto. * parse.y: ditto. * range.c: ditto. * string.c: ditto. * util.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-22* parse.y (yylex): case '<': here-document label ate '-'.aamine
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-20* parse.y (bodystmt): ensure clause was excuted on else clausenobu
without rescue clase. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-14* eval.c (rb_clear_cache_by_class): new function.matz
* eval.c (set_method_visibility): should have clear cache forq updated visibility. * numeric.c (flo_to_s): default format precision to be "%.16g". * util.c (ruby_strtod): use own strtod(3) implementation to avoid locale hell. Due to this change "0xff".to_f no longer returns 255.0 * eval.c (avalue_to_yvalue): new function to distinguish yvalue (no-arg == Qundef) from svalue (no-arg == Qnil). * eval.c (rb_yield_0): use avalue_to_yvalue(). * eval.c (assign): warn if val == Qundef where it means rhs is void (e.g. yield without value or call without argument). * parse.y (value_expr): need not to warn for WHILE and UNTIL, since they can have return value (via valued break). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-10* parse.y (here_document): preserve line number begins herenobu
document. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-25* various files: macro fix-up by Michal Rokos.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e