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

Go to the source code of this file.

Data Structures

struct  inlinable
 INLINE[] gives, for each inlinable (i.e., unboxed) type, its NAME, its initial VALUE and its printing FORMAT (for each language which can be a target. More...
 

Functions

 __attribute__ ((__noreturn__))
 FATAL generates a fatal error by printing (according to FORMAT) the given MSG. More...
 
void check_not_keyword (char *s)
 CHECK_NOT_KEYWORD checks if S isn't a reserved word. More...
 
void init (void)
 INIT initializes global data structures. More...
 
int max_domain_index ()
 
struct gen_bindinglookup (char *name, int action)
 LOOKUP checks whether a given NAME is in the Domains table. More...
 
struct gen_bindingnew_binding (char *name, union domain *val)
 NEW_BINDING introduces a new pair (NAME, VAL) in the Domains table. More...
 
void print_domainlist (out, l, op)
 PRINT_DOMAINLIST prints, in the OUT stream, the List of domains, bound together by an OPerator. More...
 
void print_persistant (out, dp)
 
void print_domain (FILE *out, union domain *dp)
 PRINT_DOMAIN prints on the OUT stream a domain denoted by the DP pointer. More...
 
void print_domains (FILE *out)
 PRINT_DOMAINS prints on the OUT stream the Domains table. More...
 
void reconnect (int op, union domain *dp)
 
void compile (void)
 COMPILE reconnects the Domains table (for not compiled types – note that an inlined type is already compiled). More...
 
void gen_write_spec (char *filename)
 GEN_WRITE_SPEC prints the Domains table in the given FILENAME. More...
 
int build (int argc, char *argv[])
 BUILD (in fact, the "main" function) parses the specifications and generates the manipulation functions. More...
 
char * alloc (int size)
 ALLOC is an "iron-clad" version of malloc(3). More...
 

Variables

static char * keywords []
 
int Current_op
 Used to check, while parsing specs, that a constructed domain use only one operator type. More...
 
int Current_start
 
static char * Op_names []
 Warning: this table knows about the actual values used for AND_OP and OR_OP. More...
 
int error_seen
 Have we seen a user error somewhere ? More...
 
static int max_domain = -1
 
static int current_first
 RECONNECT replaces the (STRUCT BINDING *) members of the DP domain which are, on entry, strings by their effective values, i.e. More...
 

Function Documentation

◆ __attribute__()

__attribute__ ( (__noreturn__)  )

FATAL generates a fatal error by printing (according to FORMAT) the given MSG.

USER generates a user error (i.e., non fatal) by printing the given MSG according to the FMT.

If there already is a user error, let's suppose that's her fault !

Definition at line 82 of file build.c.

84 {
85  va_list args;
86  va_start(args, fmt);
87  fprintf( stderr, "\nNewgen Fatal Error -- " ) ;
88  vfprintf( stderr, fmt, args) ;
89  va_end(args);
90 
91  abort() ;
92 }
#define abort()
Definition: misc-local.h:53
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...

References abort, and fprintf().

+ Here is the call graph for this function:

◆ alloc()

char* alloc ( int  size)

ALLOC is an "iron-clad" version of malloc(3).

Definition at line 501 of file build.c.

502 {
503  char * p;
504 
505  if( (p=malloc( (unsigned)size )) == NULL && size != 0)
506  fatal( "alloc: No more memory for %s bytes\n", i2a( size )) ;
507 
508  return p;
509 }
void * malloc(YYSIZE_T)
char * i2a(int)
I2A (Integer TO Ascii) yields a string for a given Integer.
Definition: string.c:121
void fatal(char *,...)

References fatal(), i2a(), and malloc().

Referenced by chunk_for_domain(), copy_obj_in(), freia_memory_management_statement(), gen_alloc(), gen_cons(), gen_copy_array(), gen_copy_list(), gen_init_tabulated(), gen_make_array(), gen_sort_list(), gtt_make(), hash_enlarge_table(), hash_map_put(), hash_table_generic_make(), init_array(), make_ref(), new_local_image_variable(), push_gen_trav_env(), and set_generic_make().

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

◆ 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:

◆ check_not_keyword()

void check_not_keyword ( char *  s)

CHECK_NOT_KEYWORD checks if S isn't a reserved word.

Definition at line 117 of file build.c.

118 {
119  char **sp ;
120 
121  for( sp = keywords ; *sp != NULL ; sp++ ) {
122  if( strcmp( s, *sp ) == 0 ) {
123  user( "Trying to use the reserved word %s\n", s ) ;
124  }
125  }
126 }
static char * keywords[]
Definition: build.c:53

References keywords, and user().

+ Here is the call graph for this function:

◆ compile()

void compile ( void  )

COMPILE reconnects the Domains table (for not compiled types – note that an inlined type is already compiled).

set size of domain.

Definition at line 422 of file build.c.

423 {
424  int i;
425  current_first = 0;
426 
427  for(i=0; i<MAX_DOMAIN; i++)
428  {
429  struct gen_binding * bp = &Domains[i];
430 
431  if( bp->name == NULL || bp->compiled || bp == Tabulated_bp )
432  continue ;
433 
434  reconnect( -1, bp->domain ) ;
435  bp->compiled = (bp->domain->ba.type != EXTERNAL_DT ) ;
436 
437  if( IS_TABULATED( bp )) {
438  union domain *dp = NULL;
439 
440  if( !(bp->domain->ba.type == CONSTRUCTED_DT &&
441  (dp=bp->domain->co.components->domain)->ba.type == BASIS_DT &&
442  strcmp( dp->ba.constructand->name, "string" ) == 0)) {
443  user( "compile: tabulated first %s domain isn't string\n",
444  dp->ba.constructand->name ) ;
445  }
446  }
447 
448  /* set size of domain. */
449  if (bp->domain->ba.type == BASIS_DT ||
450  bp->domain->ba.type == ARRAY_DT ||
451  bp->domain->ba.type == SET_DT ||
452  bp->domain->ba.type == LIST_DT ||
453  bp->domain->ba.type == CONSTRUCTED_DT)
454  bp->size = gen_size(i);
455  }
456 
457 #ifdef DBG_COMPILE
458  print_domains( stderr ) ;
459 #endif
460 }
void reconnect(int op, union domain *dp)
Definition: build.c:384
static int current_first
RECONNECT replaces the (STRUCT BINDING *) members of the DP domain which are, on entry,...
Definition: build.c:382
void print_domains(FILE *out)
PRINT_DOMAINS prints on the OUT stream the Domains table.
Definition: build.c:352
int gen_size(int domain)
GEN_SIZE returns the size (in gen_chunks) of an object of type defined by the BP type.
Definition: genC.c:71
struct gen_binding * Tabulated_bp
pointer to tabulated domain hack
Definition: genClib.c:58
struct gen_binding Domains[MAX_DOMAIN]
in build.c
Definition: genspec_yacc.c:114
@ EXTERNAL_DT
@ SET_DT
@ ARRAY_DT
@ LIST_DT
@ BASIS_DT
@ CONSTRUCTED_DT
#define MAX_DOMAIN
MAX_DOMAIN is the maximum number of entries in the DOMAINS table.
#define IS_TABULATED(bp)
union domain * domain
A DOMAIN union describes the structure of a user type.
struct domainlist * components
struct domain::@7 co
int type
EXTERNAL.
struct domain::@3 ba
struct gen_binding * constructand

References ARRAY_DT, domain::ba, BASIS_DT, domain::co, gen_binding::compiled, domain::components, domain::constructand, CONSTRUCTED_DT, current_first, gen_binding::domain, Domains, EXTERNAL_DT, gen_size(), IS_TABULATED, LIST_DT, MAX_DOMAIN, gen_binding::name, print_domains(), reconnect(), SET_DT, gen_binding::size, Tabulated_bp, domain::type, and user().

Referenced by build(), gen_read_spec(), and opencl_compile_mergeable_dag().

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

◆ gen_write_spec()

void gen_write_spec ( char *  filename)

GEN_WRITE_SPEC prints the Domains table in the given FILENAME.

Definition at line 464 of file build.c.

465 {
466  extern int fclose();
467  FILE *id ;
468 
469  if( (id = fopen( filename, "w" )) == NULL ) {
470  user( "Cannot open spec file %s in write mode\n", filename ) ;
471  return ;
472  }
473  print_domains( id ) ;
474 
475  if( fclose( id ))
476  user( "Cannot close spec file %s\n", filename ) ;
477 }
return(s1)

References domain::filename, print_domains(), return(), and user().

Referenced by build().

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

◆ init()

void init ( void  )

INIT initializes global data structures.

FC: formats are directly inlined in genClib...

Tabulated_bp hack is statically allocated here.

Definition at line 130 of file build.c.

131 {
132  struct gen_binding *bp ;
133  struct inlinable *ip ;
134 
135  /* FC: formats are directly inlined in genClib...
136  */
137  struct inlinable Inline[] = {
138  {UNIT_TYPE_NAME, "U", "U", ":unit", "U"},
139  {"bool", "1", "B%d", "newgen:gen-true", "~S"},
140  {"char", "#\\a", "#\\%c", "#\\space", "~C"},
141  {"int", "0", "%d", "0", "~D"},
142  {"float", "0.0", "%f", "0.0", "~F"},
143  {"string", "\"\"", "\"%s\"", "\"\"", "~S"},
144  {NULL, "-- HELP --", "-- HELP --", "-- HELP --", "-- HELP --"},
145  } ;
146 
147  for( bp = Domains ; bp < &Domains[ MAX_DOMAIN ] ; bp++ ) {
148  bp->name = NULL ;
149  bp->compiled = 0 ;
150  bp->size = 0 ;
151  bp->tabulated = NULL;
152  bp->domain = NULL ;
153  bp->inlined = NULL ;
154  }
155 
156  for( ip = Inline, bp = Domains ; ip->name != NULL ; ip++, bp++ ) {
157  bp->name = ip->name ;
158  bp->compiled = 1 ;
159  bp->inlined = ip ;
160  }
161 
162  /* Tabulated_bp hack is statically allocated here. */
163  {
164  static union domain d ;
165  bp->name = "Name for tabulated domain" ;
166  bp->domain = &d ;
167  d.ba.type = ARRAY_DT ;
168  d.ar.constructor = "Constructor for tabulated domain" ;
169  d.ar.element = (struct gen_binding *) NULL ;
170  d.ar.dimensions = (struct intlist *) NULL;
171  Tabulated_bp = bp ;
172  }
173 
174  Current_op = UNDEF_OP ;
175  Current_start = -1 ;
176  error_seen = 0 ;
177 }
int Current_op
Used to check, while parsing specs, that a constructed domain use only one operator type.
Definition: build.c:62
int Current_start
Definition: build.c:62
@ UNDEF_OP
#define UNIT_TYPE_NAME
The UNIT_TYPE_NAME is the used to type expressions which only perform side-effects.
struct inlinable * inlined
gen_tabulated_p tabulated
number of chunks to hold this data.
INLINE[] gives, for each inlinable (i.e., unboxed) type, its NAME, its initial VALUE and its printing...
Definition: build.c:45
string name
Definition: build.c:46

References domain::ar, ARRAY_DT, domain::ba, gen_binding::compiled, domain::constructor, Current_op, Current_start, domain::dimensions, gen_binding::domain, Domains, domain::element, error_seen, gen_binding::inlined, MAX_DOMAIN, inlinable::name, gen_binding::name, gen_binding::size, gen_binding::tabulated, Tabulated_bp, domain::type, UNDEF_OP, and UNIT_TYPE_NAME.

Referenced by build().

+ Here is the caller graph for this function:

◆ lookup()

struct gen_binding* lookup ( char *  name,
int  action 
)

LOOKUP checks whether a given NAME is in the Domains table.

If not, the ACTION says whether this is an error or it should be introduced. If this is for a new gen_binding, look in the current allocation range, else from beginning

Definition at line 191 of file build.c.

192 {
193  struct gen_binding *bp ;
194 
195  //bp = (action == NEW_BINDING) ? Tabulated_bp+Current_start+1 : Domains ;
196  bp = Domains + ((action == NEW_BINDING) ? Current_start : 0);
197 
198  for( ; bp < &Domains[ MAX_DOMAIN ] ; bp++ ) {
199  if( bp->name == NULL ) {
200  if( action == NEW_BINDING )
201  break ;
202  }
203  else if( strcmp( bp->name, name ) == 0 ) break ;
204  }
205  switch( action ) {
206  case NEW_BINDING:
207  if( bp == &Domains[ MAX_DOMAIN ] )
208  fatal( "lookup: Domains overflow on %s -- new\n", name ) ;
209 
210  break;
211  case OLD_BINDING:
212  if( bp == &Domains[ MAX_DOMAIN ] )
213  user( "Unknown domain <%s>\n", name ) ;
214 
215  break ;
216  default:
217  fatal( "lookup: Unknown type %s\n", i2a( action )) ;
218  }
219  if( max_domain < bp-Domains ) {
220  max_domain = bp-Domains ;
221  }
222  return( bp ) ;
223 }
static int max_domain
Definition: build.c:179
#define OLD_BINDING
#define NEW_BINDING
Action parameter to the LOOKUP() function in the symbol table.

References Current_start, Domains, fatal(), i2a(), max_domain, MAX_DOMAIN, gen_binding::name, NEW_BINDING, OLD_BINDING, and user().

Referenced by new_binding(), and reconnect().

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

◆ max_domain_index()

int max_domain_index ( )

Definition at line 181 of file build.c.

182 {
183  return max_domain;
184 }

References max_domain.

Referenced by gen_check().

+ Here is the caller graph for this function:

◆ new_binding()

struct gen_binding* new_binding ( char *  name,
union domain val 
)

NEW_BINDING introduces a new pair (NAME, VAL) in the Domains table.

Redeclaration is allowed if this is to overwrite a previous IMPORT definition. Note that we could (should ?) check that this new gen_binding isn't a new (and incompatible) IMPORT definition.

Definition at line 230 of file build.c.

231 {
232  struct gen_binding * bp;
233 
234  if( Read_spec_mode && val->ba.type == IMPORT_DT ) {
235  bp = lookup(name, OLD_BINDING);
236  }
237  else {
238  bp = lookup(name, NEW_BINDING);
239  }
240  if( bp->domain == NULL ) {
241 #ifdef DBG_BINDING
242  (void)fprintf(stderr, "Introducing %s at index %d\n",
243  name, bp-Domains ) ;
244 #endif
245  bp->domain = val ;
246  bp->name = name ;
247  }
248  else
249  {
250  if( val->ba.type == IMPORT_DT ||
251  (Read_spec_mode && val->ba.type == EXTERNAL_DT )) {
252  }
253  else
254  user( "Redeclaration skipped: <%s>\n", name ) ;
255  free(val);
256  }
257 
258  return( bp ) ;
259 }
struct gen_binding * lookup(char *name, int action)
LOOKUP checks whether a given NAME is in the Domains table.
Definition: build.c:191
int Read_spec_mode
extern int Current_first ;
Definition: genClib.c:60
void free(void *)
@ IMPORT_DT

References domain::ba, gen_binding::domain, Domains, EXTERNAL_DT, fprintf(), free(), IMPORT_DT, lookup(), gen_binding::name, NEW_BINDING, OLD_BINDING, Read_spec_mode, domain::type, and user().

+ Here is the call graph for this function:

◆ print_domain()

void print_domain ( FILE *  out,
union domain dp 
)

PRINT_DOMAIN prints on the OUT stream a domain denoted by the DP pointer.

This is done before the compilation so (STRUCT BINDING *) members are still strings.

Definition at line 294 of file build.c.

295 {
296  if (!dp) {
297  fprintf(out, " NULL union domain");
298  return;
299  }
300 
301  switch( dp->ba.type ) {
302  case EXTERNAL_DT:
303  break ;
304  case IMPORT_DT:
305  (void)fprintf( out, " from \"%s\"", dp->im.filename ) ;
306  break ;
307  case BASIS_DT:
308  (void)print_persistant( out, dp ) ;
309 #ifdef DBG_DOMAINS
310  (void)fprintf( out, "%s:%s (%d)",
311  dp->ba.constructor, dp->ba.constructand->name,
312  dp->ba.constructand-Domains ) ;
313 #else
314  (void)fprintf(out, "%s:%s",
315  dp->ba.constructor, dp->ba.constructand->name );
316 #endif
317  break ;
318  case LIST_DT:
319  print_persistant( out, dp ) ;
320  (void)fprintf(out, "%s:%s*",
321  dp->li.constructor, dp->li.element->name ) ;
322  break ;
323  case SET_DT:
324  print_persistant( out, dp ) ;
325  (void)fprintf(out, "%s:%s{}",
326  dp->se.constructor, dp->se.element->name ) ;
327  break ;
328  case ARRAY_DT: {
329  struct intlist *ilp ;
330 
331  print_persistant( out, dp ) ;
332  (void)fprintf(out, "%s:%s",
333  dp->ar.constructor, dp->ar.element->name ) ;
334 
335  for( ilp = dp->ar.dimensions ; ilp != NULL ; ilp = ilp->cdr )
336  (void)fprintf( out, "[%d]", ilp->val ) ;
337 
338  break ;
339  }
340  case CONSTRUCTED_DT:
341  print_domainlist( out, dp->co.components, dp->co.op ) ;
342  break ;
343  default:
344  fatal( "print_domain: switch on %s\n", i2a( dp->ba.type )) ;
345  }
346 }
static FILE * out
Definition: alias_check.c:128
void print_domainlist(out, l, op)
PRINT_DOMAINLIST prints, in the OUT stream, the List of domains, bound together by an OPerator.
Definition: build.c:265
void print_persistant(out, dp)
Definition: build.c:281
char * constructor
struct gen_binding * element
enum domain_operator op
struct domain::@5 se
struct domain::@8 im
struct intlist * dimensions
struct domain::@4 li
char * filename
struct domain::@6 ar

References domain::ar, ARRAY_DT, domain::ba, BASIS_DT, domain::co, domain::components, domain::constructand, CONSTRUCTED_DT, domain::constructor, domain::dimensions, Domains, domain::element, EXTERNAL_DT, fatal(), domain::filename, fprintf(), i2a(), domain::im, IMPORT_DT, domain::li, LIST_DT, gen_binding::name, domain::op, out, print_domainlist(), print_persistant(), domain::se, SET_DT, and domain::type.

Referenced by defined_null(), gen_trav_obj(), gen_trav_simple(), print_domainlist(), and print_domains().

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

◆ print_domainlist()

void print_domainlist ( out  ,
,
op   
)

PRINT_DOMAINLIST prints, in the OUT stream, the List of domains, bound together by an OPerator.

Definition at line 265 of file build.c.

269 {
270  if( l == NULL )
271  fatal( "print_domainlist: null", "" ) ;
272 
273  for( ; l->cdr != NULL ; l = l->cdr ) {
274  print_domain( out, l->domain ) ;
275  (void)fprintf( out, " %s ", Op_names[ op ] ) ;
276  }
277  print_domain( out, l->domain ) ;
278 }
static char * Op_names[]
Warning: this table knows about the actual values used for AND_OP and OR_OP.
Definition: build.c:67
void print_domain(FILE *out, union domain *dp)
PRINT_DOMAIN prints on the OUT stream a domain denoted by the DP pointer.
Definition: build.c:294

References fatal(), fprintf(), Op_names, out, and print_domain().

Referenced by print_domain().

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

◆ print_domains()

void print_domains ( FILE *  out)

PRINT_DOMAINS prints on the OUT stream the Domains table.

Inlined domains aren't printed.

if( (dp=bp->domain)->ba.type==CONSTRUCTED_DT && dp->co.op==OR_OP) (void)fprintf( out, "--NEWGEN-FIRST %d\n", dp->co.first ) ;

Definition at line 352 of file build.c.

353 {
354  struct gen_binding *bp ;
355 
356  for( bp = Domains ; bp < &Domains[ MAX_DOMAIN ] ; bp++ ) {
357  if( bp->name == NULL || bp == Tabulated_bp ) continue ;
358 
359  if( !IS_INLINABLE( bp )) {
360 
361  /* if( (dp=bp->domain)->ba.type==CONSTRUCTED_DT && dp->co.op==OR_OP)
362  (void)fprintf( out, "--NEWGEN-FIRST %d\n", dp->co.first ) ; */
363 
364  (void)fprintf( out,
365  (IS_EXTERNAL( bp ) ? "external %s" :
366  IS_IMPORT( bp ) ? "import %s" :
367  IS_TABULATED( bp ) ? "tabulated %s = " :
368  "%s = "),
369  bp->name ) ;
370  print_domain( out, bp->domain ) ;
371  (void)fprintf( out, ";\n" ) ;
372  }
373  }
374 }
#define IS_EXTERNAL(bp)
#define IS_INLINABLE(bp)
Different kinds of BINDING structure pointers.
#define IS_IMPORT(bp)

References gen_binding::domain, Domains, fprintf(), IS_EXTERNAL, IS_IMPORT, IS_INLINABLE, IS_TABULATED, MAX_DOMAIN, gen_binding::name, out, print_domain(), and Tabulated_bp.

Referenced by compile(), and gen_write_spec().

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

◆ print_persistant()

void print_persistant ( out  ,
dp   
)

Definition at line 281 of file build.c.

284 {
285  if( dp->ba.persistant ) {
286  (void)fprintf( out, "persistant " ) ;
287  }
288 }

References domain::ba, fprintf(), out, and domain::persistant.

Referenced by print_domain().

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

◆ reconnect()

void reconnect ( int  op,
union domain dp 
)

Definition at line 384 of file build.c.

385 {
386  struct domainlist *dlp ;
387 
388  if( op == OR_OP ) current_first++ ;
389 
390  switch( dp->ba.type ) {
391  case EXTERNAL_DT:
392  case IMPORT_DT:
393  return ;
394  case BASIS_DT:
395  dp->ba.constructand = lookup( (char *)dp->ba.constructand, OLD_BINDING ) ;
396  break;
397  case LIST_DT:
398  dp->li.element = lookup( (char *)dp->li.element, OLD_BINDING ) ;
399  break ;
400  case SET_DT:
401  dp->se.element = lookup( (char *)dp->se.element, OLD_BINDING ) ;
402  break ;
403  case ARRAY_DT:
404  dp->ar.element = lookup( (char *)dp->ar.element, OLD_BINDING ) ;
405  break ;
406  case CONSTRUCTED_DT:
407  if( dp->co.op == OR_OP && !Read_spec_mode )
408  dp->co.first = current_first ;
409 
410  for( dlp = dp->co.components ; dlp != NULL ; dlp = dlp->cdr ) {
411  reconnect( dp->co.op, dlp->domain ) ;
412  }
413  return ;
414  default:
415  fatal( "reconnect: switch on %s\n", i2a( dp->ba.type )) ;
416  }
417 }
@ OR_OP

References domain::ar, ARRAY_DT, domain::ba, BASIS_DT, domain::co, domain::components, domain::constructand, CONSTRUCTED_DT, current_first, domain::element, EXTERNAL_DT, fatal(), domain::first, i2a(), IMPORT_DT, domain::li, LIST_DT, lookup(), OLD_BINDING, domain::op, OR_OP, Read_spec_mode, return(), domain::se, SET_DT, and domain::type.

Referenced by compile().

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

Variable Documentation

◆ current_first

int current_first
static

RECONNECT replaces the (STRUCT BINDING *) members of the DP domain which are, on entry, strings by their effective values, i.e.

pointers in the Domains table which have the corresponding names.

FIRST members for OR_OP (checked with OP) domains are updated.

Definition at line 382 of file build.c.

Referenced by compile(), and reconnect().

◆ Current_op

int Current_op

Used to check, while parsing specs, that a constructed domain use only one operator type.

Definition at line 62 of file build.c.

Referenced by init(), and update_op().

◆ Current_start

int Current_start

Definition at line 62 of file build.c.

Referenced by init(), and lookup().

◆ error_seen

int error_seen

Have we seen a user error somewhere ?

Definition at line 76 of file build.c.

Referenced by build(), gen_consistent_p(), gen_defined_p(), and init().

◆ keywords

char* keywords[]
static
Initial value:
= {
"external",
"import",
"tabulated",
"from",
"persistant",
NULL
}

Definition at line 53 of file build.c.

Referenced by check_not_keyword().

◆ max_domain

int max_domain = -1
static

Definition at line 179 of file build.c.

Referenced by lookup(), and max_domain_index().

◆ Op_names

char* Op_names[]
static
Initial value:
= {
"-- shouldn't appear --",
"x",
"+",
"->"
}

Warning: this table knows about the actual values used for AND_OP and OR_OP.

Definition at line 67 of file build.c.

Referenced by print_domainlist().