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