1 /**************************************************************************** 2 ** 3 ** Copyright (C) 2016 The Qt Company Ltd. 4 ** Contact: https://www.qt.io/licensing/ 5 ** 6 ** This file is part of the Qt Toolkit. 7 ** 8 ** $QT_BEGIN_LICENSE:GPL-EXCEPT$ 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 General Public License Usage 18 ** Alternatively, this file may be used under the terms of the GNU 19 ** General Public License version 3 as published by the Free Software 20 ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT 21 ** included in the packaging of this file. Please review the following 22 ** information to ensure the GNU General Public License requirements will 23 ** be met: https://www.gnu.org/licenses/gpl-3.0.html. 24 ** 25 ** $QT_END_LICENSE$ 26 ** 27 ****************************************************************************/ 28 29 // 30 // W A R N I N G 31 // ------------- 32 // 33 // This file is not part of the Qt API. It exists for the convenience 34 // of other Qt classes. This header file may change from version to 35 // version without notice, or even be removed. 36 // 37 // We mean it. 38 // 39 40 // This file was generated by qlalr - DO NOT EDIT! 41 #ifndef GRAMMAR_P_H 42 #define GRAMMAR_P_H 43 44 #include <QtCore/qglobal.h> 45 46 QT_BEGIN_NAMESPACE 47 48 class grammar 49 { 50 public: 51 enum VariousConstants { 52 EOF_SYMBOL = 0, 53 COLON = 16, 54 DECL = 19, 55 DECL_FILE = 3, 56 ERROR = 21, 57 EXPECT = 4, 58 EXPECT_RR = 5, 59 ID = 1, 60 IMPL = 20, 61 IMPL_FILE = 6, 62 LEFT = 7, 63 MERGED_OUTPUT = 8, 64 NONASSOC = 9, 65 OR = 17, 66 PARSER = 10, 67 PREC = 11, 68 RIGHT = 12, 69 SEMICOLON = 18, 70 START = 13, 71 STRING_LITERAL = 2, 72 TOKEN = 14, 73 TOKEN_PREFIX = 15, 74 75 ACCEPT_STATE = 68, 76 RULE_COUNT = 45, 77 STATE_COUNT = 69, 78 TERMINAL_COUNT = 22, 79 NON_TERMINAL_COUNT = 24, 80 81 GOTO_INDEX_OFFSET = 69, 82 GOTO_INFO_OFFSET = 57, 83 GOTO_CHECK_OFFSET = 57 84 }; 85 86 static const char *const spell[]; 87 static const short lhs[]; 88 static const short rhs[]; 89 static const short goto_default[]; 90 static const short action_default[]; 91 static const short action_index[]; 92 static const short action_info[]; 93 static const short action_check[]; 94 nt_action(int state,int nt)95 static inline int nt_action (int state, int nt) 96 { 97 const int yyn = action_index [GOTO_INDEX_OFFSET + state] + nt; 98 if (yyn < 0 || action_check [GOTO_CHECK_OFFSET + yyn] != nt) 99 return goto_default [nt]; 100 101 return action_info [GOTO_INFO_OFFSET + yyn]; 102 } 103 t_action(int state,int token)104 static inline int t_action (int state, int token) 105 { 106 const int yyn = action_index [state] + token; 107 108 if (yyn < 0 || action_check [yyn] != token) 109 return - action_default [state]; 110 111 return action_info [yyn]; 112 } 113 }; 114 115 116 QT_END_NAMESPACE 117 #endif // GRAMMAR_P_H 118 119