comparison tests/agcl/silly/good/silly06.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 SILLY06_H
2 #define SILLY06_H
3
4 typedef enum {
5 silly06_foo_token = 1
6 } silly06_token_type;
7
8 typedef struct silly06_pcb_struct{
9 silly06_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 char ag_msg[82];
23 } silly06_pcb_type;
24
25 #ifndef PRULE_CONTEXT
26 #define PRULE_CONTEXT(pcb) (&((pcb).cs[(pcb).ssx]))
27 #define PERROR_CONTEXT(pcb) ((pcb).cs[(pcb).error_frame_ssx])
28 #define PCONTEXT(pcb) ((pcb).cs[(pcb).ssx])
29 #endif
30
31 #ifndef AG_RUNNING_CODE
32 /* PCB.exit_flag values */
33 #define AG_RUNNING_CODE 0
34 #define AG_SUCCESS_CODE 1
35 #define AG_SYNTAX_ERROR_CODE 2
36 #define AG_REDUCTION_ERROR_CODE 3
37 #define AG_STACK_ERROR_CODE 4
38 #define AG_SEMANTIC_ERROR_CODE 5
39 #endif
40
41 extern silly06_pcb_type silly06_pcb;
42 void init_silly06(void);
43 void silly06(void);
44 #endif
45