| 1 | /****************************************************************************
|
|---|
| 2 | **
|
|---|
| 3 | ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|---|
| 4 | ** Contact: Qt Software Information (qt-info@nokia.com)
|
|---|
| 5 | **
|
|---|
| 6 | ** This file is part of the QtScript module of the Qt Toolkit.
|
|---|
| 7 | **
|
|---|
| 8 | ** $QT_BEGIN_LICENSE:LGPL$
|
|---|
| 9 | ** Commercial Usage
|
|---|
| 10 | ** Licensees holding valid Qt Commercial licenses may use this file in
|
|---|
| 11 | ** accordance with the Qt Commercial License Agreement provided with the
|
|---|
| 12 | ** Software or, alternatively, in accordance with the terms contained in
|
|---|
| 13 | ** a written agreement between you and Nokia.
|
|---|
| 14 | **
|
|---|
| 15 | ** GNU Lesser General Public License Usage
|
|---|
| 16 | ** Alternatively, this file may be used under the terms of the GNU Lesser
|
|---|
| 17 | ** General Public License version 2.1 as published by the Free Software
|
|---|
| 18 | ** Foundation and appearing in the file LICENSE.LGPL included in the
|
|---|
| 19 | ** packaging of this file. Please review the following information to
|
|---|
| 20 | ** ensure the GNU Lesser General Public License version 2.1 requirements
|
|---|
| 21 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|---|
| 22 | **
|
|---|
| 23 | ** In addition, as a special exception, Nokia gives you certain
|
|---|
| 24 | ** additional rights. These rights are described in the Nokia Qt LGPL
|
|---|
| 25 | ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
|
|---|
| 26 | ** package.
|
|---|
| 27 | **
|
|---|
| 28 | ** GNU General Public License Usage
|
|---|
| 29 | ** Alternatively, this file may be used under the terms of the GNU
|
|---|
| 30 | ** General Public License version 3.0 as published by the Free Software
|
|---|
| 31 | ** Foundation and appearing in the file LICENSE.GPL included in the
|
|---|
| 32 | ** packaging of this file. Please review the following information to
|
|---|
| 33 | ** ensure the GNU General Public License version 3.0 requirements will be
|
|---|
| 34 | ** met: http://www.gnu.org/copyleft/gpl.html.
|
|---|
| 35 | **
|
|---|
| 36 | ** If you are unsure which license is appropriate for your use, please
|
|---|
| 37 | ** contact the sales department at qt-sales@nokia.com.
|
|---|
| 38 | ** $QT_END_LICENSE$
|
|---|
| 39 | **
|
|---|
| 40 | ****************************************************************************/
|
|---|
| 41 |
|
|---|
| 42 | // This file was generated by qlalr - DO NOT EDIT!
|
|---|
| 43 |
|
|---|
| 44 | #ifndef QSCRIPTGRAMMAR_P_H
|
|---|
| 45 | #define QSCRIPTGRAMMAR_P_H
|
|---|
| 46 |
|
|---|
| 47 | //
|
|---|
| 48 | // W A R N I N G
|
|---|
| 49 | // -------------
|
|---|
| 50 | //
|
|---|
| 51 | // This file is not part of the Qt API. It exists for the convenience
|
|---|
| 52 | // of other Qt classes. This header file may change from version to
|
|---|
| 53 | // version without notice, or even be removed.
|
|---|
| 54 | //
|
|---|
| 55 | // We mean it.
|
|---|
| 56 | //
|
|---|
| 57 |
|
|---|
| 58 | #include <QtCore/qglobal.h>
|
|---|
| 59 |
|
|---|
| 60 | #ifndef QT_NO_SCRIPT
|
|---|
| 61 |
|
|---|
| 62 | QT_BEGIN_NAMESPACE
|
|---|
| 63 |
|
|---|
| 64 | class QScriptGrammar
|
|---|
| 65 | {
|
|---|
| 66 | public:
|
|---|
| 67 | enum {
|
|---|
| 68 | EOF_SYMBOL = 0,
|
|---|
| 69 | T_AND = 1,
|
|---|
| 70 | T_AND_AND = 2,
|
|---|
| 71 | T_AND_EQ = 3,
|
|---|
| 72 | T_AUTOMATIC_SEMICOLON = 62,
|
|---|
| 73 | T_BREAK = 4,
|
|---|
| 74 | T_CASE = 5,
|
|---|
| 75 | T_CATCH = 6,
|
|---|
| 76 | T_COLON = 7,
|
|---|
| 77 | T_COMMA = 8,
|
|---|
| 78 | T_CONST = 81,
|
|---|
| 79 | T_CONTINUE = 9,
|
|---|
| 80 | T_DEBUGGER = 82,
|
|---|
| 81 | T_DEFAULT = 10,
|
|---|
| 82 | T_DELETE = 11,
|
|---|
| 83 | T_DIVIDE_ = 12,
|
|---|
| 84 | T_DIVIDE_EQ = 13,
|
|---|
| 85 | T_DO = 14,
|
|---|
| 86 | T_DOT = 15,
|
|---|
| 87 | T_ELSE = 16,
|
|---|
| 88 | T_EQ = 17,
|
|---|
| 89 | T_EQ_EQ = 18,
|
|---|
| 90 | T_EQ_EQ_EQ = 19,
|
|---|
| 91 | T_FALSE = 80,
|
|---|
| 92 | T_FINALLY = 20,
|
|---|
| 93 | T_FOR = 21,
|
|---|
| 94 | T_FUNCTION = 22,
|
|---|
| 95 | T_GE = 23,
|
|---|
| 96 | T_GT = 24,
|
|---|
| 97 | T_GT_GT = 25,
|
|---|
| 98 | T_GT_GT_EQ = 26,
|
|---|
| 99 | T_GT_GT_GT = 27,
|
|---|
| 100 | T_GT_GT_GT_EQ = 28,
|
|---|
| 101 | T_IDENTIFIER = 29,
|
|---|
| 102 | T_IF = 30,
|
|---|
| 103 | T_IN = 31,
|
|---|
| 104 | T_INSTANCEOF = 32,
|
|---|
| 105 | T_LBRACE = 33,
|
|---|
| 106 | T_LBRACKET = 34,
|
|---|
| 107 | T_LE = 35,
|
|---|
| 108 | T_LPAREN = 36,
|
|---|
| 109 | T_LT = 37,
|
|---|
| 110 | T_LT_LT = 38,
|
|---|
| 111 | T_LT_LT_EQ = 39,
|
|---|
| 112 | T_MINUS = 40,
|
|---|
| 113 | T_MINUS_EQ = 41,
|
|---|
| 114 | T_MINUS_MINUS = 42,
|
|---|
| 115 | T_NEW = 43,
|
|---|
| 116 | T_NOT = 44,
|
|---|
| 117 | T_NOT_EQ = 45,
|
|---|
| 118 | T_NOT_EQ_EQ = 46,
|
|---|
| 119 | T_NULL = 78,
|
|---|
| 120 | T_NUMERIC_LITERAL = 47,
|
|---|
| 121 | T_OR = 48,
|
|---|
| 122 | T_OR_EQ = 49,
|
|---|
| 123 | T_OR_OR = 50,
|
|---|
| 124 | T_PLUS = 51,
|
|---|
| 125 | T_PLUS_EQ = 52,
|
|---|
| 126 | T_PLUS_PLUS = 53,
|
|---|
| 127 | T_QUESTION = 54,
|
|---|
| 128 | T_RBRACE = 55,
|
|---|
| 129 | T_RBRACKET = 56,
|
|---|
| 130 | T_REMAINDER = 57,
|
|---|
| 131 | T_REMAINDER_EQ = 58,
|
|---|
| 132 | T_RESERVED_WORD = 83,
|
|---|
| 133 | T_RETURN = 59,
|
|---|
| 134 | T_RPAREN = 60,
|
|---|
| 135 | T_SEMICOLON = 61,
|
|---|
| 136 | T_STAR = 63,
|
|---|
| 137 | T_STAR_EQ = 64,
|
|---|
| 138 | T_STRING_LITERAL = 65,
|
|---|
| 139 | T_SWITCH = 66,
|
|---|
| 140 | T_THIS = 67,
|
|---|
| 141 | T_THROW = 68,
|
|---|
| 142 | T_TILDE = 69,
|
|---|
| 143 | T_TRUE = 79,
|
|---|
| 144 | T_TRY = 70,
|
|---|
| 145 | T_TYPEOF = 71,
|
|---|
| 146 | T_VAR = 72,
|
|---|
| 147 | T_VOID = 73,
|
|---|
| 148 | T_WHILE = 74,
|
|---|
| 149 | T_WITH = 75,
|
|---|
| 150 | T_XOR = 76,
|
|---|
| 151 | T_XOR_EQ = 77,
|
|---|
| 152 |
|
|---|
| 153 | ACCEPT_STATE = 237,
|
|---|
| 154 | RULE_COUNT = 269,
|
|---|
| 155 | STATE_COUNT = 468,
|
|---|
| 156 | TERMINAL_COUNT = 84,
|
|---|
| 157 | NON_TERMINAL_COUNT = 88,
|
|---|
| 158 |
|
|---|
| 159 | GOTO_INDEX_OFFSET = 468,
|
|---|
| 160 | GOTO_INFO_OFFSET = 1562,
|
|---|
| 161 | GOTO_CHECK_OFFSET = 1562
|
|---|
| 162 | };
|
|---|
| 163 |
|
|---|
| 164 | static const char *const spell [];
|
|---|
| 165 | static const int lhs [];
|
|---|
| 166 | static const int rhs [];
|
|---|
| 167 |
|
|---|
| 168 | #ifndef QLALR_NO_QSCRIPTGRAMMAR_DEBUG_INFO
|
|---|
| 169 | static const int rule_index [];
|
|---|
| 170 | static const int rule_info [];
|
|---|
| 171 | #endif // QLALR_NO_QSCRIPTGRAMMAR_DEBUG_INFO
|
|---|
| 172 |
|
|---|
| 173 | static const int goto_default [];
|
|---|
| 174 | static const int action_default [];
|
|---|
| 175 | static const int action_index [];
|
|---|
| 176 | static const int action_info [];
|
|---|
| 177 | static const int action_check [];
|
|---|
| 178 |
|
|---|
| 179 | static inline int nt_action (int state, int nt)
|
|---|
| 180 | {
|
|---|
| 181 | const int *const goto_index = &action_index [GOTO_INDEX_OFFSET];
|
|---|
| 182 | const int *const goto_check = &action_check [GOTO_CHECK_OFFSET];
|
|---|
| 183 |
|
|---|
| 184 | const int yyn = goto_index [state] + nt;
|
|---|
| 185 |
|
|---|
| 186 | if (yyn < 0 || goto_check [yyn] != nt)
|
|---|
| 187 | return goto_default [nt];
|
|---|
| 188 |
|
|---|
| 189 | const int *const goto_info = &action_info [GOTO_INFO_OFFSET];
|
|---|
| 190 | return goto_info [yyn];
|
|---|
| 191 | }
|
|---|
| 192 |
|
|---|
| 193 | static inline int t_action (int state, int token)
|
|---|
| 194 | {
|
|---|
| 195 | const int yyn = action_index [state] + token;
|
|---|
| 196 |
|
|---|
| 197 | if (yyn < 0 || action_check [yyn] != token)
|
|---|
| 198 | return - action_default [state];
|
|---|
| 199 |
|
|---|
| 200 | return action_info [yyn];
|
|---|
| 201 | }
|
|---|
| 202 | };
|
|---|
| 203 |
|
|---|
| 204 | QT_END_NAMESPACE
|
|---|
| 205 |
|
|---|
| 206 | #endif // QT_NO_SCRIPT
|
|---|
| 207 |
|
|---|
| 208 | #endif // QSCRIPTGRAMMAR_P_H
|
|---|