| 1 |
/**************************************************************************** |
| 2 |
** |
| 3 |
** Copyright (C) 2016 The Qt Company Ltd. |
| 4 |
** Contact: https://www.qt.io/licensing/ |
| 5 |
** |
| 6 |
** This file is part of the test suite of the Qt Toolkit. |
| 7 |
** |
| 8 |
** $QT_BEGIN_LICENSE:GPL-EXCEPT$ |
| 9 |
** Commercial License Usage |
| 10 |
** Licensees holding valid commercial Qt licenses may use this file in |
| 11 |
** accordance with the commercial license agreement provided with the |
| 12 |
** Software or, alternatively, in accordance with the terms contained in |
| 13 |
** a written agreement between you and The Qt Company. For licensing terms |
| 14 |
** and conditions see https://www.qt.io/terms-conditions. For further |
| 15 |
** information use the contact form at https://www.qt.io/contact-us. |
| 16 |
** |
| 17 |
** GNU General Public License Usage |
| 18 |
** Alternatively, this file may be used under the terms of the GNU |
| 19 |
** General Public License version 3 as published by the Free Software |
| 20 |
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT |
| 21 |
** included in the packaging of this file. Please review the following |
| 22 |
** information to ensure the GNU General Public License requirements will |
| 23 |
** be met: https://www.gnu.org/licenses/gpl-3.0.html. |
| 24 |
** |
| 25 |
** $QT_END_LICENSE$ |
| 26 |
** |
| 27 |
****************************************************************************/ |
| 28 |
/* NOTE: This file is AUTO GENERATED by qtokenautomaton2cpp.xsl. */ |
| 29 |
|
| 30 |
#include "noToString.h" |
| 31 |
|
| 32 |
QT_BEGIN_NAMESPACE |
| 33 |
|
| 34 |
using namespace NoToStringNS; |
| 35 |
|
| 36 |
NoToString::Token NoToString::classifier3(const QChar *data) |
| 37 |
|
| 38 |
{ |
| 39 |
if (data[0].unicode() == 100) |
| 40 |
|
| 41 |
|
| 42 |
{ |
| 43 |
|
| 44 |
static const unsigned short string[] = |
| 45 |
{ |
| 46 |
101, 102 |
| 47 |
}; |
| 48 |
if(memcmp(&data[1], &string, sizeof(QChar) * 2) == 0) |
| 49 |
|
| 50 |
|
| 51 |
return _111; |
| 52 |
|
| 53 |
} |
| 54 |
|
| 55 |
else if (data[0].unicode() == 97) |
| 56 |
|
| 57 |
|
| 58 |
{ |
| 59 |
|
| 60 |
static const unsigned short string[] = |
| 61 |
{ |
| 62 |
98, 99 |
| 63 |
}; |
| 64 |
if(memcmp(&data[1], &string, sizeof(QChar) * 2) == 0) |
| 65 |
|
| 66 |
|
| 67 |
return _; |
| 68 |
|
| 69 |
} |
| 70 |
|
| 71 |
else if (data[0].unicode() == 103) |
| 72 |
|
| 73 |
|
| 74 |
{ |
| 75 |
|
| 76 |
static const unsigned short string[] = |
| 77 |
{ |
| 78 |
104, 105 |
| 79 |
}; |
| 80 |
if(memcmp(&data[1], &string, sizeof(QChar) * 2) == 0) |
| 81 |
|
| 82 |
|
| 83 |
return wobbly; |
| 84 |
|
| 85 |
} |
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
return NoKeyword; |
| 90 |
} |
| 91 |
NoToString::Token NoToString::classifier4(const QChar *data) |
| 92 |
|
| 93 |
{ |
| 94 |
if (data[0].unicode() == 70) |
| 95 |
|
| 96 |
|
| 97 |
{ |
| 98 |
if (data[1].unicode() == 70) |
| 99 |
|
| 100 |
|
| 101 |
{ |
| 102 |
if (data[2].unicode() == 70) |
| 103 |
|
| 104 |
|
| 105 |
{ |
| 106 |
if (data[3].unicode() == 70) |
| 107 |
|
| 108 |
|
| 109 |
{ |
| 110 |
|
| 111 |
|
| 112 |
return FFFF; |
| 113 |
|
| 114 |
} |
| 115 |
|
| 116 |
else if (data[3].unicode() == 71) |
| 117 |
|
| 118 |
|
| 119 |
{ |
| 120 |
|
| 121 |
|
| 122 |
return FFFG; |
| 123 |
|
| 124 |
} |
| 125 |
|
| 126 |
|
| 127 |
} |
| 128 |
|
| 129 |
else if (data[2].unicode() == 71) |
| 130 |
|
| 131 |
|
| 132 |
{ |
| 133 |
if (data[3].unicode() == 70) |
| 134 |
|
| 135 |
|
| 136 |
{ |
| 137 |
|
| 138 |
|
| 139 |
return FFGF; |
| 140 |
|
| 141 |
} |
| 142 |
|
| 143 |
else if (data[3].unicode() == 71) |
| 144 |
|
| 145 |
|
| 146 |
{ |
| 147 |
|
| 148 |
|
| 149 |
return FFGG; |
| 150 |
|
| 151 |
} |
| 152 |
|
| 153 |
|
| 154 |
} |
| 155 |
|
| 156 |
else if (data[2].unicode() == 76) |
| 157 |
|
| 158 |
|
| 159 |
{ |
| 160 |
|
| 161 |
if (data[3].unicode() == 77) |
| 162 |
|
| 163 |
|
| 164 |
return FFLM; |
| 165 |
|
| 166 |
} |
| 167 |
|
| 168 |
|
| 169 |
} |
| 170 |
|
| 171 |
|
| 172 |
} |
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
return NoKeyword; |
| 177 |
} |
| 178 |
NoToString::Token NoToString::classifier14(const QChar *data) |
| 179 |
|
| 180 |
{ |
| 181 |
|
| 182 |
static const unsigned short string[] = |
| 183 |
{ |
| 184 |
99, 111, 108, 111, 110, 58, 105, 110, 58, 110, 97, 109, 101, 58 |
| 185 |
}; |
| 186 |
if(memcmp(&data[0], &string, sizeof(QChar) * 14) == 0) |
| 187 |
|
| 188 |
|
| 189 |
return ColonInName; |
| 190 |
|
| 191 |
|
| 192 |
return NoKeyword; |
| 193 |
} |
| 194 |
NoToString::Token NoToString::classifier44(const QChar *data) |
| 195 |
|
| 196 |
{ |
| 197 |
|
| 198 |
static const unsigned short string[] = |
| 199 |
{ |
| 200 |
97, 82, 101, 97, 108, 108, 121, 76, 111, 110, 103, 84, 111, 107, 101, 110, 73, 70, 114, 101, 97, 107, 105, 110, 77, 101, 97, 110, 73, 116, 85, 75, 110, 111, 119, 85, 75, 110, 111, 119, 75, 110, 111, 119 |
| 201 |
}; |
| 202 |
if(memcmp(&data[0], &string, sizeof(QChar) * 44) == 0) |
| 203 |
|
| 204 |
|
| 205 |
return AReallyLongTokenIFreakinMeanItUKnowUKnowKnow; |
| 206 |
|
| 207 |
|
| 208 |
return NoKeyword; |
| 209 |
} |
| 210 |
NoToString::Token NoToString::toToken(const QChar *data, int length) |
| 211 |
{ |
| 212 |
switch(length) |
| 213 |
{ |
| 214 |
|
| 215 |
case 3: |
| 216 |
return classifier3(data); |
| 217 |
|
| 218 |
|
| 219 |
case 4: |
| 220 |
return classifier4(data); |
| 221 |
|
| 222 |
|
| 223 |
case 14: |
| 224 |
return classifier14(data); |
| 225 |
|
| 226 |
|
| 227 |
case 44: |
| 228 |
return classifier44(data); |
| 229 |
|
| 230 |
|
| 231 |
default: |
| 232 |
return NoKeyword; |
| 233 |
} |
| 234 |
} |
| 235 |
|
| 236 |
|
| 237 |
QT_END_NAMESPACE |
| 238 |
|