PIPS
c_parser_private.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _newgen_struct_c_parser_context_
 

Macros

#define _gen_c_parser_private_start   153
 
#define _newgen_entity_domain_defined_
 
#define ENTITY_NEWGEN_DOMAIN   (entity_domain)
 
#define entity_NEWGEN_DOMAIN   (entity_domain)
 
#define _newgen_type_domain_defined_
 newgen_entity_domain_defined More...
 
#define TYPE_NEWGEN_DOMAIN   (type_domain)
 
#define type_NEWGEN_DOMAIN   (type_domain)
 
#define _newgen_storage_domain_defined_
 newgen_type_domain_defined More...
 
#define STORAGE_NEWGEN_DOMAIN   (storage_domain)
 
#define storage_NEWGEN_DOMAIN   (storage_domain)
 
#define _newgen_qualifier_domain_defined_
 newgen_storage_domain_defined More...
 
#define QUALIFIER_NEWGEN_DOMAIN   (qualifier_domain)
 
#define qualifier_NEWGEN_DOMAIN   (qualifier_domain)
 
#define c_parser_context_domain   (_gen_c_parser_private_start+0)
 newgen_qualifier_domain_defined More...
 
#define _newgen_c_parser_context_domain_defined_
 
#define C_PARSER_CONTEXT_NEWGEN_DOMAIN   (c_parser_context_domain)
 
#define c_parser_context_NEWGEN_DOMAIN   (c_parser_context_domain)
 
#define C_PARSER_CONTEXT(x)   ((c_parser_context)((x).p))
 newgen_c_parser_context_domain_defined More...
 
#define c_parser_context_CAST(x)   C_PARSER_CONTEXT(x)
 
#define C_PARSER_CONTEXT_CAST(x)   C_PARSER_CONTEXT(x)
 
#define C_PARSER_CONTEXT_(x)   ((x).e)
 
#define C_PARSER_CONTEXT_TYPE   c_parser_context
 
#define c_parser_context_TYPE   c_parser_context
 
#define c_parser_context_undefined   ((c_parser_context)gen_chunk_undefined)
 
#define c_parser_context_undefined_p(x)   ((x)==c_parser_context_undefined)
 
#define gen_C_PARSER_CONTEXT_cons   gen_c_parser_context_cons
 
#define c_parser_context_domain_number(x)   ((x)->_type_)
 
#define c_parser_context_scope_(x)   c_parser_context_scope(x) /**old hack compatible */
 
#define c_parser_context_scope(x)   ((x)->_c_parser_context_scope_)
 
#define c_parser_context_type_(x)   c_parser_context_type(x) /**old hack compatible */
 
#define c_parser_context_type(x)   ((x)->_c_parser_context_type_)
 
#define c_parser_context_storage_(x)   c_parser_context_storage(x) /**old hack compatible */
 
#define c_parser_context_storage(x)   ((x)->_c_parser_context_storage_)
 
#define c_parser_context_qualifiers_(x)   c_parser_context_qualifiers(x) /**old hack compatible */
 
#define c_parser_context_qualifiers(x)   ((x)->_c_parser_context_qualifiers_)
 
#define c_parser_context_typedef_(x)   c_parser_context_typedef(x) /**old hack compatible */
 
#define c_parser_context_typedef(x)   ((x)->_c_parser_context_typedef_.b)
 
#define c_parser_context_static_(x)   c_parser_context_static(x) /**old hack compatible */
 
#define c_parser_context_static(x)   ((x)->_c_parser_context_static_.b)
 
#define c_parser_private_spec   "\--NEWGEN-START 153\n\import entity from \"ri.newgen\";\n\import type from \"ri.newgen\";\n\import storage from \"ri.newgen\";\n\import qualifier from \"ri.newgen\";\n\c_parser_context = scope:string x type:type x storage:storage x qualifiers:qualifier* x typedef:bool x static:bool;\n\"
 

Typedefs

typedef struct _newgen_struct_entity_entity
 
typedef struct _newgen_struct_type_type
 
typedef struct _newgen_struct_storage_storage
 
typedef struct _newgen_struct_qualifier_qualifier
 
typedef struct _newgen_struct_c_parser_context_c_parser_context
 

Functions

c_parser_context copy_c_parser_context (c_parser_context)
 C_PARSER_CONTEXT. More...
 
void free_c_parser_context (c_parser_context)
 
c_parser_context check_c_parser_context (c_parser_context)
 
bool c_parser_context_consistent_p (c_parser_context)
 
bool c_parser_context_defined_p (c_parser_context)
 
list gen_c_parser_context_cons (c_parser_context, list)
 
void c_parser_context_assign_contents (c_parser_context, c_parser_context)
 
void c_parser_context_non_recursive_free (c_parser_context)
 
void write_c_parser_context (FILE *, c_parser_context)
 
c_parser_context read_c_parser_context (FILE *)
 
c_parser_context make_c_parser_context (string, type, storage, list, bool, bool)
 

Macro Definition Documentation

◆ _gen_c_parser_private_start

#define _gen_c_parser_private_start   153

Definition at line 3 of file c_parser_private.h.

◆ _newgen_c_parser_context_domain_defined_

#define _newgen_c_parser_context_domain_defined_

Definition at line 40 of file c_parser_private.h.

◆ _newgen_entity_domain_defined_

#define _newgen_entity_domain_defined_

Definition at line 11 of file c_parser_private.h.

◆ _newgen_qualifier_domain_defined_

#define _newgen_qualifier_domain_defined_

newgen_storage_domain_defined

Definition at line 32 of file c_parser_private.h.

◆ _newgen_storage_domain_defined_

#define _newgen_storage_domain_defined_

newgen_type_domain_defined

Definition at line 25 of file c_parser_private.h.

◆ _newgen_type_domain_defined_

#define _newgen_type_domain_defined_

newgen_entity_domain_defined

Definition at line 18 of file c_parser_private.h.

◆ C_PARSER_CONTEXT

#define C_PARSER_CONTEXT (   x)    ((c_parser_context)((x).p))

newgen_c_parser_context_domain_defined

C_PARSER_CONTEXT

Definition at line 48 of file c_parser_private.h.

◆ C_PARSER_CONTEXT_

#define C_PARSER_CONTEXT_ (   x)    ((x).e)

Definition at line 51 of file c_parser_private.h.

◆ c_parser_context_CAST

#define c_parser_context_CAST (   x)    C_PARSER_CONTEXT(x)

Definition at line 49 of file c_parser_private.h.

◆ C_PARSER_CONTEXT_CAST

#define C_PARSER_CONTEXT_CAST (   x)    C_PARSER_CONTEXT(x)

Definition at line 50 of file c_parser_private.h.

◆ c_parser_context_domain

#define c_parser_context_domain   (_gen_c_parser_private_start+0)

newgen_qualifier_domain_defined

Definition at line 38 of file c_parser_private.h.

◆ c_parser_context_domain_number

#define c_parser_context_domain_number (   x)    ((x)->_type_)

Definition at line 80 of file c_parser_private.h.

◆ C_PARSER_CONTEXT_NEWGEN_DOMAIN

#define C_PARSER_CONTEXT_NEWGEN_DOMAIN   (c_parser_context_domain)

Definition at line 41 of file c_parser_private.h.

◆ c_parser_context_NEWGEN_DOMAIN

#define c_parser_context_NEWGEN_DOMAIN   (c_parser_context_domain)

Definition at line 42 of file c_parser_private.h.

◆ c_parser_context_qualifiers

#define c_parser_context_qualifiers (   x)    ((x)->_c_parser_context_qualifiers_)

Definition at line 88 of file c_parser_private.h.

◆ c_parser_context_qualifiers_

#define c_parser_context_qualifiers_ (   x)    c_parser_context_qualifiers(x) /**old hack compatible */

Definition at line 87 of file c_parser_private.h.

◆ c_parser_context_scope

#define c_parser_context_scope (   x)    ((x)->_c_parser_context_scope_)

Definition at line 82 of file c_parser_private.h.

◆ c_parser_context_scope_

#define c_parser_context_scope_ (   x)    c_parser_context_scope(x) /**old hack compatible */

Definition at line 81 of file c_parser_private.h.

◆ c_parser_context_static

#define c_parser_context_static (   x)    ((x)->_c_parser_context_static_.b)

Definition at line 92 of file c_parser_private.h.

◆ c_parser_context_static_

#define c_parser_context_static_ (   x)    c_parser_context_static(x) /**old hack compatible */

Definition at line 91 of file c_parser_private.h.

◆ c_parser_context_storage

#define c_parser_context_storage (   x)    ((x)->_c_parser_context_storage_)

Definition at line 86 of file c_parser_private.h.

◆ c_parser_context_storage_

#define c_parser_context_storage_ (   x)    c_parser_context_storage(x) /**old hack compatible */

Definition at line 85 of file c_parser_private.h.

◆ C_PARSER_CONTEXT_TYPE

#define C_PARSER_CONTEXT_TYPE   c_parser_context

Definition at line 52 of file c_parser_private.h.

◆ c_parser_context_TYPE

#define c_parser_context_TYPE   c_parser_context

Definition at line 53 of file c_parser_private.h.

◆ c_parser_context_type

#define c_parser_context_type (   x)    ((x)->_c_parser_context_type_)

Definition at line 84 of file c_parser_private.h.

◆ c_parser_context_type_

#define c_parser_context_type_ (   x)    c_parser_context_type(x) /**old hack compatible */

Definition at line 83 of file c_parser_private.h.

◆ c_parser_context_typedef

#define c_parser_context_typedef (   x)    ((x)->_c_parser_context_typedef_.b)

Definition at line 90 of file c_parser_private.h.

◆ c_parser_context_typedef_

#define c_parser_context_typedef_ (   x)    c_parser_context_typedef(x) /**old hack compatible */

Definition at line 89 of file c_parser_private.h.

◆ c_parser_context_undefined

#define c_parser_context_undefined   ((c_parser_context)gen_chunk_undefined)

Definition at line 54 of file c_parser_private.h.

◆ c_parser_context_undefined_p

#define c_parser_context_undefined_p (   x)    ((x)==c_parser_context_undefined)

Definition at line 55 of file c_parser_private.h.

◆ c_parser_private_spec

#define c_parser_private_spec   "\--NEWGEN-START 153\n\import entity from \"ri.newgen\";\n\import type from \"ri.newgen\";\n\import storage from \"ri.newgen\";\n\import qualifier from \"ri.newgen\";\n\c_parser_context = scope:string x type:type x storage:storage x qualifiers:qualifier* x typedef:bool x static:bool;\n\"

Definition at line 94 of file c_parser_private.h.

◆ ENTITY_NEWGEN_DOMAIN

#define ENTITY_NEWGEN_DOMAIN   (entity_domain)

Definition at line 12 of file c_parser_private.h.

◆ entity_NEWGEN_DOMAIN

#define entity_NEWGEN_DOMAIN   (entity_domain)

Definition at line 13 of file c_parser_private.h.

◆ gen_C_PARSER_CONTEXT_cons

#define gen_C_PARSER_CONTEXT_cons   gen_c_parser_context_cons

Definition at line 62 of file c_parser_private.h.

◆ QUALIFIER_NEWGEN_DOMAIN

#define QUALIFIER_NEWGEN_DOMAIN   (qualifier_domain)

Definition at line 33 of file c_parser_private.h.

◆ qualifier_NEWGEN_DOMAIN

#define qualifier_NEWGEN_DOMAIN   (qualifier_domain)

Definition at line 34 of file c_parser_private.h.

◆ STORAGE_NEWGEN_DOMAIN

#define STORAGE_NEWGEN_DOMAIN   (storage_domain)

Definition at line 26 of file c_parser_private.h.

◆ storage_NEWGEN_DOMAIN

#define storage_NEWGEN_DOMAIN   (storage_domain)

Definition at line 27 of file c_parser_private.h.

◆ TYPE_NEWGEN_DOMAIN

#define TYPE_NEWGEN_DOMAIN   (type_domain)

Definition at line 19 of file c_parser_private.h.

◆ type_NEWGEN_DOMAIN

#define type_NEWGEN_DOMAIN   (type_domain)

Definition at line 20 of file c_parser_private.h.

Typedef Documentation

◆ c_parser_context

Definition at line 43 of file c_parser_private.h.

◆ entity

typedef struct _newgen_struct_entity_* entity

Definition at line 14 of file c_parser_private.h.

◆ qualifier

Definition at line 35 of file c_parser_private.h.

◆ storage

Definition at line 28 of file c_parser_private.h.

◆ type

typedef struct _newgen_struct_type_* type

Definition at line 21 of file c_parser_private.h.

Function Documentation

◆ c_parser_context_assign_contents()

void c_parser_context_assign_contents ( c_parser_context  r,
c_parser_context  v 
)

Definition at line 35 of file c_parser_private.c.

35  {
38  message_assert("defined references to domain c_parser_context",
40  memcpy(r, v, sizeof(struct _newgen_struct_c_parser_context_));
41 }
c_parser_context check_c_parser_context(c_parser_context p)
bool c_parser_context_defined_p(c_parser_context p)
#define message_assert(msg, ex)
Definition: newgen_assert.h:47

References c_parser_context_defined_p(), check_c_parser_context(), and message_assert.

+ Here is the call graph for this function:

◆ c_parser_context_consistent_p()

bool c_parser_context_consistent_p ( c_parser_context  p)

Definition at line 25 of file c_parser_private.c.

25  {
27  return gen_consistent_p((gen_chunk*) p);
28 }
int gen_consistent_p(gen_chunk *obj)
GEN_CONSISTENT_P dynamically checks the type correctness of OBJ.
Definition: genClib.c:2398
A gen_chunk is used to store every object.
Definition: genC.h:58

References check_c_parser_context(), and gen_consistent_p().

+ Here is the call graph for this function:

◆ c_parser_context_defined_p()

bool c_parser_context_defined_p ( c_parser_context  p)

Definition at line 29 of file c_parser_private.c.

29  {
30  return gen_defined_p((gen_chunk*) p);
31 }
int gen_defined_p(gen_chunk *obj)
Definition: genClib.c:2438

References gen_defined_p().

Referenced by c_parser_context_assign_contents().

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

◆ c_parser_context_non_recursive_free()

void c_parser_context_non_recursive_free ( c_parser_context  p)

Definition at line 42 of file c_parser_private.c.

42  {
43  // should clear up contents...
44  free(p);
45 }
void free(void *)

References free().

+ Here is the call graph for this function:

◆ check_c_parser_context()

c_parser_context check_c_parser_context ( c_parser_context  p)

Definition at line 22 of file c_parser_private.c.

22  {
24 }
#define c_parser_context_domain
newgen_qualifier_domain_defined
gen_chunk * gen_check(gen_chunk *obj, int t)
GEN_CHECK checks that the gen_chunk received OBJ is of the appropriate TYPE.
Definition: genClib.c:2356

References c_parser_context_domain, and gen_check().

Referenced by c_parser_context_assign_contents(), and c_parser_context_consistent_p().

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

◆ copy_c_parser_context()

c_parser_context copy_c_parser_context ( c_parser_context  p)

C_PARSER_CONTEXT.

Definition at line 16 of file c_parser_private.c.

16  {
18 }
gen_chunk * gen_copy_tree(gen_chunk *obj)
Definition: genClib.c:1429

References gen_copy_tree().

Referenced by GetContextCopy().

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

◆ free_c_parser_context()

void free_c_parser_context ( c_parser_context  p)

Definition at line 19 of file c_parser_private.c.

19  {
20  gen_free((gen_chunk*) p);
21 }
void gen_free(gen_chunk *obj)
version without shared_pointers.
Definition: genClib.c:992

References gen_free().

Referenced by ExitScope().

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

◆ gen_c_parser_context_cons()

list gen_c_parser_context_cons ( c_parser_context  p,
list  l 
)

Definition at line 32 of file c_parser_private.c.

32  {
34 }
#define C_PARSER_CONTEXT_NEWGEN_DOMAIN
list gen_typed_cons(_int type, const void *item, const list next)
CONS a list with minimal type checking this cannot be done within the CONS macro because possible fun...
Definition: list.c:900

References C_PARSER_CONTEXT_NEWGEN_DOMAIN, and gen_typed_cons().

+ Here is the call graph for this function:

◆ make_c_parser_context()

c_parser_context make_c_parser_context ( string  a1,
type  a2,
storage  a3,
list  a4,
bool  a5,
bool  a6 
)

Definition at line 52 of file c_parser_private.c.

52  {
53  return (c_parser_context) gen_alloc(7*sizeof(gen_chunk), GEN_CHECK_ALLOC, c_parser_context_domain, a1, a2, a3, a4, a5, a6);
54 }
#define GEN_CHECK_ALLOC
Definition: genC.h:307
gen_chunk * gen_alloc(int size, int gen_check_p, int dom,...)
allocates something in newgen.
Definition: genClib.c:298

References c_parser_context_domain, gen_alloc(), and GEN_CHECK_ALLOC.

Referenced by CreateDefaultContext().

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

◆ read_c_parser_context()

c_parser_context read_c_parser_context ( FILE *  f)

Definition at line 49 of file c_parser_private.c.

49  {
50  return (c_parser_context) gen_read(f);
51 }
gen_chunk * gen_read(FILE *file)
GEN_READ reads any object from the FILE stream.
Definition: genClib.c:2323
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
Definition: offsets.c:15

References f(), and gen_read().

+ Here is the call graph for this function:

◆ write_c_parser_context()

void write_c_parser_context ( FILE *  f,
c_parser_context  p 
)

Definition at line 46 of file c_parser_private.c.

46  {
47  gen_write(f, (gen_chunk*) p);
48 }
void gen_write(FILE *fd, gen_chunk *obj)
GEN_WRITE writes the OBJect on the stream FD.
Definition: genClib.c:1745

References f(), and gen_write().

+ Here is the call graph for this function: