Qt 4.8
qscriptgrammar_p.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
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-project.org/.
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 
42 
44 {
45 public:
46  enum {
48  T_AND = 1,
49  T_AND_AND = 2,
50  T_AND_EQ = 3,
52  T_BREAK = 4,
53  T_CASE = 5,
54  T_CATCH = 6,
55  T_COLON = 7,
56  T_COMMA = 8,
57  T_CONST = 81,
59  T_DEBUGGER = 82,
60  T_DEFAULT = 10,
61  T_DELETE = 11,
62  T_DIVIDE_ = 12,
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,
81  T_IF = 30,
82  T_IN = 31,
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,
94  T_NEW = 43,
95  T_NOT = 44,
96  T_NOT_EQ = 45,
98  T_NULL = 78,
100  T_OR = 48,
101  T_OR_EQ = 49,
102  T_OR_OR = 50,
103  T_PLUS = 51,
104  T_PLUS_EQ = 52,
107  T_RBRACE = 55,
112  T_RETURN = 59,
113  T_RPAREN = 60,
115  T_STAR = 63,
116  T_STAR_EQ = 64,
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 
133  RULE_COUNT = 269,
134  STATE_COUNT = 468,
137 
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 
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 
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 
180 #endif // QSCRIPTGRAMMAR_P_H
181 
static const short lhs[]
static const short action_check[]
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
static int t_action(int state, int token)
static int nt_action(int state, int nt)
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
static const short goto_default[]
#define nt(var, enu)
static const short action_info[]
static const short action_index[]
static const int rule_info[]
static const char *const spell[]
static const int rule_index[]
static const short rhs[]
static const short action_default[]