Contents
Page-10
Prev
Next
Page+10
Index
Line Handler
Below the level of the lexical analyzer will be low-level routines
that perform input of the source file and get characters from it.
An input line is treated as an array of characters, with a pointer
to the next character (an index in the array).
Interfaces:
- getchar() Get the next character from the input line and move
the pointer.
- peekchar() Get the next character from the input line without
moving the pointer. (uses ungetc())
- peek2char() Get the second character from the input line without
moving the pointer.
The Line Handler does such things as skipping whitespace (blanks, tabs,
newlines), ignoring comments, handling continuation lines, etc. It may
return special ``end of statement'' or ``end of file'' pseudo-characters.