21 #ifndef Minisat_ParseUtils_h
22 #define Minisat_ParseUtils_h
59 static inline bool isEof(
const char* in) {
return *in ==
'\0'; }
67 while ((*in >= 9 && *in <= 13) || *in == 32)
74 if (
isEof(in))
return;
75 if (*in ==
'\n') { ++in;
return; }
84 if (*in ==
'-') neg =
true, ++in;
85 else if (*in ==
'+') ++in;
86 if (*in < '0' || *in >
'9') fprintf(stderr,
"PARSE ERROR! Unexpected char: %c\n", *in), exit(3);
87 while (*in >=
'0' && *in <=
'9')
88 val = val*10 + (*in -
'0'),
90 return neg ? -val : val; }
96 static bool match(B& in,
const char* str) {
98 for (i = 0; str[i] !=
'\0'; i++)
110 for (; *str !=
'\0'; ++str, ++in)
static bool eagerMatch(B &in, const char *str)
virtual void assureLookahead()=0
static bool isEof(StreamBuffer &in)
static int parseInt(B &in)
static void skipWhitespace(B &in)
static bool match(B &in, const char *str)
static void skipLine(B &in)