Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qxmlstreamgrammar_p.h
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:critical reason:data-parser
4
5//
6// W A R N I N G
7// -------------
8//
9// This file is not part of the Qt API. It exists for the convenience
10// of other Qt classes. This header file may change from version to
11// version without notice, or even be removed.
12//
13// We mean it.
14//
15
16// This file was generated by qlalr - DO NOT EDIT!
17#ifndef QXMLSTREAMGRAMMAR_P_H
18#define QXMLSTREAMGRAMMAR_P_H
20#include <QtCore/qglobal.h>
21
22QT_BEGIN_NAMESPACE
23
24class QXmlStreamGrammar
25{
26public:
27 enum VariousConstants {
28 EOF_SYMBOL = 0,
29 AMPERSAND = 5,
30 ANY = 41,
31 ATTLIST = 31,
32 BANG = 25,
33 CDATA = 47,
34 CDATA_START = 28,
35 COLON = 17,
36 COMMA = 19,
37 DASH = 20,
38 DBLQUOTE = 8,
39 DIGIT = 27,
40 DOCTYPE = 29,
41 DOT = 23,
42 ELEMENT = 30,
43 EMPTY = 40,
44 ENTITIES = 51,
45 ENTITY = 32,
46 ENTITY_DONE = 45,
47 EQ = 14,
48 FIXED = 39,
49 HASH = 6,
50 ID = 48,
51 IDREF = 49,
52 IDREFS = 50,
53 IMPLIED = 38,
54 LANGLE = 3,
55 LBRACK = 9,
56 LETTER = 26,
57 LPAREN = 11,
58 NDATA = 36,
59 NMTOKEN = 52,
60 NMTOKENS = 53,
61 NOTATION = 33,
62 NOTOKEN = 1,
63 PARSE_ENTITY = 44,
64 PCDATA = 42,
65 PERCENT = 15,
66 PIPE = 13,
67 PLUS = 21,
68 PUBLIC = 35,
69 QUESTIONMARK = 24,
70 QUOTE = 7,
71 RANGLE = 4,
72 RBRACK = 10,
73 REQUIRED = 37,
74 RPAREN = 12,
75 SEMICOLON = 18,
76 SHIFT_THERE = 56,
77 SLASH = 16,
78 SPACE = 2,
79 STAR = 22,
80 SYSTEM = 34,
81 UNRESOLVED_ENTITY = 46,
82 VERSION = 55,
83 XML = 54,
84 XML_ERROR = 43,
85
86 ACCEPT_STATE = 416,
87 RULE_COUNT = 270,
88 STATE_COUNT = 427,
89 TERMINAL_COUNT = 57,
90 NON_TERMINAL_COUNT = 84,
91
92 GOTO_INDEX_OFFSET = 427,
93 GOTO_INFO_OFFSET = 1030,
94 GOTO_CHECK_OFFSET = 1030
95 };
96
97 static const char *const spell[];
98 static const short lhs[];
99 static const short rhs[];
100 static const short goto_default[];
101 static const short action_default[];
102 static const short action_index[];
103 static const short action_info[];
104 static const short action_check[];
105
106 static inline int nt_action (int state, int nt)
107 {
108 const int yyn = action_index [GOTO_INDEX_OFFSET + state] + nt;
109 if (yyn < 0 || action_check [GOTO_CHECK_OFFSET + yyn] != nt)
110 return goto_default [nt];
111
112 return action_info [GOTO_INFO_OFFSET + yyn];
113 }
114
115 static inline int t_action (int state, int token)
116 {
117 const int yyn = action_index [state] + token;
118
119 if (yyn < 0 || action_check [yyn] != token)
120 return - action_default [state];
121
122 return action_info [yyn];
123 }
124};
126
128#endif // QXMLSTREAMGRAMMAR_P_H