/*************************************************************** * Function: CodeParser::parseSrcFile() * Purpose : Parse a source file (Matlab code) * Initial : Maxime Chevalier-Boisvert on October 23, 2008 **************************************************************** Revisions and bug fixes: */ CompUnits CodeParser::parseSrcFile(const std::string& filePath) { // If the verbose output flag is set if (ConfigManager::s_verboseVar.getBoolValue() == true) { // Log that we are parsing this file std::cout << "Parsing source file: \"" << filePath << "\"" << std::endl; } // Get the absolute path for the file std::string absPath = getAbsPath(filePath); // If the file name is invalid if (absPath.empty()) { // Log the error std::cout << "ERROR: invalid file name \"" + filePath << "\"" << std::endl; // Abort parsing return CompUnits(); } // Have the front-end parse the source code std::string xmlText = Client::parseFile(absPath); // Parse the XML IR return parseXMLText(xmlText); }
std::ds_wstring xOperationSys::getAbsResourcePath(const wchar_t* relPath) { return getAbsPath(relPath , m_ResPath.c_str() ); }
std::ds_wstring xOperationSys::getAbsPath(const wchar_t* _relPath) { return getAbsPath(_relPath , getAppPath()); }