34 |
|
|
35 |
|
|
36 |
struct m4_token_data { |
struct m4_token_data { |
37 |
m4_token_data_t type; |
m4_token_data * next; |
38 |
lt_dlhandle handle; |
m4_token_data_t type; |
39 |
|
boolean macro_args; |
40 |
|
boolean blind_no_args; |
41 |
|
lt_dlhandle handle; |
42 |
union { |
union { |
43 |
struct { |
struct { |
44 |
char *text; |
char * text; |
45 |
} u_t; |
} u_t; |
46 |
struct { |
struct { |
47 |
m4_builtin_func *func; |
m4_builtin_func *func; |
48 |
boolean traced; |
boolean traced; |
49 |
} u_f; |
} u_f; |
50 |
} u; |
} u; |
51 |
}; |
}; |
52 |
|
|
53 |
|
#define M4_TOKEN_DATA_NEXT(Td) ((Td)->next) |
54 |
#define M4_TOKEN_DATA_TYPE(Td) ((Td)->type) |
#define M4_TOKEN_DATA_TYPE(Td) ((Td)->type) |
55 |
|
#define M4_TOKEN_MACRO_ARGS(Td) ((Td)->macro_args) |
56 |
|
#define M4_TOKEN_BLIND_NO_ARGS(Td) ((Td)->blind_no_args) |
57 |
#define M4_TOKEN_DATA_HANDLE(Td) ((Td)->handle) |
#define M4_TOKEN_DATA_HANDLE(Td) ((Td)->handle) |
58 |
#define M4_TOKEN_DATA_TEXT(Td) ((Td)->u.u_t.text) |
#define M4_TOKEN_DATA_TEXT(Td) ((Td)->u.u_t.text) |
59 |
#define M4_TOKEN_DATA_FUNC(Td) ((Td)->u.u_f.func) |
#define M4_TOKEN_DATA_FUNC(Td) ((Td)->u.u_f.func) |
66 |
|
|
67 |
struct m4_symbol |
struct m4_symbol |
68 |
{ |
{ |
|
struct m4_symbol *next; |
|
69 |
boolean traced; |
boolean traced; |
70 |
boolean shadowed; |
m4_token_data *data; |
|
boolean macro_args; |
|
|
boolean blind_no_args; |
|
|
|
|
|
char *name; |
|
|
m4_token_data data; |
|
71 |
}; |
}; |
72 |
|
|
73 |
#define M4_SYMBOL_NEXT(S) ((S)->next) |
#define M4_SYMBOL_TRACED(S) ((S)->traced) |
74 |
#define M4_SYMBOL_TRACED(S) ((S)->traced) |
#define M4_SYMBOL_DATA(S) ((S)->data) |
75 |
#define M4_SYMBOL_SHADOWED(S) ((S)->shadowed) |
#define M4_SYMBOL_DATA_NEXT(S) (M4_TOKEN_DATA_NEXT (M4_SYMBOL_DATA(S))) |
76 |
#define M4_SYMBOL_MACRO_ARGS(S) ((S)->macro_args) |
#define M4_SYMBOL_TYPE(S) (M4_TOKEN_DATA_TYPE (M4_SYMBOL_DATA(S))) |
77 |
#define M4_SYMBOL_BLIND_NO_ARGS(S) ((S)->blind_no_args) |
#define M4_SYMBOL_MACRO_ARGS(S) (M4_TOKEN_MACRO_ARGS (M4_SYMBOL_DATA(S))) |
78 |
#define M4_SYMBOL_NAME(S) ((S)->name) |
#define M4_SYMBOL_BLIND_NO_ARGS(S) (M4_TOKEN_BLIND_NO_ARGS (M4_SYMBOL_DATA(S))) |
79 |
#define M4_SYMBOL_TYPE(S) (M4_TOKEN_DATA_TYPE (&(S)->data)) |
#define M4_SYMBOL_TEXT(S) (M4_TOKEN_DATA_TEXT (M4_SYMBOL_DATA(S))) |
80 |
#define M4_SYMBOL_TEXT(S) (M4_TOKEN_DATA_TEXT (&(S)->data)) |
#define M4_SYMBOL_FUNC(S) (M4_TOKEN_DATA_FUNC (M4_SYMBOL_DATA(S))) |
81 |
#define M4_SYMBOL_FUNC(S) (M4_TOKEN_DATA_FUNC (&(S)->data)) |
#define M4_SYMBOL_HANDLE(S) (M4_TOKEN_DATA_HANDLE (M4_SYMBOL_DATA(S))) |
|
#define M4_SYMBOL_HANDLE(S) (M4_TOKEN_DATA_HANDLE(&(S)->data)) |
|
82 |
|
|
83 |
|
|
84 |
/* Debugging the memory allocator. */ |
/* Debugging the memory allocator. */ |
93 |
#if DEBUG |
#if DEBUG |
94 |
# define DEBUG_INPUT |
# define DEBUG_INPUT |
95 |
# define DEBUG_MACRO |
# define DEBUG_MACRO |
96 |
/* # define DEBUG_SYM */ |
# define DEBUG_SYM |
97 |
/* # define DEBUG_INCL */ |
# define DEBUG_INCL |
98 |
# define DEBUG_MODULE |
# define DEBUG_MODULE |
99 |
#endif |
#endif |
100 |
|
|