23#define obstack_chunk_alloc xmalloc
24#define obstack_chunk_free free
25#define OBSTACK_CHUNK_SIZE 0
215 const char *to,
const char *from);
343 ((x)->kind == TYPE_UNION \
344 || ((x)->kind == TYPE_LANG_STRUCT \
345 && (x)->u.s.lang_struct->kind == TYPE_UNION))
430(const struct
fileloc *pos, const
char *
msg, ...) ATTRIBUTE_PRINTF_2;
454extern
int yylex (const
char **yylval);
455extern
void yybegin (const
char *fname);
456extern
void yyend (
void);
508#define DBGPRINTF(Fmt,...) do {if (do_debug) \
509 fprintf (stderr, "%s:%d: " Fmt "\n", \
510 lbasename (__FILE__),__LINE__, ##__VA_ARGS__);} while (0)
512#define DBGPRINT_COUNT_TYPE(Msg,Ty) do {if (do_debug) \
513 dbgprint_count_type_at (__FILE__, __LINE__, Msg, Ty);}while (0)
515#define FOR_ALL_INHERITED_FIELDS(TYPE, FIELD_VAR) \
516 for (type_p sub = (TYPE); sub; sub = sub->u.s.base_class) \
517 for (FIELD_VAR = sub->u.s.fields; FIELD_VAR; FIELD_VAR = FIELD_VAR->next)
int yylex(void)
Definition gengtype-lex.l:66
fields
Definition gengtype.cc:622
int lexer_toplevel_done
Definition gengtype-lex.l:41
void write_state(const char *path)
Definition gengtype-state.cc:1339
void dbgprint_count_type_at(const char *, int, const char *, type_p)
Definition gengtype.cc:169
option_kind
Definition gengtype.h:169
@ OPTION_TYPE
Definition gengtype.h:173
@ OPTION_STRING
Definition gengtype.h:171
@ OPTION_NONE
Definition gengtype.h:170
@ OPTION_NESTED
Definition gengtype.h:174
pair_p nreverse_pairs(pair_p list)
int do_debug
Definition gengtype.cc:68
pair_p typedefs
Definition gengtype.cc:510
int do_dump
Definition gengtype.cc:67
type_p adjust_field_type(type_p, options_p)
const char * get_file_srcdir_relative_path(const input_file *inpf)
int verbosity_level
Definition gengtype.cc:71
void oprintf(outf_p o, const char *S,...) ATTRIBUTE_PRINTF_2
type_p resolve_typedef(const char *s, struct fileloc *pos)
Definition gengtype.cc:676
const char ** lang_dir_names
Definition gengtype.cc:159
type_p create_array(type_p t, const char *len)
const char * get_output_file_name(input_file *inpf)
options_p create_string_option(options_p next, const char *name, const char *info)
pair_p variables
Definition gengtype.cc:512
const char * read_state_filename
Definition gengtype.cc:63
struct fileloc * type_fileloc(type_p t)
Definition gengtype.h:366
struct pair * pair_p
Definition gengtype.h:119
outf_p output_files
Definition genemit.cc:912
void do_scalar_typedef(const char *s, struct fileloc *pos)
Definition gengtype.cc:555
outf_p header_file
Definition gengtype.cc:43
const struct type * const_type_p
Definition gengtype.h:121
bool hit_error
Definition gengtype.cc:97
bool opts_have(options_p opts, const char *str)
Definition gengtype-parse.cc:856
type_p find_structure(const char *s, enum typekind kind)
void read_state(const char *path)
Definition gengtype-state.cc:2604
pair_p create_field_at(pair_p next, type_p type, const char *name, options_p opt, struct fileloc *pos)
type_p new_structure(const char *name, enum typekind kind, struct fileloc *pos, pair_p fields, options_p o, type_p base)
gc_used_enum
Definition gengtype.h:230
@ GC_POINTED_TO
Definition gengtype.h:248
@ GC_MAYBE_POINTED_TO
Definition gengtype.h:244
@ GC_UNUSED
Definition gengtype.h:233
@ GC_USED
Definition gengtype.h:237
struct type scalar_char
Definition gengtype.cc:500
size_t num_build_headers
Definition gengtype.cc:149
const char * get_input_file_name(const input_file *inpf)
Definition gengtype.h:81
const input_file ** gt_files
Definition gengtype.cc:143
size_t srcdir_len
Definition gengtype.cc:60
bool union_or_struct_p(enum typekind kind)
Definition gengtype.h:350
void parse_file(const char *name)
Definition gengtype-parse.cc:1151
typekind
Definition gengtype.h:146
@ TYPE_NONE
Definition gengtype.h:147
@ TYPE_LANG_STRUCT
Definition gengtype.h:160
@ TYPE_UNDEFINED
Definition gengtype.h:148
@ TYPE_UNION
Definition gengtype.h:154
@ TYPE_USER_STRUCT
Definition gengtype.h:163
@ TYPE_POINTER
Definition gengtype.h:155
@ TYPE_STRUCT
Definition gengtype.h:153
@ TYPE_ARRAY
Definition gengtype.h:156
@ TYPE_SCALAR
Definition gengtype.h:151
@ TYPE_STRING
Definition gengtype.h:152
@ TYPE_CALLBACK
Definition gengtype.h:157
void note_variable(const char *s, type_p t, options_p o, struct fileloc *pos)
void error_at_line(const struct fileloc *pos, const char *msg,...) ATTRIBUTE_PRINTF_2
Definition gengtype.cc:107
lang_bitmap get_lang_bitmap(const input_file *inpf)
Definition gengtype.h:98
options_p create_nested_option(options_p next, const char *name, struct nested_ptr_data *info)
gty_token
Definition gengtype.h:464
@ ID
Definition gengtype.h:483
@ FIRST_TOKEN_WITH_VALUE
Definition gengtype.h:491
@ NUM
Definition gengtype.h:481
@ NESTED_PTR
Definition gengtype.h:479
@ ELLIPSIS
Definition gengtype.h:477
@ ARRAY
Definition gengtype.h:486
@ CHAR
Definition gengtype.h:485
@ UNION
Definition gengtype.h:474
@ ENUM
Definition gengtype.h:476
@ USER_GTY
Definition gengtype.h:480
@ SCALAR
Definition gengtype.h:482
@ TYPEDEF
Definition gengtype.h:471
@ PTR_ALIAS
Definition gengtype.h:478
@ STRUCT
Definition gengtype.h:475
@ GTY_TOKEN
Definition gengtype.h:470
@ IGNORABLE_CXX_KEYWORD
Definition gengtype.h:487
@ EOF_TOKEN
Definition gengtype.h:465
@ STATIC
Definition gengtype.h:473
@ STRING
Definition gengtype.h:484
@ EXTERN
Definition gengtype.h:472
@ CHAR_TOKEN_OFFSET
Definition gengtype.h:469
size_t num_gt_files
Definition gengtype.cc:144
type_p create_user_defined_type(const char *, struct fileloc *)
Definition gengtype.cc:598
unsigned lang_bitmap
Definition gengtype.h:29
struct fileloc lexer_line
Definition gengtype-lex.l:40
const char * srcdir
Definition gengtype.cc:59
struct type * type_p
Definition gengtype.h:120
input_file * input_file_by_name(const char *name)
outf_p get_output_file_with_visibility(input_file *inpf)
size_t num_lang_dirs
Definition gengtype.cc:160
void yybegin(const char *fname)
Definition gengtype-lex.l:208
options_p create_nested_ptr_option(options_p next, type_p t, const char *to, const char *from)
options_p create_type_option(options_p next, const char *name, type_p info)
void add_subclass(type_p base, type_p subclass)
void yyend(void)
Definition gengtype-lex.l:221
input_file * this_file
Definition gengtype.cc:154
struct type scalar_nonchar
Definition gengtype.cc:496
type_p structures
Definition gengtype.cc:511
write_types_kinds
Definition gengtype.h:137
@ WTK_GGC
Definition gengtype.h:138
@ NUM_WTK
Definition gengtype.h:141
@ WTK_PCH
Definition gengtype.h:139
type_p create_scalar_type(const char *name)
struct options * options_p
Definition gengtype.h:122
struct type callback_type
Definition gengtype.cc:504
const char ** build_headers
Definition gengtype.cc:148
const char * write_state_filename
Definition gengtype.cc:64
input_file * system_h_file
Definition gengtype.cc:156
struct type string_type
Definition gengtype.cc:489
type_p create_pointer(type_p t)
struct outf * outf_p
Definition gengtype.h:384
void do_typedef(const char *s, type_p t, struct fileloc *pos)
Definition gengtype.cc:519
void set_lang_bitmap(input_file *inpf, lang_bitmap n)
Definition gengtype.h:108
#define UCHAR_MAX
Definition glimits.h:45
static void const char * msg
Definition read-md.cc:204
const input_file * file
Definition gengtype.h:49
int line
Definition gengtype.h:50
Definition gengtype.h:192
type_p type
Definition gengtype.h:193
const char * convert_to
Definition gengtype.h:194
const char * convert_from
Definition gengtype.h:195
Definition gengtype.h:179
type_p type
Definition gengtype.h:185
const char * string
Definition gengtype.h:184
struct nested_ptr_data * nested
Definition gengtype.h:186
const char * name
Definition gengtype.h:181
struct options * next
Definition gengtype.h:180
enum option_kind kind
Definition gengtype.h:182
Definition gengtype.h:377
const char * name
Definition gengtype.h:379
struct outf * next
Definition gengtype.h:378
char * buf
Definition gengtype.h:382
size_t buflength
Definition gengtype.h:380
size_t bufused
Definition gengtype.h:381
Definition gengtype.h:218
type_p type
Definition gengtype.h:221
const char * name
Definition gengtype.h:220
struct fileloc line
Definition gengtype.h:222
options_p opt
Definition gengtype.h:223
pair_p next
Definition gengtype.h:219
Definition gengtype.h:252
pair_p fields
Definition gengtype.h:290
int state_number
Definition gengtype.h:267
bool scalar_is_char
Definition gengtype.h:318
type_p next
Definition gengtype.h:261
type_p pointer_to
Definition gengtype.h:272
const char * len
Definition gengtype.h:323
const char * tag
Definition gengtype.h:288
type_p base_class
Definition gengtype.h:301
bool wrote_user_func_for_ptr[NUM_WTK]
Definition gengtype.h:314
type_p first_subclass
Definition gengtype.h:308
type_p p
Definition gengtype.h:283
options_p opt
Definition gengtype.h:291
type_p lang_struct
Definition gengtype.h:299
enum gc_used_enum gc_used
Definition gengtype.h:276
type_p next_sibling_class
Definition gengtype.h:310
struct fileloc line
Definition gengtype.h:289
enum typekind kind
Definition gengtype.h:254
lang_bitmap bitmap
Definition gengtype.h:292
#define NULL
Definition system.h:50
#define gcc_assert(EXPR)
Definition system.h:814