comparison tests/agcl/parsifal/good/ss-fp.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-FP_H
2 #define SS-FP_H
3
4 typedef union {
5 double alignment;
6 char ag_vt_2[sizeof(int)];
7 char ag_vt_4[sizeof(number)];
8 char ag_vt_5[sizeof(format_code)];
9 char ag_vt_6[sizeof(pair<int>)];
10 char ag_vt_7[sizeof(char *)];
11 char ag_vt_8[sizeof(function_name)];
12 char ag_vt_9[sizeof(double)];
13 } ss-fp_vs_type;
14
15 typedef enum {
16 ss-fp_space_token = 1, ss-fp_grammar_token, ss-fp_cell_name_token = 4,
17 ss-fp_eof_token, ss-fp_input_line_token = 7,
18 ss-fp_conditional_expression_token, ss-fp_to_token = 14,
19 ss-fp_format_token = 18, ss-fp_alignment_token = 23,
20 ss-fp_conversion_token = 26, ss-fp_integer_token = 28,
21 ss-fp_column_id_token = 34, ss-fp_letter_token, ss-fp_digit_token = 37,
22 ss-fp_x_expression_token, ss-fp_expression_token, ss-fp_disjunction_token,
23 ss-fp_conjunction_token = 42, ss-fp_logical_value_token = 44,
24 ss-fp_comparison_token = 46, ss-fp_partial_comparison_token = 50,
25 ss-fp_summation_token = 57, ss-fp_term_token = 60, ss-fp_xxfactor_token,
26 ss-fp_xfactor_token = 63, ss-fp_function_token, ss-fp_factor_token,
27 ss-fp_yfactor_token, ss-fp_base_token, ss-fp_simple_factor_token = 69,
28 ss-fp_r_value_token, ss-fp_l_value_token, ss-fp_c_value_token,
29 ss-fp_number_token, ss-fp_parens_token, ss-fp_sigma_token = 76,
30 ss-fp_bound_variable_token, ss-fp_x_expression_string_token,
31 ss-fp_integer_part_token = 99, ss-fp_decimal_point_token,
32 ss-fp_fraction_part_token = 102, ss-fp_cell_name_request_token = 109,
33 ss-fp_input_line_request_token, ss-fp_block_request_token = 112,
34 ss-fp_nonzero_digit_token = 125, ss-fp_pi_token = 142
35 } ss-fp_token_type;
36
37 typedef struct ss-fp_pcb_struct{
38 ss-fp_token_type token_number, reduction_token, error_frame_token;
39 int input_code;
40 int input_value;
41 int line, column;
42 int ssx, sn, error_frame_ssx;
43 int drt, dssx, dsn;
44 int ss[128];
45 ss-fp_vs_type vs[128];
46 int ag_ap;
47 const char *error_message;
48 char read_flag;
49 char exit_flag;
50 unsigned char * pointer;
51 unsigned char * la_ptr;
52 const unsigned char *key_sp;
53 int save_index, key_state;
54 } ss-fp_pcb_type;
55
56 #ifndef PRULE_CONTEXT
57 #define PRULE_CONTEXT(pcb) (&((pcb).cs[(pcb).ssx]))
58 #define PERROR_CONTEXT(pcb) ((pcb).cs[(pcb).error_frame_ssx])
59 #define PCONTEXT(pcb) ((pcb).cs[(pcb).ssx])
60 #endif
61
62 #ifndef AG_RUNNING_CODE
63 /* PCB.exit_flag values */
64 #define AG_RUNNING_CODE 0
65 #define AG_SUCCESS_CODE 1
66 #define AG_SYNTAX_ERROR_CODE 2
67 #define AG_REDUCTION_ERROR_CODE 3
68 #define AG_STACK_ERROR_CODE 4
69 #define AG_SEMANTIC_ERROR_CODE 5
70 #endif
71 void init_ss-fp(void);
72 void ss-fp(void);
73 #endif
74