Initialisiert den Lexer

der Sourcecode wird gelesen und in tokens übersetzt
nach diesem Befehl ist der erste token in $this->token gesetzt
771273
public function init($source) {
    $this->source = $source; // für debug
    $this->scan($source);
    $this->reset();
  }
375091
private function init()
    {
        if (!$this->plink) {
            if (!extension_loaded('pspell')) {
                $this->error = "Pspell extension not available";
                return;
            }

            $this->plink = pspell_new($this->lang, null, null, RCUBE_CHARSET, PSPELL_FAST);
        }

        if (!$this->plink) {
            $this->error = "Unable to load Pspell engine for selected language";
        }
    }
1150437
protected function init()
    {
        $structure = $this->imapFetchstructure();
        $this->structure = $structure;
        if (isset($structure->parts)) {
            $countSection = count($structure->parts);
            $this->countAttachment = $countSection - 1;
        }
        $this->getCountSection();
        $this->getHeader();
        $this->getAttachments();
        $this->getBody();
        if ($this->_decode === self::DECODE) {
            $this->decode();
        }
    }
985468
public function _setTokenStart($delimiter)
    {
        if (
            !($delimiter instanceof Stringable) &&
            !is_string($delimiter) &&
            !is_null($delimiter)
        ) {
            throw $this->_createInvalidArgumentException($this->__('Invalid token start delimiter'), null, null, $delimiter);
        }

        $this->tokenStart = $delimiter;
    }
751231
function init(ctx) {
        var server = ctx.server;

        if (!privateKey) {
            throw new Error('Please set config.security.token.privateKey');
        }

        server.ext('onPreAuth', validateToken);

        return new Q(ctx);
    }
73699
public function initialize()
    {
        $lang = $this;

        if (is_callable($this->options['lang'])) {
            $this->options['lang'] = call_user_func($this->options['lang']);
        }

        if ($p = realpath(rtrim($this->app->config('bono.base.path'), DIRECTORY_SEPARATOR))) {
            $this->addBaseDirectory($p, 9);
        }

        $d = explode(DIRECTORY_SEPARATOR.'src', __DIR__);
        $this->addBaseDirectory($d[0]);

        $this->app->container->singleton('lang', function () use ($lang) {
            return $lang;
        });
    }
859111
private static function init() {
        self::$huffmanLookup = self::huffmanLookupInit();
        self::$huffmanCodes = self::huffmanCodesInit();
        self::$huffmanLengths = self::huffmanLengthsInit();

        foreach (\array_column(self::TABLE, 0) as $index => $name) {
            if (isset(self::$indexMap[$name])) {
                continue;
            }

            self::$indexMap[$name] = $index + 1;
        }
    }
184336
function parse()
    {
        $criteria        = $this->criteria;
        $expectAsLiteral = $this->expectAsLiteral;


        $TOKENS  = preg_quote(static::TOKENS);

        $expectAsLiteral = (empty($expectAsLiteral)) ? '/@+-.' : $expectAsLiteral;
        $LITERAL = preg_quote($expectAsLiteral).'A-Za-z0-9_';


        $currentPos = 0;
        $length     = strlen($criteria);
        $parts      = [];
        $levelParts = [&$parts];
        $level      = 0;

        while ($currentPos < $length)
        {
            preg_match("(\G(?P<_literal_>[$LITERAL]*)(?P<_token_>[$TOKENS]|$))"
                , $criteria
                , $matches
                , 0
                , $currentPos
            );

            if ( empty($matches) )
                break;

            if (! empty($matches['_literal_']) ) {
                $levelParts[$level][] = ['_literal_' => $matches['_literal_']];
                $currentPos += strlen($matches['_literal_']);
            }

            # Deal With Token:
            if ( !isset($matches['_token_']) || $matches['_token_'] == '' )
                continue;

            $currentPos += strlen($matches['_token_']);
            $Token = $matches['_token_'];

            ## Regular Expression Token
            #
            #
            if ($Token === '~') {
                // ^ match any character that is not in list
                $pmatch = preg_match("/~(?P<_delimiter_>[^~]+)~/"
                    , $criteria
                    , $matches
                    , 0
                    , 0
                );
                if (! $pmatch )
                    throw new \RuntimeException('Miss usage of ~ ~ token.');

                $val['_regex_'] = $matches['_delimiter_'];
                $levelParts[$level][] = $val;

                $currentPos += strlen($matches[0])+2/*~x~*/;
            }
            ##
            # Variable
            # /:hash_id~\w{24}~
            #
            elseif ($Token === ':') {
                // ^$TOKENS  match any character that is not in list
                $pmatch = preg_match("(\G(?P<_name_>[^$TOKENS]+)(?:~(?P<_delimiter_>[^~]+)~)?:?)"
                    , $criteria
                    , $matches
                    , 0
                    , $currentPos
                );

                if (! $pmatch && !(isset($matches['_name_']) && isset($matches['_delimiter_'])) )
                    throw new \RuntimeException(
                        'Found empty parameter name or delimiter on (%s).'
                        , $criteria
                    );

                $parameter = $matches['_name_'];
                $val       = ['_parameter_' => $parameter];
                if (isset($matches['_delimiter_']))
                    $val[$parameter] = $matches['_delimiter_'];

                $levelParts[$level][] = $val;
                $currentPos += strlen($matches[0]);
            }

            ## Literal Token
            #  localhost\:port
            #
            elseif ($Token === '\\') {
                // Consider next character as Literal
                $nextChar = $currentPos += 1;
                $levelParts[$level][]   = ['_literal_' => $criteria[$nextChar]];
            }

            ## Optional Part
            #  /<u/:username~[a-zA-Z0-9._]+~><-:userid~\w{24}~>
            #
            elseif ($Token === '<') {
                if (! isset($va) ) {
                    $va = [];
                    $n = 0;
                }

                $n++;
                $va[$n] = [];
                $levelParts[$level][] = ['_optional_' => &$va[$n]];
                $level++;
                $levelParts[$level] = &$va[$n];
            }
            ## Close Optional ##
            elseif ($Token === '>') {
                unset($levelParts[$level]);
                $level--;

                if ($level < 0)
                    throw new \RuntimeException('Found closing bracket without matching opening bracket');
            }

            else
                // Recognized unused token return immanently
                $levelParts[$level][]   = ['_token_' => $Token];

        } // end while

        if ($level > 0)
            throw new \RuntimeException('Found unbalanced brackets');


        return ParsedCriteria::of($parts);
    }
951053
function initPHP( $charset = false )
    {
        if ( $charset === false )
            $charset = $this->Language->code();
        setlocale( LC_ALL, $charset );
    }
1326235
private static function init(): void
    {
        if (!static::$initialized) {
            $baseClass = Base::getInstance();
            static::$initialized = true;
            static::$serverName = (string)$baseClass->getServerName();
            static::$refererIntegrityEnabled = (bool)$baseClass->Session->RefererIntegrity->enabled;
            static::$tokenIntegrityEnabled = (bool)$baseClass->Session->TokenIntegrity->enabled;
            static::$tokenUseLooseIP = (bool)$baseClass->Session->TokenIntegrity->useLooseIP;
            static::$tokenUseHttpUserAgent = (bool)$baseClass->Session->TokenIntegrity->useHttpUserAgent;
            static::$tokenUseHttpAccept = (bool)$baseClass->Session->TokenIntegrity->useHttpAccept;
            static::$tokenUseHttpAcceptCharset = (bool)$baseClass->Session->TokenIntegrity->useHttpAcceptCharset;
            static::$tokenUseHttpAcceptEncoding = (bool)$baseClass->Session->TokenIntegrity->useHttpAcceptEncoding;
            static::$tokenUseHttpAcceptLanguage = (bool)$baseClass->Session->TokenIntegrity->useHttpAcceptLanguage;
        }
    }
86662
public function initParser()
    {
        $parserType = CheckoutApi_Client_Constant::PARSER_CLASS_GROUP.$this->getRespondType(); 

        $parserObj =  CheckoutApi_Lib_Factory::getSingletonInstance($parserType) ;
        $this->setParser($parserObj);       
    }
1072605
private function initToken()
    {
        $tokenName = $this->getConfig()->get('Token', false);
        $rememberMe = $this->getConfig()->get('RememberMe', false);


        if (!$tokenName) {
            // fallback to the default token
            $securityKey = $this->getConfig()->get('TokenKey', false);

            if (!$securityKey) {
                throw new FirewallException('Missing TokenKey for "' . $this->getRealmName() . '" firewall.');
            }
        } else {
            $securityKey = Security::getConfig()->get('Tokens.' . $tokenName . '.SecurityKey', false);

            if (!$securityKey) {
                throw new FirewallException('Missing security key for "' . $tokenName . '" token.');
            }
        }

        $tokenCryptDriver = Security::getConfig()->get('Tokens.' . $tokenName . '.Driver', $this->defaultCryptDriver);
        $tokenCryptParams = Security::getConfig()->get('Tokens.' . $tokenName . '.Params', [], true);
        try {
            $tokenCrypt = $this->factory($tokenCryptDriver, $this->cryptDriverInterface, $tokenCryptParams);
        } catch (\Exception $e) {
            throw new FirewallException($e->getMessage());
        }

        $storageClass = Security::getConfig()->get('Tokens.' . $tokenName . '.StorageDriver');
        $this->token = new Token($this->getTokenName(), $rememberMe, $securityKey, $tokenCrypt, $storageClass);
    }
1374312
@Override
    protected void initializeTokenStream( DdlTokenStream tokens ) {
        super.initializeTokenStream(tokens);
        tokens.registerKeyWords(CUSTOM_KEYWORDS);
        tokens.registerStatementStartPhrase(ALTER_PHRASES);
        tokens.registerStatementStartPhrase(CREATE_PHRASES);
        tokens.registerStatementStartPhrase(DROP_PHRASES);
        tokens.registerStatementStartPhrase(SET_PHRASES);
        tokens.registerStatementStartPhrase(MISC_PHRASES);
    }
7427
Token parseTerm() throws ParseException {
		int ch = this.read();
		Token tok = null;
		if (ch == T_OR || ch == T_RPAREN || ch == T_EOF) {
			tok = Token.createEmpty();
		} else {
			tok = this.parseFactor();
			Token concat = null;
			while ((ch = this.read()) != T_OR && ch != T_RPAREN && ch != T_EOF) {
				if (concat == null) {
					concat = Token.createConcat();
					concat.addChild(tok);
					tok = concat;
				}
				concat.addChild(this.parseFactor());
				// tok = Token.createConcat(tok, this.parseFactor());
			}
		}
		if (ch == T_RPAREN) {
			parenCount--;
		}
		return tok;
	}
726140
private static function init()
    {
        if (!self::$defaultLng) {
            $config = Application::getConfigManager()->loadForModule('Cmf\Language');
            self::$defaultLng = strtolower($config->defaultLanguage);
            $currentLng = $config->currentLanguage;
            self::$currentLng = $currentLng ? strtolower($currentLng) : strtolower($config->defaultLanguage);
        }
    }
490547
protected function setCode(array $tokens, int $line = 0): void
    {
        $this->tokens = $tokens;
        $this->line = $line;
    }
444509
protected function initToken()
    {
        if (!$this->hasSessionNamespace(self::SESSION_NAMESPACE)) {
            $this->registerSessionNamespace(self::SESSION_NAMESPACE);
        }

        $session = $this->getSessionNamespace(self::SESSION_NAMESPACE);

        $this->token = $session->get('token');

        if (!$this->token) {
            $this->token = sha1('token:' . time() . rand());
            $session->set('token', $this->token);
        }
    }