* parse.y (bodystmt): expand opt_else to show the error message at
the right place.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (here_document): a continuing line is not the
terminator. [ruby-core:86283] [Bug #14621]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (tokadd_string): stop at continued line in dedented here
documents, to dedent for each lines before removing escaped
newlines. [ruby-core:86236] [Bug #14621]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (yycompile): in some cases (warning, error, dtrace,...),
ruby_sourcefile is expected to be NUL-terminated, so ensure it.
* template/prelude.c.tmpl (prelude_name): NUL-terminate to get rid
of copying static data.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (k_rescue, k_ensure): ignore indentations of `do`, it
is not at the beginning of line usually.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (f_kwrest): add the variable name as an argument, as
well as an internal variable.
* parse.y (new_args_tail): now keyword rest argument variable is
always placed between keyword arguments and block argument, so
so just reorder required and optional keyword arguments. no
longer kwrest duplicates.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: use tSP same as ripper instead of tSPACE.
[ruby-core:86080] [Bug #14597]
* ext/ripper/eventids2.c: tSP is defined in ripper.c now.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (heredoc_dedent): fix interpolated string literal dedent,
remove indentations from only nodes with the newline flag.
[ruby-core:85983] [Bug #14584]
* parse.y (here_document): set the newline flag on literal string
nodes starting at the beginning of line.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (tSPACE): define a separate token for escaped space, to
fix `redefining user token number of ' '` error at word list
separator on bison 2.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: named escaped whitespaces to show unexpected character.
bare whitespaces should not appear outside of word_list.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (assign_in_cond): refine a warning message for
assignment of a literal in conditinal expression.
[ruby-core:85872] [Bug #14562]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (parser_yylex): as well as `tLBRACE_ARG` (expr block),
`tLBRACE` (primary block) also does not accept a label. only
hash brace accepts a label.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Currently, parser.y includes core parser and Ripper parser obscurity.
In addition, *some* Ripper code uses the result of the core parser,
which make it difficult to separate the two parsers.
I want to simplify this, not by separating the two parsers, but by
making *all* Ripper actions follows the core parser actions.
In other words, all the core parser actions run always even in Ripper,
and after that, Ripper-specific actions run.
For tha sake, in principle, I want to put `/*% ripper: ... %*/` in the
end of actions.
Anyway, it is too dirty to put it within expressions, IMO.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
I thought this trick was needed because the result of var_field was
passed to different arguments, as follows:
```
$1 = var_field(p, $1);
$$ = backref_assign_error(p, $1, $1, &@$);
```
Currently the DSL supports that one result is passed to one argument.
However, after the refactoring, I found that `backref_assign_error`
uses only one `$1`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (dot_or_colon): made type of `dot_or_colon` and EXPR_DOT
tokens to <id> and set those IDs at tokenization. type cast at
primary in ripper is no longer needed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (block_param): embed excessed_comma event result in
place of rest argument, instead of dispatching with the whole
parameters.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e