private function compileString($str) {
        $result = null;
        try {
            $result = $this->parser->compile($str);
        } catch (\Exception $e) {
            throw new SyntaxErrorException("Syntax error in $this->currFile: "
                . $e->getMessage());
        }

        return $result;
    }