* 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
* 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
* 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
* 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
* 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
* 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
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
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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
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
* 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
* 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
* 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
* 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
* parse.y (parser_magic_comment): allow a sole magic comment without
indicators, neither other non-space comments. [Feature #8976]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (parser_nextc): send a warning to ripper, not to STDERR
always.
* parse.y (rb_warn1, rb_warning1): move argument conversions to
callers. PRIsVALUE is not valid in String#%.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (token_info_pop): scan lex buffer only when token info
is enabled.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e