]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/textparser.cpp
Add a flag to return also internal statements
[libs/datafile.git] / source / textparser.cpp
index c4eb03c7d91ef21e2b1af8d707e2f1363cc7fc4e..225425b4e23166eea05fe0697f16974c327ab1c0 100644 (file)
@@ -35,7 +35,7 @@ TextParser::TextParser(Input &i, const string &s):
        ParserMode(i, s)
 { }
 
-Statement TextParser::parse()
+Statement TextParser::parse(bool)
 {
        return parse_statement(0);
 }
@@ -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;