PIPS
new.c File Reference
#include <stdio.h>
#include "genC.h"
#include "newgen_include.h"
+ Include dependency graph for new.c:

Go to the source code of this file.

Functions

int build (int, char *[])
 BUILD (in fact, the "main" function) parses the specifications and generates the manipulation functions. More...
 
int main (int argc, char *argv[])
 MAIN is the C entry (in fact a renaming for BUILD). More...
 

Variables

FILE * genspec_in
 
FILE * genspec_out
 

Function Documentation

◆ build()

int build ( int  argc,
char *  argv[] 
)

BUILD (in fact, the "main" function) parses the specifications and generates the manipulation functions.

RGSUSED

Definition at line 483 of file build.c.

484 {
485  init();
486  genspec_parse();
487  compile();
488 
489  if (error_seen == 0) {
490  if (argc<3)
491  user("not enough arguments provided, need 3, got %d!", argc);
492  gencode(argv[1]);
493  gen_write_spec(argv[2]);
494  return 0;
495  }
496  return 1;
497 }
void init(void)
INIT initializes global data structures.
Definition: build.c:130
int error_seen
Have we seen a user error somewhere ?
Definition: build.c:76
void gen_write_spec(char *filename)
GEN_WRITE_SPEC prints the Domains table in the given FILENAME.
Definition: build.c:464
void compile(void)
COMPILE reconnects the Domains table (for not compiled types – note that an inlined type is already c...
Definition: build.c:422
void gencode(string file)
generate the code necessary to manipulate every internal non-inlinable type in the Domains table.
Definition: genC.c:928
int genspec_parse(void)
void user(char *,...)
External routines.

References compile(), error_seen, gen_write_spec(), gencode(), genspec_parse(), init(), and user().

Referenced by main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char *  argv[] 
)

MAIN is the C entry (in fact a renaming for BUILD).

explicit initialization (lex default not assumed)

Definition at line 39 of file new.c.

42 {
43 #ifdef GENSPEC_DEBUG
44  genspec_debug = 0 ;
45 #endif
46  Read_spec_mode = 0 ;
47 
48  /* explicit initialization (lex default not assumed)
49  */
50  genspec_in = stdin;
51  genspec_out = stdout;
52  return build(argc, argv);
53 }
int Read_spec_mode
extern int Current_first ;
Definition: genClib.c:60
FILE * genspec_out
Definition: new.c:31
FILE * genspec_in
int build(int, char *[])
BUILD (in fact, the "main" function) parses the specifications and generates the manipulation functio...
Definition: build.c:483

References build(), genspec_in, genspec_out, and Read_spec_mode.

+ Here is the call graph for this function:

Variable Documentation

◆ genspec_in

FILE* genspec_in
extern

Referenced by main().

◆ genspec_out

FILE * genspec_out

Definition at line 31 of file new.c.

Referenced by main().