Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:02:03

0001 #ifndef MAD_CMDIN_H
0002 #define MAD_CMDIN_H
0003 
0004 // types
0005 
0006 struct command;
0007 struct name_list;
0008 struct char_p_array;
0009 
0010 struct in_cmd          /* contains information about classified command */
0011 {
0012   char name[NAME_L];
0013   char* label;         /* pointer to label: if != NULL then buffer this */
0014   int type;            /*    0 command from list;
0015                              1 element definiton outside sequence;
0016                              2 variable definition;
0017                              3 start or end of sequence;
0018                              4 element definition; */
0019   int sub_type;        /* position in cmd_match_base */
0020   int stamp;
0021   int decl_start;      /* start of declarative part in tok_list */
0022   int clone_flag;      /* if zero, clone can be dropped after decoding */
0023   struct char_p_array* tok_list; /* contains pointers to tokens */
0024   struct command* cmd_def;       /* points to command definition */
0025   struct command* clone;         /* points to clone of command definition */
0026 };
0027 
0028 struct in_cmd_list /* contains list of in_cmd pointers sorted by label */
0029 {
0030   int stamp;
0031   char name[NAME_L];
0032   int  max,                     /* max. pointer array size */
0033        curr;                    /* current occupation */
0034   struct name_list* labels;     /* index list of labels */
0035   struct in_cmd** in_cmds;      /* in_cmd pointer list */
0036 };
0037 
0038 // interface
0039 
0040 struct in_cmd* new_in_cmd(int length);            // many uses
0041 struct in_cmd* delete_in_cmd(struct in_cmd*);     // many uses
0042 struct in_cmd* buffered_cmd (struct in_cmd*);     // used by mad_cmd.c
0043 struct in_cmd* buffer_in_cmd(struct in_cmd*);     // used by mad_eval.c
0044 
0045 struct in_cmd_list* new_in_cmd_list(int length);  // used by mad_core.c
0046 void                grow_in_cmd_list(struct in_cmd_list*);
0047 // missing delete?
0048 
0049 void  scan_in_cmd (struct in_cmd*);
0050 void  dump_in_cmd (struct in_cmd*); // for debugging
0051 
0052 #endif // MAD_CMDIN_H