summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-02-05 08:11:27 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-02-05 08:11:27 +0000
commitbb7085084e32ad15c51688bf55b841dad4f880a3 (patch)
treee897500fbc208e632174f54adfd9a0a7009f5d28 /parse.y
parentaa8b38793f86e41ab7ece75010227b2674a622fb (diff)
* parse.y (yylex): no .<digit> floating literal anymore.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y14
1 files changed, 4 insertions, 10 deletions
diff --git a/parse.y b/parse.y
index 3adbecf..c7423f5 100644
--- a/parse.y
+++ b/parse.y
@@ -3645,12 +3645,7 @@ yylex()
lex_state = EXPR_BEG;
pushback(c);
if (ISDIGIT(c)) {
-#if 0
- c = '-';
- goto start_num;
-#else
return tUMINUS_NUM;
-#endif
}
return tUMINUS;
}
@@ -3668,12 +3663,11 @@ yylex()
return tDOT2;
}
pushback(c);
- if (!ISDIGIT(c)) {
- lex_state = EXPR_DOT;
- return '.';
+ if (ISDIGIT(c)) {
+ rb_warning("no .<digit> floating literal anymore; put 0 before dot");
}
- c = '.';
- /* fall through */
+ lex_state = EXPR_DOT;
+ return '.';
start_num:
case '0': case '1': case '2': case '3': case '4':