blob: 701bb02a5e390b9869033b8cd6f512a7d9d9d73d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#ifndef _ZX_BASIC_H
#define _ZX_BASIC_H
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#define ZX81_BASIC_STATE_SIZE 116
#define ZX81_BASIC_LINE_LAST 0x7676
extern char *zx81_basic_tokens_low[3];
extern char *zx81_basic_tokens[64];
typedef struct _zx_basic_line {
uint16_t num, len;
} zx_basic_line;
enum zx_basic_token_type {
ZX81_BASIC_TOKEN_UNKNOWN,
ZX81_BASIC_TOKEN_ALNUM,
ZX81_BASIC_TOKEN_PAREN_OPEN,
ZX81_BASIC_TOKEN_PAREN_CLOSE,
ZX81_BASIC_TOKEN_QUOTE,
ZX81_BASIC_TOKEN_SYMBOL,
ZX81_BASIC_TOKEN_WORD,
ZX81_BASIC_TOKEN_INTEGRAL,
ZX81_BASIC_TOKEN_FLOAT,
ZX81_BASIC_TOKEN_NEWLINE,
};
ssize_t zx81_basic_dump(int fd, FILE *stream);
#endif /* _ZX_BASIC_H */
|