31 : filePtr( file_ptr ), nextToken(
buffer ), bufferEnd(
buffer ), lineNumber( 1 ), lastChar(
'\0' )
95 memmove(
buffer, result, remaining );
130 if( !token )
return false;
135 if( token[0] && token[1] && token[0] ==
'0' && toupper( token[1] ) ==
'X' )
140 result = strtod( token, (
char**)&token_end );
166 if( !token )
return false;
169 result = strtol( token, (
char**)&token_end, 0 );
186 result = (
unsigned char)i;
218 if( !token )
return false;
220 if( token[1] || ( token[0] !=
'0' && token[0] !=
'1' ) )
224 result = token[0] ==
'1';
231 for(
size_t i = 0; i < count; ++i )
242 for(
size_t i = 0; i < count; ++i )
253 for(
size_t i = 0; i < count; ++i )
264 for(
size_t i = 0; i < count; ++i )
275 for(
size_t i = 0; i < count; ++i )
286 for(
size_t i = 0; i < count; ++i )
297 for(
size_t i = 0; i < count; ++i )
325 if( !token )
return false;
328 if( 0 == strcmp( token, str ) )
return true;
342 if( !token )
return 0;
345 const char*
const* ptr;
346 for( ptr = list; *ptr; ++ptr )
348 if( 0 == strcmp( token, *ptr ) )
return ptr - list + 1;
354 std::string message(
"Parsing error at line " );
358 message +=
": expected one of {";
359 for( ptr = list; *ptr; ++ptr )
364 message +=
" } got \"";