view tests/agcl/contrib/good/bug-I158.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 BUG-I158_H
#define BUG-I158_H

typedef union {
  double alignment;
  char ag_vt_2[sizeof(int)];
  char ag_vt_4[sizeof(double)];
  char ag_vt_5[sizeof(char *)];
} bug-I158_vs_type;

typedef enum {
  bug-I158_step_part_token = 1, bug-I158_const_token, bug-I158_number_token,
  bug-I158_intnum_token, bug-I158_symbol_or_lineno_token,
  bug-I158_hashed_number_token, bug-I158_SEP_token, bug-I158_EOFILE_token,
  bug-I158_FNUM_token, bug-I158_simple_real_token,
  bug-I158_exponent_token = 14, bug-I158_integer_part_token = 16,
  bug-I158_fraction_part_token = 18, bug-I158_digit_token = 20,
  bug-I158_name_token, bug-I158_letter_token, bug-I158_SYMBOL_token = 24,
  bug-I158_STRSYM_token, bug-I158_DIGITS_token = 27,
  bug-I158_digit_string_token, bug-I158_STRING_token,
  bug-I158_string_text_token = 31, bug-I158_GOSUB_token = 33,
  bug-I158_LABEL_token, bug-I158_ON_token, bug-I158_INTERRUPT_token,
  bug-I158_BREAK_token, bug-I158_CONTINUE_token, bug-I158_IF_token,
  bug-I158_THEN_token, bug-I158_ELSE_token, bug-I158_ENDIF_token,
  bug-I158_PRINT_token, bug-I158_INPUT_token, bug-I158_LINE_token,
  bug-I158_RETURN_token, bug-I158_DIM_token, bug-I158_END_token,
  bug-I158_AT_token, bug-I158_SCREEN_token, bug-I158_REVERSE_token,
  bug-I158_AND_token, bug-I158_OR_token, bug-I158_NOT_token,
  bug-I158_NE_token, bug-I158_LE_token, bug-I158_GE_token,
  bug-I158_LT_token, bug-I158_GT_token, bug-I158_EQ_token,
  bug-I158_READ_token, bug-I158_DATA_token, bug-I158_RESTORE_token,
  bug-I158_OPEN_token, bug-I158_CLOSE_token, bug-I158_WINDOW_token,
  bug-I158_DOT_token, bug-I158_CIRCLE_token, bug-I158_TEXT_token,
  bug-I158_CLEAR_token, bug-I158_PRINTER_token, bug-I158_WAIT_token,
  bug-I158_BELL_token, bug-I158_MAP_token, bug-I158_XMAP_token,
  bug-I158_YMAP_token, bug-I158_ARROW_token, bug-I158_XTICK_token,
  bug-I158_YTICK_token, bug-I158_SIN_token, bug-I158_ASIN_token,
  bug-I158_COS_token, bug-I158_ACOS_token, bug-I158_TAN_token,
  bug-I158_ATAN_token, bug-I158_EXP_token, bug-I158_LOG_token,
  bug-I158_SQRT_token, bug-I158_MYEOF_token, bug-I158_INT_token,
  bug-I158_FRAC_token, bug-I158_MOD_token, bug-I158_RAN_token,
  bug-I158_LEN_token, bug-I158_VAL_token, bug-I158_LEFT_token,
  bug-I158_RIGHT_token, bug-I158_MID_token, bug-I158_MIN_token,
  bug-I158_MAX_token, bug-I158_STR_token, bug-I158_INKEY_token,
  bug-I158_CHR_token, bug-I158_ASC_token, bug-I158_UPPER_token,
  bug-I158_LOWER_token, bug-I158_TRIM_token, bug-I158_LTRIM_token,
  bug-I158_RTRIM_token, bug-I158_INSTR_token, bug-I158_SYSTEM_token,
  bug-I158_SYSTEM2_token, bug-I158_PEEK_token, bug-I158_PEEK2_token,
  bug-I158_POKE_token, bug-I158_DATE_token, bug-I158_TIME_token,
  bug-I158_UMINUS_token = 121, bug-I158_NAME_token, bug-I158_program_token,
  bug-I158_statement_list_token, bug-I158_eof_token,
  bug-I158_statement_list_token, bug-I158_statement_token = 129,
  bug-I158_string_assignment_token, bug-I158_assignment_token,
  bug-I158_for_loop_token, bug-I158_if_clause_token,
  bug-I158_expression_token = 136, bug-I158_goto_list_token = 138,
  bug-I158_gosub_list_token = 140, bug-I158_string_expression_token = 142,
  bug-I158_printintro_token, bug-I158_printlist_token,
  bug-I158_semicolon_token = 146, bug-I158_inputintro_token,
  bug-I158_inputlist_token, bug-I158_readlist_token,
  bug-I158_datalist_token, bug-I158_dimlist_token, bug-I158_mapping_token,
  bug-I158_indexlist_token = 160, bug-I158_string_function_token = 167,
  bug-I158_function_token = 170, bug-I158_next_or_eofile_token = 181,
  bug-I158_next_symbol_token, bug-I158_condition_token = 185,
  bug-I158_else_part_token = 188, bug-I158_endif_or_eof_token = 190,
  bug-I158_input_token, bug-I158_readitem_token = 194,
  bug-I158_stream_token = 197, bug-I158_position_token,
  bug-I158_prompt_token = 200
} bug-I158_token_type;

typedef struct bug-I158_pcb_struct{
  bug-I158_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];
  bug-I158_vs_type vs[128];
  int ag_ap;
  const char *error_message;
  char read_flag;
  char exit_flag;
  int bts[128], btsx;
  int lab[6], rx, fx;
  const unsigned char *key_sp;
  int save_index, key_state;
  char ag_msg[82];
  const  int *ag_dtl;
  int ag_dsn;
} bug-I158_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 bug-I158_pcb_type bug-I158_pcb;
void init_bug-I158(void);
void bug-I158(void);
#endif