PIPS
html_prettyprinter.c
Go to the documentation of this file.
1 /*
2 
3  $Id: html_prettyprinter.c 22686 2015-07-21 07:31:15Z coelho $
4 
5  Copyright 1989-2009 MINES ParisTech
6 
7  This file is part of PIPS.
8 
9  PIPS is free software: you can redistribute it and/or modify it
10  under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  any later version.
13 
14  PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
15  WARRANTY; without even the implied warranty of MERCHANTABILITY or
16  FITNESS FOR A PARTICULAR PURPOSE.
17 
18  See the GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with PIPS. If not, see <http://www.gnu.org/licenses/>.
22 
23  */
24 #ifdef HAVE_CONFIG_H
25 #include "pips_config.h"
26 #endif
27 /*
28 
29  Try to prettyprint the RI in C.
30  Very basic at the time.
31  Functionnal.
32  All arguments are assumed newly allocated.
33  It might be really slow, but it should be safe.
34  I should use some kind of string accumulator (array/list...)
35 
36  html_print_crough > MODULE.crough
37  < PROGRAM.entities
38  < MODULE.code
39 
40  html_print_c_code > MODULE.c_printed_file
41  < MODULE.crough
42  */
43 
44 #include <stdio.h>
45 #include <ctype.h>
46 
47 #include "genC.h"
48 #include "linear.h"
49 
50 #include "misc.h"
51 #include "pipsdbm.h"
52 #include "properties.h"
53 
54 #include "ri-util.h"
55 
56 #define NL "\n"
57 /**************************************************************** MISC UTILS */
58 
59 #define current_module_is_a_function() \
60 (entity_function_p(get_current_module_entity()))
61 
62 static void html_print_expression(expression e, bool cr);
63 static void html_print_range(range r);
64 static void html_print_statement(statement r);
65 static void html_print_type(type t);
66 static void html_print_value(value v);
67 
68 // Output
69 static FILE *out_fp = 0;
70 
71 // Define output
72 static void html_set_output(FILE *new_fp) {
73  out_fp = new_fp;
74 }
75 
76 /*
77  * Print to the defined output the format string and an optional string argument
78  */
79 #define html_print(format, args...) \
80 { \
81  pips_assert("Output is set",out_fp); \
82  fprintf(out_fp,format,##args); \
83 }
84 
85 
86 static void begin_block(const char *block, bool cr) {
87  if(cr) {
88  html_print("<li class=\"%s blocked\"><span>%s</span><ul class=\"inlined\">" NL,
89  block,
90  block);
91  } else {
92  html_print("<li class=\"%s inlined\"><span>%s</span><ul class=\"inlined\">" NL,
93  block,
94  block);
95  }
96 }
97 
98 static void end_block(const char *block, bool cr) {
99  if(cr) {
100  html_print("</ul></li><!-- %s -->" NL, block);
101  } else
102  html_print("</ul></li><!-- %s -->" NL, block);
103 }
104 
105 void html_output(const char *out, bool cr) {
106  if(cr) {
107  html_print("<li><span>%s</span></li>" NL, out);
108  } else {
109  html_print("<li class=\"inlined\"><span>%s</span></li>" NL, out);
110  }
111 }
112 
114  begin_block("entity", false);
115  html_output(entity_name( e ), false);
116  end_block("entity", false);
117 }
118 
119 static void html_print_ram(ram r) {
120  begin_block("ram", true);
121 
122  begin_block("Function", true);
124  end_block("Function", true);
125 
126  html_output(NL, false);
127 
128  begin_block("Section", true);
130  end_block("Section", true);
131 
132  string buf;
133  pips_assert("Asprintf !",
134  asprintf( &buf, "Offset : %d", (int) ram_offset( r ) ) > 0 );
135  html_output(buf, true);
136  free(buf);
137  FOREACH(entity, e, ram_shared( r ) ) {
139  }
140 
141  end_block("ram", true);
142 }
143 
144 static void html_print_formal(formal f) {
145  begin_block("formal", true);
146 
147  begin_block("Function", false);
149  end_block("Function", false);
150 
151  string buf;
152  pips_assert("Asprintf !",
153  asprintf( &buf, "Offset : %d", (int) formal_offset( f ) ) > 0);
154  html_output(buf, true);
155 
156  end_block("formal", true);
157 }
158 
159 static void html_print_rom(_UNUSED_ unit r) {
160  begin_block("rom", false);
161 
162  html_output("unit ? (not implemented)", false);
163 
164  end_block("rom", false);
165 }
166 
167 static void html_print_code(code c) {
168  begin_block("code", true);
169 
170  list l = code_declarations(c);
171  if(l) {
172  begin_block("declarations", true);
173  if(!ENDP(l)) {
174  FOREACH(entity, e, l )
175  {
176  begin_block("", true);
178  end_block("", true);
179  }
180  }
181  end_block("declarations", true);
182  }
183  end_block("code", true);
184 }
185 
186 static void html_print_storage(storage s) {
187  begin_block("storage", true);
188  if(storage_undefined_p(s)) {
189  html_output("undefined", false);
190  } else {
191  switch(storage_tag( s )) {
192  case is_storage_return:
193  html_output("Return", false);
195  break;
196  case is_storage_ram:
198  break;
199  case is_storage_formal:
201  break;
202  case is_storage_rom:
204  break;
205  default:
206  html_output("Unknown storage", true);
207  break;
208  }
209  }
210  end_block("storage", true);
211 }
212 
213 static void html_print_basic(basic b) {
214  begin_block("basic", false);
215  string buf;
216 
217  if(!b || b == basic_undefined) {
218  html_output("undefined", false);
219  } else {
220  switch(basic_tag( b )) {
221  case is_basic_int:
222  html_output("int", false);
223  pips_assert("Asprintf !", asprintf( &buf, "%d", (int)basic_int(b) ));
224  html_output(buf, false);
225  free(buf);
226  break;
227  case is_basic_float:
228  html_output("float", false);
229  pips_assert("Asprintf !", asprintf( &buf, "%f", (float)basic_int(b) ));
230  html_output(buf, false);
231  free(buf);
232  break;
233  case is_basic_logical:
234  html_output("logical", false);
235  pips_assert("Asprintf !", asprintf( &buf, "%d", (int)basic_int(b) ));
236  html_output(buf, false);
237  free(buf);
238  break;
239  case is_basic_overloaded:
240  html_output("overloaded", false);
241  html_output("unimplemented", false);
242  break;
243  case is_basic_complex:
244  html_output("complex", false);
245  html_output("unimplemented", false);
246  break;
247  case is_basic_string:
248  html_output("string", false);
250  break;
251  case is_basic_bit:
252  html_output("bit", false);
253  html_output("unimplemented", false);
254  break;
255  case is_basic_pointer:
256  html_output("pointer", false);
258  break;
259  case is_basic_derived:
260  html_output("derived", false);
262  break;
263  case is_basic_typedef:
264  html_output("typedef", false);
266  break;
267  default:
268  html_output("unknown", false);
269  break;
270  }
271  }
272  end_block("basic", false);
273 }
274 
275 static void html_print_area(area a) {
276  begin_block("area", false);
277 
278  string buf;
279  pips_assert("Asprintf !",
280  asprintf( &buf, "Size : %d", (int) area_size( a ) ) > 0);
281  html_output(buf, false);
282  free(buf);
283 
284  html_output("Layout", false);
285  FOREACH(entity, e, area_layout( a ) ) {
287  }
288 
289  end_block("area", false);
290 }
291 
293  begin_block("qualifier", false);
294 
295  switch(qualifier_tag( q )) {
296  case is_qualifier_const:
297  html_output("const", false);
298  break;
300  html_output("restrict", false);
301  break;
303  html_output("volatile", false);
304  break;
306  html_output("register", false);
307  break;
308  case is_qualifier_auto:
309  html_output("auto", false);
310  break;
311  default:
312  html_output("unknown", false);
313  break;
314  }
315 
316  end_block("qualifier", false);
317 }
318 
320  begin_block("dimension", true);
323  end_block("dimension", true);
324 }
325 
327  begin_block("variable", true);
328 
332  }
335  }
336 
337  end_block("variable", true);
338 }
339 
340 static void html_print_mode(mode m) {
341  begin_block("mode", false);
342 
343  switch(mode_tag( m )) {
344  case is_mode_value:
345  html_output("value", false);
346  break;
347  case is_mode_reference:
348  html_output("reference", false);
349  break;
350  default:
351  html_output("unknown", false);
352  break;
353  }
354 
355  end_block("mode", false);
356 }
357 
359  begin_block("parameter", true);
360 
363  html_output("Dummy : not implemented", true);
364 
365  end_block("parameter", true);
366 }
367 
369  begin_block("functional", true);
372  }
373 
374  begin_block("return", false);
376  end_block("return", false);
377 
378  end_block("functional", true);
379 }
380 
381 static void html_print_type(type t) {
382  begin_block("type", true);
383  if(t == type_undefined) {
384  html_output("*undefined*", true);
385  } else {
386  switch(type_tag( t )) {
387  case is_type_statement:
388  html_output("Statement (unit ?) ", true);
389  break;
390  case is_type_area:
392  break;
393  case is_type_variable:
395  break;
396  case is_type_functional:
398  break;
399  case is_type_varargs:
400  html_output("VarArgs", true);
402  break;
403  case is_type_unknown:
404  html_output("Unknown", true);
405  break;
406  case is_type_void:
407  html_output("Void", true);
408  break;
409  case is_type_struct:
410  begin_block("Struct", true);
411  FOREACH(entity, e, type_struct( t ) )
412  {
413  begin_block("field", true);
415  end_block("field", true);
416  }
417  end_block("Struct", true);
418  break;
419  case is_type_union:
420  html_output("Union", true);
421  FOREACH(entity, e, type_union( t ) )
422  {
424  }
425  break;
426  case is_type_enum:
427  html_output("Enum", true);
428  FOREACH(entity, e, type_enum( t ) )
429  {
431  }
432  break;
433  default:
434  break;
435  }
436  }
437  end_block("type", true);
438 }
439 
441  begin_block("constant", false);
442  if(!c || c == constant_undefined) {
443  html_output("undefined", false);
444  } else {
445  switch(constant_tag( c )) {
446  case is_constant_int: {
447  string buf;
448  pips_assert("Asprintf !",
449  asprintf( &buf, "int : %d", (int) constant_int( c ) ) > 0 );
450  html_output(buf, true);
451  free(buf);
452  break;
453  }
454  case is_constant_float: {
455  string buf;
456  pips_assert("Asprintf !",
457  asprintf( &buf, "float : %f", (float) constant_float( c ) ) > 0 );
458  html_output(buf, true);
459  free(buf);
460  break;
461  }
462  case is_constant_logical: {
463  string buf;
464  pips_assert("Asprintf !",
465  asprintf( &buf, "Logical : %d", (int) constant_logical( c ) ) > 0 );
466  html_output(buf, true);
467  free(buf);
468  break;
469  }
471  html_output("litteral", false);
472  break;
473  case is_constant_call:
475  break;
476  case is_constant_unknown:
477  begin_block("unknown", false);
478  break;
479  default:
480  html_output("error", false);
481  break;
482  }
483  }
484  end_block("constant", false);
485 }
486 
487 static void html_print_value(value v) {
488  begin_block("value", false);
489  if(!v || v == value_undefined) {
490  html_output("undefined", false);
491  } else {
492  switch(value_tag( v )) {
493  case is_value_code:
495  break;
496  case is_value_symbolic:
497  html_output("symbolic", false);
498  break;
499  case is_value_constant:
501  break;
502  case is_value_intrinsic:
503  html_output("intrinsic", false);
504  break;
505  case is_value_unknown:
506  html_output("unknown", false);
507  break;
508  case is_value_expression:
509  begin_block("expression", false);
511  end_block("expression", false);
512  break;
513  default:
514  html_output("error", false);
515  break;
516  }
517  }
518  end_block("value", false);
519 }
520 
522  begin_block("entity", true);
523  html_output(entity_name( e ), true);
527 
528  end_block("entity", true);
529 }
530 
531 static void html_print_call(call c) {
532  bool cr = false;
533  if(call_arguments( c )) {
534  cr = true;
535  }
536  begin_block("call", cr);
537 
538  begin_block("function", cr);
540  end_block("function", cr);
541 
542  if(call_arguments( c )) {
543  begin_block("arguments", cr);
544  FOREACH(expression, e, call_arguments( c ) ) {
545  html_print_expression(e, cr);
546  }
547  end_block("arguments", cr);
548  }
549  end_block("call", cr);
550 }
551 
553  begin_block("unstructured", false);
554  html_output("Not implemented", false);
555  end_block("unstructured", false);
556 }
557 
559  bool cr = false;
560  if(reference_indices( r )) {
561  cr = true;
562  }
563 
564  begin_block("reference", cr);
565  begin_block("variable", cr);
567  end_block("variable", cr);
568 
569  if(reference_indices( r )) {
570  begin_block("indices", cr);
572  html_print_expression(e, false);
573  }
574  end_block("indices", cr);
575  }
576 
577  end_block("reference", cr);
578 }
579 
581  begin_block("subscript", false);
582  begin_block("array", false);
584  end_block("array", false);
585  begin_block("indices", false);
587  html_print_expression(e, false);
588  }
589  end_block("indices", false);
590  end_block("subscript", false);
591 }
592 
593 static void html_print_expression(expression e, bool cr) {
594  begin_block("expression", cr);
595  begin_block("syntax", false);
596 
597  syntax s = expression_syntax(e);
598  switch(syntax_tag(s)) {
599  case is_syntax_call:
601  break;
602  case is_syntax_range:
604  break;
605  case is_syntax_reference:
607  break;
608  case is_syntax_subscript:
610  break;
611  case is_syntax_cast:
612  html_output("cast unimplemented", false);
613  break;
615  html_output("sizeofexpression unimplemented", false);
616  break;
618  html_output("sizeofexpression unimplemented", false);
619  break;
620  case is_syntax_va_arg:
621  html_output("va_arg unimplemented", false);
622  break;
623  default:
624  pips_internal_error("unexpected syntax tag");
625  }
626 
627  end_block("syntax", false);
628  end_block("expression", cr);
629 }
630 
631 static void html_print_range(range r) {
632  begin_block("range", true);
633  begin_block("lower", false);
634  html_print_expression(range_lower( r ), false);
635  end_block("lower", false);
636  begin_block("upper", true);
637  html_print_expression(range_upper( r ), false);
638  end_block("upper", true);
639  begin_block("increment", true);
641  end_block("increment", true);
642  end_block("range", true);
643 }
644 
645 static void html_print_loop(loop l) {
646  begin_block("loop", true);
647  /* partial implementation ??? */
648 
649  begin_block("index", false);
651  end_block("index", false);
652 
654 
655  begin_block("body", false);
657  end_block("body", false);
658 
659  end_block("loop", true);
660 }
661 
663  /* partial implementation... ?? */
664 
665  begin_block("whileloop", true);
666 
667  begin_block("condition", false);
669  end_block("condition", false);
670 
671  begin_block("statement", false);
673  end_block("statement", false);
674 
675  begin_block("evaluation", false);
677  /*do while and while do loops */
679  html_output("while() {}" NL, false);
680  else
681  html_output("do {} while(); " NL, false);
682  end_block("evaluation", false);
683 
684  begin_block("body", false);
686  end_block("body", false);
687 
688  end_block("whileloop", true);
689 }
690 
692  /* partial implementation... */
693 
694  begin_block("forloop", true);
695 
696  begin_block("initialization", true);
698  end_block("initialization", true);
699 
700  begin_block("condition", true);
702  end_block("condition", true);
703 
704  begin_block("increment", true);
706  end_block("increment", true);
707 
708  begin_block("body", false);
710  end_block("body", false);
711 
712  end_block("forloop", true);
713 }
714 
715 static void html_print_sequence(sequence seq) {
716  begin_block("sequence", true);
717  FOREACH( statement, s, sequence_statements( seq ) ) {
719  }
720  end_block("sequence", true);
721 }
722 
723 static void html_print_test(test t) {
724  begin_block("test", true);
725 
726  begin_block("cond", true);
728  end_block("cond", true);
729 
730  begin_block("strue", false);
732  end_block("strue", false);
733 
734  if(!empty_statement_p(test_false( t ))) {
735  begin_block("sfalse", false);
737  end_block("sfalse", false);
738  }
739 
740  end_block("test", true);
741 }
742 
744  begin_block("statement", true);
745 
747  begin_block("label", false);
749  end_block("label", false);
750  }
751 
753  if(!ENDP(l)) {
754  begin_block("declarations", true);
755  FOREACH( entity, e, l ) {
757  }
758  end_block("declarations", true);
759  }
760 
761  begin_block("instruction", true);
763  switch(instruction_tag(i)) {
764  case is_instruction_test:
766  break;
769  break;
770  case is_instruction_loop:
772  break;
775  break;
778  break;
779  case is_instruction_call:
781  break;
784  break;
787  break;
788  case is_instruction_goto:
789  /* statement g = instruction_goto(i);
790  entity el = statement_label(g);
791  string l = entity_local_name(el) + sizeof(LABEL_PREFIX) -1;
792  printf("%s", strdup( concatenate( "goto ", l, SEMICOLON, NULL ) ) );*/
793  break;
794  /* add switch, forloop break, continue, return instructions here*/
795  default:
796  html_output(" Instruction not implemented" NL, false);
797  break;
798  }
799  end_block("instruction", true);
800 
801  end_block("statement", true);
802 }
803 
804 
806 {
807  /* Print symbol table */
808  html_print(NL "<li><ul class=\"symbolTable\">" NL);
809  begin_block("Symbol table", true);
811  FOREACH(entity, e, entities ) {
813  }
814  html_print("<li class=\"endSymbolTable\">&nbsp;</li>" NL "</ul></li>" NL);
815  end_block("Symbol table", true);
816 }
817 
818 bool html_prettyprint(const string mod_name)
819 {
820 
822  mod_name,
823  true);
824 
826 
827  /* Set the current module entity required to have many things
828  working in PIPS: */
830 
831 
832  /* The debug is now controled by this environment variable name: */
833  debug_on("HTML_PRETTYPRINT_DEBUG_LEVEL");
834  pips_assert("Statement should be OK at entry...",
836 
837  // Prepare the output file
838  string html_file_name = db_build_file_resource_name( "RI", mod_name, ".ri.html" );
839  string output_file = strdup( concatenate( db_get_current_workspace_directory( ),
840  "/",
841  html_file_name,
842  NULL ) );
843  pips_debug(2,"Output in %s",output_file);
844  FILE *fp = safe_fopen( output_file, "w" );
845  html_set_output(fp);
846 
847  /* Print current module */
848  html_print(NL "<li><ul class=\"module\">" NL);
849  begin_block(mod_name, true);
851  end_block(mod_name, true);
852  html_print("<li class=\"endmodule\">&nbsp;</li>" NL "</ul></li>" NL);
853 
854 
855  if(get_bool_property("HTML_PRETTYPRINT_SYMBOL_TABLE")) {
857  }
858 
859  // Reset output file
860  html_set_output(0);
861  safe_fclose( fp, output_file );
862 
863 
864  DB_PUT_FILE_RESOURCE( DBR_HTML_IR_FILE, strdup( mod_name ), html_file_name );
865 
868 
869  return true;
870 }
871 
873 {
874  pips_debug(1, "working on %s", module);
875 
876  // Prepare the output file
877  string html_file_name =
878  db_build_file_resource_name( "Symbols", "", ".symbols.html" );
879  string output_file =
881  "/", html_file_name, NULL ) );
882  FILE *fp = safe_fopen( output_file, "w" );
883  html_set_output(fp);
884 
885  // Reset output file
886  html_set_output(0);
887  safe_fclose( fp, output_file );
888 
889  DB_PUT_FILE_RESOURCE( DBR_HTML_IR_FILE, "", html_file_name );
890 
891  return true;
892 }
bool statement_consistent_p(statement p)
Definition: ri.c:2195
static FILE * out
Definition: alias_check.c:128
static statement module_statement
Definition: alias_check.c:125
struct _newgen_struct_statement_ * statement
Definition: cloning.h:21
FILE * safe_fopen(const char *filename, const char *what)
Definition: file.c:67
int safe_fclose(FILE *stream, const char *filename)
Definition: file.c:77
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
void free(void *)
void reset_current_module_entity(void)
Reset the current module entity.
Definition: static.c:97
void reset_current_module_statement(void)
Reset the current module statement.
Definition: static.c:221
statement set_current_module_statement(statement)
Set the current module statement.
Definition: static.c:165
entity set_current_module_entity(entity)
static.c
Definition: static.c:66
bool gen_true(__attribute__((unused)) gen_chunk *unused)
Return true and ignore the argument.
Definition: genClib.c:2780
#define ENDP(l)
Test if a list is empty.
Definition: newgen_list.h:66
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
Definition: newgen_list.h:179
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
Definition: database.c:755
#define DB_PUT_FILE_RESOURCE
Put a file resource into the current workspace database.
Definition: pipsdbm-local.h:85
bool empty_statement_p(statement)
Test if a statement is empty.
Definition: statement.c:391
static Value eval(Pvecteur pv, Value val, Variable var)
static void html_print_whileloop(whileloop w)
static void html_print_call(call c)
static void html_print_qualifier(qualifier q)
void html_print_symbol_table(void)
static void html_print_area(area a)
bool html_prettyprint_symbol_table(const string module)
void html_print_entity_full(entity e)
static void html_print_constant(constant c)
static void html_print_unstructured(_UNUSED_ unstructured u)
static void html_print_entity_name(entity e)
static void html_print_forloop(forloop f)
#define NL
static void html_print_sequence(sequence seq)
static void html_print_subscript(subscript s)
static void end_block(const char *block, bool cr)
static void html_print_storage(storage s)
static void html_print_mode(mode m)
static void html_print_range(range r)
static void html_print_ram(ram r)
static void html_print_basic(basic b)
bool html_prettyprint(const string mod_name)
static void html_print_formal(formal f)
static void html_print_statement(statement r)
#define html_print(format, args...)
void html_output(const char *out, bool cr)
html_prettyprinter.c
static void begin_block(const char *block, bool cr)
static void html_print_variable(variable v)
static void html_print_expression(expression e, bool cr)
static void html_set_output(FILE *new_fp)
static FILE * out_fp
static void html_print_functional(functional f)
static void html_print_value(value v)
static void html_print_reference(reference r)
static void html_print_type(type t)
static void html_print_code(code c)
static void html_print_parameter(parameter p)
static void html_print_loop(loop l)
static void html_print_dimension(dimension d)
static void html_print_test(test t)
static void html_print_rom(_UNUSED_ unit r)
string db_build_file_resource_name(const char *rname, const char *oname, const char *suffix)
returns an allocated file name for a file resource.
Definition: lowlevel.c:169
#define debug_on(env)
Definition: misc-local.h:157
#define _UNUSED_
Definition: misc-local.h:232
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
Definition: misc-local.h:145
#define asprintf
Definition: misc-local.h:225
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
Definition: misc-local.h:172
#define pips_internal_error
Definition: misc-local.h:149
string concatenate(const char *,...)
Return the concatenation of the given strings.
Definition: string.c:183
list gen_filter_tabulated(bool(*)(gen_chunk *), int)
returns the list of entities with this caracteristics.
Definition: tabulated.c:144
int unit
UNIT.
Definition: newgen_types.h:97
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
Definition: offsets.c:15
static char * module
Definition: pips.c:74
string db_get_current_workspace_directory(void)
Definition: workspace.c:96
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
Definition: entity.c:1479
#define formal_offset(x)
Definition: ri.h:1408
#define value_tag(x)
Definition: ri.h:3064
#define value_undefined
Definition: ri.h:3016
#define loop_body(x)
Definition: ri.h:1644
@ is_basic_derived
Definition: ri.h:579
@ is_basic_string
Definition: ri.h:576
@ is_basic_float
Definition: ri.h:572
@ is_basic_bit
Definition: ri.h:577
@ is_basic_pointer
Definition: ri.h:578
@ is_basic_overloaded
Definition: ri.h:574
@ is_basic_int
Definition: ri.h:571
@ is_basic_logical
Definition: ri.h:573
@ is_basic_typedef
Definition: ri.h:580
@ is_basic_complex
Definition: ri.h:575
#define type_struct(x)
Definition: ri.h:2964
#define basic_pointer(x)
Definition: ri.h:637
#define qualifier_tag(x)
Definition: ri.h:2175
#define functional_result(x)
Definition: ri.h:1444
#define parameter_type(x)
Definition: ri.h:1819
#define area_size(x)
Definition: ri.h:544
#define value_constant(x)
Definition: ri.h:3073
#define syntax_reference(x)
Definition: ri.h:2730
#define syntax_tag(x)
Definition: ri.h:2727
#define constant_tag(x)
Definition: ri.h:847
#define forloop_initialization(x)
Definition: ri.h:1366
#define call_function(x)
Definition: ri.h:709
#define reference_variable(x)
Definition: ri.h:2326
#define basic_derived(x)
Definition: ri.h:640
#define basic_int(x)
Definition: ri.h:616
#define range_upper(x)
Definition: ri.h:2290
#define storage_tag(x)
Definition: ri.h:2515
#define type_tag(x)
Definition: ri.h:2940
#define forloop_increment(x)
Definition: ri.h:1370
#define constant_int(x)
Definition: ri.h:850
#define instruction_loop(x)
Definition: ri.h:1520
#define type_functional(x)
Definition: ri.h:2952
#define test_false(x)
Definition: ri.h:2837
#define storage_rom(x)
Definition: ri.h:2527
@ is_mode_reference
Definition: ri.h:1676
@ is_mode_value
Definition: ri.h:1675
#define dimension_lower(x)
Definition: ri.h:980
#define basic_tag(x)
Definition: ri.h:613
#define parameter_mode(x)
Definition: ri.h:1821
@ is_constant_int
Definition: ri.h:817
@ is_constant_logical
Definition: ri.h:819
@ is_constant_unknown
Definition: ri.h:822
@ is_constant_litteral
Definition: ri.h:820
@ is_constant_float
Definition: ri.h:818
@ is_constant_call
Definition: ri.h:821
#define whileloop_evaluation(x)
Definition: ri.h:3166
#define type_variable(x)
Definition: ri.h:2949
#define entity_storage(x)
Definition: ri.h:2794
@ is_value_intrinsic
Definition: ri.h:3034
@ is_value_unknown
Definition: ri.h:3035
@ is_value_expression
Definition: ri.h:3036
@ is_value_constant
Definition: ri.h:3033
@ is_value_code
Definition: ri.h:3031
@ is_value_symbolic
Definition: ri.h:3032
#define code_declarations(x)
Definition: ri.h:784
#define syntax_range(x)
Definition: ri.h:2733
@ is_syntax_range
Definition: ri.h:2692
@ is_syntax_application
Definition: ri.h:2697
@ is_syntax_cast
Definition: ri.h:2694
@ is_syntax_call
Definition: ri.h:2693
@ is_syntax_va_arg
Definition: ri.h:2698
@ is_syntax_reference
Definition: ri.h:2691
@ is_syntax_sizeofexpression
Definition: ri.h:2695
@ is_syntax_subscript
Definition: ri.h:2696
#define range_increment(x)
Definition: ri.h:2292
#define ram_section(x)
Definition: ri.h:2249
#define storage_formal(x)
Definition: ri.h:2524
#define basic_typedef(x)
Definition: ri.h:643
#define subscript_indices(x)
Definition: ri.h:2563
#define statement_label(x)
Definition: ri.h:2450
@ is_storage_rom
Definition: ri.h:2494
@ is_storage_return
Definition: ri.h:2491
@ is_storage_ram
Definition: ri.h:2492
@ is_storage_formal
Definition: ri.h:2493
#define basic_undefined
Definition: ri.h:556
#define type_enum(x)
Definition: ri.h:2970
#define entity_undefined
Definition: ri.h:2761
@ is_instruction_goto
Definition: ri.h:1473
@ is_instruction_unstructured
Definition: ri.h:1475
@ is_instruction_whileloop
Definition: ri.h:1472
@ is_instruction_expression
Definition: ri.h:1478
@ is_instruction_test
Definition: ri.h:1470
@ is_instruction_call
Definition: ri.h:1474
@ is_instruction_sequence
Definition: ri.h:1469
@ is_instruction_forloop
Definition: ri.h:1477
@ is_instruction_loop
Definition: ri.h:1471
#define instruction_tag(x)
Definition: ri.h:1511
#define entity_name(x)
Definition: ri.h:2790
#define area_layout(x)
Definition: ri.h:546
#define type_varargs(x)
Definition: ri.h:2955
#define functional_parameters(x)
Definition: ri.h:1442
#define test_true(x)
Definition: ri.h:2835
#define formal_function(x)
Definition: ri.h:1406
#define sequence_statements(x)
Definition: ri.h:2360
#define dimension_upper(x)
Definition: ri.h:982
#define reference_indices(x)
Definition: ri.h:2328
#define value_code(x)
Definition: ri.h:3067
#define instruction_sequence(x)
Definition: ri.h:1514
#define instruction_forloop(x)
Definition: ri.h:1538
#define syntax_call(x)
Definition: ri.h:2736
#define variable_qualifiers(x)
Definition: ri.h:3124
#define type_area(x)
Definition: ri.h:2946
#define instruction_expression(x)
Definition: ri.h:1541
#define mode_tag(x)
Definition: ri.h:1693
#define test_condition(x)
Definition: ri.h:2833
#define subscript_array(x)
Definition: ri.h:2561
#define instruction_whileloop(x)
Definition: ri.h:1523
#define range_lower(x)
Definition: ri.h:2288
#define variable_dimensions(x)
Definition: ri.h:3122
#define whileloop_body(x)
Definition: ri.h:3162
#define statement_declarations(x)
Definition: ri.h:2460
#define statement_instruction(x)
Definition: ri.h:2458
#define storage_ram(x)
Definition: ri.h:2521
#define type_undefined
Definition: ri.h:2883
#define instruction_call(x)
Definition: ri.h:1529
#define syntax_subscript(x)
Definition: ri.h:2745
#define loop_range(x)
Definition: ri.h:1642
#define ram_function(x)
Definition: ri.h:2247
#define forloop_condition(x)
Definition: ri.h:1368
#define constant_float(x)
Definition: ri.h:853
#define call_arguments(x)
Definition: ri.h:711
@ is_qualifier_volatile
Definition: ri.h:2129
@ is_qualifier_register
Definition: ri.h:2130
@ is_qualifier_restrict
Definition: ri.h:2128
@ is_qualifier_const
Definition: ri.h:2127
@ is_qualifier_auto
Definition: ri.h:2131
#define instruction_test(x)
Definition: ri.h:1517
#define constant_logical(x)
Definition: ri.h:856
@ is_type_varargs
Definition: ri.h:2902
@ is_type_void
Definition: ri.h:2904
@ is_type_enum
Definition: ri.h:2907
@ is_type_statement
Definition: ri.h:2898
@ is_type_functional
Definition: ri.h:2901
@ is_type_variable
Definition: ri.h:2900
@ is_type_union
Definition: ri.h:2906
@ is_type_area
Definition: ri.h:2899
@ is_type_unknown
Definition: ri.h:2903
@ is_type_struct
Definition: ri.h:2905
#define whileloop_condition(x)
Definition: ri.h:3160
#define entity_type(x)
Definition: ri.h:2792
#define constant_call(x)
Definition: ri.h:862
#define ram_shared(x)
Definition: ri.h:2253
#define expression_syntax(x)
Definition: ri.h:1247
#define evaluation_before_p(x)
Definition: ri.h:1159
#define forloop_body(x)
Definition: ri.h:1372
#define value_expression(x)
Definition: ri.h:3082
#define storage_undefined_p(x)
Definition: ri.h:2477
#define instruction_unstructured(x)
Definition: ri.h:1532
#define storage_return(x)
Definition: ri.h:2518
#define entity_domain
newgen_syntax_domain_defined
Definition: ri.h:410
#define constant_undefined
Definition: ri.h:802
#define loop_index(x)
Definition: ri.h:1640
#define type_union(x)
Definition: ri.h:2967
#define variable_basic(x)
Definition: ri.h:3120
#define basic_string(x)
Definition: ri.h:631
#define ram_offset(x)
Definition: ri.h:2251
#define entity_initial(x)
Definition: ri.h:2796
char * strdup()
static char buf[BSZ]
Definition: split_file.c:157
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
Definition: replace.c:135