21 #ifndef Minisat_ParseUtils_h
22 #define Minisat_ParseUtils_h
62 static inline bool isEof(
const char* in) {
return *in ==
'\0'; }
70 while ((*in >= 9 && *in <= 13) || *in == 32)
77 if (
isEof(in))
return;
78 if (*in ==
'\n') { ++in;
return; }
87 if (*in ==
'-') neg =
true, ++in;
88 else if (*in ==
'+') ++in;
89 if (*in < '0' || *in >
'9') fprintf(stderr,
"PARSE ERROR! Unexpected char: %c\n", *in),
exit(3);
90 while (*in >=
'0' && *in <=
'9')
91 val = val*10 + (*in -
'0'),
93 return neg ? -val : val; }
99 static bool match(B& in,
const char* str) {
101 for (i = 0; str[i] !=
'\0'; i++)
113 for (; *str !=
'\0'; ++str, ++in)
static bool eagerMatch(B &in, const char *str)
static bool isEof(StreamBuffer &in)
unsigned char buf[buffer_size]
static int parseInt(B &in)
static void skipWhitespace(B &in)
static bool match(B &in, const char *str)
static const int buffer_size
int ZEXPORT gzread(gzFile file, voidp buf, unsigned len)
static void skipLine(B &in)