65 throw std::runtime_error(
"ReadCIdentifier: Unexpected character");
70 for(_position++; !
AtEOL(); _position++)
74 int32_t len = _position - startIdx;
75 return _line.substr(startIdx, len);
79 return _line.substr(startIdx, std::string::npos);
86 if (val == std::string())
88 throw std::runtime_error(
"Synxax Error: Expected : " + fieldName);
149 int32_t startIdx = position;
152 for(; !
AtEOL(); position++)
154 if (!isdigit(
_line[position]))
156 len = position - startIdx;
163 len = position - startIdx;
171 std::istringstream reader(
_line.substr(startIdx, len));
194 len = _position - startIdx;
209 std::istringstream reader(
_line.substr(startIdx, len));
246 for(_position++; !
AtEOL(); _position++)
248 if (!isdigit(
_line[_position]))
250 len = _position - startIdx;
257 len = _position - startIdx;
265 std::istringstream reader(
_line.substr(startIdx, len));
292 for(_position++; !
AtEOL(); _position++)
298 if (
'E' == c ||
'e' == c)
306 else if (!isdigit(c))
312 if (
'E' == c ||
'e' == c)
322 if (
'+' == c ||
'-' == c)
356 len = _position - startIdx;
363 std::istringstream reader(
_line.substr(startIdx, len));
389 if (nextChar == 0x00 || nextChar != separator)
391 throw std::runtime_error(
"Synxax Error: Expected : " + separator);
406 throw std::runtime_error(
"ReadQuotedString: Missing Quote");
432 return _line.substr(startIdx, len);
void SeekSeparator(char separator)
LineParser(const std::string &line)
std::string ReadCIdentifier()
std::string ReadQuotedString()