Mercurial > ~dholland > hg > ag > index.cgi
comparison tests/agcl/parsifal/good/t201a.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 T201A_H | |
2 #define T201A_H | |
3 | |
4 typedef enum { | |
5 t201a_name_token = 1, t201a_letter_token, t201a_hex_digit_token = 4, | |
6 t201a_text_token, t201a_digit_token, t201a_hex_number_token = 9, | |
7 t201a_number_token = 11, t201a_token_token, t201a_printable_token = 14, | |
8 t201a_nonprintable_token = 16, t201a_universe_token = 18, | |
9 t201a_grammar_token, t201a_eof_token | |
10 } t201a_token_type; | |
11 | |
12 typedef struct t201a_pcb_struct{ | |
13 t201a_token_type token_number, reduction_token, error_frame_token; | |
14 int input_code; | |
15 int input_value; | |
16 int line, column; | |
17 int ssx, sn, error_frame_ssx; | |
18 int drt, dssx, dsn; | |
19 int ss[128]; | |
20 int vs[128]; | |
21 int ag_ap; | |
22 const char *error_message; | |
23 char read_flag; | |
24 char exit_flag; | |
25 int bts[128], btsx; | |
26 int lab[3], rx, fx; | |
27 const unsigned char *key_sp; | |
28 int save_index, key_state; | |
29 char ag_msg[82]; | |
30 const int *ag_dtl; | |
31 int ag_dsn; | |
32 } t201a_pcb_type; | |
33 | |
34 #ifndef PRULE_CONTEXT | |
35 #define PRULE_CONTEXT(pcb) (&((pcb).cs[(pcb).ssx])) | |
36 #define PERROR_CONTEXT(pcb) ((pcb).cs[(pcb).error_frame_ssx]) | |
37 #define PCONTEXT(pcb) ((pcb).cs[(pcb).ssx]) | |
38 #endif | |
39 | |
40 #ifndef AG_RUNNING_CODE | |
41 /* PCB.exit_flag values */ | |
42 #define AG_RUNNING_CODE 0 | |
43 #define AG_SUCCESS_CODE 1 | |
44 #define AG_SYNTAX_ERROR_CODE 2 | |
45 #define AG_REDUCTION_ERROR_CODE 3 | |
46 #define AG_STACK_ERROR_CODE 4 | |
47 #define AG_SEMANTIC_ERROR_CODE 5 | |
48 #endif | |
49 | |
50 extern t201a_pcb_type t201a_pcb; | |
51 void init_t201a(void); | |
52 void t201a(void); | |
53 #endif | |
54 |