* parse.y (TOKEN2ID): add macro which maps static tokens to IDs.
* template/id.h.tmpl (TOKEN2*ID, DEFINE_*ID_FROM_TOKEN): separate
into macros, token to ID mapping and enum definitions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* defs/id.def: remove idDSTAR and idCOLON3.
* parse.y (tCOLON2): make same as id.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (rb_parser_while_loop): should chomp but not chop by -l
option. [ruby-core:78099] [Bug #12926]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (parser_heredoc_identifier): reject multiline here
document identifier, which never matches single line.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (parser_yyerror): curtail scanning range, not to exceed
the max margin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (parser_yyerror): show the error line even if the error
is at the end.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (parser_tokadd_utf8): relax restriction to allow zero or
more codepoints.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (ripper_initialize): allow generic input as source, if
it has #gets method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (parser_tokadd_codepoint): reject invalid codepoint,
surrogate blocks and surrogate pair, as well as mruby.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (parser_tokadd_utf8): refine error message at bad char
in unicode escape, "invalid" instead of "unterminated".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (parser_yylex): do not warn parentheses of lambda
argument list, because there is no name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (parser_yylex): warn ambiguous parentheses after a space
in method definitions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (parse_qmark): warn `?` with unbalanced space, which is
interpreted as a conditional operator.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (strings): tCHAR is not a subject of string literal
concatenation and string interpolation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (command_asgn, arg): new_attr_op_assign in ripper
expects a Symbol VALUE as the operator, not an ID, so convert
literal IDs to Symbols. [ruby-core:78069] [Bug #12916]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (brace_body, do_body): since cmdarg_stack is saved in
VALUE val, should restore from the same member. on big-endian
platforms where VALUE is larger than int, it restored 0 in the
upper word. [ruby-core:77920] [Bug #12900]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (cond0): !-operator is a method call, no warning for
literal in condition. [ruby-core:77801] [Bug #12881]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c (iseq_compile_each): move numeric literal range
optimization from fixup_nodes() in parse.y.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (symbol, dsym, parser_set_number_literal): set state to
ENDARG, so that `do` after a literal should be `do_block` and
bound to the outer method. [ruby-core:72482] [Bug #11873]
* parse.y (parse_ident): revert r56198.
* parse.y (warn_balanced): the state of symbol and numeric
literals is now EXPR_ENDARG, do not exclude it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (brace_body, do_body): preserve cmdarg_stack so that
`do` after cmdarg in a block should be `do_block` and bound to
the outer method. [ruby-core:72482] [Bug #11873]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: `do` after cmdarg in parentheses should be `do_block`
and bound to the outer method. [ruby-core:72482] [Bug #11873]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (parser_parse_string): store the end of string literal
mark in nd_term instead of nd_func.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (parser_string_term): return the token of string or
regexp literal terminator.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (stmt, arg): rescue modifier in command op assignment
should be limited to rhs only. [ruby-core:75621] [Bug #12402]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (const_decl_gen): extract as a function as well as
ripper.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e