Mercurial > ~dholland > hg > ag > index.cgi
comparison tests/agcl/parsifal/good/keydis1.h @ 0:13d2b8934445
Import AnaGram (near-)release tree into Mercurial.
author | David A. Holland |
---|---|
date | Sat, 22 Dec 2007 17:52:45 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:13d2b8934445 |
---|---|
1 #ifndef KEYDIS1_H | |
2 #define KEYDIS1_H | |
3 | |
4 typedef enum { | |
5 keydis1_ws_token = 1, keydis1_file_token, keydis1_thing_token, | |
6 keydis1_eof_token, keydis1_word_token = 8, keydis1_letter_token = 16 | |
7 } keydis1_token_type; | |
8 | |
9 typedef struct keydis1_pcb_struct{ | |
10 keydis1_token_type token_number, reduction_token, error_frame_token; | |
11 int input_code; | |
12 int input_value; | |
13 int line, column; | |
14 int ssx, sn, error_frame_ssx; | |
15 int drt, dssx, dsn; | |
16 int ss[128]; | |
17 int vs[128]; | |
18 int ag_ap; | |
19 const char *error_message; | |
20 char read_flag; | |
21 char exit_flag; | |
22 int bts[128], btsx; | |
23 int lab[6], rx, fx; | |
24 const unsigned char *key_sp; | |
25 int save_index, key_state; | |
26 char ag_msg[82]; | |
27 } keydis1_pcb_type; | |
28 | |
29 #ifndef PRULE_CONTEXT | |
30 #define PRULE_CONTEXT(pcb) (&((pcb).cs[(pcb).ssx])) | |
31 #define PERROR_CONTEXT(pcb) ((pcb).cs[(pcb).error_frame_ssx]) | |
32 #define PCONTEXT(pcb) ((pcb).cs[(pcb).ssx]) | |
33 #endif | |
34 | |
35 #ifndef AG_RUNNING_CODE | |
36 /* PCB.exit_flag values */ | |
37 #define AG_RUNNING_CODE 0 | |
38 #define AG_SUCCESS_CODE 1 | |
39 #define AG_SYNTAX_ERROR_CODE 2 | |
40 #define AG_REDUCTION_ERROR_CODE 3 | |
41 #define AG_STACK_ERROR_CODE 4 | |
42 #define AG_SEMANTIC_ERROR_CODE 5 | |
43 #endif | |
44 | |
45 extern keydis1_pcb_type keydis1_pcb; | |
46 void init_keydis1(void); | |
47 void keydis1(void); | |
48 #endif | |
49 |