Lines Matching refs:symbol
4 * Basic symbol and namespace definitions.
32 * An identifier with semantic meaning is a "symbol".
34 * There's a 1:n relationship: each symbol is always
39 * The progression is symbol -> token -> identifier. The
40 * token contains the information on where the symbol was
99 struct symbol *base_type;
130 struct token *(*declarator)(struct token *token, struct symbol *, struct decl_state *ctx);
133 struct token *(*attribute)(struct token *token, struct symbol *attr, struct decl_state *ctx);
134 struct symbol *(*to_mode)(struct symbol *);
145 struct symbol {
149 struct position pos; /* Where this symbol was declared */
150 struct position endpos; /* Where this symbol ends*/
151 struct ident *ident; /* What identifier this symbol is associated with */
152 struct symbol *next_id; /* Next semantic symbol that shares this identifier */
153 struct symbol *replace; /* What is this symbol shadowed by in copy-expression */
156 struct symbol *same_symbol;
157 struct symbol *next_subobject;
208 struct symbol *definition;
279 /* must be part of the declared symbol, not its type */
285 extern struct symbol *current_fn;
288 extern struct symbol int_type,
292 extern struct symbol bool_ctype, void_ctype, type_ctype,
303 extern struct symbol autotype_ctype;
304 extern struct symbol schar_ptr_ctype, short_ptr_ctype;
305 extern struct symbol int_ptr_ctype, uint_ptr_ctype;
306 extern struct symbol long_ptr_ctype, ulong_ptr_ctype;
307 extern struct symbol llong_ptr_ctype, ullong_ptr_ctype;
308 extern struct symbol size_t_ptr_ctype, intmax_ptr_ctype, ptrdiff_ptr_ctype;
309 extern struct symbol float32_ctype, float32x_ctype;
310 extern struct symbol float64_ctype, float64x_ctype;
311 extern struct symbol float128_ctype;
312 extern struct symbol const_void_ctype, const_char_ctype;
313 extern struct symbol const_ptr_ctype, const_string_ctype;
314 extern struct symbol const_wchar_ctype, const_wstring_ctype;
315 extern struct symbol volatile_void_ctype, volatile_ptr_ctype;
316 extern struct symbol volatile_bool_ctype, volatile_bool_ptr_ctype;
319 extern struct symbol zero_int;
328 extern void access_symbol(struct symbol *);
333 extern struct symbol *lookup_symbol(struct ident *, enum namespace);
334 extern struct symbol *create_symbol(int stream, const char *name, int type, int namespace);
339 extern struct symbol *alloc_symbol(struct position, int type);
340 extern void show_type(struct symbol *);
343 extern void show_symbol(struct symbol *);
344 extern int show_symbol_expr_init(struct symbol *sym);
345 extern void show_type_list(struct symbol *);
347 extern void add_symbol(struct symbol_list **, struct symbol *);
348 extern void bind_symbol(struct symbol *, struct ident *, enum namespace);
349 extern void bind_symbol_with_scope(struct symbol *, struct ident *, enum namespace, struct scope *);
351 extern struct symbol *examine_symbol_type(struct symbol *);
352 extern struct symbol *examine_pointer_target(struct symbol *);
354 extern const char *show_typename(struct symbol *sym);
355 extern const char *builtin_typename(struct symbol *sym);
356 extern const char *builtin_type_suffix(struct symbol *sym);
360 extern void debug_symbol(struct symbol *);
361 extern void merge_type(struct symbol *sym, struct symbol *base_type);
362 extern void check_declaration(struct symbol *sym);
363 extern void check_duplicates(struct symbol *sym);
365 static inline int valid_type(const struct symbol *ctype)
370 static inline struct symbol *get_base_type(const struct symbol *sym)
380 static inline int is_int_type(const struct symbol *type)
390 static inline int is_enum_type(const struct symbol *type)
397 static inline int is_signed_type(struct symbol *sym)
406 static inline int is_type_type(struct symbol *type)
411 static inline int is_ptr_type(struct symbol *type)
418 static inline int is_func_type(struct symbol *type)
425 static inline int is_array_type(struct symbol *type)
432 static inline int is_struct_type(struct symbol *type)
439 static inline int is_union_type(struct symbol *type)
446 static inline int is_float_type(struct symbol *type)
453 static inline int is_byte_type(struct symbol *type)
458 static inline int is_wchar_type(struct symbol *type)
465 static inline int is_void_type(struct symbol *type)
472 static inline int is_bool_type(struct symbol *type)
479 static inline int is_scalar_type(struct symbol *type)
501 static inline bool is_integral_type(struct symbol *type)
519 static inline int is_function(struct symbol *type)
524 static inline int is_extern_inline(struct symbol *sym)
531 static inline int has_flexible_array(struct symbol *type)
538 static inline int get_sym_type(struct symbol *type)
547 static inline long long extend_value(long long val, struct symbol *ctype)
555 static inline struct symbol *lookup_keyword(struct ident *ident, enum namespace ns)
566 void create_fouled(struct symbol *type);
567 struct symbol *befoul(struct symbol *type);