* parse.y (parser_yylex): identfier after dot must not be a variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2005-02-21 22:25:28 +00:00
parent 7e70ac99de
commit 8c18a183c9
2 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,7 @@
Tue Feb 22 07:24:57 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (parser_yylex): identfier after dot must not be a variable.
Mon Feb 21 18:31:12 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* signal.c: Standard signal handlers ignore signals on non-Ruby native
@ -5,7 +9,7 @@ Mon Feb 21 18:31:12 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
standard signal handlers), the handler for the signal is marked as
it cannot accept non-Ruby native threads. If a handler can treat all
signals on all native threads, please use ruby_nativethread_signal()
to entry it.
to entry it.
Sun Feb 20 00:48:48 2005 Tanaka Akira <akr@m17n.org>

11
parse.y
View File

@ -2619,7 +2619,7 @@ primary : literal
$$ = dispatch2(while, $3, $6);
%*/
}
| kUNTIL {COND_PUSH(1);} expr_value do {COND_POP();}
| kUNTIL {COND_PUSH(1);} expr_value do {COND_POP();}
compstmt
kEND
{
@ -4446,7 +4446,7 @@ lex_io_gets(parser, io)
struct parser_params *parser;
VALUE io;
{
return rb_io_gets(io);
return rb_io_gets(io);
}
NODE*
@ -5037,7 +5037,7 @@ parser_heredoc_identifier(parser)
uc = (unsigned int)c;
len = mbclen(uc);
do {tokadd(c);} while (--len > 0 && (c = nextc()) != -1);
} while ((c = nextc()) != -1 &&
} while ((c = nextc()) != -1 &&
(uc = (unsigned char)c, is_identchar(uc)));
pushback(c);
break;
@ -5430,7 +5430,7 @@ parser_yylex(parser)
if (c == '<' &&
lex_state != EXPR_END &&
lex_state != EXPR_DOT &&
lex_state != EXPR_ENDARG &&
lex_state != EXPR_ENDARG &&
lex_state != EXPR_CLASS &&
(!IS_ARG() || space_seen)) {
int token = heredoc_identifier();
@ -6326,6 +6326,7 @@ parser_yylex(parser)
{
int result = 0;
enum lex_state_e last_state = lex_state;
switch (tok()[0]) {
case '$':
@ -6421,7 +6422,7 @@ parser_yylex(parser)
ID ident = rb_intern(tok());
set_yylval_id(ident);
if (is_local_id(ident) && lvar_defined(ident)) {
if (last_state != EXPR_DOT && is_local_id(ident) && lvar_defined(ident)) {
lex_state = EXPR_END;
}
}