version 1.19, 2007/05/17 03:37:31 |
version 1.20, 2007/09/17 09:28:36 |
|
|
|
|
static IFile *current; /* IFile being parsed. */ |
static IFile *current; /* IFile being parsed. */ |
|
|
static LIST input_stack; /* Stack of IFiles waiting to be parsed |
static LIST input_stack; /* Stack of IFiles waiting to be parsed |
* (includes and loop reparses) */ |
* (includes and loop reparses) */ |
|
|
/* IFile ctors. |
/* IFile ctors. |
* |
* |
* obj = new_ifile(filename, filehandle); |
* obj = new_ifile(filename, filehandle); |
* Create input object from filename, filehandle. */ |
* Create input object from filename, filehandle. */ |
|
|
static void free_ifile(IFile *); |
static void free_ifile(IFile *); |
|
|
|
|
/* Handling basic character reading. |
/* Handling basic character reading. |
* c = ParseReadc(); |
* c = ParseReadc(); |
* New character c from current input stream, or EOF at end of stream. */ |
* New character c from current input stream, or EOF at end of stream. */ |
#define ParseReadc() current->ptr < current->end ? *current->ptr++ : newline() |
#define ParseReadc() current->ptr < current->end ? *current->ptr++ : newline() |
|
|
|
|
/* Parse_ReadNormalLine removes beginning and trailing blanks (but keeps |
/* Parse_ReadNormalLine removes beginning and trailing blanks (but keeps |
* the first tab), handles escaped newlines, and skips over uninteresting |
* the first tab), handles escaped newlines, and skips over uninteresting |
* lines. |
* lines. |
* |
* |
* The line number is incremented, which implies that continuation |
* The line number is incremented, which implies that continuation |
* lines are numbered with the last line number (we could do better, at a |
* lines are numbered with the last line number (we could do better, at a |