|
pforth
0943e5e71114f286dbb2474d55aabf91df02d104
|
Data Structures | |
| struct | _loop_struct |
Functions | |
| char * | strndup (const char *src, size_t len) |
| char | upcase (char c) |
| int | preprocess (char *line) |
| void | eval (dict_t *dict, const char *line, const char *line_end) |
Variables | |
| static struct _loop_struct | loops [MAX_DO_LOOP_DEPTH] |
| const char * | begin_loops [MAX_BEGIN_LOOP_DEPTH] |
| static FORTH_TYPE | if_depth |
| static FORTH_TYPE | do_loop_depth |
| static FORTH_TYPE | begin_loop_depth |
| void eval | ( | dict_t * | dict, |
| const char * | line, | ||
| const char * | line_end | ||
| ) |
Evaluate the FORTH line
| dict | the dictionary to use |
| line | the FORTH line |
| line_end | the last byte to interpret, if NULL then function evaluates ASCIIZ line |
| int preprocess | ( | char * | line | ) |
Preprocess the FORTH line.
The preprocessing is done in-place, comments and newlines are removed by replacing with space characters. There's no space compression pass - it's easier to do that right in eval().
| line | the line to be preprocessed. |
| char* strndup | ( | const char * | src, |
| size_t | len | ||
| ) |
| char upcase | ( | char | c | ) |
|
static |
| const char* begin_loops[MAX_BEGIN_LOOP_DEPTH] |
|
static |
|
static |
|
static |