summaryrefslogtreecommitdiff
path: root/parse.y
AgeCommit message (Collapse)Author
2016-01-04Revert r53431 "temporally revert r53411 to debug"naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-04temporally revert r53411 to debugnaruse
http://rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20151225T162507Z.diff.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-02parse.y: use nd_tagnobu
* parse.y (regexp): set_yylval_num sets u1, should use nd_tag instead of nd_state. [ruby-core:72638] [Bug #11932] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-02Revert r53409 "parse.y: yylval.num should be u3"naruse
It introduces SEGV git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-02parse.y: yylval.num should be u3nobu
* parse.y (set_yylval_num): should be used as nd_state, set to u3. [ruby-core:72638] [Bug #11932] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-31parse.y: single-quote indented heredocnobu
* parse.y (parser_here_document): update indent for each line in indented here document with single-quotes. [ruby-core:72479] [Bug #11871] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-27parse.y: show_bitstacknobu
* parse.y (show_bitstack): trace stack_type value if yydebug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-24fix typoskazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-24deprecate exposed internal functionsnobu
* error.c (rb_compile_error_with_enc, rb_compile_error), (rb_compile_bug): deprecate internal functions. * parse.y (parser_yyerror): construct exception message with source code and carret. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-24preserve source file name encodingnobu
* compile.c (append_compile_error), parse.y (compile_error): preserve encoding of source file name in exceptions. * error.c (rb_compile_error_str, rb_compile_bug_str): add. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-20parse.y: labeled heredocnobu
* parse.y (parser_yylex): allow here documents in labeled argument. [ruby-core:72396] [Bug #11849] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16parse.y: fix block_call&.callnobu
* parse.y (block_command, block_call): fix `&.` calls after block_call. [Feature #11537] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-14ytab.sed: for bison 2nobu
* tool/ytab.sed: substitute `fprintf`s used directory in yy_reduce_print by bison 2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-14parse.y: suppress warningsnobu
* parse.y (SET_LEX_STATE): explicit cast to suppress sign-compare warnings in the case restoring from saved num in the parser stack and getting from kwtable state. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-13ytab.sed: replace argumentnobu
* tool/ytab.sed: substitute the first argument of YYFPRINTF, instead of substitution by preprocessor, not to redefine stderr. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-13ytab.sed: work aroundnobu
* tool/ytab.sed: work around for platforms where vairadic macro is not available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-13parse.y: reset buffernobu
* parse.y (rb_parser_printf): reset debug_buffer after print out. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-13parse.y: lex_state trace by yydebugnobu
* parse.y (trace_lex_state): trace lex_state changes if yydebug is set, and send the messages to rb_stdout. * parse.y (rb_parser_printf): store YYPRINTF messages per lines so that lex_state traces do not mix. * tool/ytab.sed: add parser argument to yy_stack_print too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-13parse.y: lex_state bitsnobu
* parse.y (build_lex_state_name, trace_lex_state): lex_state is now bit flags and can be set 2 bits or more. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-13* parse.y (parse_percent): Allow %-literals in labeled arg asyugui
r51624 did for parentheses. Fixes [ruby-core:72084] [Bug #11812]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-13* parse.y (lex_state_name): Make it return the correct names.yugui
Add new names to follow r51617; Indices ffs(2) returns are 1-origin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-13* parse.y: debug output of lex_state transition if PARSER_DEBUGyugui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09* *.c (*_memsize): do not check ptr.ko1
NULL checking is finished Before call of memsize functions. See r52979. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07parse.y: indented hereocnobu
* parse.y: add heredoc <<~ syntax. [Feature #9098] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-01parse.y: TAB_WIDTHnobu
* parse.y (TAB_WIDTH, token_info_get_column): add constant for column calcuation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30parse.y: dispatch heredoc endnobu
* parse.y (ripper_dispatch_heredoc_end): at the end of here document, the terminator always should present. has_scan_event is true. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-28parse.y: last content of heredocnobu
* parse.y (parser_here_document): store dispatched result of on_tstring_content at the last fragment of a here document. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-27parse.y: reduce ifdefsnobu
* parse.y (dispatch_ignored_scan_event, has_delayed_token): more macros to reduce ifdefs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-24parse.y: ripper for warningsnobu
* parse.y (parser_yylex): deal with magic comment warnings also in ripper. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-24parse.y: fix dispatch_scan_eventnobu
* parse.y (dispatch_scan_event): fix wrong macro at r52547. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-22compile.c: move logop DCEnobu
* compile.c (iseq_peephole_optimize): remove unreachable code chunk after jump/leave. * parse.y: move dead code elimination of logical operation to compile.c. not to warn logical operation of literal constants. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13parse.y: optimize condition for unlessnobu
* parse.y (new_unless): optimize constant condition for `unless` as well as `if`. [Fix GH-1092] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-12parse.y: exact magic comment namenobu
* parse.y (parser_magic_comment): should match exactly. [ruby-core:71460] [Bug #11679] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-12parse.y: ANDDOT fluent interfacenobu
* parse.y (parser_yylex): ANDDOT at the head of the line denote line continuation from previous one to support fluent interface, as well as single dot. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-12parse.y: simplifynobu
* parse.y (parser_yylex): reduce RIPPER ifdefs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-10Rename DOTQ to ANDDOTnobu
* defs/id.def, parse.y: Switch internal token name to reflect current form of safe-call operator. [Fix GH-1090] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-06change DOTQnobu
* defs/id.def (token_ops), parse.y (parser_yylex): change DOTQ from ".?" to "&.". [ruby-core:71363] [Feature #11537] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-06parse.y: fix segv after invalid keyword argumentnobu
* parse.y (kwd_append): fix segv after invalid keyword argument, preceding keyword list is NULL when syntax error is there. [ruby-core:71356] [Bug #11663] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-05parse.y: CALL_Q_Pnobu
* parse.y (CALL_Q_P): extract common condition for safe-call token. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-03parse.y: revert lbracketnobu
* parse.y (lbracket): remove .? before aref. [Feature #11537] revert r52422 and r52424 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-02* parse.y (NO_QCALL): fix type mismatch of operands that causesngoto
compile error with Oracle Solaris Studio on Solaris. [Bug #11645] [ruby-dev:49327] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-02parse.y: lbracketnobu
* parse.y (lbracket): support .? before aref. [Feature #11537] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-01parse.y: invalid symbolnobu
* parse.y (parser_yylex): ':' separated by a comment and a newline is not valid as symbol. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-31internal.h: RUBY_DTRACE_HOOKnobu
* internal.h (RUBY_DTRACE_HOOK): extract from RUBY_DTRACE_CREATE_HOOK for other type hooks. * gc.c (RUBY_DTRACE_GC_HOOK): ditto. * parse.y (RUBY_DTRACE_PARSE_HOOK): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-28parse.y: fix op_assign typenobu
* parse.y (new_attr_op_assign): fix op_assign type, which is already an ID since r52284. [Feature #11537] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-26parse.y: fix rippernobu
* parse.y (call_op, call_op2): fix values on ripper. [Feature #11537] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-26parse.y: call_op2nobu
* parse.y (call_op2): separate from call_op and also allow "::", while dot_or_colon should not allow ".?". [Feature #11537] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23parse.y: canonical namenobu
* parse.y (parser_magic_comment): intern canonical name. InstructionSequence.compile_options are case-sensitive while pragma names are case-insensitive. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23safe navigation attrsetnobu
* compile.c (iseq_compile_each): support safe navigation of simple attribute assignment. [Feature #11537] * parse.y (mlhs_node, lhs, attrset_gen): ditto. keep mid non-attrset as the sign of safe navigation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22Safe navigation operatornobu
* compile.c (iseq_peephole_optimize): peephole optimization for branchnil jumps. * compile.c (iseq_compile_each): generate save navigation operator code. * insns.def (branchnil): new opcode to pop the tos and branch if it is nil. * parse.y (NEW_QCALL, call_op, parser_yylex): parse token '.?'. [Feature #11537] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e