1
// auto-generated: "lalrpop 0.20.0"
2
// sha3: 175fa3d158082ace8f8d659a081a6be93a041c13f271223c521bc4f6ff4b8968
3
use crate::message::lexer;
4
#[allow(unused_extern_crates)]
5
extern crate lalrpop_util as __lalrpop_util;
6
#[allow(unused_imports)]
7
use self::__lalrpop_util::state_machine as __state_machine;
8
extern crate core;
9
extern crate alloc;
10

            
11
#[rustfmt::skip]
12
#[allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports, unused_parens, clippy::all)]
13
mod __parse__Message {
14

            
15
    use crate::message::lexer;
16
    #[allow(unused_extern_crates)]
17
    extern crate lalrpop_util as __lalrpop_util;
18
    #[allow(unused_imports)]
19
    use self::__lalrpop_util::state_machine as __state_machine;
20
    extern crate core;
21
    extern crate alloc;
22
    use super::__ToTriple;
23
    #[allow(dead_code)]
24
    pub(crate) enum __Symbol<>
25
     {
26
        Variant0(lexer::Token),
27
        Variant1(()),
28
    }
29
    const __ACTION: &[i8] = &[
30
        // State 0
31
        3, 4, 16, 0, 17, 5, 18, 0, 6, 7, 19,
32
        // State 1
33
        3, 0, 0, 0, 0, 0, 18, 0, 6, 0, 19,
34
        // State 2
35
        3, 4, 16, 0, 17, 5, 18, 0, 6, 7, 19,
36
        // State 3
37
        3, 4, 16, 0, 17, 5, 18, 0, 6, 7, 19,
38
        // State 4
39
        3, 4, 16, 0, 17, 5, 18, 0, 6, 7, 19,
40
        // State 5
41
        3, 4, 16, 0, 26, 5, 18, 0, 6, 7, 19,
42
        // State 6
43
        3, 4, 16, 0, 17, 5, 18, 0, 6, 7, 19,
44
        // State 7
45
        0, 0, 0, -10, 0, 0, 0, -10, 0, -10, 0,
46
        // State 8
47
        0, 0, 0, -12, 0, 0, 0, -12, 0, -12, 0,
48
        // State 9
49
        -5, 0, 0, 0, 0, 0, -5, 0, -5, 0, -5,
50
        // State 10
51
        0, 0, 0, -13, 0, 0, 0, -13, 0, -13, 0,
52
        // State 11
53
        0, 0, 0, -7, 0, 0, 0, -7, 0, -7, 0,
54
        // State 12
55
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
56
        // State 13
57
        0, 0, 0, -9, 0, 0, 0, -9, 0, -9, 0,
58
        // State 14
59
        0, 0, 0, -14, 0, 0, 0, -14, 0, -14, 0,
60
        // State 15
61
        0, 0, 0, -11, 0, 0, 0, -11, 0, -11, 0,
62
        // State 16
63
        0, 0, 0, -15, 0, 0, 0, -15, 0, -15, 0,
64
        // State 17
65
        -3, 0, 0, 0, 0, 0, -3, 0, -3, 0, -3,
66
        // State 18
67
        -4, 0, 0, 0, 0, 0, -4, 0, -4, 0, -4,
68
        // State 19
69
        -6, 0, 0, 0, 0, 0, -6, 0, -6, 0, -6,
70
        // State 20
71
        0, 0, 0, -8, 0, 0, 0, -8, 0, -8, 0,
72
        // State 21
73
        0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0,
74
        // State 22
75
        0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0,
76
        // State 23
77
        0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0,
78
        // State 24
79
        0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0,
80
        // State 25
81
        0, 0, 0, -15, 0, 0, 0, 32, 0, 0, 0,
82
        // State 26
83
        0, 0, 0, -18, 0, 0, 0, -18, 0, -18, 0,
84
        // State 27
85
        0, 0, 0, -1, 0, 0, 0, -1, 0, -1, 0,
86
        // State 28
87
        0, 0, 0, -2, 0, 0, 0, -2, 0, -2, 0,
88
        // State 29
89
        0, 0, 0, -19, 0, 0, 0, -19, 0, -19, 0,
90
        // State 30
91
        0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0,
92
        // State 31
93
        0, 0, 0, -17, 0, 0, 0, -17, 0, -17, 0,
94
        // State 32
95
        0, 0, 0, -16, 0, 0, 0, -16, 0, -16, 0,
96
    ];
97
    fn __action(state: i8, integer: usize) -> i8 {
98
        __ACTION[(state as usize) * 11 + integer]
99
    }
100
    const __EOF_ACTION: &[i8] = &[
101
        // State 0
102
        0,
103
        // State 1
104
        0,
105
        // State 2
106
        0,
107
        // State 3
108
        0,
109
        // State 4
110
        0,
111
        // State 5
112
        0,
113
        // State 6
114
        0,
115
        // State 7
116
        -10,
117
        // State 8
118
        -12,
119
        // State 9
120
        0,
121
        // State 10
122
        -13,
123
        // State 11
124
        -7,
125
        // State 12
126
        -20,
127
        // State 13
128
        -9,
129
        // State 14
130
        -14,
131
        // State 15
132
        -11,
133
        // State 16
134
        -15,
135
        // State 17
136
        0,
137
        // State 18
138
        0,
139
        // State 19
140
        0,
141
        // State 20
142
        -8,
143
        // State 21
144
        0,
145
        // State 22
146
        0,
147
        // State 23
148
        0,
149
        // State 24
150
        0,
151
        // State 25
152
        0,
153
        // State 26
154
        -18,
155
        // State 27
156
        -1,
157
        // State 28
158
        -2,
159
        // State 29
160
        -19,
161
        // State 30
162
        0,
163
        // State 31
164
        -17,
165
        // State 32
166
        -16,
167
    ];
168
    fn __goto(state: i8, nt: usize) -> i8 {
169
        match nt {
170
            0 => 7,
171
            1 => 8,
172
            2 => match state {
173
                1 => 19,
174
                _ => 9,
175
            },
176
            3 => 1,
177
            4 => 10,
178
            5 => match state {
179
                1 => 20,
180
                _ => 11,
181
            },
182
            6 => match state {
183
                2 => 21,
184
                3 => 22,
185
                4 => 23,
186
                5 => 24,
187
                6 => 26,
188
                _ => 12,
189
            },
190
            7 => 13,
191
            8 => 14,
192
            _ => 0,
193
        }
194
    }
195
    const __TERMINAL: &[&str] = &[
196
        r###"AED"###,
197
        r###"COMPRESSED_DATA"###,
198
        r###"LITERAL"###,
199
        r###"MDC"###,
200
        r###"OPAQUE_CONTENT"###,
201
        r###"OPS"###,
202
        r###"PKESK"###,
203
        r###"POP"###,
204
        r###"SEIPv1"###,
205
        r###"SIG"###,
206
        r###"SKESK"###,
207
    ];
208
    fn __expected_tokens(__state: i8) -> alloc::vec::Vec<alloc::string::String> {
209
        __TERMINAL.iter().enumerate().filter_map(|(index, terminal)| {
210
            let next_state = __action(__state, index);
211
            if next_state == 0 {
212
                None
213
            } else {
214
                Some(alloc::string::ToString::to_string(terminal))
215
            }
216
        }).collect()
217
    }
218
    fn __expected_tokens_from_states<
219
    >(
220
        __states: &[i8],
221
        _: core::marker::PhantomData<()>,
222
    ) -> alloc::vec::Vec<alloc::string::String>
223
    {
224
        __TERMINAL.iter().enumerate().filter_map(|(index, terminal)| {
225
            if __accepts(None, __states, Some(index), core::marker::PhantomData::<()>) {
226
                Some(alloc::string::ToString::to_string(terminal))
227
            } else {
228
                None
229
            }
230
        }).collect()
231
    }
232
    pub(crate) struct __StateMachine<>
233
    where 
234
    {
235
        __phantom: core::marker::PhantomData<()>,
236
    }
237
    impl<> __state_machine::ParserDefinition for __StateMachine<>
238
    where 
239
    {
240
        type Location = usize;
241
        type Error = lexer::LexicalError;
242
        type Token = lexer::Token;
243
        type TokenIndex = usize;
244
        type Symbol = __Symbol<>;
245
        type Success = ();
246
        type StateIndex = i8;
247
        type Action = i8;
248
        type ReduceIndex = i8;
249
        type NonterminalIndex = usize;
250

            
251
        #[inline]
252
        fn start_location(&self) -> Self::Location {
253
              Default::default()
254
        }
255

            
256
        #[inline]
257
        fn start_state(&self) -> Self::StateIndex {
258
              0
259
        }
260

            
261
        #[inline]
262
        fn token_to_index(&self, token: &Self::Token) -> Option<usize> {
263
            __token_to_integer(token, core::marker::PhantomData::<()>)
264
        }
265

            
266
        #[inline]
267
        fn action(&self, state: i8, integer: usize) -> i8 {
268
            __action(state, integer)
269
        }
270

            
271
        #[inline]
272
        fn error_action(&self, state: i8) -> i8 {
273
            __action(state, 11 - 1)
274
        }
275

            
276
        #[inline]
277
        fn eof_action(&self, state: i8) -> i8 {
278
            __EOF_ACTION[state as usize]
279
        }
280

            
281
        #[inline]
282
        fn goto(&self, state: i8, nt: usize) -> i8 {
283
            __goto(state, nt)
284
        }
285

            
286
        fn token_to_symbol(&self, token_index: usize, token: Self::Token) -> Self::Symbol {
287
            __token_to_symbol(token_index, token, core::marker::PhantomData::<()>)
288
        }
289

            
290
        fn expected_tokens(&self, state: i8) -> alloc::vec::Vec<alloc::string::String> {
291
            __expected_tokens(state)
292
        }
293

            
294
        fn expected_tokens_from_states(&self, states: &[i8]) -> alloc::vec::Vec<alloc::string::String> {
295
            __expected_tokens_from_states(states, core::marker::PhantomData::<()>)
296
        }
297

            
298
        #[inline]
299
        fn uses_error_recovery(&self) -> bool {
300
            false
301
        }
302

            
303
        #[inline]
304
        fn error_recovery_symbol(
305
            &self,
306
            recovery: __state_machine::ErrorRecovery<Self>,
307
        ) -> Self::Symbol {
308
            panic!("error recovery not enabled for this grammar")
309
        }
310

            
311
        fn reduce(
312
            &mut self,
313
            action: i8,
314
            start_location: Option<&Self::Location>,
315
            states: &mut alloc::vec::Vec<i8>,
316
            symbols: &mut alloc::vec::Vec<__state_machine::SymbolTriple<Self>>,
317
        ) -> Option<__state_machine::ParseResult<Self>> {
318
            __reduce(
319
                action,
320
                start_location,
321
                states,
322
                symbols,
323
                core::marker::PhantomData::<()>,
324
            )
325
        }
326

            
327
        fn simulate_reduce(&self, action: i8) -> __state_machine::SimulatedReduce<Self> {
328
            __simulate_reduce(action, core::marker::PhantomData::<()>)
329
        }
330
    }
331
    fn __token_to_integer<
332
    >(
333
        __token: &lexer::Token,
334
        _: core::marker::PhantomData<()>,
335
    ) -> Option<usize>
336
    {
337
        match *__token {
338
            lexer::Token::AED if true => Some(0),
339
            lexer::Token::CompressedData if true => Some(1),
340
            lexer::Token::Literal if true => Some(2),
341
            lexer::Token::MDC if true => Some(3),
342
            lexer::Token::OpaqueContent if true => Some(4),
343
            lexer::Token::OPS if true => Some(5),
344
            lexer::Token::PKESK if true => Some(6),
345
            lexer::Token::Pop if true => Some(7),
346
            lexer::Token::SEIPv1 if true => Some(8),
347
            lexer::Token::SIG if true => Some(9),
348
            lexer::Token::SKESK if true => Some(10),
349
            _ => None,
350
        }
351
    }
352
    fn __token_to_symbol<
353
    >(
354
        __token_index: usize,
355
        __token: lexer::Token,
356
        _: core::marker::PhantomData<()>,
357
    ) -> __Symbol<>
358
    {
359
        match __token_index {
360
            0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 => __Symbol::Variant0(__token),
361
            _ => unreachable!(),
362
        }
363
    }
364
    fn __simulate_reduce<
365
    >(
366
        __reduce_index: i8,
367
        _: core::marker::PhantomData<()>,
368
    ) -> __state_machine::SimulatedReduce<__StateMachine<>>
369
    {
370
        match __reduce_index {
371
            0 => {
372
                __state_machine::SimulatedReduce::Reduce {
373
                    states_to_pop: 3,
374
                    nonterminal_produced: 0,
375
                }
376
            }
377
            1 => {
378
                __state_machine::SimulatedReduce::Reduce {
379
                    states_to_pop: 3,
380
                    nonterminal_produced: 1,
381
                }
382
            }
383
            2 => {
384
                __state_machine::SimulatedReduce::Reduce {
385
                    states_to_pop: 1,
386
                    nonterminal_produced: 2,
387
                }
388
            }
389
            3 => {
390
                __state_machine::SimulatedReduce::Reduce {
391
                    states_to_pop: 1,
392
                    nonterminal_produced: 2,
393
                }
394
            }
395
            4 => {
396
                __state_machine::SimulatedReduce::Reduce {
397
                    states_to_pop: 1,
398
                    nonterminal_produced: 3,
399
                }
400
            }
401
            5 => {
402
                __state_machine::SimulatedReduce::Reduce {
403
                    states_to_pop: 2,
404
                    nonterminal_produced: 3,
405
                }
406
            }
407
            6 => {
408
                __state_machine::SimulatedReduce::Reduce {
409
                    states_to_pop: 1,
410
                    nonterminal_produced: 4,
411
                }
412
            }
413
            7 => {
414
                __state_machine::SimulatedReduce::Reduce {
415
                    states_to_pop: 2,
416
                    nonterminal_produced: 4,
417
                }
418
            }
419
            8 => {
420
                __state_machine::SimulatedReduce::Reduce {
421
                    states_to_pop: 1,
422
                    nonterminal_produced: 5,
423
                }
424
            }
425
            9 => {
426
                __state_machine::SimulatedReduce::Reduce {
427
                    states_to_pop: 1,
428
                    nonterminal_produced: 5,
429
                }
430
            }
431
            10 => {
432
                __state_machine::SimulatedReduce::Reduce {
433
                    states_to_pop: 1,
434
                    nonterminal_produced: 6,
435
                }
436
            }
437
            11 => {
438
                __state_machine::SimulatedReduce::Reduce {
439
                    states_to_pop: 1,
440
                    nonterminal_produced: 6,
441
                }
442
            }
443
            12 => {
444
                __state_machine::SimulatedReduce::Reduce {
445
                    states_to_pop: 1,
446
                    nonterminal_produced: 6,
447
                }
448
            }
449
            13 => {
450
                __state_machine::SimulatedReduce::Reduce {
451
                    states_to_pop: 1,
452
                    nonterminal_produced: 6,
453
                }
454
            }
455
            14 => {
456
                __state_machine::SimulatedReduce::Reduce {
457
                    states_to_pop: 1,
458
                    nonterminal_produced: 6,
459
                }
460
            }
461
            15 => {
462
                __state_machine::SimulatedReduce::Reduce {
463
                    states_to_pop: 4,
464
                    nonterminal_produced: 7,
465
                }
466
            }
467
            16 => {
468
                __state_machine::SimulatedReduce::Reduce {
469
                    states_to_pop: 3,
470
                    nonterminal_produced: 7,
471
                }
472
            }
473
            17 => {
474
                __state_machine::SimulatedReduce::Reduce {
475
                    states_to_pop: 2,
476
                    nonterminal_produced: 8,
477
                }
478
            }
479
            18 => {
480
                __state_machine::SimulatedReduce::Reduce {
481
                    states_to_pop: 3,
482
                    nonterminal_produced: 8,
483
                }
484
            }
485
            19 => __state_machine::SimulatedReduce::Accept,
486
            _ => panic!("invalid reduction index {}", __reduce_index)
487
        }
488
    }
489
    pub struct MessageParser {
490
        _priv: (),
491
    }
492

            
493
    impl MessageParser {
494
        pub fn new() -> MessageParser {
495
            MessageParser {
496
                _priv: (),
497
            }
498
        }
499

            
500
        #[allow(dead_code)]
501
        pub fn parse<
502
            __TOKEN: __ToTriple<>,
503
            __TOKENS: IntoIterator<Item=__TOKEN>,
504
        >(
505
            &self,
506
            __tokens0: __TOKENS,
507
        ) -> Result<(), __lalrpop_util::ParseError<usize, lexer::Token, lexer::LexicalError>>
508
        {
509
            let __tokens = __tokens0.into_iter();
510
            let mut __tokens = __tokens.map(|t| __ToTriple::to_triple(t));
511
            __state_machine::Parser::drive(
512
                __StateMachine {
513
                    __phantom: core::marker::PhantomData::<()>,
514
                },
515
                __tokens,
516
            )
517
        }
518
    }
519
    fn __accepts<
520
    >(
521
        __error_state: Option<i8>,
522
        __states: &[i8],
523
        __opt_integer: Option<usize>,
524
        _: core::marker::PhantomData<()>,
525
    ) -> bool
526
    {
527
        let mut __states = __states.to_vec();
528
        __states.extend(__error_state);
529
        loop {
530
            let mut __states_len = __states.len();
531
            let __top = __states[__states_len - 1];
532
            let __action = match __opt_integer {
533
                None => __EOF_ACTION[__top as usize],
534
                Some(__integer) => __action(__top, __integer),
535
            };
536
            if __action == 0 { return false; }
537
            if __action > 0 { return true; }
538
            let (__to_pop, __nt) = match __simulate_reduce(-(__action + 1), core::marker::PhantomData::<()>) {
539
                __state_machine::SimulatedReduce::Reduce {
540
                    states_to_pop, nonterminal_produced
541
                } => (states_to_pop, nonterminal_produced),
542
                __state_machine::SimulatedReduce::Accept => return true,
543
            };
544
            __states_len -= __to_pop;
545
            __states.truncate(__states_len);
546
            let __top = __states[__states_len - 1];
547
            let __next_state = __goto(__top, __nt);
548
            __states.push(__next_state);
549
        }
550
    }
551
    pub(crate) fn __reduce<
552
    >(
553
        __action: i8,
554
        __lookahead_start: Option<&usize>,
555
        __states: &mut alloc::vec::Vec<i8>,
556
        __symbols: &mut alloc::vec::Vec<(usize,__Symbol<>,usize)>,
557
        _: core::marker::PhantomData<()>,
558
    ) -> Option<Result<(),__lalrpop_util::ParseError<usize, lexer::Token, lexer::LexicalError>>>
559
    {
560
        let (__pop_states, __nonterminal) = match __action {
561
            0 => {
562
                __reduce0(__lookahead_start, __symbols, core::marker::PhantomData::<()>)
563
            }
564
            1 => {
565
                __reduce1(__lookahead_start, __symbols, core::marker::PhantomData::<()>)
566
            }
567
            2 => {
568
                __reduce2(__lookahead_start, __symbols, core::marker::PhantomData::<()>)
569
            }
570
            3 => {
571
                __reduce3(__lookahead_start, __symbols, core::marker::PhantomData::<()>)
572
            }
573
            4 => {
574
                __reduce4(__lookahead_start, __symbols, core::marker::PhantomData::<()>)
575
            }
576
            5 => {
577
                __reduce5(__lookahead_start, __symbols, core::marker::PhantomData::<()>)
578
            }
579
            6 => {
580
                __reduce6(__lookahead_start, __symbols, core::marker::PhantomData::<()>)
581
            }
582
            7 => {
583
                __reduce7(__lookahead_start, __symbols, core::marker::PhantomData::<()>)
584
            }
585
            8 => {
586
                __reduce8(__lookahead_start, __symbols, core::marker::PhantomData::<()>)
587
            }
588
            9 => {
589
                __reduce9(__lookahead_start, __symbols, core::marker::PhantomData::<()>)
590
            }
591
            10 => {
592
                __reduce10(__lookahead_start, __symbols, core::marker::PhantomData::<()>)
593
            }
594
            11 => {
595
                __reduce11(__lookahead_start, __symbols, core::marker::PhantomData::<()>)
596
            }
597
            12 => {
598
                __reduce12(__lookahead_start, __symbols, core::marker::PhantomData::<()>)
599
            }
600
            13 => {
601
                __reduce13(__lookahead_start, __symbols, core::marker::PhantomData::<()>)
602
            }
603
            14 => {
604
                __reduce14(__lookahead_start, __symbols, core::marker::PhantomData::<()>)
605
            }
606
            15 => {
607
                __reduce15(__lookahead_start, __symbols, core::marker::PhantomData::<()>)
608
            }
609
            16 => {
610
                __reduce16(__lookahead_start, __symbols, core::marker::PhantomData::<()>)
611
            }
612
            17 => {
613
                __reduce17(__lookahead_start, __symbols, core::marker::PhantomData::<()>)
614
            }
615
            18 => {
616
                __reduce18(__lookahead_start, __symbols, core::marker::PhantomData::<()>)
617
            }
618
            19 => {
619
                // __Message = Message => ActionFn(0);
620
                let __sym0 = __pop_Variant1(__symbols);
621
                let __start = __sym0.0;
622
                let __end = __sym0.2;
623
                let __nt = super::__action0::<>(__sym0);
624
                return Some(Ok(__nt));
625
            }
626
            _ => panic!("invalid action code {}", __action)
627
        };
628
        let __states_len = __states.len();
629
        __states.truncate(__states_len - __pop_states);
630
        let __state = *__states.last().unwrap();
631
        let __next_state = __goto(__state, __nonterminal);
632
        __states.push(__next_state);
633
        None
634
    }
635
    #[inline(never)]
636
    fn __symbol_type_mismatch() -> ! {
637
        panic!("symbol type mismatch")
638
    }
639
    fn __pop_Variant1<
640
    >(
641
        __symbols: &mut alloc::vec::Vec<(usize,__Symbol<>,usize)>
642
    ) -> (usize, (), usize)
643
     {
644
        match __symbols.pop() {
645
            Some((__l, __Symbol::Variant1(__v), __r)) => (__l, __v, __r),
646
            _ => __symbol_type_mismatch()
647
        }
648
    }
649
    fn __pop_Variant0<
650
    >(
651
        __symbols: &mut alloc::vec::Vec<(usize,__Symbol<>,usize)>
652
    ) -> (usize, lexer::Token, usize)
653
     {
654
        match __symbols.pop() {
655
            Some((__l, __Symbol::Variant0(__v), __r)) => (__l, __v, __r),
656
            _ => __symbol_type_mismatch()
657
        }
658
    }
659
    pub(crate) fn __reduce0<
660
    >(
661
        __lookahead_start: Option<&usize>,
662
        __symbols: &mut alloc::vec::Vec<(usize,__Symbol<>,usize)>,
663
        _: core::marker::PhantomData<()>,
664
    ) -> (usize, usize)
665
    {
666
        // AedPart = AED, Message, POP => ActionFn(9);
667
        assert!(__symbols.len() >= 3);
668
        let __sym2 = __pop_Variant0(__symbols);
669
        let __sym1 = __pop_Variant1(__symbols);
670
        let __sym0 = __pop_Variant0(__symbols);
671
        let __start = __sym0.0;
672
        let __end = __sym2.2;
673
        let __nt = super::__action9::<>(__sym0, __sym1, __sym2);
674
        __symbols.push((__start, __Symbol::Variant1(__nt), __end));
675
        (3, 0)
676
    }
677
    pub(crate) fn __reduce1<
678
    >(
679
        __lookahead_start: Option<&usize>,
680
        __symbols: &mut alloc::vec::Vec<(usize,__Symbol<>,usize)>,
681
        _: core::marker::PhantomData<()>,
682
    ) -> (usize, usize)
683
    {
684
        // CompressedData = COMPRESSED_DATA, Message, POP => ActionFn(6);
685
        assert!(__symbols.len() >= 3);
686
        let __sym2 = __pop_Variant0(__symbols);
687
        let __sym1 = __pop_Variant1(__symbols);
688
        let __sym0 = __pop_Variant0(__symbols);
689
        let __start = __sym0.0;
690
        let __end = __sym2.2;
691
        let __nt = super::__action6::<>(__sym0, __sym1, __sym2);
692
        __symbols.push((__start, __Symbol::Variant1(__nt), __end));
693
        (3, 1)
694
    }
695
    pub(crate) fn __reduce2<
696
    >(
697
        __lookahead_start: Option<&usize>,
698
        __symbols: &mut alloc::vec::Vec<(usize,__Symbol<>,usize)>,
699
        _: core::marker::PhantomData<()>,
700
    ) -> (usize, usize)
701
    {
702
        // ESK = PKESK => ActionFn(16);
703
        let __sym0 = __pop_Variant0(__symbols);
704
        let __start = __sym0.0;
705
        let __end = __sym0.2;
706
        let __nt = super::__action16::<>(__sym0);
707
        __symbols.push((__start, __Symbol::Variant1(__nt), __end));
708
        (1, 2)
709
    }
710
    pub(crate) fn __reduce3<
711
    >(
712
        __lookahead_start: Option<&usize>,
713
        __symbols: &mut alloc::vec::Vec<(usize,__Symbol<>,usize)>,
714
        _: core::marker::PhantomData<()>,
715
    ) -> (usize, usize)
716
    {
717
        // ESK = SKESK => ActionFn(17);
718
        let __sym0 = __pop_Variant0(__symbols);
719
        let __start = __sym0.0;
720
        let __end = __sym0.2;
721
        let __nt = super::__action17::<>(__sym0);
722
        __symbols.push((__start, __Symbol::Variant1(__nt), __end));
723
        (1, 2)
724
    }
725
    pub(crate) fn __reduce4<
726
    >(
727
        __lookahead_start: Option<&usize>,
728
        __symbols: &mut alloc::vec::Vec<(usize,__Symbol<>,usize)>,
729
        _: core::marker::PhantomData<()>,
730
    ) -> (usize, usize)
731
    {
732
        // ESKS = ESK => ActionFn(14);
733
        let __sym0 = __pop_Variant1(__symbols);
734
        let __start = __sym0.0;
735
        let __end = __sym0.2;
736
        let __nt = super::__action14::<>(__sym0);
737
        __symbols.push((__start, __Symbol::Variant1(__nt), __end));
738
        (1, 3)
739
    }
740
    pub(crate) fn __reduce5<
741
    >(
742
        __lookahead_start: Option<&usize>,
743
        __symbols: &mut alloc::vec::Vec<(usize,__Symbol<>,usize)>,
744
        _: core::marker::PhantomData<()>,
745
    ) -> (usize, usize)
746
    {
747
        // ESKS = ESKS, ESK => ActionFn(15);
748
        assert!(__symbols.len() >= 2);
749
        let __sym1 = __pop_Variant1(__symbols);
750
        let __sym0 = __pop_Variant1(__symbols);
751
        let __start = __sym0.0;
752
        let __end = __sym1.2;
753
        let __nt = super::__action15::<>(__sym0, __sym1);
754
        __symbols.push((__start, __Symbol::Variant1(__nt), __end));
755
        (2, 3)
756
    }
757
    pub(crate) fn __reduce6<
758
    >(
759
        __lookahead_start: Option<&usize>,
760
        __symbols: &mut alloc::vec::Vec<(usize,__Symbol<>,usize)>,
761
        _: core::marker::PhantomData<()>,
762
    ) -> (usize, usize)
763
    {
764
        // EncryptedPart = EncryptionContainer => ActionFn(10);
765
        let __sym0 = __pop_Variant1(__symbols);
766
        let __start = __sym0.0;
767
        let __end = __sym0.2;
768
        let __nt = super::__action10::<>(__sym0);
769
        __symbols.push((__start, __Symbol::Variant1(__nt), __end));
770
        (1, 4)
771
    }
772
    pub(crate) fn __reduce7<
773
    >(
774
        __lookahead_start: Option<&usize>,
775
        __symbols: &mut alloc::vec::Vec<(usize,__Symbol<>,usize)>,
776
        _: core::marker::PhantomData<()>,
777
    ) -> (usize, usize)
778
    {
779
        // EncryptedPart = ESKS, EncryptionContainer => ActionFn(11);
780
        assert!(__symbols.len() >= 2);
781
        let __sym1 = __pop_Variant1(__symbols);
782
        let __sym0 = __pop_Variant1(__symbols);
783
        let __start = __sym0.0;
784
        let __end = __sym1.2;
785
        let __nt = super::__action11::<>(__sym0, __sym1);
786
        __symbols.push((__start, __Symbol::Variant1(__nt), __end));
787
        (2, 4)
788
    }
789
    pub(crate) fn __reduce8<
790
    >(
791
        __lookahead_start: Option<&usize>,
792
        __symbols: &mut alloc::vec::Vec<(usize,__Symbol<>,usize)>,
793
        _: core::marker::PhantomData<()>,
794
    ) -> (usize, usize)
795
    {
796
        // EncryptionContainer = Seipv1Part => ActionFn(12);
797
        let __sym0 = __pop_Variant1(__symbols);
798
        let __start = __sym0.0;
799
        let __end = __sym0.2;
800
        let __nt = super::__action12::<>(__sym0);
801
        __symbols.push((__start, __Symbol::Variant1(__nt), __end));
802
        (1, 5)
803
    }
804
    pub(crate) fn __reduce9<
805
    >(
806
        __lookahead_start: Option<&usize>,
807
        __symbols: &mut alloc::vec::Vec<(usize,__Symbol<>,usize)>,
808
        _: core::marker::PhantomData<()>,
809
    ) -> (usize, usize)
810
    {
811
        // EncryptionContainer = AedPart => ActionFn(13);
812
        let __sym0 = __pop_Variant1(__symbols);
813
        let __start = __sym0.0;
814
        let __end = __sym0.2;
815
        let __nt = super::__action13::<>(__sym0);
816
        __symbols.push((__start, __Symbol::Variant1(__nt), __end));
817
        (1, 5)
818
    }
819
    pub(crate) fn __reduce10<
820
    >(
821
        __lookahead_start: Option<&usize>,
822
        __symbols: &mut alloc::vec::Vec<(usize,__Symbol<>,usize)>,
823
        _: core::marker::PhantomData<()>,
824
    ) -> (usize, usize)
825
    {
826
        // Message = LITERAL => ActionFn(1);
827
        let __sym0 = __pop_Variant0(__symbols);
828
        let __start = __sym0.0;
829
        let __end = __sym0.2;
830
        let __nt = super::__action1::<>(__sym0);
831
        __symbols.push((__start, __Symbol::Variant1(__nt), __end));
832
        (1, 6)
833
    }
834
    pub(crate) fn __reduce11<
835
    >(
836
        __lookahead_start: Option<&usize>,
837
        __symbols: &mut alloc::vec::Vec<(usize,__Symbol<>,usize)>,
838
        _: core::marker::PhantomData<()>,
839
    ) -> (usize, usize)
840
    {
841
        // Message = CompressedData => ActionFn(2);
842
        let __sym0 = __pop_Variant1(__symbols);
843
        let __start = __sym0.0;
844
        let __end = __sym0.2;
845
        let __nt = super::__action2::<>(__sym0);
846
        __symbols.push((__start, __Symbol::Variant1(__nt), __end));
847
        (1, 6)
848
    }
849
    pub(crate) fn __reduce12<
850
    >(
851
        __lookahead_start: Option<&usize>,
852
        __symbols: &mut alloc::vec::Vec<(usize,__Symbol<>,usize)>,
853
        _: core::marker::PhantomData<()>,
854
    ) -> (usize, usize)
855
    {
856
        // Message = EncryptedPart => ActionFn(3);
857
        let __sym0 = __pop_Variant1(__symbols);
858
        let __start = __sym0.0;
859
        let __end = __sym0.2;
860
        let __nt = super::__action3::<>(__sym0);
861
        __symbols.push((__start, __Symbol::Variant1(__nt), __end));
862
        (1, 6)
863
    }
864
    pub(crate) fn __reduce13<
865
    >(
866
        __lookahead_start: Option<&usize>,
867
        __symbols: &mut alloc::vec::Vec<(usize,__Symbol<>,usize)>,
868
        _: core::marker::PhantomData<()>,
869
    ) -> (usize, usize)
870
    {
871
        // Message = SignedPart => ActionFn(4);
872
        let __sym0 = __pop_Variant1(__symbols);
873
        let __start = __sym0.0;
874
        let __end = __sym0.2;
875
        let __nt = super::__action4::<>(__sym0);
876
        __symbols.push((__start, __Symbol::Variant1(__nt), __end));
877
        (1, 6)
878
    }
879
    pub(crate) fn __reduce14<
880
    >(
881
        __lookahead_start: Option<&usize>,
882
        __symbols: &mut alloc::vec::Vec<(usize,__Symbol<>,usize)>,
883
        _: core::marker::PhantomData<()>,
884
    ) -> (usize, usize)
885
    {
886
        // Message = OPAQUE_CONTENT => ActionFn(5);
887
        let __sym0 = __pop_Variant0(__symbols);
888
        let __start = __sym0.0;
889
        let __end = __sym0.2;
890
        let __nt = super::__action5::<>(__sym0);
891
        __symbols.push((__start, __Symbol::Variant1(__nt), __end));
892
        (1, 6)
893
    }
894
    pub(crate) fn __reduce15<
895
    >(
896
        __lookahead_start: Option<&usize>,
897
        __symbols: &mut alloc::vec::Vec<(usize,__Symbol<>,usize)>,
898
        _: core::marker::PhantomData<()>,
899
    ) -> (usize, usize)
900
    {
901
        // Seipv1Part = SEIPv1, Message, MDC, POP => ActionFn(7);
902
        assert!(__symbols.len() >= 4);
903
        let __sym3 = __pop_Variant0(__symbols);
904
        let __sym2 = __pop_Variant0(__symbols);
905
        let __sym1 = __pop_Variant1(__symbols);
906
        let __sym0 = __pop_Variant0(__symbols);
907
        let __start = __sym0.0;
908
        let __end = __sym3.2;
909
        let __nt = super::__action7::<>(__sym0, __sym1, __sym2, __sym3);
910
        __symbols.push((__start, __Symbol::Variant1(__nt), __end));
911
        (4, 7)
912
    }
913
    pub(crate) fn __reduce16<
914
    >(
915
        __lookahead_start: Option<&usize>,
916
        __symbols: &mut alloc::vec::Vec<(usize,__Symbol<>,usize)>,
917
        _: core::marker::PhantomData<()>,
918
    ) -> (usize, usize)
919
    {
920
        // Seipv1Part = SEIPv1, OPAQUE_CONTENT, POP => ActionFn(8);
921
        assert!(__symbols.len() >= 3);
922
        let __sym2 = __pop_Variant0(__symbols);
923
        let __sym1 = __pop_Variant0(__symbols);
924
        let __sym0 = __pop_Variant0(__symbols);
925
        let __start = __sym0.0;
926
        let __end = __sym2.2;
927
        let __nt = super::__action8::<>(__sym0, __sym1, __sym2);
928
        __symbols.push((__start, __Symbol::Variant1(__nt), __end));
929
        (3, 7)
930
    }
931
    pub(crate) fn __reduce17<
932
    >(
933
        __lookahead_start: Option<&usize>,
934
        __symbols: &mut alloc::vec::Vec<(usize,__Symbol<>,usize)>,
935
        _: core::marker::PhantomData<()>,
936
    ) -> (usize, usize)
937
    {
938
        // SignedPart = SIG, Message => ActionFn(18);
939
        assert!(__symbols.len() >= 2);
940
        let __sym1 = __pop_Variant1(__symbols);
941
        let __sym0 = __pop_Variant0(__symbols);
942
        let __start = __sym0.0;
943
        let __end = __sym1.2;
944
        let __nt = super::__action18::<>(__sym0, __sym1);
945
        __symbols.push((__start, __Symbol::Variant1(__nt), __end));
946
        (2, 8)
947
    }
948
    pub(crate) fn __reduce18<
949
    >(
950
        __lookahead_start: Option<&usize>,
951
        __symbols: &mut alloc::vec::Vec<(usize,__Symbol<>,usize)>,
952
        _: core::marker::PhantomData<()>,
953
    ) -> (usize, usize)
954
    {
955
        // SignedPart = OPS, Message, SIG => ActionFn(19);
956
        assert!(__symbols.len() >= 3);
957
        let __sym2 = __pop_Variant0(__symbols);
958
        let __sym1 = __pop_Variant1(__symbols);
959
        let __sym0 = __pop_Variant0(__symbols);
960
        let __start = __sym0.0;
961
        let __end = __sym2.2;
962
        let __nt = super::__action19::<>(__sym0, __sym1, __sym2);
963
        __symbols.push((__start, __Symbol::Variant1(__nt), __end));
964
        (3, 8)
965
    }
966
}
967
pub use self::__parse__Message::MessageParser;
968

            
969
#[allow(clippy::too_many_arguments)]
970
fn __action0<
971
>(
972
    (_, __0, _): (usize, (), usize),
973
)
974
{
975
}
976

            
977
#[allow(clippy::too_many_arguments)]
978
fn __action1<
979
>(
980
    (_, __0, _): (usize, lexer::Token, usize),
981
)
982
{
983
}
984

            
985
#[allow(clippy::too_many_arguments)]
986
fn __action2<
987
>(
988
    (_, __0, _): (usize, (), usize),
989
)
990
{
991
}
992

            
993
#[allow(clippy::too_many_arguments)]
994
fn __action3<
995
>(
996
    (_, __0, _): (usize, (), usize),
997
)
998
{
999
}
#[allow(clippy::too_many_arguments)]
fn __action4<
>(
    (_, __0, _): (usize, (), usize),
)
{
}
#[allow(clippy::too_many_arguments)]
fn __action5<
>(
    (_, __0, _): (usize, lexer::Token, usize),
)
{
}
#[allow(clippy::too_many_arguments)]
fn __action6<
>(
    (_, __0, _): (usize, lexer::Token, usize),
    (_, __1, _): (usize, (), usize),
    (_, __2, _): (usize, lexer::Token, usize),
)
{
}
#[allow(clippy::too_many_arguments)]
fn __action7<
>(
    (_, __0, _): (usize, lexer::Token, usize),
    (_, __1, _): (usize, (), usize),
    (_, __2, _): (usize, lexer::Token, usize),
    (_, __3, _): (usize, lexer::Token, usize),
)
{
}
#[allow(clippy::too_many_arguments)]
fn __action8<
>(
    (_, __0, _): (usize, lexer::Token, usize),
    (_, __1, _): (usize, lexer::Token, usize),
    (_, __2, _): (usize, lexer::Token, usize),
)
{
}
#[allow(clippy::too_many_arguments)]
fn __action9<
>(
    (_, __0, _): (usize, lexer::Token, usize),
    (_, __1, _): (usize, (), usize),
    (_, __2, _): (usize, lexer::Token, usize),
)
{
}
#[allow(clippy::too_many_arguments)]
fn __action10<
>(
    (_, __0, _): (usize, (), usize),
)
{
}
#[allow(clippy::too_many_arguments)]
fn __action11<
>(
    (_, __0, _): (usize, (), usize),
    (_, __1, _): (usize, (), usize),
)
{
}
#[allow(clippy::too_many_arguments)]
fn __action12<
>(
    (_, __0, _): (usize, (), usize),
)
{
}
#[allow(clippy::too_many_arguments)]
fn __action13<
>(
    (_, __0, _): (usize, (), usize),
)
{
}
#[allow(clippy::too_many_arguments)]
fn __action14<
>(
    (_, __0, _): (usize, (), usize),
)
{
}
#[allow(clippy::too_many_arguments)]
fn __action15<
>(
    (_, __0, _): (usize, (), usize),
    (_, __1, _): (usize, (), usize),
)
{
}
#[allow(clippy::too_many_arguments)]
fn __action16<
>(
    (_, __0, _): (usize, lexer::Token, usize),
)
{
}
#[allow(clippy::too_many_arguments)]
fn __action17<
>(
    (_, __0, _): (usize, lexer::Token, usize),
)
{
}
#[allow(clippy::too_many_arguments)]
fn __action18<
>(
    (_, __0, _): (usize, lexer::Token, usize),
    (_, __1, _): (usize, (), usize),
)
{
}
#[allow(clippy::too_many_arguments)]
fn __action19<
>(
    (_, __0, _): (usize, lexer::Token, usize),
    (_, __1, _): (usize, (), usize),
    (_, __2, _): (usize, lexer::Token, usize),
)
{
}
#[allow(clippy::type_complexity)]
pub trait __ToTriple<>
{
    fn to_triple(value: Self) -> Result<(usize,lexer::Token,usize), __lalrpop_util::ParseError<usize, lexer::Token, lexer::LexicalError>>;
}
impl<> __ToTriple<> for (usize, lexer::Token, usize)
{
    fn to_triple(value: Self) -> Result<(usize,lexer::Token,usize), __lalrpop_util::ParseError<usize, lexer::Token, lexer::LexicalError>> {
        Ok(value)
    }
}
impl<> __ToTriple<> for Result<(usize, lexer::Token, usize), lexer::LexicalError>
{
    fn to_triple(value: Self) -> Result<(usize,lexer::Token,usize), __lalrpop_util::ParseError<usize, lexer::Token, lexer::LexicalError>> {
        match value {
            Ok(v) => Ok(v),
            Err(error) => Err(__lalrpop_util::ParseError::User { error }),
        }
    }
}