Mercurial > ~dholland > hg > ag > index.cgi
comparison tests/agcl/parsifal/good/ss-kb.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 SS-KB_H | |
2 #define SS-KB_H | |
3 | |
4 typedef enum { | |
5 ss-kb_file_error_message_token = 1, ss-kb_goto_query_token, | |
6 ss-kb_load_name_query_token, ss-kb_no_such_file_message_token, | |
7 ss-kb_overwrite_query_token, ss-kb_save_changes_query_token, | |
8 ss-kb_save_name_query_token, ss-kb_print_file_query_token, | |
9 ss-kb_block_query_token, ss-kb_decimals_query_token, | |
10 ss-kb_bad_decimals_message_token, ss-kb_grammar_token, | |
11 ss-kb_top_level_command_token, ss-kb_eof_token = 16, | |
12 ss-kb_recalc_request_token, ss-kb_utility_menu_token, | |
13 ss-kb_main_menu_token = 20, ss-kb_edit_request_token = 22, | |
14 ss-kb_edit_text_token, ss-kb_return_token, ss-kb_escape_token, | |
15 ss-kb_delete_request_token, ss-kb_page_up_token, ss-kb_page_down_token, | |
16 ss-kb_control_left_token, ss-kb_control_right_token, ss-kb_home_token, | |
17 ss-kb_end_token, ss-kb_up_token, ss-kb_down_token, ss-kb_left_token, | |
18 ss-kb_right_token, ss-kb_load_file_token, ss-kb_save_file_token, | |
19 ss-kb_clear_spreadsheet_token, ss-kb_format_token, ss-kb_exit_token, | |
20 ss-kb_error_token, ss-kb_goto_token, ss-kb_column_menu_token, | |
21 ss-kb_column_width_token = 47, ss-kb_row_menu_token, ss-kb_any_menu_token, | |
22 ss-kb_print_menu_token, ss-kb_print_file_name_token = 52, | |
23 ss-kb_spreadsheet_menu_token, ss-kb_format_menu_token, | |
24 ss-kb_block_token = 56, ss-kb_digits_spec_token = 58, | |
25 ss-kb_label_menu_token, ss-kb_how_token, ss-kb_bad_digits_spec_token = 63, | |
26 ss-kb_edit_number_token, ss-kb_F1_token, ss-kb_delete_token, | |
27 ss-kb_cell_name_token, ss-kb_column_width_request_token, | |
28 ss-kb_bad_cell_name_token = 70, ss-kb_bad_block_token, | |
29 ss-kb_exit_request_token, ss-kb_save_changes_token, | |
30 ss-kb_alt_x_token = 75, ss-kb_load_spreadsheet_token, | |
31 ss-kb_save_spreadsheet_token = 78, ss-kb_not_changed_token, | |
32 ss-kb_changed_token, ss-kb_no_token, ss-kb_yes_token, | |
33 ss-kb_write_file_token = 84, ss-kb_old_file_token, ss-kb_new_file_token, | |
34 ss-kb_file_error_token, ss-kb_any_key_token, | |
35 ss-kb_clear_spreadsheet_request_token, ss-kb_F2_token = 95, | |
36 ss-kb_text_character_token = 100, ss-kb_edit_key_token, ss-kb_digit_token, | |
37 ss-kb_backspace_token | |
38 } ss-kb_token_type; | |
39 | |
40 typedef struct ss-kb_pcb_struct{ | |
41 ss-kb_token_type token_number, reduction_token, error_frame_token; | |
42 int input_code; | |
43 int input_value; | |
44 int line, column; | |
45 int ssx, sn, error_frame_ssx; | |
46 int drt, dssx, dsn; | |
47 int ss[128]; | |
48 int vs[128]; | |
49 int ag_ap; | |
50 const char *error_message; | |
51 char read_flag; | |
52 char exit_flag; | |
53 int bts[128], btsx; | |
54 const int *ag_dtl; | |
55 int ag_dsn; | |
56 } ss-kb_pcb_type; | |
57 | |
58 #ifndef PRULE_CONTEXT | |
59 #define PRULE_CONTEXT(pcb) (&((pcb).cs[(pcb).ssx])) | |
60 #define PERROR_CONTEXT(pcb) ((pcb).cs[(pcb).error_frame_ssx]) | |
61 #define PCONTEXT(pcb) ((pcb).cs[(pcb).ssx]) | |
62 #endif | |
63 | |
64 #ifndef AG_RUNNING_CODE | |
65 /* PCB.exit_flag values */ | |
66 #define AG_RUNNING_CODE 0 | |
67 #define AG_SUCCESS_CODE 1 | |
68 #define AG_SYNTAX_ERROR_CODE 2 | |
69 #define AG_REDUCTION_ERROR_CODE 3 | |
70 #define AG_STACK_ERROR_CODE 4 | |
71 #define AG_SEMANTIC_ERROR_CODE 5 | |
72 #endif | |
73 | |
74 extern ss-kb_pcb_type ss-kb_pcb; | |
75 void init_ss-kb(void); | |
76 void ss-kb(void); | |
77 #endif | |
78 |