1 | // Copyright (C) 2016 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 |
3 | |
4 | // |
5 | // W A R N I N G |
6 | // ------------- |
7 | // |
8 | // This file is not part of the Qt API. It exists for the convenience |
9 | // of other Qt classes. This header file may change from version to |
10 | // version without notice, or even be removed. |
11 | // |
12 | // We mean it. |
13 | // |
14 | |
15 | // This file was generated by qlalr - DO NOT EDIT! |
16 | #ifndef GRAMMAR_P_H |
17 | #define GRAMMAR_P_H |
18 | |
19 | #include <QtCore/qglobal.h> |
20 | |
21 | QT_BEGIN_NAMESPACE |
22 | |
23 | class grammar |
24 | { |
25 | public: |
26 | enum VariousConstants { |
27 | EOF_SYMBOL = 0, |
28 | COLON = 16, |
29 | DECL = 19, |
30 | DECL_FILE = 3, |
31 | ERROR = 21, |
32 | EXPECT = 4, |
33 | EXPECT_RR = 5, |
34 | ID = 1, |
35 | IMPL = 20, |
36 | IMPL_FILE = 6, |
37 | LEFT = 7, |
38 | MERGED_OUTPUT = 8, |
39 | NONASSOC = 9, |
40 | OR = 17, |
41 | PARSER = 10, |
42 | PREC = 11, |
43 | RIGHT = 12, |
44 | SEMICOLON = 18, |
45 | START = 13, |
46 | STRING_LITERAL = 2, |
47 | TOKEN = 14, |
48 | TOKEN_PREFIX = 15, |
49 | |
50 | ACCEPT_STATE = 68, |
51 | RULE_COUNT = 45, |
52 | STATE_COUNT = 69, |
53 | TERMINAL_COUNT = 22, |
54 | NON_TERMINAL_COUNT = 24, |
55 | |
56 | GOTO_INDEX_OFFSET = 69, |
57 | GOTO_INFO_OFFSET = 57, |
58 | GOTO_CHECK_OFFSET = 57 |
59 | }; |
60 | |
61 | static const char *const spell[]; |
62 | static const short lhs[]; |
63 | static const short rhs[]; |
64 | static const short goto_default[]; |
65 | static const short action_default[]; |
66 | static const short action_index[]; |
67 | static const short action_info[]; |
68 | static const short action_check[]; |
69 | |
70 | static inline int nt_action (int state, int nt) |
71 | { |
72 | const int yyn = action_index [GOTO_INDEX_OFFSET + state] + nt; |
73 | if (yyn < 0 || action_check [GOTO_CHECK_OFFSET + yyn] != nt) |
74 | return goto_default [nt]; |
75 | |
76 | return action_info [GOTO_INFO_OFFSET + yyn]; |
77 | } |
78 | |
79 | static inline int t_action (int state, int token) |
80 | { |
81 | const int yyn = action_index [state] + token; |
82 | |
83 | if (yyn < 0 || action_check [yyn] != token) |
84 | return - action_default [state]; |
85 | |
86 | return action_info [yyn]; |
87 | } |
88 | }; |
89 | |
90 | |
91 | QT_END_NAMESPACE |
92 | #endif // GRAMMAR_P_H |
93 | |
94 | |