aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
Commit message (Collapse)AuthorAgeFilesLines
* * parse.y (struct parser_params): fields common to ripper must benobu2005-11-301-355/+363
| | | | | | | | | | placed at each same offset. * parse.y (NEWHEAP, ADD2HEAP): set count after pointer was set. fixed: [ruby-dev:27896] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (struct parser_params): heap must be placed at same offsetnobu2005-11-291-10/+12
| | | | | | | | | | | | | also in ripper.y. fixed: [ruby-dev:27846] * parse.y (yycompile): prevent vparser from tail call optimization. fixed: [ruby-dev:27851] * parse.y (parser_mark): value needs to be marked. fixed: [ruby-dev:27845] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (dsym): prohibit empty symbol literal by interpolation.nobu2005-11-211-1/+8
| | | | | | | fixed: [ruby-talk:166529] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_symname_p): [ not followed by ] is not valid symbol.nobu2005-11-201-1/+2
| | | | | | | fixed: [ruby-talk:166520] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (sym_inspect), parse.y (parser_yylex, rb_symname_p): checknobu2005-10-221-7/+115
| | | | | | | | | if valid as a symbol name more strictly. [ruby-dev:27478] * test/ruby/test_symbol.rb: tests for [ruby-core:03573]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parser.y (struct parser_params): parser never modify input string.nobu2005-10-201-16/+19
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c, eval.c, gc.c, parse.y, regparse.c, sjis.c, time.c:nobu2005-10-181-1/+1
| | | | | | | made internal symbols static. [ruby-dev:27435] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (HEAPCNT): bison allocates indivisible size.nobu2005-10-131-1/+1
| | | | | | | fixed: [ruby-core:06261] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_obj_respond_to): check if obj responds to the givennobu2005-10-111-10/+1
| | | | | | | | | method with the given visibility. [ruby-dev:27408] * eval.c (rb_respond_to): conform to Object#respond_to?. [ruby-dev:27411] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (ripper_initialize): rollback obj_respond_to().nobu2005-10-091-1/+10
| | | | | | | fixed: [ruby-dev:27406] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_parser_malloc, rb_parser_free): manage parser stack onnobu2005-10-081-12/+87
| | | | | | | | | | | heap. [ruby-list:41199] * parse.y (ripper_initialize): use rb_respond_to(). * ext/ripper/depend (check): get rid of re-generating ripper.y always. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: changed to ANSI function style.ocean2005-09-261-442/+162
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: replaced `foo _((boo))' with `foo(boo)'.ocean2005-09-251-85/+85
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* banish some ripper warnings.akr2005-09-241-5/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* banish some warnings.akr2005-09-241-19/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/ripper: no longer generates .rb files.aamine2005-09-231-3/+3
| | | | | | | | | | | | | | | | | | | | | * parse.y (Init_ripper): ripper_init_eventids*() takes 1 argument, self (class Ripper). * ext/ripper/depend: target removed: `lib/ripper/core.rb'. * ext/ripper/depend: new target `eventids2table.c'. * ext/ripper/depend: new target `check'. * ext/ripper/eventids2.c: include eventids2table.c. * ext/ripper/eventids2.c: initialize SCANNER_EVENT_TABLE. * ext/ripper/extconf.rb: update $cleanfiles list. * ext/ripper/tools/generate.rb: no longer generate ripper/core.rb. * ext/ripper/tools/generate.rb: new mode `check'. * ext/ripper/tools/generate.rb: new mode `eventids2table'. * ext/ripper/lib/ripper/core.rb.in: removed. * ext/ripper/lib/ripper/core.rb: added. * ext/ripper/lib/ripper/filter.rb: update copyright year. * ext/ripper/lib/ripper/lexer.rb: ditto. * ext/ripper/lib/ripper/sexp.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* forgot to check-inaamine2005-09-191-2/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (stmt, mlhs_node, lhs, arg, method_call): aref_args might benobu2005-09-051-5/+5
| | | | | | | | | nothing. fixed: [ruby-dev:26952] * ext/ripper/eventids2.c: added new tokens. fixed: [ruby-dev:26952] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (f_arg): Ripper should not do semantic check. [ruby-dev:26948]aamine2005-09-041-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (f_arg): f_norm_arg is a VALUE in ripper, not an ID.nobu2005-09-021-4/+14
| | | | | | | fixed: [ruby-dev:26942] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_f_send): do not call private methods if the receivermatz2005-08-301-1/+8
| | | | | | | is specified. [ruby-talk:153672] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: ONIG_OPTION_CAPTURE_GROUP conflicts withmatz2005-08-221-1/+1
| | | | | | | RE_OPTION_ONCE. [ruby-dev:26852] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_yylex): update paren_nest for brackets [].matz2005-08-201-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_add_method): preserve safe level in the environmentmatz2005-08-161-19/+18
| | | | | | | | | | | | | | | | | | | where a method is defined . * eval.c (rb_call0): restore preserved safe level in the method execution. * parse.y (lambda): need separate block variable stack manipulation and lpar_beg maintenance. based on a patch found in [ruby-core:05551] from Mauricio Fernandez <mfp@acm.org>. * parse.y (parser_yylex): adjust lpar_beg after tLAMBEG and kDO_LAMBDA. [ruby-core:05551] * parse.y (yycompile): remove unreachable code. [yarv-dev:570] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (f_larglist): allow optional arguments even whenmatz2005-08-121-31/+23
| | | | | | | | | | | parentheses are omitted. based on Nobu's patch from http://www.rubyist.net/~nobu/t/20050805.html * parse.y (parser_yylex): update & maintain lpar_beg for detect lambda parameters. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (rb_big_mul0): multiply two numbers (x, y) withoutmatz2005-08-101-5/+26
| | | | | | | | | | | | | | | | | | | | | | | | normalizing the result. x should be a big number. [ruby-dev:26778] * bignum.c (rb_big_pow): use rb_big_mul0() instead of rb_big_mul(). * array.c (rb_ary_or, rb_ary_and, rb_ary_plus, rb_ary_diff): revert the change on 2005-08-03. Set operation on other item should have in separate methods. * parse.y (shadowing_lvar_gen): warn when arguments shadows external local variables. * parse.y (f_opt): optional arguments should not clobber external local variables. * parse.y (f_rest_arg): rest arguments should not clobber external local variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (f_block_arg), eval.c (rb_yield_0): deal with dynamicnobu2005-08-081-1/+1
| | | | | | | variable lambda arguments. [ruby-core:05540] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (f_larglist): mistake in syntax rule. [ruby-core:05535]matz2005-08-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (formal_assign): returns position of rest arguments variable.nobu2005-08-041-1/+6
| | | | | | | | * parse.y (f_rest_arg): use anonymous variable for rest arguments. fixed: [ruby-dev:26647] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call0): fix calling zsuper from a method with anonymousnobu2005-07-291-1/+1
| | | | | | | rest argument. [ruby-dev:26639] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_parser_end_seen_p): exclude from ripper.nobu2005-07-281-1/+1
| | | | | | | | | | <http://moonrock.jp/~don/d/200507.html#d28_t2> * sprintf.c (clearerr): remove standard macro before re-definition. <http://moonrock.jp/~don/d/200507.html#d28_t3> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (f_larglist): allow block argument in lambda parametermatz2005-07-281-8/+8
| | | | | | | list without parenthesis. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (f_arg): better argument name duplication checkmatz2005-07-281-23/+73
| | | | | | | | | | | * parse.y (new_args_gen): factored out name duplication check for optional and rest arguments. * parse.y (new_bv_gen): allow shadowing outer local variables; warning remains. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (f_larglist): allow bv_decl at the end of lambdamatz2005-07-281-31/+46
| | | | | | | | | | | | | argument list. [EXPERIMENTAL] * parse.y (new_bv_gen): allow local variable shadowing, with warning in verbose mode. * ext/socket/socket.c (ruby_connect): break immediately if a socket is non-blocking. [ruby-talk:111654] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (obj_free): make message formant consistent with one frommatz2005-07-271-11/+12
| | | | | | | | | gc_mark(). [ruby-talk:149668] * sprintf.c (quad_t): prepare quad_t as well. [ruby-talk:149668] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (lambda): Perl6 style -> lambda expression. [NEW]matz2005-07-271-53/+132
| | | | | | | | | | | | | | | | | | | | | | | [VERY EXPERIMENTAL] * gc.c (id2ref): must not assign pointers to long int. use LONG_LONG instead if SIZEOF_LONG < SIZEOF_VOIDP. [ruby-talk:149645] * ruby.h: use LONG_LONG to simplify the change. [ruby-talk:149645] * dir.c (dir_each): rewinddir(3) before iteration. [ruby-talk:149628] * eval.c (rb_f_throw): replace all '0x%lx' by '%p'. [ruby-talk:149553] * missing/vsnprintf.c (BSD_vfprintf): '%p' need to handle 64bit size pointer. [ruby-talk:149553] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * sprintf.c (rb_vsprintf, rb_sprintf): new functions return new String,nobu2005-07-231-3/+3
| | | | | | | | | using missing/vsnprintf.c. [ruby-dev:26580] * missing/vsnprintf.c: made the output changeable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: remove static variables. [ruby-dev:26530]nobu2005-07-131-28/+78
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval): pre-evaluate argument for unambiguousmatz2005-06-301-6/+10
| | | | | | | | | | | | | | evaluation order. [ruby-dev:26383] * lib/delegate.rb (Delegator::method_missing): forward unknown method to the destination. suggested by <christophe.poucet@gmail.com>. [ruby-talk:146776] * process.c (detach_process_watcher): terminate process watcher thread right after rb_waitpid() succeed. [ruby-talk:146430] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c, eval.c, parse.y, process.c, ruby.c: avoid warning "unusedocean2005-06-281-2/+0
| | | | | | | | | | | | variable" [ruby-dev:26387] * dir.c (glob_helper): avoid warning "enumeration value `RECURSIVE' not handled in switch" [ruby-dev:26392] (patch from Kazuhiro NISHIYAMA) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * signal.c (sigexit): call rb_thread_signal_exit() instead ofmatz2005-06-121-29/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rb_exit(). [ruby-dev:26347] * eval.c (rb_thread_signal_exit): a new function to exit on main thread. * eval.c (rb_thread_switch): exit status should be retrieved from ruby_errinfo. * eval.c (rb_f_exit): ensure exit(0) should call exit(EXIT_SUCCESS). * missing/mkdir.c: remove. [ruby-core:05177] * hash.c (env_aset): do not treat nil as key-removing value. [ruby-list:40865] * parse.y (method_call): allow aref expression ([]) to take a block. * parse.y (block_dup_check): a function to check duplication of a block argument and an actual block. * lib/delegate.rb (SimpleDelegator::__setobj__): need check for recursive delegation. [ruby-core:04940] * lib/cgi.rb: add underscore aliases CGI::escape_html, CGI::unescape_html, CGI::escape_element, CGI::unescape_element. [ruby-core:05058] * misc/ruby-mode.el (ruby-expr-beg): fix looking point drift. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: missing arg_paren event. This patch is contributed by Mitchell N ↵aamine2005-06-111-2/+2
| | | | | | Charity. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_yylex): small error fixed.matz2005-06-071-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_yylex): allow ';;' to be block terminator inmatz2005-06-071-1/+6
| | | | | | | | | | | | | | | | | | place of 'end'. [highly experimental] * misc/ruby-mode.el (ruby-block-end-re): allow ';;' for a negative indent trigger. [highly experimental] * parse.y (parser_yylex): "respond_to?:foo" should be interpreted as "respond_to? :foo" at the command level. [ruby-talk:144303] * sprintf.c (rb_f_sprintf): raise exception on debug mode (-d), not verbose mode (-w/-w). [ruby-core:05123] * sprintf.c (rb_f_sprintf): warn always on verbose mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: pragma support on ripper. [ruby-dev:26266]nobu2005-06-021-1/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (method_call): new experiment: "(expr)(args...)" tomatz2005-06-021-2/+14
| | | | | | | | | invoke "expr.call(args...)". [EXPERIMENTAL] * parse.y (command): revert implicit "call" for local variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * intern.h, parse.y (ruby_pragma): removed. fixed: [ruby-dev:26198]nobu2005-05-221-9/+2
| | | | | | | * parse.y (parser_pragma): pragma name was ignored. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (pragma_encoding): add prototype to suppress false warningnobu2005-05-161-0/+1
| | | | | | | by VC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * intern.h (ruby_pragma): prototype. [ruby-core:04881]nobu2005-05-141-10/+186
| | | | | | | | | | | * parse.y (parser_pragma): parse Emacsen hack. * parse.y (parser_prepare): deal with specific syntax at the top. * ruby.c (load_file): read the first line iff it started with shebang. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval), parse.y (arg): reduce fixnum range literal atnobu2005-05-011-2/+16
| | | | | | | parser. fixed: [ruby-dev:26113] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e