public String parseString() throws IOException {
           
        int c = nextNonWhitespace();
        if( c < 0 ) {
            error("Expected '\"', found end of file");
        }
        position(-1); // mark the position       
        if( c != '"' ) {
            error("Expected '\"', found:" + (char)c, lastPosition());
        }
        
        StringBuilder sb = new StringBuilder();
        while( (c = read()) >= 0 ) {
            if( c == '"' ) {
                break; // end of string
            }
            if( c == '\n' ) {
                error("Newline detected in string", lastPosition());
            }
            if( c == '\\' ) {
                c = parseEscapeSequence(true);
            } 
            sb.append((char)c);
        }
        
        return sb.toString();        
    }