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