Mercurial > ~dholland > hg > ag > index.cgi
comparison anagram/agcore/sums.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 | 5581ef01f993 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:13d2b8934445 |
---|---|
1 #ifndef SUMS_H_1198348435 | |
2 #define SUMS_H_1198348435 | |
3 | |
4 typedef union { | |
5 long alignment; | |
6 char ag_vt_2[sizeof(int)]; | |
7 char ag_vt_4[sizeof(summable)]; | |
8 char ag_vt_5[sizeof(unsigned long)]; | |
9 } parseSumData_vs_type; | |
10 | |
11 typedef enum { | |
12 parseSumData_inserted_data_token = 1, parseSumData_checksum_data_token, | |
13 parseSumData_build_date_token, parseSumData_build_os_token, | |
14 parseSumData_eof_token, parseSumData_text_token = 7, | |
15 parseSumData_sum_entry_token = 11, parseSumData_summable_token = 14, | |
16 parseSumData_length_token = 16, parseSumData_sum_token = 18, | |
17 parseSumData_offset_token, parseSumData_integer_token = 23, | |
18 parseSumData_digit_token = 25, parseSumData_ascii_token | |
19 } parseSumData_token_type; | |
20 | |
21 typedef struct parseSumData_pcb_struct{ | |
22 parseSumData_token_type token_number, reduction_token, error_frame_token; | |
23 int input_code; | |
24 int input_value; | |
25 int line, column; | |
26 int ssx, sn, error_frame_ssx; | |
27 int drt, dssx, dsn; | |
28 int ss[128]; | |
29 parseSumData_vs_type vs[128]; | |
30 int ag_ap; | |
31 const char *error_message; | |
32 char read_flag; | |
33 char exit_flag; | |
34 int bts[128], btsx; | |
35 int lab[16], rx, fx; | |
36 const unsigned char *key_sp; | |
37 int save_index, key_state; | |
38 char ag_msg[82]; | |
39 } parseSumData_pcb_type; | |
40 | |
41 #ifndef PRULE_CONTEXT | |
42 #define PRULE_CONTEXT(pcb) (&((pcb).cs[(pcb).ssx])) | |
43 #define PERROR_CONTEXT(pcb) ((pcb).cs[(pcb).error_frame_ssx]) | |
44 #define PCONTEXT(pcb) ((pcb).cs[(pcb).ssx]) | |
45 #endif | |
46 | |
47 #ifndef AG_RUNNING_CODE | |
48 /* PCB.exit_flag values */ | |
49 #define AG_RUNNING_CODE 0 | |
50 #define AG_SUCCESS_CODE 1 | |
51 #define AG_SYNTAX_ERROR_CODE 2 | |
52 #define AG_REDUCTION_ERROR_CODE 3 | |
53 #define AG_STACK_ERROR_CODE 4 | |
54 #define AG_SEMANTIC_ERROR_CODE 5 | |
55 #endif | |
56 | |
57 extern parseSumData_pcb_type parseSumData_pcb; | |
58 void init_parseSumData(void); | |
59 void parseSumData(void); | |
60 #endif | |
61 |