protected function is($methodName /*, $arg1, $arg2, $arg3 ... */)
    {
        if (!method_exists($this, $methodName)) {
            throw new TextParserException(
                "The method `$methodName` does not exist"
            );
        }

        if (!is_callable(array($this, $methodName))) {
            throw new TextParserException(
                "The method `$methodName` is inaccessible"
            );
        }

        // saves offset
        $offset = $this->offset;

        // calls user function
        $ret = call_user_func_array(
            array($this, $methodName),
            array_slice(func_get_args(), 1)
        );

        // restores offset
        if (!$ret) {
            $this->offset = $offset;
        }

        return $ret;
    }