* parse.y (parse_numvar): NTH_REF must be less than a half of
INT_MAX, as it is left-shifted to be ORed with back-ref flag.
[ruby-core:74444] [Bug#12192] [Fix GH-1296]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* defs/keywords (alias, undef): symbol literals are allowed.
* parse.y (parse_percent): should parse symbol literals for alias
and undef. [ruby-dev:47681] [Bug #8851]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* iseq.c (prepare_iseq_build): enable coverage by coverage_enabled
option, not by parse_in_eval flag in the thread context.
* iseq.h (rb_compile_option_struct): add coverage_enabled flag.
* parse.y (yycompile0): set coverage_enabled flag if coverage
array is made.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (rb_io_gets_internal): read one line from an IO without
setting ARGF.lineno.
* parse.y (lex_io_gets): use rb_io_gets_internal not to affect
$. global variable.
* ruby.c (load_file): no longer reset $.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* defs/id.def (predefined): add idLASTLINE and idBACKREF for $~
and $_ respectively.
* parse.y: use idLASTLINE and idBACKREF instead of rb_intern.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (parse_ident): short circuit by result, as only
tIDENTIFIER can be a local variable, but tFID and tCONSTANT not.
fix up r53834.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (parse_ident): allow keyword arguments just after a
method where the same name local variable is defined.
[ruby-core:73816] [Bug#12073]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (tokenize_ident, parse_ident): ident in tokenize_ident()
can be a local id only when called from parse_ident(), but never
from parse_gvar() and parse_atmark().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (parser_here_document): an escaped newline is not an
actual newline, and the rest part should not be dedented.
[ruby-core:72855] [Bug #11989]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (xstring): reset heredoc indent after dedenting,
so that following string literal would not be dedented.
[ruby-core:72857] [Bug #11990]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (string1): reset heredoc indent fore each string leteral
so that concatenated string would not be dedented.
[ruby-core:72857] [Bug #11990]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 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
* 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
* 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