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