diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-02 06:51:53 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-02 06:51:53 +0000 |
| commit | 01ff66004f2edd6e792bb5c535e5567b71a8b5eb (patch) | |
| tree | 051c5e82fd12337a37c3031cbfc3222dc8e07e84 /parse.y | |
| parent | 0dc9fb7474fe95dd9993653849798c9533ac0c30 (diff) | |
| download | ruby-01ff66004f2edd6e792bb5c535e5567b71a8b5eb.tar.gz ruby-01ff66004f2edd6e792bb5c535e5567b71a8b5eb.tar.xz ruby-01ff66004f2edd6e792bb5c535e5567b71a8b5eb.zip | |
* parse.y (yylex): 8 and 9 in octal integer should cause compile
error. [ruby-dev:35729]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
| -rw-r--r-- | parse.y | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -6656,7 +6656,8 @@ parser_yylex(struct parser_params *parser) nondigit = c; continue; } - if (c < '0' || c > '7') break; + if (c < '0' || c > '9') break; + if (c > '7') goto invalid_octal; nondigit = 0; tokadd(c); } while ((c = nextc()) != -1); @@ -6673,6 +6674,7 @@ parser_yylex(struct parser_params *parser) } } if (c > '7' && c <= '9') { + invalid_octal: yyerror("Invalid octal digit"); } else if (c == '.' || c == 'e' || c == 'E') { |
