Debian Codegraph @

Source/Parser/FunctionalJAVACC/FunctionalJAVACCSettings.h

raw
1 /*
2 * Copyright (C) 2013-2015, 2019 by the Konclude Developer Team.
3 *
4 * This file is part of the reasoning system Konclude.
5 * For details and support, see <http://konclude.com/>.
6 *
7 * Konclude is free software: you can redistribute it and/or modify
8 * it under the terms of version 3 of the GNU Lesser General Public
9 * License (LGPLv3) as published by the Free Software Foundation.
10 *
11 * Konclude is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU (Lesser) General Public License for more details.
15 *
16 * You should have received a copy of the GNU (Lesser) General Public
17 * License along with Konclude. If not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21 #ifndef KONCLUDE_EXPRESSION_FUNCTIONALJAVACC_FUNCTIONALJAVACCSETTINGS
22 #define KONCLUDE_EXPRESSION_FUNCTIONALJAVACC_FUNCTIONALJAVACCSETTINGS
23
24 // Libraries includes
25
26
27 // Namespace includes
28 #include "JavaCC.h"
29
30 // Other includes
31 #include "Parser/ParserSettings.h"
32 #include "Parser/COntologyBuilder.h"
33
34 #include "Parser/Expressions/CBuildExpression.h"
35 #include "Parser/Expressions/CDatatypeExpression.h"
36 #include "Parser/Expressions/CDataLexicalValueExpression.h"
37
38
39 // Logger includes
40
41
42 namespace Konclude {
43
44 namespace Parser {
45
46 using namespace Expression;
47
48 namespace FunctionalJAVACC {
49
50
51
52
53
54 #ifndef JAVACC_TO_QSTRING_DEFINED
55 #define JAVACC_TO_QSTRING_DEFINED
56 #ifndef EXPLICIT_JAVACC_QSTRING_CONVERTION
57 #define JAVACC_TO_QSTRING(s) QString::fromStdWString(s)
58 #else
59
60 class JAVACCToQStringConverter {
61 public:
62 static const QString convertJAVACCToQString(JAVACC_STRING_TYPE string) {
63 QString qstring;
64 qstring.reserve(string.size());
65 for (JAVACC_STRING_TYPE::const_iterator it = string.cbegin(), itEnd = string.cend(); it != itEnd; ++it) {
66 JAVACC_CHAR_TYPE character = *it;
67 uint unicode = (uint)character;
68 qstring.append(QChar(unicode));
69 }
70 return qstring;
71 }
72 };
73
74 #define JAVACC_TO_QSTRING(s) JAVACCToQStringConverter::convertJAVACCToQString(s)
75 #endif
76 #endif
77
78
79 /*!
80 *
81 * \file FunctionalJAVACCSettings
82 * \author Andreas Steigmiller
83 * \version 0.1
84 * \brief TODO
85 *
86 */
87
88
89 // forward declarations
90
91 typedef CBuildExpression* CBuildExpressionPtr;
92 typedef CDatatypeExpression* CDatatypeExpressionPtr;
93 typedef CDataLexicalValueExpression* CDataLexicalValueExpressionPtr;
94
95
96 }; // end namespace FunctionalJAVACC
97
98 }; // end namespace Parser
99
100 }; // end namespace Konclude
101
102
103 #endif // end KONCLUDE_EXPRESSION_FUNCTIONALJAVACC_FUNCTIONALJAVACCSETTINGS