private function validateInteger(string $str) : int
    {
        $ret = filter_var($str,FILTER_VALIDATE_INT);
        if ($ret === false){
            throw new CompileErrorException('invalid integer value', $this->state);
        }
        return $ret;
    }