comparison tests/agcl/parsifal/good/iaparams.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 IAPARAMS_H
2 #define IAPARAMS_H
3
4 typedef union {
5 long alignment;
6 char ag_vt_2[sizeof(int)];
7 char ag_vt_3[sizeof(long)];
8 } iaparams_vs_type;
9
10 typedef enum {
11 iaparams_grammar_token = 1, iaparams_whole_number_token,
12 iaparams_number_token = 5, iaparams_digit_token = 8
13 } iaparams_token_type;
14
15 typedef struct iaparams_pcb_struct{
16 iaparams_token_type token_number, reduction_token, error_frame_token;
17 int input_code;
18 int input_value;
19 int line, column;
20 int ssx, sn, error_frame_ssx;
21 int drt, dssx, dsn;
22 int ss[128];
23 iaparams_vs_type vs[128];
24 int ag_ap;
25 const char *error_message;
26 char read_flag;
27 char exit_flag;
28 int bts[128], btsx;
29 char ag_msg[82];
30 } iaparams_pcb_type;
31
32 #ifndef PRULE_CONTEXT
33 #define PRULE_CONTEXT(pcb) (&((pcb).cs[(pcb).ssx]))
34 #define PERROR_CONTEXT(pcb) ((pcb).cs[(pcb).error_frame_ssx])
35 #define PCONTEXT(pcb) ((pcb).cs[(pcb).ssx])
36 #endif
37
38 #ifndef AG_RUNNING_CODE
39 /* PCB.exit_flag values */
40 #define AG_RUNNING_CODE 0
41 #define AG_SUCCESS_CODE 1
42 #define AG_SYNTAX_ERROR_CODE 2
43 #define AG_REDUCTION_ERROR_CODE 3
44 #define AG_STACK_ERROR_CODE 4
45 #define AG_SEMANTIC_ERROR_CODE 5
46 #endif
47
48 extern iaparams_pcb_type iaparams_pcb;
49 void init_iaparams(void);
50 void iaparams(void);
51 #endif
52