Compiles a list of possible symbols that can hold a value in
        place. These consist of local vars, global vars, and functions.
429937
def _complete_values(self, symbol = ""):
        """"""
        result = {}
        #Also add the subroutines from the module and its dependencies.
        moddict = self._generic_filter_execs(self.context.module)
        self._cond_update(result, moddict, symbol)
        self._cond_update(result, self.context.module.interfaces, symbol)
        for depend in self.context.module.dependencies:
            if depend in self.context.module.parent.modules:
                #We don't want to display executables that are part of an interface, or that are embedded in
                #a derived type, since those will be called through the type or interface
                filtdict = self._generic_filter_execs(self.context.module.parent.modules[depend])
                self._cond_update(result, filtdict, symbol)
                self._cond_update(result, self.context.module.parent.modules[depend].interfaces, symbol)

        #Add all the local vars if we are in an executable
        if (isinstance(self.context.element, Function) or 
            isinstance(self.context.element, Subroutine)):
            self._cond_update(result, self.element.members, symbol)
        #Next add the global variables from the module
        if self.context.module is not None:
            self._cond_update(result, self.context.module.members, symbol)
            #Next add user defined functions to the mix
            for execkey in self.context.module.executables:
                iexec = self.context.module.executables[execkey]
                if isinstance(iexec, Function) and self._symbol_in(symbol, iexec.name):
                    result[iexec.name] = iexec

        #Finally add the builtin functions to the mix. We need to add support
        #for these in a separate file so we have their call signatures.
        if symbol == "":
            #Use the abbreviated list of most common fortran builtins
            self._cond_update(result, cache.common_builtin, symbol)
        else:
            #we can use the full list as there will probably not be that
            #many left over.
            self._cond_update(result, cache.builtin, symbol)           
        
        return result
674929
def key_words
      # because dollar signs don't work we can't display a $ sign in the keyword
      # list so its not explicitly clear what the keyword
      variables = scope.to_hash.keys
      # prepend a :: to topscope variables
      scoped_vars = variables.map { |k, _v| scope.compiler.topscope.exist?(k) ? "$::#{k}" : "$#{k}" }
      # append a () to functions so we know they are functions
      funcs = function_map.keys.map { |k| "#{k.split('::').last}()" }
      PuppetDebugger::InputResponders::Datatypes.instance.debugger = self
      (scoped_vars + funcs + static_responder_list + PuppetDebugger::InputResponders::Datatypes.instance.all_data_types).uniq.sort
    end
1080772
function(str, vars) {
			vars = vars || {};
			var resolver = typeof vars === 'function' ? vars : function(str, p1) {
				return p1 in vars ? vars[p1] : null;
			};
			
			return this.processText(str, {
				variable: function(data) {
					var newValue = resolver(data.token, data.name, data);
					if (newValue === null) {
						// try to find variable in resources
						newValue = resources.getVariable(data.name);
					}
					
					if (newValue === null || typeof newValue === 'undefined')
						// nothing found, return token itself
						newValue = data.token;
					return newValue;
				}
			});
		}
855502
def compilearg(self):
        """"""
        if isinstance(self.value,list):
            value = self.delimiter.join(self.value)
        else:
            value = self.value
        if value.find(" ") >= 0:
            value = '"' + value + '"' #wrap all in quotes

        #for some odd, reason this produced an error, as if we're not an instance of choiceparameter
        #return super(ChoiceParameter,self).compilearg(value)

        #workaround:
        if self.paramflag and self.paramflag[-1] == '=' or self.nospace:
            sep = ''
        elif self.paramflag:
            sep = ' '
        else:
            return str(value)
        return self.paramflag + sep + str(value)
735584
void insertFunctionsAndVariables(TokenList tokens ) {
        TokenList.Token t = tokens.getFirst();
        while( t != null ) {
            if( t.getType() == Type.WORD ) {
                Variable v = lookupVariable(t.word);
                if (v != null) {
                    t.variable = v;
                    t.word = null;
                } else if (functions.isFunctionName(t.word)) {
                    t.function = (new Function(t.word));
                    t.word = null;
                }
            }
            t = t.next;
        }
    }
835196
private static void
    prepSymbolsListAndMap(SymbolTable priorSymtab, Iterator<String> symbols,
                          List<String> symbolsList,
                          Map<String, Integer> symbolsMap)
    {
        int sid = 1;

        // Collect from passed-in priorSymtab
        if (priorSymtab != null)
        {
            Iterator<String> priorSymbols =
                priorSymtab.iterateDeclaredSymbolNames();
            while (priorSymbols.hasNext())
            {
                String text = priorSymbols.next();
                if (text != null)
                {
                    assert text.length() > 0;
                    putToMapIfNotThere(symbolsMap, text, sid);
                }

                // NB: Null entries must be added in the sid sequence
                //     to retain compat. with the prior version.
                symbolsList.add(text);

                sid++;
            }
        }

        // Collect from passed-in symbols
        while (symbols.hasNext())
        {
            String text = symbols.next();
            // TODO amzn/ion-java/issues/12 What about empty symbols?
            if (symbolsMap.get(text) == null)
            {
                putToMapIfNotThere(symbolsMap, text, sid);
                symbolsList.add(text);
                sid++;
            }
        }
    }
1301401
def _assign_values_to_unbound_vars(unbound_vars, unbound_var_values):
  """"""
  context = {}
  for key, value in six.iteritems(unbound_var_values):
    if key not in unbound_vars:
      raise ValueError('unexpected key: %s. Legal values are: %s' %
                       (key, list(six.iterkeys(unbound_vars))))
    context[unbound_vars[key]] = value
  unspecified = []
  for unbound_var in six.itervalues(unbound_vars):
    if unbound_var not in context:
      if unbound_var.has_default():
        context[unbound_var] = unbound_var.default
      else:
        unspecified.append(unbound_var.key)
  if unspecified:
    raise ValueError('Unspecified keys: %s' % unspecified)
  return context
166535
def VariablesValues(self, variables, t):
        
        # TODO: put interpolation in variables
        if (t < self.te) | (t > 0):
            i = t//self.ts  # time step
            ti = self.ts*i
            if type(variables) == list:
                values = []
                for variable in variables:
                    # interpolation
                    values.append(
                        variables.values[i]*((ti-t)/self.ts+1)+variables.values[i+1]*(t-ti)/self.ts)
                return values

            else:
                # interpolation
                return variables.values[i]*((ti-t)/self.ts+1)+variables.values[i+1]*(t-ti)/self.ts
        else:
            raise ValueError
795227
def declared_symbols(self):
        

        return self.local_declared_symbols | (
            self.parent.declared_symbols if self.parent else set())
1102688
@Override
  protected void visitLetValueNode(LetValueNode node) {

    String generatedVarName = node.getUniqueVarName();

    // Generate code to define the local var.
    Expression value = translateExpr(node.getExpr());
    jsCodeBuilder.append(VariableDeclaration.builder(generatedVarName).setRhs(value).build());

    // Add a mapping for generating future references to this local var.
    templateTranslationContext
        .soyToJsVariableMappings()
        .put(node.getVarName(), id(generatedVarName));
  }
86706
private void prepTemplatePlaceholders(Node fn) {
    final List<String> locals = templateLocals;
    final List<String> params = templateParams;
    final Map<String, JSType> paramTypes = new HashMap<>();

    // drop the function name so it isn't include in the name maps
    String fnName = fn.getFirstChild().getString();
    fn.getFirstChild().setString("");

    // Build a list of parameter names and types.
    Node templateParametersNode = fn.getSecondChild();
    JSDocInfo info = NodeUtil.getBestJSDocInfo(fn);
    if (templateParametersNode.hasChildren()) {
      Preconditions.checkNotNull(info,
          "Missing JSDoc declaration for template function %s", fnName);
    }
    for (Node paramNode : templateParametersNode.children()) {
      String name = paramNode.getString();
      JSTypeExpression expression = info.getParameterType(name);
      Preconditions.checkNotNull(expression,
          "Missing JSDoc for parameter %s of template function %s",
          name, fnName);
      JSType type = typeRegistry.evaluateTypeExpressionInGlobalScope(expression);
      checkNotNull(type);
      params.add(name);
      paramTypes.put(name, type);
    }

    // Find references to string literals, local variables and parameters and replace them.
    traverse(
        fn,
        new Visitor() {
          @Override
          public void visit(Node n) {
            if (n.isName()) {
              Node parent = n.getParent();
              String name = n.getString();
              if (!name.isEmpty() && parent.isVar() && !locals.contains(name)) {
                locals.add(n.getString());
              }

              if (params.contains(name)) {
                JSType type = paramTypes.get(name);
                boolean isStringLiteral =
                    type.isStringValueType() && name.startsWith("string_literal");
                replaceNodeInPlace(
                    n, createTemplateParameterNode(params.indexOf(name), type, isStringLiteral));
              } else if (locals.contains(name)) {
                replaceNodeInPlace(n, createTemplateLocalNameNode(locals.indexOf(name)));
              }
            }
          }
        });
  }
73964
function wrapValues (values, objtypes) {
  var result = [];
  for(var i=0; i < objtypes.length; i++) result.push(wrapValue(values[i], objtypes[i]));
  return result;
}
567487
private void makeCardinalityVariables() {
        vmsCountOnNodes = new ArrayList<>(nodes.size());
        int nbVMs = vms.size();
        for (Node n : nodes) {
            vmsCountOnNodes.add(csp.intVar(makeVarLabel("nbVMsOn('", n, "')"), 0, nbVMs, true));
        }
        vmsCountOnNodes = Collections.unmodifiableList(vmsCountOnNodes);
    }
864140
def p_var_decl(p):
    
    for vardata in p[2]:
        SYMBOL_TABLE.declare_variable(vardata[0], vardata[1], p[3])

    p[0] = None
55714
def build_vars(path=None):
        """"""
        init_vars = {
            "__name__": "__main__",
            "__package__": None,
            "reload": reload,
        }
        if path is not None:
            init_vars["__file__"] = fixpath(path)
        # put reserved_vars in for auto-completion purposes
        for var in reserved_vars:
            init_vars[var] = None
        return init_vars
1118440
def global_symbols(self):
        

        declared_symbols = self.declared_symbols
        return set(
            s for s in self.referenced_symbols if s not in declared_symbols)
1373488
def _compile_list(self, data, indent_level):
        """"""
        if len(data) == 0:
            return '--'
        elif not any(isinstance(i, (dict, list)) for i in data):
            return ', '.join(self._compile_literal(value) for value in data)
        else:
            # 'ere be dragons,
            # granted there are fewer dragons than the parser,
            # but dragons nonetheless
            buffer = ''
            i = 0
            while i < len(data):
                if isinstance(data[i], dict):
                    buffer += '\n'
                    buffer += self._indent * indent_level
                    while i < len(data) and isinstance(data[i], dict):
                        buffer += '-\n'
                        buffer += self._compile_key_val(data[i], indent_level)
                        buffer += self._indent * indent_level + '-'
                        i += 1
                    buffer += '\n'
                elif (
                    isinstance(data[i], list) and
                    any(isinstance(item, (dict, list)) for item in data[i])
                ):
                    buffer += self._compile_list(data[i], indent_level+1)
                elif isinstance(data[i], list):
                    buffer += '\n'
                    buffer += self._indent * indent_level
                    buffer += self._compile_list(data[i], indent_level+1)
                else:
                    buffer += '\n'
                    buffer += self._indent * indent_level
                    buffer += self._compile_literal(data[i])

                i += 1

            return buffer