//---------------------------------------------------------------------------------------------------------------------- // // // This file is part of libpm library // // Copyright (C) 2010, ..., 2016 Pierre Molinaro. // // e-mail : pierre@pcmolinaro.name // // This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General // Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) // any later version. // // This program is distributed in the hope it will be useful, but WITHOUT ANY WARRANTY; without even the implied // warranty of MERCHANDIBILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for // more details. // //---------------------------------------------------------------------------------------------------------------------- #include "all-predefined-types.h" #include "galgas2/C_Compiler.h" #include "command_line_interface/C_BoolCommandLineOption.h" #include "command_line_interface/C_UIntCommandLineOption.h" #include "command_line_interface/C_StringCommandLineOption.h" #include "command_line_interface/F_Analyze_CLI_Options.h" #include "galgas2/F_verbose_output.h" #include "cLexiqueIntrospection.h" //---------------------------------------------------------------------------------------------------------------------- // // 'GALGAS_application' class // //---------------------------------------------------------------------------------------------------------------------- GALGAS_application::GALGAS_application (void) : AC_GALGAS_root () { } //---------------------------------------------------------------------------------------------------------------------- GALGAS_application::GALGAS_application (const GALGAS_application & inSource) : AC_GALGAS_root (inSource) { } //---------------------------------------------------------------------------------------------------------------------- GALGAS_application::~GALGAS_application (void) { } //---------------------------------------------------------------------------------------------------------------------- GALGAS_application & GALGAS_application::operator = (const GALGAS_application & /* inSource */) { return *this ; } //---------------------------------------------------------------------------------------------------------------------- typeComparisonResult GALGAS_application::objectCompare (const GALGAS_application & /* inOperand */) const { return kOperandNotValid ; } //---------------------------------------------------------------------------------------------------------------------- void GALGAS_application::description (C_String & ioString, const int32_t /* inIndentation */) const { ioString << "<@application:not built>" ; } //---------------------------------------------------------------------------------------------------------------------- GALGAS_bool GALGAS_application::constructor_verboseOutput (UNUSED_LOCATION_ARGS) { return GALGAS_bool (verboseOutput ()) ; } //---------------------------------------------------------------------------------------------------------------------- GALGAS_string GALGAS_application::constructor_system (UNUSED_LOCATION_ARGS) { #if COMPILE_FOR_WINDOWS == 1 return GALGAS_string ("windows") ; #else return GALGAS_string ("unix") ; #endif } //---------------------------------------------------------------------------------------------------------------------- GALGAS__32_stringlist GALGAS_application::constructor_boolOptionNameList (LOCATION_ARGS) { GALGAS__32_stringlist result = GALGAS__32_stringlist::constructor_emptyList (THERE) ; TC_UniqueArray array ; C_BoolCommandLineOption::getBoolOptionNameList (array) ; for (int32_t i=0 ; i array ; C_UIntCommandLineOption::getUIntOptionNameList (array) ; for (int32_t i=0 ; i array ; C_StringCommandLineOption::getStringOptionNameList (array) ; for (int32_t i=0 ; i= argument count = " << cStringWithUnsigned (commandLineArgumentCount ()) ; inCompiler->onTheFlySemanticError (message COMMA_THERE) ; } } return result ; } //----------------------------------------------------------------------------------------------------------------------* GALGAS_stringset GALGAS_application::constructor_keywordIdentifierSet (LOCATION_ARGS) { GALGAS_stringset result = GALGAS_stringset::constructor_emptySet (THERE) ; TC_UniqueArray list ; cLexiqueIntrospection::getKeywordListNames (list) ; for (int32_t i=0 ; i < list.count () ; i++) { result.addAssign_operation (GALGAS_string (list (i COMMA_HERE)) COMMA_HERE) ; } return result ; } //----------------------------------------------------------------------------------------------------------------------* GALGAS_stringlist GALGAS_application::constructor_keywordListForIdentifier (const GALGAS_string & inIdentifier COMMA_LOCATION_ARGS) { GALGAS_stringlist result ; if (inIdentifier.isValid ()) { result = GALGAS_stringlist::constructor_emptyList (THERE) ; TC_UniqueArray list ; bool found = false ; cLexiqueIntrospection::getKeywordListForIdentifier (inIdentifier.stringValue(), found, list) ; for (int32_t i=0 ; i < list.count () ; i++) { result.addAssign_operation (GALGAS_string (list (i COMMA_HERE)) COMMA_HERE) ; } } return result ; } //----------------------------------------------------------------------------------------------------------------------