-- Actual Symbol names ---
189559
@Override
    public Void visitMemberSelect(MemberSelectTree node, Set<String> p) {
        add(p, node.getIdentifier());
        return super.visitMemberSelect(node, p);
    }
1169865
def group_symbol(self):
        
        s_mapping = {symdata.index: symdata.symbol for symdata in self._symboldata_list}
        return s_mapping[self.group_num]
257381
def symbols():
    """"""
    symbols = []
    for line in symbols_stream():
        symbols.append(line.decode('utf-8').strip())
    return symbols
1305679
def symbols(arch)
      symbolications     = Symbols.new
      current_subprogram = nil

      stdin, stdout, stderr = Open3.popen3('dwarfdump', '--debug-info', "--arch=#{arch}", @dsym)
      stdout.each_line do |line|
        if current_subprogram
          if line =~ /^\s*AT_(\w+)\(\s*(.+?)\s*\)$/
            tag   = $1
            value = $2

            case tag
              when 'name', 'decl_file' # quoted strings
                value = value[1..-2]
              when 'decl_line' # decimal integers
                value = value.to_i
              when 'prototyped', 'external' # booleans
                value = (value == '0x01')
              when 'low_pc', 'high_pc' # hex integers
                value = value.hex
            end

            current_subprogram[tag] = value
          elsif line =~ /^0x[0-9a-f]+:\s+TAG_(\w+)/
            next unless %w(low_pc high_pc decl_file decl_line name).all? { |k| current_subprogram.include? k }
            current_subprogram['decl_file'].sub!(/^#{Regexp.escape @project_dir}\//, '') if @project_dir
            symbolications.add current_subprogram['low_pc'],
                               current_subprogram['high_pc'],
                               current_subprogram['decl_file'],
                               current_subprogram['decl_line'],
                               current_subprogram['name']

            current_subprogram = ($1 == 'subprogram') ? Hash.new : nil
          end
        else
          if line =~ /^0x[0-9a-f]+:\s+TAG_subprogram\s+\[\d+\]\s+\*$/
            current_subprogram = Hash.new
          end
        end
      end

      return symbolications
    end
433848
function name( $i ){
		if( is_int($i) ){
			if( ! isset($this->names[$i]) ){
				trigger_error("symbol ".var_export($i,1)." is unknown in ".get_class($this), E_USER_NOTICE );
				return 'UNKNOWN';
			}
			else {
				return $this->names[$i];
			}
		}
		else if ( ! isset($this->literals[$i]) ){
			trigger_error("literal symbol ".var_export($i,1)." is unknown in ".get_class($this), E_USER_NOTICE );
		}
		return $i;
	}
1033654
def ground_state_term_symbol(self):
        
        L_symbols = 'SPDFGHIKLMNOQRTUVWXYZ'

        term_symbols = self.term_symbols
        term_symbol_flat = {term: {"multiplicity": int(term[0]),
                                   "L": L_symbols.index(term[1]),
                                   "J": float(term[2:])}
                            for term in sum(term_symbols, [])}

        multi = [int(item['multiplicity'])
                 for terms, item in term_symbol_flat.items()]
        max_multi_terms = {symbol: item
                           for symbol, item in term_symbol_flat.items()
                           if item['multiplicity'] == max(multi)}

        Ls = [item['L'] for terms, item in max_multi_terms.items()]
        max_L_terms = {symbol: item
                       for symbol, item in term_symbol_flat.items()
                       if item['L'] == max(Ls)}

        J_sorted_terms = sorted(max_L_terms.items(),
                                key=lambda k: k[1]['J'])
        L, v_e = self.valence
        if v_e <= (2 * L + 1):
            return J_sorted_terms[0][0]
        else:
            return J_sorted_terms[-1][0]
1367074
def _lookup_symbols(self, symbols_filename):
        """"""
        symbol_lookup = GenewaysSymbols(symbols_filename)
        for action in self.actions:
            action.up_symbol = symbol_lookup.id_to_symbol(action.up)
            action.dn_symbol = symbol_lookup.id_to_symbol(action.dn)
305637
function addSymbol (s) {
        if (s && !symbols_[s]) {
            symbols_[s] = ++symbolId;
            symbols.push(s);
        }
    }
130214
def names(expr: AST) -> Set[str]:
    """"""
    nodes = [node for node in ast.walk(expr) if isinstance(node, ast.Name)]
    loaded = {node.id for node in nodes if isinstance(node.ctx, ast.Load)}
    stored = {node.id for node in nodes if isinstance(node.ctx, ast.Store)}
    return loaded - stored
789588
function symbol(s, p) {
        var x = syntax[s];
        if (!x || typeof x !== 'object') {
            syntax[s] = x = {
                id: s,
                lbp: p || 0,
                string: s
            };
        }
        return x;
    }
538936
def all_symbols(self):
        """"""
        if self._all_symbols is None:
            self._all_symbols = self.free_symbols | self.bound_symbols
        return self._all_symbols
30833
def _auto_positive_symbol(tokens, local_dict, global_dict):
    
    result = []

    tokens.append((None, None))  # so zip traverses all tokens
    for tok, nextTok in zip(tokens, tokens[1:]):
        tokNum, tokVal = tok
        nextTokNum, nextTokVal = nextTok
        if tokNum == token.NAME:
            name = tokVal
            if name in global_dict:
                obj = global_dict[name]
                if isinstance(obj, (Basic, type)) or callable(obj):
                    result.append((token.NAME, name))
                    continue

            # try to resolve known alternative unit name
            try:
                used_name = inv_name_alternatives[str(name)]
            except KeyError:
                # if we don't know this name it's a user-defined unit name
                # so we should create a new symbol for it
                used_name = str(name)

            result.extend(
                [
                    (token.NAME, "Symbol"),
                    (token.OP, "("),
                    (token.NAME, repr(used_name)),
                    (token.OP, ","),
                    (token.NAME, "positive"),
                    (token.OP, "="),
                    (token.NAME, "True"),
                    (token.OP, ")"),
                ]
            )
        else:
            result.append((tokNum, tokVal))

    return result
19067
Name fieldName(Symbol sym) {
        if (scramble && (sym.flags() & PRIVATE) != 0 ||
            scrambleAll && (sym.flags() & (PROTECTED | PUBLIC)) == 0)
            return names.fromString("_$" + sym.name.getIndex());
        else
            return sym.name;
    }
368715
def names(self):
        """"""
        #This is where the context information is extremely useful in 
        #limiting the extent of the search space we need to examine.
        if self._names is None:
            attribute = self.get_attribute()
            if self.context.module is not None:
                symbol = self.context.symbol
                fullsymbol = self.context.full_symbol
                self._names = self._complete_el(symbol, attribute, fullsymbol)
            else:
                self._names = []

        return self._names
469655
def symbols_app(parser, _, args):  # pragma: no cover
    

    parser.add_argument('file', help='ELF file to list the symbols of')
    parser.add_argument('symbol', nargs='?', help='show only this symbol')
    parser.add_argument('--exact', '-e', action='store_const', const=True, help='filter by exact symbol name')
    args = parser.parse_args(args)

    print('%-18s %5s %-7s %-7s %-10s %5s %s' % (
        'value',
        'size',
        'type',
        'binding',
        'visibility',
        'index',
        'name',
    ))

    elf = ELF(args.file)
    for symbol in elf.symbols:
        if args.symbol:
            if args.exact:
                if symbol.name != args.symbol:
                    continue
            else:
                if args.symbol.lower() not in symbol.name.lower():
                    continue

        if symbol.shndx == symbol.SpecialSection.undef:
            shndx = 'UND'
        elif symbol.shndx == symbol.SpecialSection.abs:
            shndx = 'ABS'
        elif symbol.shndx == symbol.SpecialSection.common:
            shndx = 'COM'
        else:
            shndx = str(symbol.shndx)

        print('0x%016x %5d %-7s %-7s %-10s %5s %s' % (
            symbol.value,
            symbol.size,
            symbol.type.name,
            symbol.binding.name,
            symbol.visibility.name,
            shndx,
            symbol.name,
        ))
427119
def bound_symbols(self):
        """"""
        if self._bound_symbols is None:
            res = set()
            self._bound_symbols = res.union(
                *[sym.free_symbols for sym in self._vals.keys()])
        return self._bound_symbols
371474
protected String getFeatureSymbolicName(Attributes attrs) {
        String output = null;
        if (attrs != null) {
            // get Subsystem-SymbolicName
            String value = attrs.getValue(HDR_SUB_SYM_NAME);
            if (value != null) {
                String[] parts = value.split(";");
                if (parts.length > 0) {
                    output = parts[0].trim();
                }
            }
        }
        return output;
    }