Version 7.0
Copyright © 2021 Lowell D. Thomas
APG
… an ABNF Parser Generator
xmlgrammar.h
Go to the documentation of this file.
1 //
2 // This C-language parser header was generated by APG Version 7.0.
3 // User modifications invalidate the license agreement and may cause unpredictable results.
4 //
5 /* *************************************************************************************
6  Copyright (c) 2021, Lowell D. Thomas
7  All rights reserved.
8 
9  This file is part of APG Version 7.0.
10  APG Version 7.0 may be used under the terms of the BSD 2-Clause License.
11 
12  Redistribution and use in source and binary forms, with or without
13  modification, are permitted provided that the following conditions are met:
14 
15  1. Redistributions of source code must retain the above copyright notice, this
16  list of conditions and the following disclaimer.
17 
18  2. Redistributions in binary form must reproduce the above copyright notice,
19  this list of conditions and the following disclaimer in the documentation
20  and/or other materials provided with the distribution.
21 
22  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
26  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 
33 * *************************************************************************************/
34 
35 #ifndef _XMLGRAMMAR_H_
36 #define _XMLGRAMMAR_H_
37 
38 // rule ids
39 #define XMLGRAMMAR_ANOTAPOS 139
40 #define XMLGRAMMAR_ANOTGT 135
41 #define XMLGRAMMAR_ANOTH 142
42 #define XMLGRAMMAR_ANOTLA 131
43 #define XMLGRAMMAR_ANOTLAA 133
44 #define XMLGRAMMAR_ANOTLAQ 132
45 #define XMLGRAMMAR_ANOTP 140
46 #define XMLGRAMMAR_ANOTPAA 137
47 #define XMLGRAMMAR_ANOTPAQ 136
48 #define XMLGRAMMAR_ANOTPG 141
49 #define XMLGRAMMAR_ANOTQ 134
50 #define XMLGRAMMAR_ANOTQUOT 138
51 #define XMLGRAMMAR_ANOTRB 143
52 #define XMLGRAMMAR_ASCII 130
53 #define XMLGRAMMAR_ATTCHARA 69
54 #define XMLGRAMMAR_ATTCHARD 68
55 #define XMLGRAMMAR_ATTDEF 57
56 #define XMLGRAMMAR_ATTLISTCLOSE 58
57 #define XMLGRAMMAR_ATTLISTDECL 55
58 #define XMLGRAMMAR_ATTLISTOPEN 56
59 #define XMLGRAMMAR_ATTLISTVALUE 67
60 #define XMLGRAMMAR_ATTNAME 59
61 #define XMLGRAMMAR_ATTRIBUTE 91
62 #define XMLGRAMMAR_ATTTYPE 60
63 #define XMLGRAMMAR_ATTVALUE 93
64 #define XMLGRAMMAR_CD2RB 108
65 #define XMLGRAMMAR_CDCHAR 106
66 #define XMLGRAMMAR_CDEND 105
67 #define XMLGRAMMAR_CDRB 107
68 #define XMLGRAMMAR_CDSECT 104
69 #define XMLGRAMMAR_CDSECTEND 103
70 #define XMLGRAMMAR_CHAR 144
71 #define XMLGRAMMAR_CHARDATA 102
72 #define XMLGRAMMAR_CHILDREN 75
73 #define XMLGRAMMAR_CHOICE 77
74 #define XMLGRAMMAR_CLOSEAPOS 30
75 #define XMLGRAMMAR_CLOSEQUOT 29
76 #define XMLGRAMMAR_COMMENT 118
77 #define XMLGRAMMAR_CONTENT 100
78 #define XMLGRAMMAR_CONTENTREF 101
79 #define XMLGRAMMAR_CONTENTSPEC 73
80 #define XMLGRAMMAR_CP 76
81 #define XMLGRAMMAR_DCHAR 97
82 #define XMLGRAMMAR_DECLSEP 23
83 #define XMLGRAMMAR_DECOPEN 117
84 #define XMLGRAMMAR_DECREF 115
85 #define XMLGRAMMAR_DECVALUE 116
86 #define XMLGRAMMAR_DEFAULTDECL 66
87 #define XMLGRAMMAR_DOCCLOSE 21
88 #define XMLGRAMMAR_DOCINT 19
89 #define XMLGRAMMAR_DOCNAME 18
90 #define XMLGRAMMAR_DOCOPEN 17
91 #define XMLGRAMMAR_DOCTYPEDECL 16
92 #define XMLGRAMMAR_DOCUMENT 0
93 #define XMLGRAMMAR_DOUBLEH 119
94 #define XMLGRAMMAR_DVALUE 96
95 #define XMLGRAMMAR_ELATTNAME 92
96 #define XMLGRAMMAR_ELEMENT 85
97 #define XMLGRAMMAR_ELEMENTCLOSE 72
98 #define XMLGRAMMAR_ELEMENTDECL 70
99 #define XMLGRAMMAR_ELEMENTOPEN 71
100 #define XMLGRAMMAR_EMPTYCLOSE 89
101 #define XMLGRAMMAR_ENCDEF 10
102 #define XMLGRAMMAR_ENCNAME 11
103 #define XMLGRAMMAR_ENCODINGDECL 9
104 #define XMLGRAMMAR_ENTITYCHARA 45
105 #define XMLGRAMMAR_ENTITYCHARD 44
106 #define XMLGRAMMAR_ENTITYDECL 37
107 #define XMLGRAMMAR_ENTITYREF 110
108 #define XMLGRAMMAR_ENTITYVALUE 42
109 #define XMLGRAMMAR_ENUMERATEDTYPE 63
110 #define XMLGRAMMAR_ENUMERATION 65
111 #define XMLGRAMMAR_EOPEN 87
112 #define XMLGRAMMAR_EQ 157
113 #define XMLGRAMMAR_ERESERVED 88
114 #define XMLGRAMMAR_ESTART 86
115 #define XMLGRAMMAR_ETAG 94
116 #define XMLGRAMMAR_ETAGCLOSE 95
117 #define XMLGRAMMAR_EXTERNALID 24
118 #define XMLGRAMMAR_EXTERNALPUBID 26
119 #define XMLGRAMMAR_EXTERNALSYSID 25
120 #define XMLGRAMMAR_EXTSUBSET 20
121 #define XMLGRAMMAR_GEDECL 38
122 #define XMLGRAMMAR_GEDECLCLOSE 48
123 #define XMLGRAMMAR_GEDECLNAME 40
124 #define XMLGRAMMAR_GEDECLOPEN 39
125 #define XMLGRAMMAR_GEDEF 41
126 #define XMLGRAMMAR_GEDEFEX 47
127 #define XMLGRAMMAR_GEPEREF 43
128 #define XMLGRAMMAR_GEREF 46
129 #define XMLGRAMMAR_HEXOPEN 114
130 #define XMLGRAMMAR_HEXREF 111
131 #define XMLGRAMMAR_HEXVALUE 113
132 #define XMLGRAMMAR_INTSUBSET 22
133 #define XMLGRAMMAR_MARKUPDECL 35
134 #define XMLGRAMMAR_MISC 2
135 #define XMLGRAMMAR_MIXED 74
136 #define XMLGRAMMAR_NAME 150
137 #define XMLGRAMMAR_NAMECHAR 153
138 #define XMLGRAMMAR_NAMEOTHERCHAR 152
139 #define XMLGRAMMAR_NAMESTARTCHAR 151
140 #define XMLGRAMMAR_NDATADECL 54
141 #define XMLGRAMMAR_NEXTERNALID 84
142 #define XMLGRAMMAR_NMTOKEN 154
143 #define XMLGRAMMAR_NOTATIONCLOSE 80
144 #define XMLGRAMMAR_NOTATIONDECL 79
145 #define XMLGRAMMAR_NOTATIONDEF 81
146 #define XMLGRAMMAR_NOTATIONOPEN 82
147 #define XMLGRAMMAR_NOTATIONTYPE 64
148 #define XMLGRAMMAR_OS 156
149 #define XMLGRAMMAR_PEDECL 49
150 #define XMLGRAMMAR_PEDECLCLOSE 51
151 #define XMLGRAMMAR_PEDECLOPEN 50
152 #define XMLGRAMMAR_PEDEF 52
153 #define XMLGRAMMAR_PEENTITYVALUE 53
154 #define XMLGRAMMAR_PEREFERENCE 34
155 #define XMLGRAMMAR_PEREFERROR 36
156 #define XMLGRAMMAR_PI 120
157 #define XMLGRAMMAR_PICLOSE 122
158 #define XMLGRAMMAR_PIFORBIDDEN 128
159 #define XMLGRAMMAR_PIINFO 123
160 #define XMLGRAMMAR_PIINFOA 126
161 #define XMLGRAMMAR_PIINFOCHAR 124
162 #define XMLGRAMMAR_PIINFOQ 125
163 #define XMLGRAMMAR_PIOPEN 121
164 #define XMLGRAMMAR_PIRESERVED 129
165 #define XMLGRAMMAR_PITARGET 127
166 #define XMLGRAMMAR_PROLOG 1
167 #define XMLGRAMMAR_PUBID 31
168 #define XMLGRAMMAR_PUBIDLITERAL 28
169 #define XMLGRAMMAR_PUBLICID 83
170 #define XMLGRAMMAR_REFCLOSE 112
171 #define XMLGRAMMAR_REFERENCE 109
172 #define XMLGRAMMAR_S 155
173 #define XMLGRAMMAR_SCHAR 99
174 #define XMLGRAMMAR_SDDECL 12
175 #define XMLGRAMMAR_SDECLNO 15
176 #define XMLGRAMMAR_SDECLOTHER 13
177 #define XMLGRAMMAR_SDECLYES 14
178 #define XMLGRAMMAR_SEQ 78
179 #define XMLGRAMMAR_SPECIAL 32
180 #define XMLGRAMMAR_SPECIALAPOS 33
181 #define XMLGRAMMAR_STAGCLOSE 90
182 #define XMLGRAMMAR_STRINGTYPE 61
183 #define XMLGRAMMAR_SVALUE 98
184 #define XMLGRAMMAR_SYSTEMLITERAL 27
185 #define XMLGRAMMAR_TOKENIZEDTYPE 62
186 #define XMLGRAMMAR_UTF8 145
187 #define XMLGRAMMAR_UTF8_TAIL 149
188 #define XMLGRAMMAR_UTF82 146
189 #define XMLGRAMMAR_UTF83 147
190 #define XMLGRAMMAR_UTF84 148
191 #define XMLGRAMMAR_VERSIONINFO 7
192 #define XMLGRAMMAR_VERSIONNUM 8
193 #define XMLGRAMMAR_XMLDECL 3
194 #define XMLGRAMMAR_XMLDECLCLOSE 6
195 #define XMLGRAMMAR_XMLDECLINTERIOR 5
196 #define XMLGRAMMAR_XMLDECLOPEN 4
197 #define RULE_COUNT_XMLGRAMMAR 158
198 
199 // pointer to parser initialization data
200 extern void* vpXmlgrammarInit;
201 
202 // Helper function(s) for setting rule/UDT name callbacks.
203 // Un-comment and replace named NULL with pointer to the appropriate callback function.
204 // NOTE: This can easily be modified for setting AST callback functions:
205 // Replace parser_callback with ast_callback and
206 // vParserSetRuleCallback(vpParserCtx) with vAstSetRuleCallback(vpAstCtx) and
207 // vParserSetUdtCallback(vpParserCtx) with vAstSetUdtCallback(vpAstCtx).
208 /****************************************************************
209 void vXmlgrammarRuleCallbacks(void* vpParserCtx){
210  aint ui;
211  parser_callback cb[RULE_COUNT_XMLGRAMMAR];
212  cb[XMLGRAMMAR_ANOTAPOS] = NULL;
213  cb[XMLGRAMMAR_ANOTGT] = NULL;
214  cb[XMLGRAMMAR_ANOTH] = NULL;
215  cb[XMLGRAMMAR_ANOTLA] = NULL;
216  cb[XMLGRAMMAR_ANOTLAA] = NULL;
217  cb[XMLGRAMMAR_ANOTLAQ] = NULL;
218  cb[XMLGRAMMAR_ANOTP] = NULL;
219  cb[XMLGRAMMAR_ANOTPAA] = NULL;
220  cb[XMLGRAMMAR_ANOTPAQ] = NULL;
221  cb[XMLGRAMMAR_ANOTPG] = NULL;
222  cb[XMLGRAMMAR_ANOTQ] = NULL;
223  cb[XMLGRAMMAR_ANOTQUOT] = NULL;
224  cb[XMLGRAMMAR_ANOTRB] = NULL;
225  cb[XMLGRAMMAR_ASCII] = NULL;
226  cb[XMLGRAMMAR_ATTCHARA] = NULL;
227  cb[XMLGRAMMAR_ATTCHARD] = NULL;
228  cb[XMLGRAMMAR_ATTDEF] = NULL;
229  cb[XMLGRAMMAR_ATTLISTCLOSE] = NULL;
230  cb[XMLGRAMMAR_ATTLISTDECL] = NULL;
231  cb[XMLGRAMMAR_ATTLISTOPEN] = NULL;
232  cb[XMLGRAMMAR_ATTLISTVALUE] = NULL;
233  cb[XMLGRAMMAR_ATTNAME] = NULL;
234  cb[XMLGRAMMAR_ATTRIBUTE] = NULL;
235  cb[XMLGRAMMAR_ATTTYPE] = NULL;
236  cb[XMLGRAMMAR_ATTVALUE] = NULL;
237  cb[XMLGRAMMAR_CD2RB] = NULL;
238  cb[XMLGRAMMAR_CDCHAR] = NULL;
239  cb[XMLGRAMMAR_CDEND] = NULL;
240  cb[XMLGRAMMAR_CDRB] = NULL;
241  cb[XMLGRAMMAR_CDSECT] = NULL;
242  cb[XMLGRAMMAR_CDSECTEND] = NULL;
243  cb[XMLGRAMMAR_CHAR] = NULL;
244  cb[XMLGRAMMAR_CHARDATA] = NULL;
245  cb[XMLGRAMMAR_CHILDREN] = NULL;
246  cb[XMLGRAMMAR_CHOICE] = NULL;
247  cb[XMLGRAMMAR_CLOSEAPOS] = NULL;
248  cb[XMLGRAMMAR_CLOSEQUOT] = NULL;
249  cb[XMLGRAMMAR_COMMENT] = NULL;
250  cb[XMLGRAMMAR_CONTENT] = NULL;
251  cb[XMLGRAMMAR_CONTENTREF] = NULL;
252  cb[XMLGRAMMAR_CONTENTSPEC] = NULL;
253  cb[XMLGRAMMAR_CP] = NULL;
254  cb[XMLGRAMMAR_DCHAR] = NULL;
255  cb[XMLGRAMMAR_DECLSEP] = NULL;
256  cb[XMLGRAMMAR_DECOPEN] = NULL;
257  cb[XMLGRAMMAR_DECREF] = NULL;
258  cb[XMLGRAMMAR_DECVALUE] = NULL;
259  cb[XMLGRAMMAR_DEFAULTDECL] = NULL;
260  cb[XMLGRAMMAR_DOCCLOSE] = NULL;
261  cb[XMLGRAMMAR_DOCINT] = NULL;
262  cb[XMLGRAMMAR_DOCNAME] = NULL;
263  cb[XMLGRAMMAR_DOCOPEN] = NULL;
264  cb[XMLGRAMMAR_DOCTYPEDECL] = NULL;
265  cb[XMLGRAMMAR_DOCUMENT] = NULL;
266  cb[XMLGRAMMAR_DOUBLEH] = NULL;
267  cb[XMLGRAMMAR_DVALUE] = NULL;
268  cb[XMLGRAMMAR_ELATTNAME] = NULL;
269  cb[XMLGRAMMAR_ELEMENT] = NULL;
270  cb[XMLGRAMMAR_ELEMENTCLOSE] = NULL;
271  cb[XMLGRAMMAR_ELEMENTDECL] = NULL;
272  cb[XMLGRAMMAR_ELEMENTOPEN] = NULL;
273  cb[XMLGRAMMAR_EMPTYCLOSE] = NULL;
274  cb[XMLGRAMMAR_ENCDEF] = NULL;
275  cb[XMLGRAMMAR_ENCNAME] = NULL;
276  cb[XMLGRAMMAR_ENCODINGDECL] = NULL;
277  cb[XMLGRAMMAR_ENTITYCHARA] = NULL;
278  cb[XMLGRAMMAR_ENTITYCHARD] = NULL;
279  cb[XMLGRAMMAR_ENTITYDECL] = NULL;
280  cb[XMLGRAMMAR_ENTITYREF] = NULL;
281  cb[XMLGRAMMAR_ENTITYVALUE] = NULL;
282  cb[XMLGRAMMAR_ENUMERATEDTYPE] = NULL;
283  cb[XMLGRAMMAR_ENUMERATION] = NULL;
284  cb[XMLGRAMMAR_EOPEN] = NULL;
285  cb[XMLGRAMMAR_EQ] = NULL;
286  cb[XMLGRAMMAR_ERESERVED] = NULL;
287  cb[XMLGRAMMAR_ESTART] = NULL;
288  cb[XMLGRAMMAR_ETAG] = NULL;
289  cb[XMLGRAMMAR_ETAGCLOSE] = NULL;
290  cb[XMLGRAMMAR_EXTERNALID] = NULL;
291  cb[XMLGRAMMAR_EXTERNALPUBID] = NULL;
292  cb[XMLGRAMMAR_EXTERNALSYSID] = NULL;
293  cb[XMLGRAMMAR_EXTSUBSET] = NULL;
294  cb[XMLGRAMMAR_GEDECL] = NULL;
295  cb[XMLGRAMMAR_GEDECLCLOSE] = NULL;
296  cb[XMLGRAMMAR_GEDECLNAME] = NULL;
297  cb[XMLGRAMMAR_GEDECLOPEN] = NULL;
298  cb[XMLGRAMMAR_GEDEF] = NULL;
299  cb[XMLGRAMMAR_GEDEFEX] = NULL;
300  cb[XMLGRAMMAR_GEPEREF] = NULL;
301  cb[XMLGRAMMAR_GEREF] = NULL;
302  cb[XMLGRAMMAR_HEXOPEN] = NULL;
303  cb[XMLGRAMMAR_HEXREF] = NULL;
304  cb[XMLGRAMMAR_HEXVALUE] = NULL;
305  cb[XMLGRAMMAR_INTSUBSET] = NULL;
306  cb[XMLGRAMMAR_MARKUPDECL] = NULL;
307  cb[XMLGRAMMAR_MISC] = NULL;
308  cb[XMLGRAMMAR_MIXED] = NULL;
309  cb[XMLGRAMMAR_NAME] = NULL;
310  cb[XMLGRAMMAR_NAMECHAR] = NULL;
311  cb[XMLGRAMMAR_NAMEOTHERCHAR] = NULL;
312  cb[XMLGRAMMAR_NAMESTARTCHAR] = NULL;
313  cb[XMLGRAMMAR_NDATADECL] = NULL;
314  cb[XMLGRAMMAR_NEXTERNALID] = NULL;
315  cb[XMLGRAMMAR_NMTOKEN] = NULL;
316  cb[XMLGRAMMAR_NOTATIONCLOSE] = NULL;
317  cb[XMLGRAMMAR_NOTATIONDECL] = NULL;
318  cb[XMLGRAMMAR_NOTATIONDEF] = NULL;
319  cb[XMLGRAMMAR_NOTATIONOPEN] = NULL;
320  cb[XMLGRAMMAR_NOTATIONTYPE] = NULL;
321  cb[XMLGRAMMAR_OS] = NULL;
322  cb[XMLGRAMMAR_PEDECL] = NULL;
323  cb[XMLGRAMMAR_PEDECLCLOSE] = NULL;
324  cb[XMLGRAMMAR_PEDECLOPEN] = NULL;
325  cb[XMLGRAMMAR_PEDEF] = NULL;
326  cb[XMLGRAMMAR_PEENTITYVALUE] = NULL;
327  cb[XMLGRAMMAR_PEREFERENCE] = NULL;
328  cb[XMLGRAMMAR_PEREFERROR] = NULL;
329  cb[XMLGRAMMAR_PI] = NULL;
330  cb[XMLGRAMMAR_PICLOSE] = NULL;
331  cb[XMLGRAMMAR_PIFORBIDDEN] = NULL;
332  cb[XMLGRAMMAR_PIINFO] = NULL;
333  cb[XMLGRAMMAR_PIINFOA] = NULL;
334  cb[XMLGRAMMAR_PIINFOCHAR] = NULL;
335  cb[XMLGRAMMAR_PIINFOQ] = NULL;
336  cb[XMLGRAMMAR_PIOPEN] = NULL;
337  cb[XMLGRAMMAR_PIRESERVED] = NULL;
338  cb[XMLGRAMMAR_PITARGET] = NULL;
339  cb[XMLGRAMMAR_PROLOG] = NULL;
340  cb[XMLGRAMMAR_PUBID] = NULL;
341  cb[XMLGRAMMAR_PUBIDLITERAL] = NULL;
342  cb[XMLGRAMMAR_PUBLICID] = NULL;
343  cb[XMLGRAMMAR_REFCLOSE] = NULL;
344  cb[XMLGRAMMAR_REFERENCE] = NULL;
345  cb[XMLGRAMMAR_S] = NULL;
346  cb[XMLGRAMMAR_SCHAR] = NULL;
347  cb[XMLGRAMMAR_SDDECL] = NULL;
348  cb[XMLGRAMMAR_SDECLNO] = NULL;
349  cb[XMLGRAMMAR_SDECLOTHER] = NULL;
350  cb[XMLGRAMMAR_SDECLYES] = NULL;
351  cb[XMLGRAMMAR_SEQ] = NULL;
352  cb[XMLGRAMMAR_SPECIAL] = NULL;
353  cb[XMLGRAMMAR_SPECIALAPOS] = NULL;
354  cb[XMLGRAMMAR_STAGCLOSE] = NULL;
355  cb[XMLGRAMMAR_STRINGTYPE] = NULL;
356  cb[XMLGRAMMAR_SVALUE] = NULL;
357  cb[XMLGRAMMAR_SYSTEMLITERAL] = NULL;
358  cb[XMLGRAMMAR_TOKENIZEDTYPE] = NULL;
359  cb[XMLGRAMMAR_UTF8] = NULL;
360  cb[XMLGRAMMAR_UTF8_TAIL] = NULL;
361  cb[XMLGRAMMAR_UTF82] = NULL;
362  cb[XMLGRAMMAR_UTF83] = NULL;
363  cb[XMLGRAMMAR_UTF84] = NULL;
364  cb[XMLGRAMMAR_VERSIONINFO] = NULL;
365  cb[XMLGRAMMAR_VERSIONNUM] = NULL;
366  cb[XMLGRAMMAR_XMLDECL] = NULL;
367  cb[XMLGRAMMAR_XMLDECLCLOSE] = NULL;
368  cb[XMLGRAMMAR_XMLDECLINTERIOR] = NULL;
369  cb[XMLGRAMMAR_XMLDECLOPEN] = NULL;
370  for(ui = 0; ui < (aint)RULE_COUNT_XMLGRAMMAR; ui++){
371  vParserSetRuleCallback(vpParserCtx, ui, cb[ui]);
372  }
373 }
374 ****************************************************************/
375 
376 #endif /* _XMLGRAMMAR_H_ */
vpXmlgrammarInit
void * vpXmlgrammarInit
Definition: xmlgrammar.c:5741
APG Version 7.0 is licensed under the 2-Clause BSD License,
an Open Source Initiative Approved License.