Source: /app/hbasic/hbasic/parser/parser_memory.h
|
|
|
|
#include "defines.h"
#include "structs.h"
class MemoryBlock;
/* Structure to manage if while for ... */
extern int skip_pos; /* Current position in skip_vals array */
extern int skip_vals_top; /* Number of allocated entries for skip_vals. */
extern SKIP_STRUCTURE *skip_vals;
/* -------------------------------------------------------- */
/* GLOBPAR: Globals variables used during Parser execution */
/* -------------------------------------------------------- */
extern short gl_compiler_mode; /* 0 if compile for interpreter / 1 for */
/* real compiler (generate executable) */
extern long gl_label_number; /* current label number for the compiler */
extern short pa_in_sub; /* TRUE if parsing code between "sub" and "end sub"
used to detect local variables */
extern long *pa_dim_size_ptr; /* pointer to size of local variables segment */
extern long pa_last_sub_memory; /* number of bytes reserved at start of sub */
extern int pa_current_formnum; /* number of form which is currently parsed */
extern VAR_DESC *pa_start_sub_desc; /* Start of subroutine description for last sub */
extern VAR_DESC *pa_end_sub_desc; /* End of subroutine description */
extern short parser_in_sub; // TRUE if parsing code between "sub" and "end sub"
extern MemoryBlock *gmb_parser_memory; /* Memory used to store psrser structures */
extern short pa_next_typenum; /* next unique id for type descriptions. */
/* parse execution */
extern char *write_precode_ptr;
extern VAR_DESC *pa_formlocal_var; /* end of local variables when parsing SUB */
extern VAR_DESC *pa_localvar_ptr; /* store end of local varlist temporarly */
/* Start of global list of class descriptions. */
extern CLASS_DESC *gl_first_class_desc;
/* Global list of inherited class descriptions. */
/* used only when parsing the class names. */
extern CLASS_DESC *gl_inherited_class_desc;
extern char last_sign;
extern int preread;
extern unsigned char readbuff[READ_BUFFER_LENGTH];
/* Pointer to last parsed class var. */
extern VAR_DESC *pa_last_class_var;
extern FORM_DESC *pa_first_form_header; /* pointer to first form header in list */
extern SUB_DESC *pa_last_sub_header; /* pointer to sub header for current form */
//extern SUB_DESC *pa_first_sub_header; /* pointer to sub form header in list */
extern SUB_DESC *pa_current_sub_header; /* pointer to current subroutine header */
extern CONST_DESC *pa_last_const_header; /* pointer to last constant in list */
extern CONST_DESC *pa_first_const_header; /* pointer to current constant header */
extern TYPE_DESC *pa_last_type_header; /* pointer to last type definition in list */
extern TYPE_DESC *pa_first_type_header; /* pointer to first type definition header */
extern CLASS_EVENT *pa_last_event_desc; /* pointer to last event definition */
extern char *pa_runtime_errcode; /* Code to show runtime errors. */
extern HB_INT_TYPE intnumber; // 4 byte integer
extern HB_LONG_TYPE longnumber; // 8 byte integer
extern HB_FLOAT_TYPE floatnumber; // 4 byte float
extern HB_DOUBLE_TYPE doublenumber; // 8 byte float
extern HB_LDBL_TYPE longdoublenumber; // 16 byte float
extern int tok_prefetch; /* prefetch of token */
extern int last_token;
extern int std_idf_number; /* number of standard identifier */
/* Parse variables, forms and subdefs */
extern VAR_DESC *pa_last_global_desc; /* pointer to last global variable description */
extern VAR_DESC *pa_last_flocal_desc; /* pointer to last formlocal variable description */
extern VAR_DESC *pa_last_slocal_desc; /* pointer to last sublocal variable description */
extern VAR_DESC *pa_last_plocal_desc; /* pointer to last sublocal parameter description */
extern VAR_DESC *pa_current_parlist; /* pointer to first parameter description */
extern VAR_DESC *pa_end_var_desc; /* pointer to end of global variable descriptions */
extern long pa_global_var_offset; /* runtime offset for next global variable */
extern VAR_DESC *pa_first_global_desc; /* first global variable description */
extern VAR_DESC *pa_first_flocal_desc; /* first formlocal variable description */
extern VAR_DESC *pa_first_slocal_desc; /* first sublocal variable description */
extern FORM_DESC *pa_current_form_header; /* pointer to form header for current form */
extern EVT_SIGNAL_DESC *gl_first_signal_desc; /* Start of global signal list. */
/* Header of class that will currently be parsed. */
extern CLASS_DESC *gl_current_class_header;
/* Property description for property if currently parsed. */
extern CLASS_PROPERTY *gl_current_property;
/* Last parsed property description. Used in parser. */
extern CLASS_PROPERTY *gl_last_property_parsed;
extern short gl_current_property_part; //0 = none 1 = get 2 = set
/* GLobal variables used for code completion in the source code editor. */
/* control if preparse should abort on errors. */
extern int gl_abort_on_error;
extern int gl_preparse_error_occured;
/* ------------------------------------------------------------ */
void inc_skip_pos( void );
void dec_skip_pos( void );
short alloc_parser_once( void );
extern "C"
{
void mem_init_temp( void );
long *mem_alloc_temp_memory( long length );
}
Generated by: root on linux on Sun Jul 13 18:06:35 2003, using kdoc 2.0a54. |