bufend(),
bufpos(),
c(),
+ token_string(),
token_length()
{
// trigger a refill of the buffer
void
Lexer::nextChar()
{
- if(bufpos >= bufend) {
+ if(bufpos >= bufend || (bufpos == NULL && bufend == NULL) /* Initial refill trigger */) {
if(eof) {
c = EOF;
return;
++bufend;
}
}
+
+ if(bufpos == NULL)
+ return;
+
c = *bufpos++;
if(c == '\n')
++linenumber;