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

Go to the source code of this file.

Functions

c_parser_context copy_c_parser_context (c_parser_context p)
 C_PARSER_CONTEXT. More...
 
void free_c_parser_context (c_parser_context p)
 
c_parser_context check_c_parser_context (c_parser_context p)
 
bool c_parser_context_consistent_p (c_parser_context p)
 
bool c_parser_context_defined_p (c_parser_context p)
 
list gen_c_parser_context_cons (c_parser_context p, list l)
 
void c_parser_context_assign_contents (c_parser_context r, c_parser_context v)
 
void c_parser_context_non_recursive_free (c_parser_context p)
 
void write_c_parser_context (FILE *f, c_parser_context p)
 
c_parser_context read_c_parser_context (FILE *f)
 
c_parser_context make_c_parser_context (string a1, type a2, storage a3, list a4, bool a5, bool a6)
 

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().

+ Here is the call 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().

+ Here is the call 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().

+ Here is the call 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().

+ Here is the call 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.

+ Here is the call 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: