Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 630 lines (459 sloc) 18.172 kB
cf201ea Initial revision
andyv authored
1 /* Build executable statement trees
5dafbb7 Update copyright date (Steven)
andyv authored
2 Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
cf201ea Initial revision
andyv authored
3 Contributed by Andy Vaught
4
4c6fcac 7/28
andyv authored
5 This file is part of G95.
cf201ea Initial revision
andyv authored
6
4c6fcac 7/28
andyv authored
7 G95 is free software; you can redistribute it and/or modify
cf201ea Initial revision
andyv authored
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11
4c6fcac 7/28
andyv authored
12 G95 is distributed in the hope that it will be useful,
cf201ea Initial revision
andyv authored
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
4c6fcac 7/28
andyv authored
18 along with G95; see the file COPYING. If not, write to
cf201ea Initial revision
andyv authored
19 the Free Software Foundation, 59 Temple Place - Suite 330,
ce769c2 3/17
andyv authored
20 Boston, MA 02111-1307, USA. */
21
cf201ea Initial revision
andyv authored
22 /* st.c-- Executable statements are strung together into a singly
23 * linked list of code structures. These structures are later
24 * translated into GBE tree structures and from there to executable
ce769c2 3/17
andyv authored
25 * code for a target. */
26
cf201ea Initial revision
andyv authored
27 #include "g95.h"
28 #include <string.h>
ce769c2 3/17
andyv authored
29
30 g95_code new_st;
f3646c8 12/17/03
andyv authored
31
32
ce769c2 3/17
andyv authored
33
34
f3646c8 12/17/03
andyv authored
35 /* g95_add_statement()-- Takes the current new_st code structure and
36 * adds it to the current program unit. As a side-effect, it zeroes
ce769c2 3/17
andyv authored
37 * the new_st. */
38
39 g95_code *g95_add_statement(void) {
40 g95_code *l;
41
42 l = g95_get_code();
43 *l = new_st;
f3646c8 12/17/03
andyv authored
44
ce769c2 3/17
andyv authored
45 l->where = g95_current_locus;
46
47 if (g95_state_stack->head == NULL) g95_state_stack->head = l;
48 *g95_state_stack->next = l;
f3646c8 12/17/03
andyv authored
49
ce769c2 3/17
andyv authored
50 while(l->next != NULL)
51 l = l->next;
52
53 g95_state_stack->next = &l->next;
54
55 g95_clear_new_st();
f3646c8 12/17/03
andyv authored
56
ce769c2 3/17
andyv authored
57 return l;
58 }
59
60
61
62
63 /* g95_clear_new_st()-- Zeroes out the new_st structure. */
64
65 void g95_clear_new_st(void) {
66
67 memset(&new_st, '\0', sizeof(new_st));
68 new_st.type = EXEC_NOP;
69 }
70
71
72
73
74 /* g95_get_code()-- Get a g95_code structure */
75
76 g95_code *g95_get_code(void) {
77 g95_code *h;
78
79 h = g95_getmem(sizeof(g95_code));
80 h->where = g95_current_locus;
81 return h;
82 }
83
84
85
86
87 /* g95_append_code()-- Given some part of a g95_code structure, append
88 * a set of code to its tail, returning a pointer to the new tail. */
f3646c8 12/17/03
andyv authored
89
ce769c2 3/17
andyv authored
90 g95_code *g95_append_code(g95_code *t, g95_code *new) {
91
92 if (t != NULL) {
93 while(t->next != NULL)
94 t = t->next;
95
96 t->next = new;
97 }
98
99 while(new->next != NULL)
100 new = new->next;
101
102 return new;
103 }
104
105
f3646c8 12/17/03
andyv authored
106
107
def2a66 `8/9
andyv authored
108 /* free_statement()-- Free a single code structure, but not the actual
ce769c2 3/17
andyv authored
109 * structure itself. */
110
111 static void free_statement(g95_code *b) {
4c6fcac 7/28
andyv authored
112
ce769c2 3/17
andyv authored
113 if (b->expr) g95_free_expr(b->expr);
114 if (b->expr2) g95_free_expr(b->expr2);
115
116 switch(b->type) {
117 case EXEC_NOP: case EXEC_ASSIGN: case EXEC_GOTO: case EXEC_CYCLE:
118 case EXEC_RETURN: case EXEC_STOP: case EXEC_EXIT: case EXEC_PAUSE:
119 case EXEC_WHERE: case EXEC_IOLENGTH: case EXEC_CONTINUE: case EXEC_ENTRY:
120 case EXEC_DO_WHILE: case EXEC_ARITHMETIC_IF: case EXEC_POINTER_ASSIGN:
121 case EXEC_TRANSFER:
122 break;
123
124 case EXEC_CALL:
125 g95_free_actual_arglist(b->ext.actual);
126 break;
127
128 case EXEC_SELECT:
129 if (b->ext.case_list) g95_free_case_list(b->ext.case_list);
130 break;
131
132 case EXEC_DO:
133 g95_free_iterator(b->ext.iterator, 1);
134 break;
135
136 case EXEC_ALLOCATE:
137 case EXEC_DEALLOCATE:
138 g95_free_alloc_list(b->ext.alloc_list);
f3646c8 12/17/03
andyv authored
139 break;
140
ce769c2 3/17
andyv authored
141 case EXEC_OPEN:
142 g95_free_open(b->ext.open);
143 break;
144
145 case EXEC_CLOSE:
146 g95_free_close(b->ext.close);
147 break;
148
149 case EXEC_BACKSPACE:
150 case EXEC_ENDFILE:
151 case EXEC_REWIND:
152 g95_free_filepos(b->ext.filepos);
153 break;
154
155 case EXEC_IF:
156 g95_free_statements(b->ext.block);
def2a66 `8/9
andyv authored
157 break;
4c6fcac 7/28
andyv authored
158
ce769c2 3/17
andyv authored
159 case EXEC_INQUIRE:
160 g95_free_inquire(b->ext.inquire);
f3646c8 12/17/03
andyv authored
161 break;
162
ce769c2 3/17
andyv authored
163 case EXEC_READ:
164 case EXEC_WRITE:
165 g95_free_dt(b->ext.dt);
def2a66 `8/9
andyv authored
166 break;
167
ce769c2 3/17
andyv authored
168 case EXEC_DT_END:
169 /* The ext.dt member is a duplicate pointer and doesn't need to be freed */
170 break;
171
172 case EXEC_FORALL:
173 g95_free_forall_iterator(b->ext.forall_iterator);
174 break;
175
176 default:
177 g95_internal_error("free_statement(): Bad statement");
178 }
179 }
180
181
def2a66 `8/9
andyv authored
182
183
ce769c2 3/17
andyv authored
184 /* g95_free_statements()-- Free a code statement and all other code
185 * structures linked to it. */
186
187 void g95_free_statements(g95_code *u) {
188 g95_code *k;
189
190 for(; u; u=k) {
191 k = u->next;
192
193 if (u->block) g95_free_statements(u->block);
194 free_statement(u);
195 g95_free(u);
196 }
f3646c8 12/17/03
andyv authored
197 }
198
199
200
201
202 /* code_indent()-- Do indentation for a specific level */
def2a66 `8/9
andyv authored
203
ce769c2 3/17
andyv authored
204 static void code_indent(int l, g95_st_label *labl) {
205 int q;
206
207 if (labl != NULL)
208 g95_status("%-6d ", labl->value);
209 else
210 g95_status(" ");
211
212 for(q=0; q<2*l; q++)
213 g95_status_char(' ');
214 }
215
216
217
f3646c8 12/17/03
andyv authored
218
def2a66 `8/9
andyv authored
219 /* g95_show_code_node()-- Show a single code node and everything
ce769c2 3/17
andyv authored
220 * underneath it if necessary. */
221
222 static void g95_show_code_node(int lev, g95_code *g) {
223 g95_forall_iterator *fa;
224 char *m, *name0;
225 g95_open *open;
226 g95_case *cp;
227 g95_alloc *w;
228 g95_code *t;
229 g95_close *close;
230 g95_filepos *fp2;
231 g95_inquire *h;
232 g95_dt *dt;
233
234 code_indent(lev, g->here);
235
236 switch(g->type) {
237 case EXEC_NOP:
238 g95_status("NOP");
239 break;
f3646c8 12/17/03
andyv authored
240
ce769c2 3/17
andyv authored
241 case EXEC_CONTINUE:
242 g95_status("CONTINUE");
243 break;
def2a66 `8/9
andyv authored
244
ce769c2 3/17
andyv authored
245 case EXEC_ASSIGN:
246 g95_status("ASSIGN ");
247 g95_show_expr(g->expr);
248 g95_status_char(' ');
249 g95_show_expr(g->expr2);
f3646c8 12/17/03
andyv authored
250 break;
251
ce769c2 3/17
andyv authored
252 case EXEC_POINTER_ASSIGN:
253 g95_status("POINTER ASSIGN ");
f3646c8 12/17/03
andyv authored
254 g95_show_expr(g->expr);
ce769c2 3/17
andyv authored
255 g95_status_char(' ');
256 g95_show_expr(g->expr2);
257 break;
258
259 case EXEC_GOTO:
260 g95_status("GOTO %d", g->label->value);
f3646c8 12/17/03
andyv authored
261 break;
262
263 case EXEC_CALL:
ce769c2 3/17
andyv authored
264 if (g->sym == NULL)
265 m = name0 = "";
266 else {
267 m = g->sym->module;
268 name0 = g->sym->name;
269 }
f3646c8 12/17/03
andyv authored
270
ce769c2 3/17
andyv authored
271 g95_status("CALL (%s:%s) %s ", m, name0, g->sub_name);
272 g95_show_actual_arglist(g->ext.actual);
273 break;
274
275 case EXEC_RETURN:
276 g95_status("RETURN ");
277 if (g->expr) g95_show_expr(g->expr);
4c6fcac 7/28
andyv authored
278 break;
279
ce769c2 3/17
andyv authored
280 case EXEC_STOP:
281 g95_status("STOP ");
282
283 if (g->expr != NULL)
284 g95_show_expr(g->expr);
285 else
286 g95_status("%d", g->ext.stop_code);
287
288 break;
289
290 case EXEC_PAUSE:
291 g95_status("PAUSE ");
f3646c8 12/17/03
andyv authored
292 if (g->expr != NULL) g95_show_expr(g->expr);
ce769c2 3/17
andyv authored
293 break;
294
295 case EXEC_ARITHMETIC_IF:
296 g95_status("IF ");
297 g95_show_expr(g->expr);
298 g95_status(" %d, %d, %d",
299 g->label->value, g->label2->value, g->label3->value);
f3646c8 12/17/03
andyv authored
300 break;
301
ce769c2 3/17
andyv authored
302 case EXEC_IF:
303 g95_status("IF ");
304 g95_show_expr(g->expr);
305 g95_status_char('\n');
306 g95_show_code(lev+1, g->block);
307
308 if (g->ext.block != NULL) {
309 code_indent(lev, 0);
310 g95_status("ELSE\n");
311 g95_show_code(lev+1, g->ext.block);
312 }
313
314 code_indent(lev, g->label);
315 g95_status("ENDIF");
316 break;
317
318 case EXEC_SELECT:
319 t = g->block;
320 g95_status("SELECT CASE ");
f3646c8 12/17/03
andyv authored
321 g95_show_expr((g->expr != NULL) ? g->expr : g->expr2);
ce769c2 3/17
andyv authored
322 g95_status_char('\n');
f3646c8 12/17/03
andyv authored
323
ce769c2 3/17
andyv authored
324 for(;t ;t=t->block) {
325 code_indent(lev, 0);
326
327 g95_status("CASE ");
328 for(cp=t->ext.case_list; cp; cp=cp->next) {
329 g95_status_char('(');
f3646c8 12/17/03
andyv authored
330 g95_show_expr(cp->low);
331 g95_status_char(' ');
ce769c2 3/17
andyv authored
332 g95_show_expr(cp->high);
333 g95_status_char(')');
334 g95_status_char(' ');
335 }
336 g95_status_char('\n');
337
338 g95_show_code(lev+1, t->next);
339 }
340
341 code_indent(lev, g->label);
342 g95_status("END SELECT");
343 break;
f3646c8 12/17/03
andyv authored
344
345 case EXEC_WHERE:
ce769c2 3/17
andyv authored
346 g95_status("WHERE ");
347
348 t = g->block;
349 g95_show_expr(t->expr);
350 g95_status_char('\n');
351
352 g95_show_code(lev+1, t->next);
def2a66 `8/9
andyv authored
353
ce769c2 3/17
andyv authored
354 for(t=t->block; t; t=t->block) {
355 code_indent(lev, 0);
356 g95_status("ELSE WHERE ");
357 g95_show_expr(t->expr);
358 g95_status_char('\n');
359 g95_show_code(lev+1, t->next);
360 }
361
362 code_indent(lev, 0);
363 g95_status("END WHERE");
364 break;
365
4c6fcac 7/28
andyv authored
366
ce769c2 3/17
andyv authored
367 case EXEC_FORALL:
368 g95_status("FORALL ");
369 for(fa=g->ext.forall_iterator; fa; fa=fa->next) {
370 g95_show_expr(fa->var);
371 g95_status_char(' ');
372 g95_show_expr(fa->start);
373 g95_status_char(':');
374 g95_show_expr(fa->end);
375 g95_status_char(':');
376 g95_show_expr(fa->stride);
4c6fcac 7/28
andyv authored
377
ce769c2 3/17
andyv authored
378 if (fa->next != NULL) g95_status_char(',');
379 }
380
381 if (g->expr != NULL) {
382 g95_status_char(',');
383 g95_show_expr(g->expr);
384 }
385 g95_status_char('\n');
386
387 g95_show_code(lev+1, g->block);
4c6fcac 7/28
andyv authored
388
ce769c2 3/17
andyv authored
389 code_indent(lev, 0);
f3646c8 12/17/03
andyv authored
390 g95_status("END FORALL");
ce769c2 3/17
andyv authored
391 break;
392
393 case EXEC_DO:
394 g95_status("DO ");
395
f3646c8 12/17/03
andyv authored
396 g95_show_expr(g->ext.iterator->var);
ce769c2 3/17
andyv authored
397 g95_status_char('=');
398 g95_show_expr(g->ext.iterator->start);
399 g95_status_char(' ');
400 g95_show_expr(g->ext.iterator->end);
f3646c8 12/17/03
andyv authored
401 g95_status_char(' ');
ce769c2 3/17
andyv authored
402 g95_show_expr(g->ext.iterator->step);
403 g95_status_char('\n');
404
405 g95_show_code(lev+1, g->block);
406
407 code_indent(lev, 0);
408 g95_status("END DO");
409 break;
410
411 case EXEC_DO_WHILE:
412 g95_status("DO WHILE ");
f3646c8 12/17/03
andyv authored
413 g95_show_expr(g->expr);
def2a66 `8/9
andyv authored
414 g95_status_char('\n');
415
ce769c2 3/17
andyv authored
416 g95_show_code(lev+1, g->block);
417
418 code_indent(lev, g->label);
419 g95_status("END DO");
def2a66 `8/9
andyv authored
420 break;
421
ce769c2 3/17
andyv authored
422 case EXEC_CYCLE:
423 g95_status("CYCLE");
424 if (g->sym) g95_status(" %s", g->sym->name);
425 break;
426
427 case EXEC_EXIT:
428 g95_status("EXIT");
429 if (g->sym) g95_status(" %s", g->sym->name);
430 break;
431
432 case EXEC_ALLOCATE:
433 g95_status("ALLOCATE ");
434 if (g->expr) {
435 g95_status(" STAT=");
f3646c8 12/17/03
andyv authored
436 g95_show_expr(g->expr);
ce769c2 3/17
andyv authored
437 }
438
439 for(w=g->ext.alloc_list; w; w=w->next) {
f3646c8 12/17/03
andyv authored
440 g95_status_char(' ');
ce769c2 3/17
andyv authored
441 g95_show_expr(w->expr);
442 }
443
444 break;
445
446 case EXEC_DEALLOCATE:
447 g95_status("DEALLOCATE ");
448 if (g->expr) {
449 g95_status(" STAT=");
450 g95_show_expr(g->expr);
451 }
f3646c8 12/17/03
andyv authored
452
ce769c2 3/17
andyv authored
453 for(w=g->ext.alloc_list; w; w=w->next) {
454 g95_status_char(' ');
455 g95_show_expr(w->expr);
4c6fcac 7/28
andyv authored
456 }
457
ce769c2 3/17
andyv authored
458 break;
f3646c8 12/17/03
andyv authored
459
ce769c2 3/17
andyv authored
460 case EXEC_OPEN:
461 g95_status("OPEN");
462 open = g->ext.open;
4c6fcac 7/28
andyv authored
463
ce769c2 3/17
andyv authored
464 if (open->unit) { g95_status(" UNIT="); g95_show_expr(open->unit); }
465 if (open->iostat) { g95_status(" IOSTAT="); g95_show_expr(open->iostat); }
466 if (open->file) { g95_status(" FILE="); g95_show_expr(open->file); }
467 if (open->status) { g95_status(" STATUS="); g95_show_expr(open->status); }
468 if (open->access) { g95_status(" ACCESS="); g95_show_expr(open->access); }
469 if (open->form) { g95_status(" FORM="); g95_show_expr(open->form); }
470 if (open->recl) { g95_status(" RECL="); g95_show_expr(open->recl); }
471 if (open->blank) { g95_status(" BLANK="); g95_show_expr(open->blank); }
472 if (open->position) {
473 g95_status(" POSITION="); g95_show_expr(open->position); }
474 if (open->action) { g95_status(" ACTION="); g95_show_expr(open->action); }
475 if (open->delim) { g95_status(" DELIM="); g95_show_expr(open->delim); }
476 if (open->pad) { g95_status(" PAD="); g95_show_expr(open->pad); }
477 if (open->err != NULL) g95_status(" ERR=%d", open->err->value);
478
479 break;
480
481 case EXEC_CLOSE:
482 g95_status("CLOSE");
483 close = g->ext.close;
def2a66 `8/9
andyv authored
484
ce769c2 3/17
andyv authored
485 if (close->unit) { g95_status(" UNIT="); g95_show_expr(close->unit); }
486 if (close->iostat) { g95_status(" IOSTAT="); g95_show_expr(close->iostat);}
487 if (close->status) { g95_status(" STATUS=");g95_show_expr(close->status); }
488 if (close->err != NULL) g95_status(" ERR=%d", close->err->value);
489 break;
490
491 case EXEC_BACKSPACE:
492 g95_status("BACKSPACE");
493 goto show_filepos;
494
495 case EXEC_ENDFILE:
496 g95_status("ENDFILE");
f3646c8 12/17/03
andyv authored
497 goto show_filepos;
498
ce769c2 3/17
andyv authored
499 case EXEC_REWIND:
500 g95_status("REWIND");
f3646c8 12/17/03
andyv authored
501
ce769c2 3/17
andyv authored
502 show_filepos:
503 fp2 = g->ext.filepos;
504
505 if (fp2->unit) { g95_status(" UNIT="); g95_show_expr(fp2->unit); }
506 if (fp2->iostat) { g95_status(" IOSTAT="); g95_show_expr(fp2->iostat); }
507 if (fp2->err != NULL) g95_status(" ERR=%d", fp2->err->value);
f3646c8 12/17/03
andyv authored
508 break;
4c6fcac 7/28
andyv authored
509
ce769c2 3/17
andyv authored
510 case EXEC_INQUIRE:
511 g95_status("INQUIRE");
512 h = g->ext.inquire;
4c6fcac 7/28
andyv authored
513
ce769c2 3/17
andyv authored
514 if (h->unit) { g95_status(" UNIT="); g95_show_expr(h->unit); }
515 if (h->file) { g95_status(" FILE="); g95_show_expr(h->file); }
516
517 if (h->iostat) { g95_status(" IOSTAT="); g95_show_expr(h->iostat); }
518 if (h->exist) { g95_status(" EXIST="); g95_show_expr(h->exist); }
519 if (h->opened) { g95_status(" OPENED="); g95_show_expr(h->opened); }
520 if (h->number) { g95_status(" NUMBER="); g95_show_expr(h->number); }
521 if (h->named) { g95_status(" NAMED="); g95_show_expr(h->named); }
522 if (h->name) { g95_status(" NAME="); g95_show_expr(h->name); }
523 if (h->access) { g95_status(" ACCESS="); g95_show_expr(h->access); }
524 if (h->sequential) { g95_status(" SEQUENTIAL=");
525 g95_show_expr(h->sequential); }
f3646c8 12/17/03
andyv authored
526
ce769c2 3/17
andyv authored
527 if (h->direct) { g95_status(" DIRECT="); g95_show_expr(h->direct); }
528 if (h->form) { g95_status(" FORM="); g95_show_expr(h->form); }
529 if (h->formatted) { g95_status(" FORMATTED"); g95_show_expr(h->formatted);}
530 if (h->unformatted) { g95_status(" UNFORMATTED=");
531 g95_show_expr(h->unformatted); }
532 if (h->recl) { g95_status(" RECL="); g95_show_expr(h->recl); }
533 if (h->nextrec) { g95_status(" NEXTREC="); g95_show_expr(h->nextrec); }
534 if (h->blank) { g95_status(" BLANK="); g95_show_expr(h->blank); }
535 if (h->position) { g95_status(" POSITION="); g95_show_expr(h->position); }
536 if (h->action) { g95_status(" ACTION="); g95_show_expr(h->action); }
537 if (h->read) { g95_status(" READ="); g95_show_expr(h->read); }
538 if (h->write) { g95_status(" WRITE="); g95_show_expr(h->write); }
539 if (h->readwrite) {g95_status(" READWRITE="); g95_show_expr(h->readwrite);}
540 if (h->delim) { g95_status(" DELIM="); g95_show_expr(h->delim); }
541 if (h->pad) { g95_status(" PAD="); g95_show_expr(h->pad); }
542
543 if (h->err != NULL) g95_status(" ERR=%d", h->err->value);
544 break;
545
546 case EXEC_IOLENGTH:
547 g95_status("IOLENGTH ");
f3646c8 12/17/03
andyv authored
548 g95_show_expr(g->expr);
ce769c2 3/17
andyv authored
549 break;
550
551 case EXEC_READ:
552 g95_status("READ");
553 goto show_dt;
554
555 case EXEC_WRITE:
556 g95_status("WRITE");
557
558 show_dt:
559 dt = g->ext.dt;
560 if (dt->io_unit) {
561 g95_status(" UNIT="); g95_show_expr(dt->io_unit); }
562
563 if (dt->format_expr) {
564 g95_status(" FMT="); g95_show_expr(dt->format_expr); }
565
566 if (dt->format_label != NULL)
567 g95_status(" FMT=%d", dt->format_label->value);
568 if (dt->namelist) g95_status(" NML=%s", dt->namelist->name);
569 if (dt->iostat) { g95_status(" IOSTAT="); g95_show_expr(dt->iostat); }
570 if (dt->size) { g95_status(" SIZE="); g95_show_expr(dt->size); }
571 if (dt->rec) { g95_status(" REC="); g95_show_expr(dt->rec); }
572 if (dt->advance) { g95_status(" ADVANCE="); g95_show_expr(dt->advance); }
573
574 break;
575
576 case EXEC_TRANSFER:
577 g95_status("TRANSFER ");
578 g95_show_expr(g->expr);
f3646c8 12/17/03
andyv authored
579 break;
580
ce769c2 3/17
andyv authored
581 case EXEC_DT_END:
582 g95_status("DT_END");
583
584 dt = g->ext.dt;
585 if (dt != NULL) {
586 if (dt->err != NULL) g95_status(" ERR=%d", dt->err->value);
587 if (dt->end != NULL) g95_status(" END=%d", dt->end->value);
588 if (dt->eor != NULL) g95_status(" EOR=%d", dt->eor->value);
589 }
590
591 break;
592
593 case EXEC_ENTRY:
594 g95_status("ENTRY %s ", g->sym->name);
595 break;
596
597 default:
598 g95_internal_error("g95_show_code_node(): Bad statement code");
f3646c8 12/17/03
andyv authored
599 }
600
ce769c2 3/17
andyv authored
601 g95_status_char('\n');
602 }
603
604
f3646c8 12/17/03
andyv authored
605
606
ce769c2 3/17
andyv authored
607 /* g95_undo_statement()-- Frees everything associated with the current
608 * statement. */
f3646c8 12/17/03
andyv authored
609
ce769c2 3/17
andyv authored
610 void g95_undo_statement(void) {
611
612 g95_free_statements(new_st.block);
613 g95_free_statements(new_st.next);
f3646c8 12/17/03
andyv authored
614
ce769c2 3/17
andyv authored
615 free_statement(&new_st);
616 g95_clear_new_st();
617 }
def2a66 `8/9
andyv authored
618
619
f3646c8 12/17/03
andyv authored
620
ce769c2 3/17
andyv authored
621
622 /* g95_show_code()-- Show a list of code structures. */
623
624 void g95_show_code(int lvl, g95_code *c) {
625
626 for(;c ; c=c->next)
627 g95_show_code_node(lvl, c);
628 }
f3646c8 12/17/03
andyv authored
629
Something went wrong with that request. Please try again.