comparison tests/agcl/parsifal/good/test1.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 TEST1_H
2 #define TEST1_H
3
4 typedef enum {
5 test1_line_token = 1, test1_eol_token = 7, test1_other_stuff_token = 9
6 } test1_token_type;
7
8 typedef struct test1_pcb_struct{
9 test1_token_type token_number, reduction_token, error_frame_token;
10 int input_code;
11 int input_value;
12 int line, column;
13 int ssx, sn, error_frame_ssx;
14 int drt, dssx, dsn;
15 int ss[128];
16 int vs[128];
17 int ag_ap;
18 const char *error_message;
19 char read_flag;
20 char exit_flag;
21 int bts[128], btsx;
22 int lab[4], rx, fx;
23 const unsigned char *key_sp;
24 int save_index, key_state;
25 char ag_msg[82];
26 } test1_pcb_type;
27
28 #ifndef PRULE_CONTEXT
29 #define PRULE_CONTEXT(pcb) (&((pcb).cs[(pcb).ssx]))
30 #define PERROR_CONTEXT(pcb) ((pcb).cs[(pcb).error_frame_ssx])
31 #define PCONTEXT(pcb) ((pcb).cs[(pcb).ssx])
32 #endif
33
34 #ifndef AG_RUNNING_CODE
35 /* PCB.exit_flag values */
36 #define AG_RUNNING_CODE 0
37 #define AG_SUCCESS_CODE 1
38 #define AG_SYNTAX_ERROR_CODE 2
39 #define AG_REDUCTION_ERROR_CODE 3
40 #define AG_STACK_ERROR_CODE 4
41 #define AG_SEMANTIC_ERROR_CODE 5
42 #endif
43
44 extern test1_pcb_type test1_pcb;
45 void init_test1(void);
46 void test1(void);
47 #endif
48