summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-05-26 08:24:51 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-05-26 08:24:51 +0000
commite6300774896d943115b3f51fa3489d3051f61eb4 (patch)
tree825c701fc7319cb5a34d8995525d917eaed5249d /parse.y
parent0f34277fe50561c58c5c50881bbe234fbe8eafad (diff)
1.1b9_23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y22
1 files changed, 3 insertions, 19 deletions
diff --git a/parse.y b/parse.y
index 172d9c3c85..0fcd9919ae 100644
--- a/parse.y
+++ b/parse.y
@@ -57,7 +57,7 @@ static enum lex_state {
EXPR_BEG, /* ignore newline, +/- is a sign. */
EXPR_MID, /* newline significant, +/- is a sign. */
EXPR_END, /* newline significant, +/- is a operator. */
- EXPR_ARG, /* newline significant, +/- may be a sign. */
+ EXPR_ARG, /* newline significant, +/- is a operator. */
EXPR_FNAME, /* ignore newline, +/- is a operator, no reserved words. */
EXPR_DOT, /* immediate after `.', no reserved words. */
EXPR_CLASS, /* immediate after `class', no here document. */
@@ -2498,15 +2498,7 @@ retry:
yylval.id = '+';
return tOP_ASGN;
}
- if (lex_state == EXPR_ARG) {
- if (space_seen && !ISSPACE(c)) {
- arg_ambiguous();
- }
- else {
- lex_state = EXPR_END;
- }
- }
- if (lex_state != EXPR_END) {
+ if (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
if (ISDIGIT(c)) {
goto start_num;
}
@@ -2532,15 +2524,7 @@ retry:
yylval.id = '-';
return tOP_ASGN;
}
- if (lex_state == EXPR_ARG) {
- if (space_seen && !ISSPACE(c)) {
- arg_ambiguous();
- }
- else {
- lex_state = EXPR_END;
- }
- }
- if (lex_state != EXPR_END) {
+ if (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
if (ISDIGIT(c)) {
pushback(c);
c = '-';