-
Notifications
You must be signed in to change notification settings - Fork 0
/
xml_types.h
551 lines (475 loc) · 31.2 KB
/
xml_types.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
#pragma once
// Copyright David Lawrence Bien 1997 - 2021.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt).
// xml_types.h
// dbien
// 06JAN2021
// Types definitions and predeclares for XML parser.
#ifdef _MSC_VER
#include <unordered_set>
#include <unordered_map>
#else
#include <set>
#include <map>
#endif
#include "upslist.h"
#include "xml_ns.h"
#include "_l_types.h"
__XMLP_BEGIN_NAMESPACE
// There various types of data we might get in XML.
static const vtyDataType s_kdtPlainText = 0;
static const vtyDataType s_kdtCharDecRef = 1;
static const vtyDataType s_kdtCharHexRef = 2;
static const vtyDataType s_kdtFirstDTDRef = 3;
static const vtyDataType s_kdtEntityRef = 3;
static const vtyDataType s_kdtPEReference = 4;
// The string containing the values from the Production S.
#define STR_XML_WHITESPACE_TOKEN "\n\r\x20\t"
// Try to propagate this to the current usage areas that merely contain "false" - this flags where we need to change when we support DTDs.
static constexpr bool vkfSupportDTD = false;
// xml_traits.h
template < class t_TyTransport, bool t_kfSupportDTD, bool t_kfValidating >
struct xml_traits;
template < class t_TyChar >
struct xml_markup_traits;
// xml_user.h:
template < class t_tyChar, bool t_kfSupportDTD >
class _xml_user_obj_base_dtd;
template < class t_tyChar, bool t_kfSupportDTD >
class xml_user_obj;
// xml_context.h:
template < class t_TyChar >
class XMLDeclProperties;
class _xml_output_format;
class _xml_output_context;
template < class t_TyChar >
class _xml_token_copy_context;
template < class t_TyLexUserObj >
class _xml_document_context;
template < class t_TyXmlTraits >
class _xml_document_context_transport;
template < class t_TyTpTransports >
class _xml_document_context_transport_var;
// xml_namespace.h
template < class t_TyChar >
class _xml_namespace_uri;
template < class t_TyChar >
class xml_namespace_value_wrap;
template < class t_TyChar >
class xml_namespace_map;
// xml_namespace_tree.h
template < class t_TyChar, class t_TyAllocator = allocator< t_TyChar > >
class xml_namespace_tree_node;
// xml_cursor.h:
template < class t_TyXmlTraits >
class _xml_read_context;
template < class t_TyXmlTraits >
class xml_read_cursor;
template < class t_TyTpTransports >
class xml_read_cursor_var;
// xml_token.h:
template < class t_TyTransportCtxt, class t_TyUserObj, class t_TyTpValueTraits >
class xml_token;
template < class t_TyTpTransports >
class xml_token_var;
// xml_tag.h:
template < class t_TyXmlTraits >
class xml_tag;
template < class t_TyXmlTraits >
class xml_document;
template < class t_TyXmlTraits >
class _xml_tag_import_options;
template < class t_TyXmlTraits >
class _xml_tag_import_context;
template < class t_TyXmlTraits >
class _xml_local_import_context;
// xml_tag_var.h:
template < class t_TyTpTransports >
class xml_tag_var;
template < class t_TyTpTransports >
class xml_document_var;
// xml_parse.h:
template < class t_TyXmlTraits >
class xml_parser;
template < template < class ... > class t_tempTyTransport,
class t_TyTp2DCharPack = tuple< tuple< char32_t, true_type >, tuple< char32_t, false_type >, tuple< char16_t, true_type >, tuple< char16_t, false_type >, tuple< char8_t, false_type > > >
class xml_parser_var;
// xml_exc.h:
class xml_parse_exception;
// xml_transport.h:
template < class t_TyChar, class t_TyFSwitchEndian >
class xml_write_transport_file;
template < class t_TyChar, class t_TyFSwitchEndian >
class xml_write_transport_mapped;
template < class t_TyChar, class t_TyFSwitchEndian >
class xml_write_transport_memstream;
// xml_writer.h:
template < class t_TyXmlTransportOut >
class xml_write_context;
template < class t_TyXmlTransportOut >
class xml_write_tag;
template < class t_TyXmlTransportOut >
class xml_writer;
// Implement a mapping from lex read transports to xml output transports - mostly for unit testing.
template < class t_TyLexTransport >
struct map_input_to_output_transport;
template < class t_TyChar, class t_TyBoolSwitchEndian >
struct map_input_to_output_transport< _l_transport_file< t_TyChar, t_TyBoolSwitchEndian > >
{
typedef xml_write_transport_file< t_TyChar, t_TyBoolSwitchEndian > _TyXmlWriteTransport;
};
template < class t_TyChar, class t_TyBoolSwitchEndian >
struct map_input_to_output_transport< _l_transport_mapped< t_TyChar, t_TyBoolSwitchEndian > >
{
typedef xml_write_transport_mapped< t_TyChar, t_TyBoolSwitchEndian > _TyXmlWriteTransport;
};
template < class t_TyChar, class t_TyBoolSwitchEndian >
struct map_input_to_output_transport< _l_transport_fixedmem< t_TyChar, t_TyBoolSwitchEndian > >
{
typedef xml_write_transport_memstream< t_TyChar, t_TyBoolSwitchEndian > _TyXmlWriteTransport;
};
// map_input_to_any_output_transport: Map to any (char,switchendian) combo for output transport type.
template < class t_TyLexTransport, class t_TyChar, class t_TyBoolSwitchEndian >
struct map_input_to_any_output_transport;
template < class t_TyLexInputChar, class t_TyLexInputBoolSwitchEndian, class t_TyChar, class t_TyBoolSwitchEndian >
struct map_input_to_any_output_transport< _l_transport_file< t_TyLexInputChar, t_TyLexInputBoolSwitchEndian >, t_TyChar, t_TyBoolSwitchEndian >
{
typedef xml_write_transport_file< t_TyChar, t_TyBoolSwitchEndian > _TyXmlWriteTransport;
};
template < class t_TyLexInputChar, class t_TyLexInputBoolSwitchEndian, class t_TyChar, class t_TyBoolSwitchEndian >
struct map_input_to_any_output_transport< _l_transport_mapped< t_TyLexInputChar, t_TyLexInputBoolSwitchEndian >, t_TyChar, t_TyBoolSwitchEndian >
{
typedef xml_write_transport_mapped< t_TyChar, t_TyBoolSwitchEndian > _TyXmlWriteTransport;
};
template < class t_TyLexInputChar, class t_TyLexInputBoolSwitchEndian, class t_TyChar, class t_TyBoolSwitchEndian >
struct map_input_to_any_output_transport< _l_transport_fixedmem< t_TyLexInputChar, t_TyLexInputBoolSwitchEndian >, t_TyChar, t_TyBoolSwitchEndian >
{
typedef xml_write_transport_memstream< t_TyChar, t_TyBoolSwitchEndian > _TyXmlWriteTransport;
};
// When we actually support DTD and validation (if ever because they aren't that important to me) then we might have to make this more complex.
// This is an adaptor for use with MultiplexTuplePack_t<>.
template < class t_TyTransport >
using TGetXmlTraitsDefault = xml_traits< t_TyTransport, false, false >;
// TGetPrefixUri (prefix,URI).
template < class t_TyChar >
using TGetPrefixUri = std::pair< basic_string< t_TyChar >, basic_string< t_TyChar > >;
// TFIsReadCursorVar: Test for read cursor for so can overload same function names with constraints.
template < class t_TyReadCursor >
struct TFIsReadCursorVar
{
static constexpr bool value = false;
};
template < class t_TyTpTransports >
struct TFIsReadCursorVar< xml_read_cursor_var< t_TyTpTransports > >
{
static constexpr bool value = true;
};
template < class t_TyReadCursor >
inline constexpr bool TFIsReadCursorVar_v = TFIsReadCursorVar< t_TyReadCursor >::value;
// _xml_namespace_map_traits:
// This just organizes the types for the namespace map in one place because we reference it in a couple of places and we don't want to templatize by the full type because it results in unreadable log messages, etc.
template < class t_TyChar >
struct _xml_namespace_map_traits
{
typedef t_TyChar _TyChar;
typedef basic_string< _TyChar > _TyStdStr;
typedef basic_string_view< _TyChar > _TyStrView;
typedef _xml_namespace_uri< _TyChar > _TyNamespaceUri;
typedef UniquePtrSList< _TyNamespaceUri > _TyUpListNamespaceUris;
#ifdef _MSC_VER
typedef StringTransparentHash< _TyChar > _TyStringTransparentHash; // Allow lookup by string_view without creating a string.
typedef unordered_set< _TyStdStr, _TyStringTransparentHash, std::equal_to<void> > _TyUriAndPrefixMap;
// first is a pointer to a PrefixMap value for the prefix, second is the current list of namespace URIs for that prefix.
typedef pair< const typename _TyUriAndPrefixMap::value_type *, _TyUpListNamespaceUris > _TyNamespaceMapped;
typedef unordered_map< _TyStdStr, _TyNamespaceMapped, _TyStringTransparentHash, std::equal_to<void> > _TyNamespaceMap;
#else // __linux__ or any other unknown system - which should support heterogeneous lookup for set and map:
// Clang's trunk is currently supporting heterogeneous lookup for set and map so we can flavor this a bit different later (today is 09APR2021).
typedef set< _TyStdStr, std::less<> > _TyUriAndPrefixMap;
// first is a pointer to a PrefixMap value for the prefix, second is the current list of namespace URIs for that prefix.
typedef pair< const typename _TyUriAndPrefixMap::value_type *, _TyUpListNamespaceUris > _TyNamespaceMapped;
typedef map< _TyStdStr, _TyNamespaceMapped, std::less<> > _TyNamespaceMap;
#endif
};
// These are positions within the _l_value<> aggregate for tags:
static const size_t vknTagNameIdx = 0;
static const size_t vknAttributesIdx = 1;
static const size_t vknTagArrayCount = 2;
// Name positions: Shared between tag and attribute names:
static const size_t vknNameIdx = 0;
static const size_t vknNamespaceIdx = 1;
// Tag-name specific:
static const size_t vknTagName_NNamespaceDeclsIdx = 2;
static const size_t vknTagName_ArrayCount = 3;
// Attribute specific:
static const size_t vknAttr_ValueIdx = 2;
static const size_t vknAttr_FDoubleQuoteIdx = 3;
static const size_t vknAttr_ArrayCount = 4;
// Positions in the _l_value<> aggregate for Processing Instruction.
static const size_t vknProcessingInstruction_PITargetIdx = 0;
static const size_t vknProcessingInstruction_MeatIdx = 1;
static const size_t vknProcessingInstruction_ArrayCount = 2;
// Positions in the _l_value<> aggregate for XMLDecl.
static const size_t vknXMLDecl_StandaloneYesIdx = 0;
static const size_t vknXMLDecl_StandaloneNoIdx = 1;
static const size_t vknXMLDecl_StandaloneDoubleQuoteIdx = 2;
static const size_t vknXMLDecl_EncodingIdx = 3;
static const size_t vknXMLDecl_EncodingDoubleQuoteIdx = 4;
static const size_t vknXMLDecl_EncodingSingleQuoteIdx = 5;
static const size_t vknXMLDecl_VersionMinorNumberIdx = 6;
static const size_t vknXMLDecl_VersionMinorNumberDoubleQuoteIdx = 7;
static const size_t vknXMLDecl_ArrayCount = 8;
// Declare all the various types of the triggers and tokens for the XML lexical analyzer.
static const vtyActionIdent s_knTriggerPITargetStart = 1;
static const vtyActionIdent s_knTriggerPITargetEnd = 2;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerPITargetStart = _l_trigger_position< t_TyLexTraits, s_knTriggerPITargetStart, t_fInLexGen >;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerPITargetEnd = _l_trigger_string< t_TyLexTraits, s_knTriggerPITargetEnd, s_knTriggerPITargetStart, t_fInLexGen >;
static const vtyActionIdent s_knTriggerPITargetMeatBegin = 3;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerPITargetMeatBegin = _l_trigger_position< t_TyLexTraits, s_knTriggerPITargetMeatBegin, t_fInLexGen >;
static const vtyActionIdent s_knTriggerMixedNameBegin = 5;
static const vtyActionIdent s_knTriggerMixedNameEnd = 6;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerMixedNameBegin = _l_trigger_position< t_TyLexTraits, s_knTriggerMixedNameBegin, t_fInLexGen >;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerMixedNameEnd = _l_trigger_string< t_TyLexTraits, s_knTriggerMixedNameEnd, s_knTriggerMixedNameBegin, t_fInLexGen >;
// For now we will lump together everything that is a subset of CHARDATA (i.e. attr values in which can be no ' or ", etc)
// into the same triggers and resultant token data. This should be perfectly fine during input of XML - also
// it saves us implementation space.
static const vtyActionIdent s_knTriggerCharDataBegin = 7;
static const vtyActionIdent s_knTriggerCharDataEnd = 8;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerCharDataBegin = _l_trigger_position< t_TyLexTraits, s_knTriggerCharDataBegin, t_fInLexGen >;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerCharDataEnd = _l_trigger_string< t_TyLexTraits, s_knTriggerCharDataEnd, s_knTriggerCharDataBegin, t_fInLexGen >;
// We need to have a different set of triggers for the single-quoted CharData since the actions become ambiguous with each other when the are the same - which makes sense.
static const vtyActionIdent s_knTriggerCharDataSingleQuoteBegin = 9;
static const vtyActionIdent s_knTriggerCharDataSingleQuoteEnd = 10;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerCharDataSingleQuoteBegin = _l_trigger_position< t_TyLexTraits, s_knTriggerCharDataSingleQuoteBegin , t_fInLexGen >;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerCharDataSingleQuoteEnd = _l_trigger_string_typed_range< s_kdtPlainText, TyGetTriggerCharDataEnd<t_TyLexTraits,t_fInLexGen>,
s_knTriggerCharDataSingleQuoteEnd, s_knTriggerCharDataSingleQuoteBegin >;
static const vtyActionIdent s_knTriggerEntityRefBegin = 11;
static const vtyActionIdent s_knTriggerEntityRefEnd = 12;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerEntityRefBegin = _l_trigger_string_typed_beginpoint< s_kdtEntityRef, TyGetTriggerCharDataEnd<t_TyLexTraits,t_fInLexGen>, s_knTriggerEntityRefBegin >;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerEntityRefEnd = _l_trigger_string_typed_endpoint< s_kdtEntityRef, TyGetTriggerCharDataEnd<t_TyLexTraits,t_fInLexGen>, s_knTriggerEntityRefEnd, s_knTriggerEntityRefBegin >;
static const vtyActionIdent s_knTriggerCharDecRefBegin = 13;
static const vtyActionIdent s_knTriggerCharDecRefEnd = 14;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerCharDecRefBegin = _l_trigger_string_typed_beginpoint< s_kdtCharDecRef, TyGetTriggerCharDataEnd<t_TyLexTraits, t_fInLexGen>, s_knTriggerCharDecRefBegin >;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerCharDecRefEnd = _l_trigger_string_typed_endpoint< s_kdtCharDecRef, TyGetTriggerCharDataEnd<t_TyLexTraits, t_fInLexGen>, s_knTriggerCharDecRefEnd, s_knTriggerCharDecRefBegin >;
static const vtyActionIdent s_knTriggerCharHexRefBegin = 15;
static const vtyActionIdent s_knTriggerCharHexRefEnd = 16;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerCharHexRefBegin = _l_trigger_string_typed_beginpoint< s_kdtCharHexRef, TyGetTriggerCharDataEnd<t_TyLexTraits,t_fInLexGen>, s_knTriggerCharHexRefBegin >;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerCharHexRefEnd = _l_trigger_string_typed_endpoint< s_kdtCharHexRef, TyGetTriggerCharDataEnd<t_TyLexTraits,t_fInLexGen>, s_knTriggerCharHexRefEnd, s_knTriggerCharHexRefBegin >;
static const vtyActionIdent s_knTriggerAttValueDoubleQuote = 17;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerAttValueDoubleQuote = _l_trigger_bool< t_TyLexTraits, s_knTriggerAttValueDoubleQuote, t_fInLexGen >;
static const vtyActionIdent s_knTriggerPrefixBegin = 18;
static const vtyActionIdent s_knTriggerPrefixEnd = 19;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerPrefixBegin = _l_trigger_position< t_TyLexTraits, s_knTriggerPrefixBegin, t_fInLexGen >;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerPrefixEnd = _l_trigger_string< t_TyLexTraits, s_knTriggerPrefixEnd, s_knTriggerPrefixBegin, t_fInLexGen >;
static const vtyActionIdent s_knTriggerLocalPartBegin = 20;
static const vtyActionIdent s_knTriggerLocalPartEnd = 21;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerLocalPartBegin = _l_trigger_position< t_TyLexTraits, s_knTriggerLocalPartBegin, t_fInLexGen >;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerLocalPartEnd = _l_trigger_string< t_TyLexTraits, s_knTriggerLocalPartEnd, s_knTriggerLocalPartBegin, t_fInLexGen >;
#if 0 // This trigger is ambiguous due to the nature of attribute names and xmlns attribute names - they match each other - so this trigger fires all the time erroneously.
static const vtyActionIdent s_knTriggerDefaultAttName = 20;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerDefaultAttName _l_trigger_bool< t_TyLexTraits, s_knTriggerDefaultAttName, t_fInLexGen >;
#endif //0
#if 0 // These triggers also cause ambiguity since PrefixedAttName matches a QName.
static const vtyActionIdent s_knTriggerPrefixedAttNameBegin = 21;
static const vtyActionIdent s_knTriggerPrefixedAttNameEnd = 22;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerPrefixedAttNameBegin = _l_trigger_position< t_TyLexTraits, s_knTriggerPrefixedAttNameBegin, t_fInLexGen >;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerPrefixedAttNameEnd = _l_trigger_string< t_TyLexTraits, s_knTriggerPrefixedAttNameEnd, s_knTriggerPrefixedAttNameBegin, t_fInLexGen >;
#endif //0
static const vtyActionIdent s_knTriggerSaveTagName = 23;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerSaveTagName = _l_action_save_data_single< s_knTriggerSaveTagName, TyGetTriggerPrefixEnd<t_TyLexTraits,t_fInLexGen>, TyGetTriggerLocalPartEnd<t_TyLexTraits,t_fInLexGen> >;
static const vtyActionIdent s_knTriggerSaveAttributes = 24;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerSaveAttributes = _l_action_save_data_multiple< s_knTriggerSaveAttributes,
TyGetTriggerPrefixEnd<t_TyLexTraits,t_fInLexGen>, TyGetTriggerLocalPartEnd<t_TyLexTraits,t_fInLexGen>, TyGetTriggerCharDataEnd<t_TyLexTraits,t_fInLexGen>, TyGetTriggerAttValueDoubleQuote<t_TyLexTraits,t_fInLexGen> >;
#if 0 // The comment production has a problem with triggers due to its nature. It is easy to manage without triggers - impossible to try to stick triggers in - they'll never work.
static const vtyActionIdent s_knTriggerCommentBegin = 25;
static const vtyActionIdent s_knTriggerCommentEnd = 26;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerCommentBegin = _l_trigger_position< t_TyLexTraits, s_knTriggerCommentBegin, t_fInLexGen >;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerCommentEnd = _l_trigger_string< t_TyLexTraits, s_knTriggerCommentEnd, s_knTriggerCommentBegin, t_fInLexGen >;
#endif //0
static const vtyActionIdent s_knTriggerStandaloneYes = 27;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerStandaloneYes = _l_trigger_bool< t_TyLexTraits, s_knTriggerStandaloneYes, t_fInLexGen >;
static const vtyActionIdent s_knTriggerStandaloneNo = 44;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerStandaloneNo = _l_trigger_bool< t_TyLexTraits, s_knTriggerStandaloneNo, t_fInLexGen >;
static const vtyActionIdent s_knTriggerStandaloneDoubleQuote = 28;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerStandaloneDoubleQuote = _l_trigger_bool< t_TyLexTraits, s_knTriggerStandaloneDoubleQuote, t_fInLexGen >;
static const vtyActionIdent s_knTriggerEncodingNameBegin = 29;
static const vtyActionIdent s_knTriggerEncodingNameEnd = 30;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerEncodingNameBegin = _l_trigger_position< t_TyLexTraits, s_knTriggerEncodingNameBegin, t_fInLexGen >;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerEncodingNameEnd = _l_trigger_string< t_TyLexTraits, s_knTriggerEncodingNameEnd, s_knTriggerEncodingNameBegin, t_fInLexGen >;
static const vtyActionIdent s_knTriggerEncDeclDoubleQuote = 31;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerEncDeclDoubleQuote = _l_trigger_bool< t_TyLexTraits, s_knTriggerEncDeclDoubleQuote, t_fInLexGen >;
static const vtyActionIdent s_knTriggerEncDeclSingleQuote = 45;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerEncDeclSingleQuote = _l_trigger_bool< t_TyLexTraits, s_knTriggerEncDeclSingleQuote, t_fInLexGen >;
static const vtyActionIdent s_knTriggerVersionNumBegin = 32;
static const vtyActionIdent s_knTriggerVersionNumEnd = 33;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerVersionNumBegin = _l_trigger_position< t_TyLexTraits, s_knTriggerVersionNumBegin, t_fInLexGen >;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerVersionNumEnd = _l_trigger_string< t_TyLexTraits, s_knTriggerVersionNumEnd, s_knTriggerVersionNumBegin, t_fInLexGen >;
static const vtyActionIdent s_knTriggerVersionNumDoubleQuote = 34;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerVersionNumDoubleQuote = _l_trigger_bool< t_TyLexTraits, s_knTriggerVersionNumDoubleQuote, t_fInLexGen >;
static const vtyActionIdent s_knTriggerPEReferenceBegin = 35;
static const vtyActionIdent s_knTriggerPEReferenceEnd = 36;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerPEReferenceBegin = _l_trigger_position< t_TyLexTraits, s_knTriggerPEReferenceBegin, t_fInLexGen >;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerPEReferenceEnd = _l_trigger_string< t_TyLexTraits, s_knTriggerPEReferenceEnd, s_knTriggerPEReferenceBegin, t_fInLexGen >;
static const vtyActionIdent s_knTriggerSystemLiteralBegin = 37;
static const vtyActionIdent s_knTriggerSystemLiteralDoubleQuoteEnd = 38;
static const vtyActionIdent s_knTriggerSystemLiteralSingleQuoteEnd = 39;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerSystemLiteralBegin = _l_trigger_position< t_TyLexTraits, s_knTriggerSystemLiteralBegin, t_fInLexGen >;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerSystemLiteralDoubleQuoteEnd = _l_trigger_string< t_TyLexTraits, s_knTriggerSystemLiteralDoubleQuoteEnd, s_knTriggerSystemLiteralBegin, t_fInLexGen >;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerSystemLiteralSingleQuoteEnd = _l_trigger_string_typed_range< s_kdtPlainText,
TyGetTriggerSystemLiteralDoubleQuoteEnd<t_TyLexTraits,t_fInLexGen>, s_knTriggerSystemLiteralSingleQuoteEnd, s_knTriggerSystemLiteralBegin >;
static const vtyActionIdent s_knTriggerPubidLiteralBegin = 40;
static const vtyActionIdent s_knTriggerPubidLiteralDoubleQuoteEnd = 41;
static const vtyActionIdent s_knTriggerPubidLiteralSingleQuoteEnd = 42;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerPubidLiteralBegin = _l_trigger_position< t_TyLexTraits, s_knTriggerPubidLiteralBegin, t_fInLexGen >;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerPubidLiteralDoubleQuoteEnd = _l_trigger_string< t_TyLexTraits, s_knTriggerPubidLiteralDoubleQuoteEnd, s_knTriggerPubidLiteralBegin, t_fInLexGen >;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerPubidLiteralSingleQuoteEnd = _l_trigger_string_typed_range< s_kdtPlainText,
TyGetTriggerPubidLiteralDoubleQuoteEnd<t_TyLexTraits,t_fInLexGen>, s_knTriggerPubidLiteralSingleQuoteEnd, s_knTriggerPubidLiteralBegin >;
// For CharData (in between tags) we can only use a single position since a trigger at the beginning of a production is completely useless and screws things up.
// The parser will immediately "fix up" the positions to make them correct (unless it is skipping data in which case it won't).
static const vtyActionIdent s_knTriggerCharDataEndpoint = 43;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTriggerCharDataEndpoint = _l_trigger_string_typed_endpoint< s_kdtPlainText, TyGetTriggerCharDataEnd<t_TyLexTraits,t_fInLexGen>, s_knTriggerCharDataEndpoint >;
// Tokens:
static const vtyActionIdent s_knTokenSTag = 1000;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTokenSTag = _l_action_token< _l_action_save_data_single< s_knTokenSTag, TyGetTriggerSaveTagName<t_TyLexTraits,t_fInLexGen>, TyGetTriggerSaveAttributes<t_TyLexTraits,t_fInLexGen> > >;
static const vtyActionIdent s_knTokenETag = 1001;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTokenETag = _l_action_token< _l_action_save_data_single< s_knTokenETag, TyGetTriggerPrefixEnd<t_TyLexTraits,t_fInLexGen>, TyGetTriggerLocalPartEnd<t_TyLexTraits,t_fInLexGen> > >;
static const vtyActionIdent s_knTokenEmptyElemTag = 1002;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTokenEmptyElemTag = _l_action_token< _l_action_save_data_single< s_knTokenEmptyElemTag, TyGetTriggerSaveTagName<t_TyLexTraits,t_fInLexGen>, TyGetTriggerSaveAttributes<t_TyLexTraits,t_fInLexGen> > >;
static const vtyActionIdent s_knTokenComment = 1003;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTokenComment = _l_action_token< _l_trigger_noop< t_TyLexTraits, s_knTokenComment, t_fInLexGen > >;
static const vtyActionIdent s_knTokenXMLDecl = 1004;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTokenXMLDecl = _l_action_token< _l_action_save_data_single< s_knTokenXMLDecl,
TyGetTriggerStandaloneYes<t_TyLexTraits,t_fInLexGen>, TyGetTriggerStandaloneNo<t_TyLexTraits,t_fInLexGen>, TyGetTriggerStandaloneDoubleQuote<t_TyLexTraits,t_fInLexGen>,
TyGetTriggerEncodingNameEnd<t_TyLexTraits,t_fInLexGen>, TyGetTriggerEncDeclDoubleQuote<t_TyLexTraits,t_fInLexGen>, TyGetTriggerEncDeclSingleQuote<t_TyLexTraits,t_fInLexGen>,
TyGetTriggerVersionNumEnd<t_TyLexTraits,t_fInLexGen>, TyGetTriggerVersionNumDoubleQuote<t_TyLexTraits,t_fInLexGen> > >;
static const vtyActionIdent s_knTokenCDataSection = 1005;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTokenCDataSection = _l_action_token< _l_trigger_noop< t_TyLexTraits, s_knTokenCDataSection, t_fInLexGen > >;
static const vtyActionIdent s_knTokenCharData = 1006;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTokenCharData = _l_action_token< _l_action_save_data_single< s_knTokenCharData, TyGetTriggerCharDataEnd<t_TyLexTraits,t_fInLexGen> > >;
static const vtyActionIdent s_knTokenProcessingInstruction = 1007;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTokenProcessingInstruction = _l_action_token< _l_action_save_data_single< s_knTokenProcessingInstruction, TyGetTriggerPITargetEnd<t_TyLexTraits,t_fInLexGen>, TyGetTriggerPITargetMeatBegin<t_TyLexTraits,t_fInLexGen> > >;
// Write-validation tokens. These are used during writing to:
// 1) Validate written tokens of various types.
// 2) Determine the production of CharRefs withing Attribute Values and CharData and CDataSections.
// We will automatically substitute CharRefs for disallowed characters in these scenarios. Clearly
// CDataSections involve a different mechanism than AttrValues and CharData - we will correctly
// nest CDataSections to allow for the existences of "]]>" strings in the output.
static const vtyActionIdent s_knTokenValidSpaces = 2000;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTokenValidSpaces = _l_action_token_id< t_TyLexTraits, s_knTokenValidSpaces, t_fInLexGen >;
static const vtyActionIdent s_knTokenValidCommentChars = 2001;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTokenValidCommentChars = _l_action_token_id< t_TyLexTraits, s_knTokenValidCommentChars, t_fInLexGen >;
// CharData: This validates CharData.
static const vtyActionIdent s_knTokenValidCharData = 2002;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTokenValidCharData = _l_action_token_id< t_TyLexTraits, s_knTokenValidCharData, t_fInLexGen >;
// CDCharsOutputValidate: This validates CDataSection contents.
static const vtyActionIdent s_knTokenValidCDataSection = 2003;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTokenValidCDataSection = _l_action_token_id< t_TyLexTraits, s_knTokenValidCDataSection, t_fInLexGen >;
// NCName: This validates prefixes and tag and attribute names.
static const vtyActionIdent s_knTokenValidNCName = 2004;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTokenValidNCName = _l_action_token_id< t_TyLexTraits, s_knTokenValidNCName, t_fInLexGen >;
// AttCharDataNoDoubleQuote: This validates and helps to process attribute values.
static const vtyActionIdent s_knTokenValidAttCharDataNoDoubleQuote = 2005;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTokenValidAttCharDataNoDoubleQuote = _l_action_token_id< t_TyLexTraits, s_knTokenValidAttCharDataNoDoubleQuote, t_fInLexGen >;
// AttCharDataNoSingleQuote: This validates and helps to process attribute values.
static const vtyActionIdent s_knTokenValidAttCharDataNoSingleQuote = 2006;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTokenValidAttCharDataNoSingleQuote = _l_action_token_id< t_TyLexTraits, s_knTokenValidAttCharDataNoSingleQuote, t_fInLexGen >;
// Name: This validates entity reference names and parameter entity reference names.
static const vtyActionIdent s_knTokenValidName = 2007;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTokenValidName = _l_action_token_id< t_TyLexTraits, s_knTokenValidName, t_fInLexGen >;
// CharRefDec: This validates decimal character references.
static const vtyActionIdent s_knTokenValidCharRefDec = 2008;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTokenValidCharRefDec = _l_action_token_id< t_TyLexTraits, s_knTokenValidCharRefDec, t_fInLexGen >;
// CharRefHex: This validates hexidecimal character references.
static const vtyActionIdent s_knTokenValidCharRefHex = 2009;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTokenValidCharRefHex = _l_action_token_id< t_TyLexTraits, s_knTokenValidCharRefHex, t_fInLexGen >;
// EncName: This validates an encoding name inside of an XMLDecl statement.
static const vtyActionIdent s_knTokenValidEncName = 2010;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTokenValidEncName = _l_action_token_id< t_TyLexTraits, s_knTokenValidEncName, t_fInLexGen >;
// PITarget: This validates the PITarget production for a Processing Instruction.
static const vtyActionIdent s_knTokenValidPITarget = 2011;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTokenValidPITarget = _l_action_token_id< t_TyLexTraits, s_knTokenValidPITarget, t_fInLexGen >;
// PITargetMeat: This validates the "meat" of the Processing Instruction which happens to be a sequence of Char productions.
static const vtyActionIdent s_knTokenValidPITargetMeat = 2012;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTokenValidPITargetMeat = _l_action_token_id< t_TyLexTraits, s_knTokenValidPITargetMeat, t_fInLexGen >;
// These actions recognize References while writing XML files. There is a system in place to automatically recognize
// valid references within CharData and attribute data. We use _l_action_token_id<> to generate no Action###() methods
// and no m_axn* objects. This allows us not to templatize the state machine generated and thus just use by character type
// rather than fully specified lexical analyzer object.
static const vtyActionIdent s_knTokenEntityRef = 3000;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTokenEntityRef = _l_action_token_id< t_TyLexTraits, s_knTokenEntityRef, t_fInLexGen >;
static const vtyActionIdent s_knTokenCharRefDec = 3001;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTokenCharRefDec = _l_action_token_id< t_TyLexTraits, s_knTokenCharRefDec, t_fInLexGen >;
static const vtyActionIdent s_knTokenCharRefHex = 3002;
template < class t_TyLexTraits, bool t_fInLexGen = true >
using TyGetTokenCharRefHex = _l_action_token_id< t_TyLexTraits, s_knTokenCharRefHex, t_fInLexGen >;
__XMLP_END_NAMESPACE