view tests/agcl/oldagsrc/good/xvmc.h @ 22:5581ef01f993

Regen all the AG output. This also fixes the line number output in the tools (cgbigen/helpgen/help2html), apparently because those files weren't regenerated last go.
author David A. Holland
date Mon, 13 Jun 2022 00:06:39 -0400
parents 13d2b8934445
children
line wrap: on
line source

#ifndef XVMC_H
#define XVMC_H

typedef union {
  double alignment;
  char ag_vt_2[sizeof(int)];
  char ag_vt_4[sizeof(Code)];
  char ag_vt_5[sizeof(double)];
} vmCompile_vs_type;

typedef enum {
  vmCompile_white_space_token = 1, vmCompile_input_string_token = 6,
  vmCompile_eof_token, vmCompile_statements_token, vmCompile_error_token,
  vmCompile_statement_token = 13, vmCompile_executable_statement_token,
  vmCompile_declaration_token, vmCompile_type_name_token = 17,
  vmCompile_expression_token = 19, vmCompile_expression_list_token = 23,
  vmCompile_expressions_token = 25,
  vmCompile_unconditional_statement_token = 27,
  vmCompile_conditional_statement_token, vmCompile_while_clause_token = 32,
  vmCompile_for_exprs_token = 34, vmCompile_condition_token,
  vmCompile_for_expr_list_token, vmCompile_if_clause_token = 38,
  vmCompile_conditional_expression_token = 41, vmCompile_lvalue_token,
  vmCompile_variable_name_token = 53, vmCompile_logical_or_expression_token,
  vmCompile_logical_or_condition_token,
  vmCompile_logical_and_expression_token = 58,
  vmCompile_bitwise_or_expression_token = 60,
  vmCompile_logical_and_condition_token,
  vmCompile_bitwise_xor_expression_token = 63,
  vmCompile_bitwise_and_expression_token = 65,
  vmCompile_equality_expression_token = 67,
  vmCompile_relational_expression_token = 69,
  vmCompile_shift_expression_token = 72,
  vmCompile_additive_expression_token = 77,
  vmCompile_multiplicative_expression_token = 80,
  vmCompile_cast_expression_token = 83,
  vmCompile_unary_expression_token = 87, vmCompile_power_expression_token,
  vmCompile_primary_token = 93, vmCompile_integer_constant_token = 95,
  vmCompile_space_token = 97, vmCompile_simple_real_token = 108,
  vmCompile_exponent_token = 111, vmCompile_fraction_part_token = 113,
  vmCompile_digit_token, vmCompile_letter_token,
  vmCompile_char_constant_element_token = 118,
  vmCompile_not_single_quote_token, vmCompile_escape_sequence_token,
  vmCompile_string_chars_token, vmCompile_string_char_token = 123,
  vmCompile_not_double_quote_token, vmCompile_octal_escape_token = 136,
  vmCompile_hex_escape_token, vmCompile_one_octal_token,
  vmCompile_two_octal_token, vmCompile_three_octal_token,
  vmCompile_hex_digit_token = 144, vmCompile_name_string_token = 155,
  vmCompile_real_token = 204, vmCompile_string_literal_token,
  vmCompile_character_constant_token = 207, vmCompile_integer_token = 217
} vmCompile_token_type;

typedef struct vmCompile_pcb_struct{
  vmCompile_token_type token_number, reduction_token, error_frame_token;
  int input_code;
  int input_value;
  int line, column;
  int ssx, sn, error_frame_ssx;
  int drt, dssx, dsn;
  int ss[128];
  vmCompile_vs_type vs[128];
  int ag_ap;
  const char *error_message;
  char read_flag;
  char exit_flag;
  int bts[128], btsx;
  unsigned char * pointer;
  unsigned char * la_ptr;
  const unsigned char *key_sp;
  int save_index, key_state;
  char ag_msg[82];
  const  int *ag_dtl;
  int ag_dsn;
} vmCompile_pcb_type;

#ifndef PRULE_CONTEXT
#define PRULE_CONTEXT(pcb)  (&((pcb).cs[(pcb).ssx]))
#define PERROR_CONTEXT(pcb) ((pcb).cs[(pcb).error_frame_ssx])
#define PCONTEXT(pcb)       ((pcb).cs[(pcb).ssx])
#endif

#ifndef AG_RUNNING_CODE
/* PCB.exit_flag values */
#define AG_RUNNING_CODE         0
#define AG_SUCCESS_CODE         1
#define AG_SYNTAX_ERROR_CODE    2
#define AG_REDUCTION_ERROR_CODE 3
#define AG_STACK_ERROR_CODE     4
#define AG_SEMANTIC_ERROR_CODE  5
#endif

extern vmCompile_pcb_type vmCompile_pcb;
void init_vmCompile(void);
void vmCompile(void);

Code vmCompile_value(void);
#endif