From: Mikko Rasa Date: Wed, 1 Aug 2012 15:06:31 +0000 (+0300) Subject: Recognize floating-point literals with an exponent but no decimal point X-Git-Url: http://git.tdb.fi/?p=libs%2Fdatafile.git;a=commitdiff_plain;h=eec12aaf350ef69b79d149adbc3585cf784552ad Recognize floating-point literals with an exponent but no decimal point --- diff --git a/source/textparser.cpp b/source/textparser.cpp index c4eb03c..9bed08a 100644 --- a/source/textparser.cpp +++ b/source/textparser.cpp @@ -237,6 +237,8 @@ Token TextParser::parse_token() case DECIMAL: if(c=='.') state = FLOAT; + else if(c=='e' || c=='E') + state = FLOATEXPINIT; else if(!isdigit(c)) throw parse_error(buf); break;