Mercurial > ~dholland > hg > ag > index.cgi
comparison tests/agcl/parsifal/good/date_p1.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 DATE_P1_H | |
2 #define DATE_P1_H | |
3 | |
4 typedef enum { | |
5 chkdate_white_space_token = 1, chkdate_date_string_token = 5, | |
6 chkdate_date_token, chkdate_eof_token, chkdate_punct_token = 11, | |
7 chkdate_matchPunctuation_token = 14, chkdate_letter_token = 17, | |
8 chkdate_punctuation_token = 31, chkdate_i_token = 33, chkdate_x_token, | |
9 chkdate_v_token, chkdate_units_token, chkdate_number_token = 41, | |
10 chkdate_month_token, chkdate_roman_token = 46 | |
11 } chkdate_token_type; | |
12 | |
13 typedef struct chkdate_pcb_struct{ | |
14 chkdate_token_type token_number, reduction_token, error_frame_token; | |
15 int input_code; | |
16 int input_value; | |
17 int line, column; | |
18 int ssx, sn, error_frame_ssx; | |
19 int drt, dssx, dsn; | |
20 int ss[128]; | |
21 int vs[128]; | |
22 int ag_ap; | |
23 const char *error_message; | |
24 char read_flag; | |
25 char exit_flag; | |
26 int bts[128], btsx; | |
27 unsigned char * pointer; | |
28 unsigned char * la_ptr; | |
29 const unsigned char *key_sp; | |
30 int save_index, key_state; | |
31 } chkdate_pcb_type; | |
32 | |
33 #ifndef PRULE_CONTEXT | |
34 #define PRULE_CONTEXT(pcb) (&((pcb).cs[(pcb).ssx])) | |
35 #define PERROR_CONTEXT(pcb) ((pcb).cs[(pcb).error_frame_ssx]) | |
36 #define PCONTEXT(pcb) ((pcb).cs[(pcb).ssx]) | |
37 #endif | |
38 | |
39 #ifndef AG_RUNNING_CODE | |
40 /* PCB.exit_flag values */ | |
41 #define AG_RUNNING_CODE 0 | |
42 #define AG_SUCCESS_CODE 1 | |
43 #define AG_SYNTAX_ERROR_CODE 2 | |
44 #define AG_REDUCTION_ERROR_CODE 3 | |
45 #define AG_STACK_ERROR_CODE 4 | |
46 #define AG_SEMANTIC_ERROR_CODE 5 | |
47 #endif | |
48 | |
49 extern chkdate_pcb_type chkdate_pcb; | |
50 void init_chkdate(void); | |
51 void chkdate(void); | |
52 #endif | |
53 |