1 /****************************************************************************
2 **
3 ** Copyright (C) 2016 The Qt Company Ltd.
4 ** Contact: https://www.qt.io/licensing/
5 **
6 ** This file is part of Qt Creator.
7 **
8 ** Commercial License Usage
9 ** Licensees holding valid commercial Qt licenses may use this file in
10 ** accordance with the commercial license agreement provided with the
11 ** Software or, alternatively, in accordance with the terms contained in
12 ** a written agreement between you and The Qt Company. For licensing terms
13 ** and conditions see https://www.qt.io/terms-conditions. For further
14 ** information use the contact form at https://www.qt.io/contact-us.
15 **
16 ** GNU General Public License Usage
17 ** Alternatively, this file may be used under the terms of the GNU
18 ** General Public License version 3 as published by the Free Software
19 ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
20 ** included in the packaging of this file. Please review the following
21 ** information to ensure the GNU General Public License requirements will
22 ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
23 **
24 ****************************************************************************/
25 
26 //
27 //  W A R N I N G
28 //  -------------
29 //
30 // This file is not part of the Qt API.  It exists for the convenience
31 // of other Qt classes.  This header file may change from version to
32 // version without notice, or even be removed.
33 //
34 // We mean it.
35 //
36 
37 // This file was generated by qlalr - DO NOT EDIT!
38 #ifndef QMLJSGRAMMAR_P_H
39 #define QMLJSGRAMMAR_P_H
40 
41 #include "qmljsglobal_p.h"
42 #include <QtCore/qglobal.h>
43 
44 QT_BEGIN_NAMESPACE
45 
46 class QML_PARSER_EXPORT QmlJSGrammar
47 {
48 public:
49     enum VariousConstants {
50         EOF_SYMBOL = 0,
51         REDUCE_HERE = 107,
52         SHIFT_THERE = 106,
53         T_AND = 1,
54         T_AND_AND = 2,
55         T_AND_EQ = 3,
56         T_AS = 95,
57         T_AUTOMATIC_SEMICOLON = 62,
58         T_BREAK = 4,
59         T_CASE = 5,
60         T_CATCH = 6,
61         T_COLON = 7,
62         T_COMMA = 8,
63         T_COMMENT = 89,
64         T_COMPATIBILITY_SEMICOLON = 90,
65         T_CONST = 84,
66         T_CONTINUE = 9,
67         T_DEBUGGER = 86,
68         T_DEFAULT = 10,
69         T_DELETE = 11,
70         T_DIVIDE_ = 12,
71         T_DIVIDE_EQ = 13,
72         T_DO = 14,
73         T_DOT = 15,
74         T_ELSE = 16,
75         T_ENUM = 91,
76         T_EQ = 17,
77         T_EQ_EQ = 18,
78         T_EQ_EQ_EQ = 19,
79         T_ERROR = 99,
80         T_FALSE = 83,
81         T_FEED_JS_EXPRESSION = 103,
82         T_FEED_JS_PROGRAM = 105,
83         T_FEED_JS_SOURCE_ELEMENT = 104,
84         T_FEED_JS_STATEMENT = 102,
85         T_FEED_UI_OBJECT_MEMBER = 101,
86         T_FEED_UI_PROGRAM = 100,
87         T_FINALLY = 20,
88         T_FOR = 21,
89         T_FUNCTION = 22,
90         T_GE = 23,
91         T_GET = 97,
92         T_GT = 24,
93         T_GT_GT = 25,
94         T_GT_GT_EQ = 26,
95         T_GT_GT_GT = 27,
96         T_GT_GT_GT_EQ = 28,
97         T_IDENTIFIER = 29,
98         T_IF = 30,
99         T_IMPORT = 93,
100         T_IN = 31,
101         T_INSTANCEOF = 32,
102         T_LBRACE = 33,
103         T_LBRACKET = 34,
104         T_LE = 35,
105         T_LET = 85,
106         T_LPAREN = 36,
107         T_LT = 37,
108         T_LT_LT = 38,
109         T_LT_LT_EQ = 39,
110         T_MINUS = 40,
111         T_MINUS_EQ = 41,
112         T_MINUS_MINUS = 42,
113         T_MULTILINE_STRING_LITERAL = 88,
114         T_NEW = 43,
115         T_NOT = 44,
116         T_NOT_EQ = 45,
117         T_NOT_EQ_EQ = 46,
118         T_NULL = 81,
119         T_NUMERIC_LITERAL = 47,
120         T_ON = 96,
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_PRAGMA = 94,
128         T_PROPERTY = 66,
129         T_PUBLIC = 92,
130         T_QUESTION = 54,
131         T_RBRACE = 55,
132         T_RBRACKET = 56,
133         T_READONLY = 68,
134         T_REMAINDER = 57,
135         T_REMAINDER_EQ = 58,
136         T_RESERVED_WORD = 87,
137         T_RETURN = 59,
138         T_RPAREN = 60,
139         T_SEMICOLON = 61,
140         T_SET = 98,
141         T_SIGNAL = 67,
142         T_STAR = 63,
143         T_STAR_EQ = 64,
144         T_STRING_LITERAL = 65,
145         T_SWITCH = 69,
146         T_THIS = 70,
147         T_THROW = 71,
148         T_TILDE = 72,
149         T_TRUE = 82,
150         T_TRY = 73,
151         T_TYPEOF = 74,
152         T_VAR = 75,
153         T_VOID = 76,
154         T_WHILE = 77,
155         T_WITH = 78,
156         T_XOR = 79,
157         T_XOR_EQ = 80,
158 
159         ACCEPT_STATE = 691,
160         RULE_COUNT = 369,
161         STATE_COUNT = 692,
162         TERMINAL_COUNT = 108,
163         NON_TERMINAL_COUNT = 112,
164 
165         GOTO_INDEX_OFFSET = 692,
166         GOTO_INFO_OFFSET = 3357,
167         GOTO_CHECK_OFFSET = 3357
168     };
169 
170     static const char *const     spell[];
171     static const short             lhs[];
172     static const short             rhs[];
173     static const short    goto_default[];
174     static const short  action_default[];
175     static const short    action_index[];
176     static const short     action_info[];
177     static const short    action_check[];
178 
nt_action(int state,int nt)179     static inline int nt_action (int state, int nt)
180     {
181         const int yyn = action_index [GOTO_INDEX_OFFSET + state] + nt;
182         if (yyn < 0 || action_check [GOTO_CHECK_OFFSET + yyn] != nt)
183             return goto_default [nt];
184 
185         return action_info [GOTO_INFO_OFFSET + yyn];
186     }
187 
t_action(int state,int token)188     static inline int t_action (int state, int token)
189     {
190         const int yyn = action_index [state] + token;
191 
192         if (yyn < 0 || action_check [yyn] != token)
193             return - action_default [state];
194 
195         return action_info [yyn];
196     }
197 };
198 
199 
200 QT_END_NAMESPACE
201 #endif // QMLJSGRAMMAR_P_H
202 
203