4 /* This file contains some routines needed in "pars.g" to handle the action-
5 * grammarrule. The assembler-instructions are handeld in blocks rather than
6 * one at a time. So these routines provide saving and removing of assembler-
10 char **as_instructions; /* The buffer(?) where the instructions are saved */
12 int quantum = 0, /* Max. nr. of instructions in as_instructions[] */
13 nr_instr, /* Number of saved instructions */
14 first_action, /* Is this block of assembler-instr. the first after
17 last_action; /* Is this block followed by a '.' ? */
26 as_instructions = (char **)Malloc( quantum*sizeof( char *));
34 /* Save a copy of 'instr'
37 if ( nr_instr == quantum) {
39 as_instructions = (char **) Realloc( (char *) as_instructions,
40 quantum*sizeof( char *));
43 as_instructions[nr_instr++] = Salloc( instr, strlen( instr) + 1);
51 block_assemble( as_instructions, nr_instr,
52 first_action, last_action);
54 for ( i=0; i<nr_instr; i++)
55 free( as_instructions[i]);