Haanga_Compiler_Tokenizer::yylex_html PHP Method

yylex_html() public method

public yylex_html ( )
    function yylex_html()
    {
        $data =& $this->data;
        $i =& $this->N;
        foreach ($this->open_tags as $value => $status) {
            $pos = strpos($data, $value, $i);
            if ($pos === FALSE) {
                continue;
            }
            if (!isset($lowest_pos) || $lowest_pos > $pos) {
                $lowest_pos = $pos;
            }
        }
        if (isset($lowest_pos)) {
            $this->value = substr($data, $i, $lowest_pos - $i);
            $this->token = HG_Parser::T_HTML;
            $this->status = self::IN_NONE;
            $i += $lowest_pos - $i;
        } else {
            $this->value = substr($data, $i);
            $this->token = HG_Parser::T_HTML;
            $i = $this->length;
        }
        $this->line += substr_count($this->value, "\n");
    }