summaryrefslogtreecommitdiffstats
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
commita4f59896093fceec34fafc74b5fba980277a1bd1 (patch)
treee897500fbc208e632174f54adfd9a0a7009f5d28
parent464de956d81a73e7412aea80a9720032ffe365ee (diff)
downloadruby-a4f59896093fceec34fafc74b5fba980277a1bd1.tar.gz
ruby-a4f59896093fceec34fafc74b5fba980277a1bd1.tar.xz
ruby-a4f59896093fceec34fafc74b5fba980277a1bd1.zip
* parse.y (yylex): no .<digit> floating literal anymore.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--parse.y14
2 files changed, 8 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 54eb3da95..d3144ee57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Feb 5 17:11:02 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * parse.y (yylex): no .<digit> floating literal anymore.
+
Tue Feb 4 16:11:30 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* array.c (rb_ary_equal): a == b is true when b is non T_ARRAY
diff --git a/parse.y b/parse.y
index 3adbecf50..c7423f564 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':