#include <parser.h>
Public Methods | |
Parser (const char *_fname) | |
~Parser () | |
void | error (int errnum, const char *args, ...) |
void | print (const char *args, ...) |
void | printcurtok (void) |
void | gentoken (void) |
bool | eatOpen (bool force) |
bool | eatClose (bool force) |
int | eatNumber (void) |
bool | eatSNumber (int &) |
Public Attributes | |
int | curtok |
char | tok_text [MAX_TOK_LENGTH] |
Private Methods | |
int | gchar (void) |
void | push (void) |
int | type (int) |
void | skipwhite (void) |
void | vprint (const char *args, va_list ap) |
Private Attributes | |
char* | fname |
FILE* | f |
int | lineno |
int | curch |
|
constructor opens _fname for reading and initializes data |
|
destructor closes command file |
|
eats a closing bracket ')'. if force is
|
|
eats a positive integer
|
|
eats a opening bracket '('. if force is
|
|
eats a integer writes it into the argument
|
|
prints an error
errnum is one of the calls describe_error
|
|
|
|
drop current token and read next from input file |
|
replaces " |
|
prints current token to screen. Used for |
|
|
|
|
|
|
|
similar to vprintf()
replaces |
|
|
|
current token type. Value is one of the class ensures that calling functions never get PT_CBEGIN, PT_CEND and PT_LINECOM. |
|
|
|
|
|
|
|
string with the current token if curtok is PT_TEXT |