system_sentence : SYSTEM VAR
                           | SYSTEM VAR LPAREN features RPAREN
963268
def p_system_sentence(self, t):
        """"""

        if len(t) == 3:
            t[0] = system(t[2], reference=True, line=t.lineno(1))
        else:
            t[0] = system(t[2], t[4], line=t.lineno(1))
266940
def listVars(prefix="", equals="\t= ", **kw):
    """"""

    keylist = getVarList()
    if len(keylist) == 0:
        print('No IRAF variables defined')
    else:
        keylist.sort()
        for word in keylist:
            print("%s%s%s%s" % (prefix, word, equals, envget(word)))
70525
private static Variable[] litsAsVars(final Literal[] lits) {
    final Variable[] vars = new Variable[lits.length];
    for (int i = 0; i < vars.length; i++)
      vars[i] = lits[i].variable();
    return vars;
  }
901304
def variable(self):
        
        var = Var(self.cur_token)
        self.eat(TokenTypes.VAR)
        if Features.TYPE_ARRAY in self.features:
            while self.cur_token.type == TokenTypes.LBRACKET:
                self.eat(TokenTypes.LBRACKET)
                # Start passed the logical ops.
                expr = self.operator_expression(level=2)
                self.eat(TokenTypes.RBRACKET)
                var = GetArrayItem(left=var, right=expr)
        if Features.FUNC in self.features:
            if self.cur_token.type == TokenTypes.LPAREN:
                self.eat(TokenTypes.LPAREN)
                args = self.arg_list()
                self.eat(TokenTypes.RPAREN)
                var = Call(var, args)
        return var
1004868
private static Set<String>  parseRequiredFeatures(String val)
   {
      TextScanner      scan = new TextScanner(val);
      HashSet<String>  result = new HashSet<>();

      while (!scan.empty())
      {
         String feature = scan.nextToken();
         if (feature.startsWith(FEATURE_STRING_PREFIX)) {
            result.add(feature.substring(FEATURE_STRING_PREFIX.length()));
         } else {
            // Not a feature string we recognise or support. (In order to avoid accidentally
            // matches with our truncated feature strings, we'll replace it with a string
            // we know for sure won't match anything.
            result.add("UNSUPPORTED");
         }
         scan.skipWhitespace();
      }
      return result;
   }
53526
def setSystemVariable(self, remote, name, value):
        """"""
        if self.remotes[remote]['username'] and self.remotes[remote]['password']:
            LOG.debug(
                "ServerThread.setSystemVariable: Setting System variable via JSON-RPC")
            session = self.jsonRpcLogin(remote)
            if not session:
                return
            try:
                params = {"_session_id_": session,
                          "name": name, "value": value}
                if value is True or value is False:
                    params['value'] = int(value)
                    response = self._rpcfunctions.jsonRpcPost(
                        self.remotes[remote]['ip'], self.remotes[remote].get('jsonport', DEFAULT_JSONPORT), "SysVar.setBool", params)
                else:
                    response = self._rpcfunctions.jsonRpcPost(
                        self.remotes[remote]['ip'], self.remotes[remote].get('jsonport', DEFAULT_JSONPORT), "SysVar.setFloat", params)
                if response['error'] is None and response['result']:
                    res = response['result']
                    LOG.debug(
                        "ServerThread.setSystemVariable: Result while setting variable: %s" % str(res))
                else:
                    if response['error']:
                        LOG.debug("ServerThread.setSystemVariable: Error while setting variable: %s" % str(
                            response['error']))

                self.jsonRpcLogout(remote, session)
            except Exception as err:
                self.jsonRpcLogout(remote, session)
                LOG.warning(
                    "ServerThread.setSystemVariable: Exception: %s" % str(err))
        else:
            try:
                return self.proxies["%s-%s" % (self._interface_id, remote)].setSystemVariable(name, value)
            except Exception as err:
                LOG.debug(
                    "ServerThread.setSystemVariable: Exception: %s" % str(err))
433055
public void typeSystemInit(TypeSystem typeSystem)
      throws AnalysisEngineProcessException {
    
    // sentence type
    mSentenceType = AnnotatorUtil.getRequiredTypeParameter(this.context, typeSystem,
        UimaUtil.SENTENCE_TYPE_PARAMETER);
    
    // token type
    mTokenType = AnnotatorUtil.getRequiredTypeParameter(context, typeSystem,
        UimaUtil.TOKEN_TYPE_PARAMETER);

    // pos feature
    mPosFeature = AnnotatorUtil.getRequiredFeatureParameter(context, mTokenType, UimaUtil.POS_FEATURE_PARAMETER, 
    		CAS.TYPE_NAME_STRING);
    
    mLexemeFeature = AnnotatorUtil.getRequiredFeatureParameter(this.context, mTokenType,
        "opennlp.uima.LexemeFeature", CAS.TYPE_NAME_STRING);
    
    // featurizer feature
    mFeaturizerFeature = AnnotatorUtil.getRequiredFeatureParameter(context, mTokenType,
            FEATURIZER_TAG_FEATURE_PARAMETER, CAS.TYPE_NAME_STRING);
  }
737573
function setVars(origEnv, setVars) {
  var key;
  if (typeof setVars !== 'object')
    return;
  if (Array.isArray(setVars))
    return;
  for (key in setVars) {
    if (has(setVars, key)) {
      if (!has(origEnv, key)) {
        origEnv[key] = [
          !!has(process.env, key),
          process.env[key]
        ];
      }
      process.env[key] = setVars[key];
    }
  }
  return;
}
1001660
function tag_sentence_wordnet(tagged_sentence, callback) {
  var wordnet_results = {};
  var nr_tokens = tagged_sentence.length;

  tagged_sentence.forEach(function(tagged_word) {
    logger.debug("tag_sentence: processing " + tagged_word);
    wordnet.lookup(tagged_word[0], function(results) {
      results.forEach(function(result) {
        if (tagged_word.lastIndexOf(result.pos) <= 0) {
          tagged_word.push(result.pos);
          logger.debug("Lexical category of " + tagged_word[0] + " is: " + result.pos);
        }
      });

      nr_tokens--;
      if (nr_tokens === 0) {
        logger.info("Exit tag_sentence_wordnet: " + JSON.stringify(tagged_sentence));
        callback(tagged_sentence);
      }
    });
  });
}
236801
def search_stack_for_var(varname, verbose=util_arg.NOT_QUIET):
    
    curr_frame = inspect.currentframe()
    if verbose:
        print(' * Searching parent frames for: ' + six.text_type(varname))
    frame_no = 0
    while curr_frame.f_back is not None:
        if varname in curr_frame.f_locals.keys():
            if verbose:
                print(' * Found local in frame: ' + six.text_type(frame_no))
            return curr_frame.f_locals[varname]
        if varname in curr_frame.f_globals.keys():
            if verbose:
                print(' * Found global in frame: ' + six.text_type(frame_no))
            return curr_frame.f_globals[varname]
        frame_no += 1
        curr_frame = curr_frame.f_back
    if verbose:
        print('... Found nothing in all ' + six.text_type(frame_no) + ' frames.')
    return None
1055424
function getSlateEnv() {
  const env = {};

  SLATE_ENV_VARS.forEach((key) => {
    env[key] = process.env[key];
  });

  return env;
}
826168
function parseVariable(str, line) {
    var tokens = lexer.read(utils.strip(str)),
      parser,
      out;

    parser = new TokenParser(tokens, filters, escape, line, opts.filename);
    out = parser.parse().join('');

    if (parser.state.length) {
      utils.throwError('Unable to parse "' + str + '"', line, opts.filename);
    }

    /**
     * A parsed variable token.
     * @typedef {object} VarToken
     * @property {function} compile Method for compiling this token.
     */
    return {
      compile: function () {
        return '_output += ' + out + ';\n';
      }
    };
  }
309127
function parseFeatures (features) {
  features = defaultValue(features, '')
  if (!features) {
    return {}
  }

  return features
    .split(',')
    .map(toNameAndValuePair)
    .reduce(toPlainObject, {})
}
215402
def replace_vars(config, env):
  
  if isinstance(config, dict):
    for k, v in list(config.items()):
      if isinstance(v, dict) or isinstance(v, list) or isinstance(v, tuple):
        replace_vars(v, env)
      elif isinstance(v, basestring):
        config[k] = expand_var(v, env)
  elif isinstance(config, list):
    for i, v in enumerate(config):
      if isinstance(v, dict) or isinstance(v, list) or isinstance(v, tuple):
        replace_vars(v, env)
      elif isinstance(v, basestring):
        config[i] = expand_var(v, env)
  elif isinstance(config, tuple):
    # TODO(gram): figure out how to handle these if the tuple elements are scalar
    for v in config:
      if isinstance(v, dict) or isinstance(v, list) or isinstance(v, tuple):
        replace_vars(v, env)
678911
def parse_variable_definitions(lexer: Lexer) -> List[VariableDefinitionNode]:
    """"""
    return (
        cast(
            List[VariableDefinitionNode],
            many_nodes(
                lexer, TokenKind.PAREN_L, parse_variable_definition, TokenKind.PAREN_R
            ),
        )
        if peek(lexer, TokenKind.PAREN_L)
        else []
    )
496693
def _nest_vars_in_rec(var_items, rec_items, input_order, items_by_key, parallel):
    
    num_items = var_items
    var_items = list(var_items)[0]
    if rec_items:
        rec_items = list(rec_items)[0]
        if ((rec_items == 1 and var_items > 1) or parallel.startswith("batch")):
            num_items = set([rec_items])
            for var_key in (k for (k, t) in input_order.items() if t != "record"):
                var_key = tuple(var_key.split("__"))
                items_by_key[var_key] = [items_by_key[var_key]] * rec_items
        else:
            assert var_items == rec_items, (var_items, rec_items)
    return items_by_key, num_items
235644
def _clauses(lexer, varname, nvars):
    """"""
    tok = next(lexer)
    toktype = type(tok)
    if toktype is OP_not or toktype is IntegerToken:
        lexer.unpop_token(tok)
        first = _clause(lexer, varname, nvars)
        rest = _clauses(lexer, varname, nvars)
        return (first, ) + rest
    # null
    else:
        lexer.unpop_token(tok)
        return tuple()