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