Lines Matching refs:sym

140         struct symbol *sym;
142 for (sym = scope->symbols
143 ; sym != NULL
144 ; sym = sym->next_with_same_name) {
145 const struct symbol_header *const hdr = sym->hdr;
162 struct symbol *sym = scope->symbols;
169 while (sym != NULL) {
170 struct symbol *const next = sym->next_with_same_scope;
171 struct symbol_header *const hdr = sym->hdr;
173 assert(hdr->symbols == sym);
175 hdr->symbols = sym->next_with_same_name;
177 free(sym);
179 sym = next;
214 struct symbol *sym;
216 for (sym = hdr->symbols; sym != NULL; sym = sym->next_with_same_name) {
217 assert(sym->hdr == hdr);
219 if ((name_space == -1) || (sym->name_space == name_space)) {
220 iter->curr = sym;
285 struct symbol *sym;
288 for (sym = hdr->symbols; sym != NULL; sym = sym->next_with_same_name) {
289 assert(sym->hdr == hdr);
291 if ((name_space == -1) || (sym->name_space == name_space)) {
292 assert(sym->depth <= table->depth);
293 return sym->depth - table->depth;
309 struct symbol *sym;
312 for (sym = hdr->symbols; sym != NULL; sym = sym->next_with_same_name) {
313 assert(sym->hdr == hdr);
315 if ((name_space == -1) || (sym->name_space == name_space)) {
316 return sym->data;
331 struct symbol *sym;
353 for (sym = hdr->symbols
354 ; (sym != NULL) && (sym->name_space != name_space)
355 ; sym = sym->next_with_same_name) {
359 if (sym && (sym->depth == table->depth))
362 sym = calloc(1, sizeof(*sym));
363 sym->next_with_same_name = hdr->symbols;
364 sym->next_with_same_scope = table->current_scope->symbols;
365 sym->hdr = hdr;
366 sym->name_space = name_space;
367 sym->data = declaration;
368 sym->depth = table->depth;
370 assert(sym->hdr == hdr);
372 hdr->symbols = sym;
373 table->current_scope->symbols = sym;
386 struct symbol *sym;
410 for (sym = hdr->symbols
411 ; (sym != NULL) && (sym->name_space != name_space)
412 ; sym = sym->next_with_same_name) {
416 if (sym && sym->depth == 0)
426 sym = calloc(1, sizeof(*sym));
427 sym->next_with_same_scope = top_scope->symbols;
428 sym->hdr = hdr;
429 sym->name_space = name_space;
430 sym->data = declaration;
432 assert(sym->hdr == hdr);
438 hdr->symbols = sym;
445 curr->next_with_same_name = sym;
447 top_scope->symbols = sym;