1#![crate_type = "lib"]
2#[doc(inline)]
75pub use error_strategy::{BailErrorStrategy, DefaultErrorStrategy, ErrorStrategy};
76
77pub use input_stream::InputStream;
78
79#[doc(inline)]
80pub use lexer::{BaseLexer, Lexer};
81#[doc(inline)]
82pub use parser::{BaseParser, ListenerId, Parser};
83#[doc(inline)]
84pub use token_source::TokenSource;
85#[doc(hidden)]
87pub use prediction_context::PredictionContextCache;
88
89#[doc(inline)]
90pub use prediction_mode::PredictionMode;
91
92#[doc(inline)]
93pub use arena::Arena;
94
95mod arena;
96#[doc(hidden)]
97pub mod atn_config;
98#[doc(hidden)]
99pub mod atn_simulator;
100pub mod int_stream;
101mod lexer_action;
102mod ll1_analyzer;
103#[doc(hidden)]
104pub mod recognizer;
105pub mod token_factory;
106#[doc(hidden)]
108pub mod atn_deserialization_options;
109#[doc(hidden)]
110pub mod atn_state;
111pub mod char_stream;
112#[doc(hidden)]
113pub mod interval_set;
114pub mod parser_rule_context;
115mod prediction_context;
116#[doc(hidden)]
117pub mod semantic_context;
118mod token_source;
119pub mod token_stream;
120#[doc(hidden)]
122pub mod dfa;
123#[doc(hidden)]
124pub mod transition;
125pub mod tree;
126#[doc(hidden)]
128pub mod atn;
129#[doc(hidden)]
130pub mod atn_config_set;
131#[doc(hidden)]
132pub mod atn_deserializer;
133pub mod common_token_stream;
134pub mod error_listener;
135pub mod error_strategy;
136pub mod errors;
137pub mod input_stream;
138pub mod lexer;
139#[doc(hidden)]
140pub mod lexer_action_executor;
141pub mod lexer_atn_simulator;
142pub mod parser;
143pub mod parser_atn_simulator;
144mod prediction_mode;
145pub mod token;
146pub mod trees;
147mod utils;
148mod atn_type;
150pub mod rule_context;
152pub mod vocabulary;
153#[macro_export]
157macro_rules! impl_tree {
158 ($enum_name:ident { $($variant:ident,)+ }) => {
160 impl<'input, 'arena> Tree<'arena> for $enum_name<'input, 'arena> {
161 fn get_parent(&self) -> Option<&'arena Self> {
162 match self {
163 $( $enum_name::$variant(inner) => inner.get_parent(), )+
164 _ => None,
165 }
166 }
167
168 fn has_parent(&self) -> bool {
169 match self {
170 $( $enum_name::$variant(inner) => inner.has_parent(), )+
171 _ => false,
172 }
173 }
174
175 fn get_child(&self, i: usize) -> Option<&'arena Self> {
182 match self {
183 $( $enum_name::$variant(inner) => inner.get_child(i), )+
184 _ => None,
185 }
186 }
187
188 fn get_child_count(&self) -> usize {
189 match self {
190 $( $enum_name::$variant(inner) => inner.get_child_count(), )+
191 _ => 0,
192 }
193 }
194
195 fn get_children<'a>(&'a self) -> Box<dyn Iterator<Item = &'arena Self> + 'a> {
196 match self {
197 $( $enum_name::$variant(inner) => inner.get_children(), )+
198 _ => Box::new(std::iter::empty()) as Box<dyn Iterator<Item = &'arena Self>>,
199 }
200 }
201
202 }
208 };
209}
210
211#[macro_export]
212macro_rules! impl_parse_tree {
213 ($enum_name:ident { $($variant:ident,)+ }) => {
215 impl<'input, 'arena> ParseTree<'input, 'arena> for $enum_name<'input, 'arena> {
216 }
230 };
231}
232
233#[macro_export]
234macro_rules! impl_rule_node_common {
235 ($enum_name:ident { $($variant:ident,)+ }) => {
237 fn get_rule_context(&self) -> &dyn ParserRuleContext<'input, 'arena> {
238 match self {
239 $( $enum_name::$variant(inner) => inner as &dyn ParserRuleContext<'input, 'arena>, )+
241 $enum_name::Terminal(inner) => { inner as &dyn ParserRuleContext<'input, 'arena> },
242 $enum_name::Error(inner) => { inner as &dyn ParserRuleContext<'input, 'arena> },
243 }
244 }
245
246 fn as_terminal_node(&self) -> Option<&TerminalNode<'input, 'arena>> {
247 match self {
248 $enum_name::Terminal(inner) => Some(inner),
249 _ => None,
250 }
251 }
252
253 fn as_terminal_node_mut(&mut self) -> Option<&mut TerminalNode<'input, 'arena>> {
254 match self {
255 $enum_name::Terminal(inner) => Some(inner),
256 _ => None,
257 }
258 }
259
260 fn as_error_node(&self) -> Option<&ErrorNode<'input, 'arena>> {
261 match self {
262 $enum_name::Error(inner) => Some(inner),
263 _ => None,
264 }
265 }
266
267 fn as_error_node_mut(&mut self) -> Option<&mut ErrorNode<'input, 'arena>> {
268 match self {
269 $enum_name::Error(inner) => Some(inner),
270 _ => None,
271 }
272 }
273
274 fn set_exception(&self, e: $crate::errors::ANTLRError, arena: &'arena $crate::Arena) {
275 match self {
276 $( $enum_name::$variant(inner) => inner.set_exception(e, arena), )+
277 _ => {}
278 }
279 }
280
281 fn set_invoking_state(&mut self, t: i32) {
282 match self {
283 $( $enum_name::$variant(inner) => inner.set_invoking_state(t), )+
284 _ => {}
285 }
286 }
287
288 fn set_alt_number(&mut self, alt_number: i32) {
289 match self {
290 $( $enum_name::$variant(inner) => inner.set_alt_number(alt_number), )+
291 _ => {}
292 }
293 }
294
295 fn set_start(&mut self, t: Option<&'arena dyn $crate::token::Token>) {
296 match self {
297 $( $enum_name::$variant(inner) => inner.set_start(t), )+
298 _ => {}
299 }
300 }
301
302 fn set_stop(&mut self, t: Option<&'arena dyn $crate::token::Token>) {
303 match self {
304 $( $enum_name::$variant(inner) => inner.set_stop(t), )+
305 _ => {}
306 }
307 }
308
309 fn remove_last_child(&mut self) {
310 match self {
311 $( $enum_name::$variant(inner) => inner.remove_last_child(), )+
312 _ => {}
313 }
314 }
315
316 fn add_child(&mut self, child: &'arena Self) {
317 match self {
318 $( $enum_name::$variant(inner) => inner.add_child(child), )+
319 _ => {}
320 }
321 }
322
323 fn set_parent(&mut self, parent: Option<&'arena Self>) {
324 match self {
325 $( $enum_name::$variant(inner) => inner.set_parent(parent), )+
326 _ => {}
327 }
328 }
329
330 unsafe fn set_self_ref(&mut self, self_ref: *const Self) {
331 match self {
332 $( $enum_name::$variant(inner) => inner.set_self_ref(self_ref), )+
333 _ => {}
334 }
335 }
336 };
337}
338
339#[macro_export]
340macro_rules! impl_rule_node {
341 ($enum_name:ident { $($variant:ident,)+ }; ) => {
343 impl<'input, 'arena> RuleNode<'input, 'arena> for $enum_name<'input, 'arena> {
344 type Listener = dyn ParseTreeListener<'input, 'arena, Self>;
345
346 $crate::impl_rule_node_common! { $enum_name { $($variant,)+ } }
347
348 fn enter_rule(&self, _listener: &mut Self::Listener) -> Result<(), ANTLRError> {
349 Ok(())
350 }
351
352 fn exit_rule(&self, _listener: &mut Self::Listener) -> Result<(), ANTLRError> {
353 Ok(())
354 }
355 }
356 };
357
358 ($enum_name:ident { $($labeled_variant:ident,)*; $($variant:ident($visit_method:ident),)* }; visitor = $visitor:ty, ) => {
360 impl<'input, 'arena> RuleNode<'input, 'arena> for $enum_name<'input, 'arena> {
361 type listener = dyn ParseTreeListener<'input, 'arena, Self>;
362
363 $crate::impl_rule_node_common! { $enum_name { $( $labeled_variant,)* $($variant,)* } }
364
365 fn enter_rule(&self, _listener: &mut Self::Listener) -> Result<(), ANTLRError> {
366 Ok(())
367 }
368
369 fn exit_rule(&self, _listener: &mut Self::Listener) -> Result<(), ANTLRError> {
370 Ok(())
371 }
372
373 }
383 };
384
385 ($enum_name:ident { $($labeled_variant:ident,)*; $($variant:ident($enter_method:ident, $exit_method:ident, ),)* }; listener = $listener:ty, ) => {
387 impl<'input, 'arena> RuleNode<'input, 'arena> for $enum_name<'input, 'arena> {
388 type Listener = $listener;
389
390 $crate::impl_rule_node_common! { $enum_name { $( $labeled_variant,)* $($variant,)* } }
391
392 fn enter_rule(&self, listener: &mut Self::Listener) -> Result<(), ANTLRError> {
393 match self {
394 $( $enum_name::$labeled_variant(inner) => inner.dispatch_enter(listener), )*
395 $( $enum_name::$variant(inner) => listener.$enter_method(inner), )*
396 $enum_name::Terminal(inner) => { listener.visit_terminal(inner) },
397 $enum_name::Error(inner) => { listener.visit_error_node(inner) },
398 }
399 }
400
401 fn exit_rule(&self, listener: &mut Self::Listener) -> Result<(), ANTLRError> {
402 match self {
403 $( $enum_name::$labeled_variant(inner) => inner.dispatch_exit(listener), )*
404 $( $enum_name::$variant(inner) => listener.$exit_method(inner), )*
405 $enum_name::Terminal(inner) => { listener.visit_terminal(inner) },
406 $enum_name::Error(inner) => { listener.visit_error_node(inner) },
407 }
408 }
409 }
410 };
411
412 ($enum_name:ident { $($labeled_variant:ident,)*; $($variant:ident($enter_method:ident, $exit_method:ident, $visit_method:ident),)* }; listener = $listener:ty, visitor = $visitor:ident, ) => {
414 impl<'input, 'arena> RuleNode<'input, 'arena> for $enum_name<'input, 'arena> {
415 type Listener = $listener;
416
417 $crate::impl_rule_node_common! { $enum_name { $($labeled_variant,)* $($variant,)* } }
418
419 fn enter_rule(&self, listener: &mut Self::Listener) -> Result<(), ANTLRError> {
420 match self {
421 $( $enum_name::$labeled_variant(inner) => inner.dispatch_enter(listener), )*
422 $( $enum_name::$variant(inner) => listener.$enter_method(inner), )*
423 $enum_name::Terminal(inner) => { listener.visit_terminal(inner) },
424 $enum_name::Error(inner) => { listener.visit_error_node(inner) },
425 }
426 }
427
428 fn exit_rule(&self, listener: &mut Self::Listener) -> Result<(), ANTLRError> {
429 match self {
430 $( $enum_name::$labeled_variant(inner) => inner.dispatch_exit(listener), )*
431 $( $enum_name::$variant(inner) => listener.$exit_method(inner), )*
432 $enum_name::Terminal(inner) => { listener.visit_terminal(inner) },
433 $enum_name::Error(inner) => { listener.visit_error_node(inner) },
434 }
435 }
436 }
437
438 impl<'input, 'arena> Visitable<'input, 'arena> for $enum_name<'input, 'arena>
439 where
440 'input: 'arena,
441 {
442 fn accept<V>(&self, visitor: &mut V) -> Result<V::Return, ANTLRError>
443 where
444 V: $visitor<'input, 'arena> + ?Sized,
445 {
446 match self {
447 $( $enum_name::$labeled_variant(inner) => inner.accept(visitor), )*
448 $( $enum_name::$variant(inner) => visitor.$visit_method(inner), )+
449 $enum_name::Terminal(inner) => { visitor.visit_terminal(inner) },
450 $enum_name::Error(inner) => { visitor.visit_error_node(inner) },
451 }
452 }
453 }
454 };
455}
456
457#[macro_export]
458macro_rules! impl_listener_dispatch {
459 ($listener:ident::$node_name:ident::$enum_name:ident { $($variant:ident($enter_method:ident, $exit_method:ident),)+ }) => {
461 impl<'input, 'arena> $enum_name<'input, 'arena>
462 where
463 'input: 'arena,
464 {
465 fn dispatch_enter(&self, listener: &mut (dyn $listener<'input, 'arena> + 'static)) -> Result<(), ANTLRError>
466 {
467 match self {
468 $( $enum_name::$variant(inner) => listener.$enter_method(inner), )+
469 $enum_name::Error(_) => Ok(()),
470 }
471 }
472
473 fn dispatch_exit(&self, listener: &mut (dyn $listener<'input, 'arena> + 'static)) -> Result<(), ANTLRError>
474 {
475 match self {
476 $( $enum_name::$variant(inner) => listener.$exit_method(inner), )+
477 $enum_name::Error(_) => Ok(()),
478 }
479 }
480 }
481 };
482}
483
484#[macro_export]
485macro_rules! impl_visitable {
486 ($visitor:ident::$enum_name:ident { $($variant:ident($visit_method:ident),)+ }) => {
488 impl<'input, 'arena> Visitable<'input, 'arena> for $enum_name<'input, 'arena> {
489 fn accept<V>(&self, visitor: &mut V) -> Result<V::Return, ANTLRError>
490 where
491 V: $visitor<'input, 'arena> + ?Sized,
492 {
493 match self {
494 $( $enum_name::$variant(inner) => visitor.$visit_method(inner), )+
495 $enum_name::Error(_) => Ok(Default::default()),
496 }
497 }
498 }
499 };
500 ($visitor:ident::$ctx_name:ident($visit_method:ident)) => {
501 impl<'input, 'arena> Visitable<'input, 'arena> for $ctx_name<'input, 'arena> {
502 fn accept<V>(&self, visitor: &mut V) -> Result<V::Return, ANTLRError>
503 where
504 V: $visitor<'input, 'arena> + ?Sized,
505 {
506 visitor.$visit_method(self)
507 }
508 }
509 };
510}
511
512#[macro_export]
513macro_rules! impl_rule_context {
514 ($enum_name:ident { $($variant:ident,)+ }) => {
516 impl<'input, 'arena> RuleContext<'input, 'arena> for $enum_name<'input, 'arena> {
517 fn get_rule_index(&self) -> usize {
518 match self {
519 $( $enum_name::$variant(inner) => RuleContext::get_rule_index(inner), )+
521 }
522 }
523
524 fn get_alt_number(&self) -> i32 {
525 match self {
526 $( $enum_name::$variant(inner) => RuleContext::get_alt_number(inner), )+
527 }
528 }
529
530 fn get_invoking_state(&self) -> i32 {
531 match self {
532 $( $enum_name::$variant(inner) => RuleContext::get_invoking_state(inner), )+
533 }
534 }
535
536 fn get_parent_ctx(&self) -> Option<&'arena dyn RuleContext<'input, 'arena>> {
537 match self {
538 $( $enum_name::$variant(inner) => RuleContext::get_parent_ctx(inner), )+
539 }
540 }
541
542 fn get_node_text(&self, rule_names: &[&str]) -> String {
543 match self {
544 $( $enum_name::$variant(inner) => RuleContext::get_node_text(inner, rule_names), )+
545 }
546 }
547
548 }
549 };
550}
551
552#[macro_export]
553macro_rules! impl_parser_rule_context {
554 ($enum_name:ident { $($variant:ident,)+ }) => {
556 impl<'input, 'arena> ParserRuleContext<'input, 'arena> for $enum_name<'input, 'arena> {
557 fn start(&self) -> &'arena dyn $crate::token::Token {
558 match self {
559 $( $enum_name::$variant(inner) => ParserRuleContext::start(inner), )+
560 }
561 }
562
563 fn stop(&self) -> &'arena dyn $crate::token::Token {
564 match self {
565 $( $enum_name::$variant(inner) => ParserRuleContext::stop(inner), )+
566 }
567 }
568
569 fn get_parent_ctx(&self) -> Option<&'arena dyn ParserRuleContext<'input, 'arena>> {
570 match self {
571 $( $enum_name::$variant(inner) => ParserRuleContext::get_parent_ctx(inner), )+
572 }
573 }
574
575 fn get_child_ctx(&self, _i: usize) -> Option<&'arena dyn ParserRuleContext<'input, 'arena>> {
576 match self {
577 $( $enum_name::$variant(inner) => ParserRuleContext::get_child_ctx(inner, _i), )+
578 }
579 }
580
581 fn get_child_count(&self) -> usize {
582 match self {
583 $( $enum_name::$variant(inner) => ParserRuleContext::get_child_count(inner), )+
584 }
585 }
586
587 fn iter_children<'a>(
588 &'a self,
589 ) -> Box<dyn Iterator<Item = &'arena dyn ParserRuleContext<'input, 'arena>> + 'a>
590 where
591 'input: 'a,
592 'arena: 'a,
593 {
594 match self {
595 $( $enum_name::$variant(inner) => ParserRuleContext::iter_children(inner), )+
596 }
597 }
598
599 fn get_token(&self, _ttype: i32, _pos: usize) -> Option<&TerminalNode<'input, 'arena>> {
600 match self {
601 $( $enum_name::$variant(inner) => ParserRuleContext::get_token(inner, _ttype, _pos), )+
602 }
603 }
604
605 fn get_tokens(&self, _ttype: i32) -> Vec<&TerminalNode<'input, 'arena>> {
606 match self {
607 $( $enum_name::$variant(inner) => ParserRuleContext::get_tokens(inner, _ttype), )+
608 }
609 }
610
611 fn get_text(&self) -> String {
612 match self {
613 $( $enum_name::$variant(inner) => ParserRuleContext::get_text(inner), )+
614 }
615 }
616 }
617 };
618}
619
620#[macro_export]
621macro_rules! impl_from_contexts {
622 ($enum_name:ident { $($variant:ident($inner:ident)),+ $(,)? }) => {
623 $(
624 impl<'input, 'arena> From<$inner<'input, 'arena>> for $enum_name<'input, 'arena> {
625 fn from(ctx: $inner<'input, 'arena>) -> Self {
626 $enum_name::$variant(ctx)
627 }
628 }
629 )+
630 };
631}
632
633#[macro_export]
634macro_rules! impl_defaults {
635 ($enum_name:ident) => {
636 impl<'input, 'arena> From<TerminalNode<'input, 'arena>> for $enum_name<'input, 'arena> {
637 fn from(node: TerminalNode<'input, 'arena>) -> Self {
638 $enum_name::Terminal(node)
639 }
640 }
641
642 impl<'input, 'arena> From<ErrorNode<'input, 'arena>> for $enum_name<'input, 'arena> {
643 fn from(node: ErrorNode<'input, 'arena>) -> Self {
644 $enum_name::Error(node)
645 }
646 }
647
648 impl<'input, 'arena> Default for $enum_name<'input, 'arena> {
649 fn default() -> Self {
650 Self::Error(ErrorNode::default())
651 }
652 }
653 };
654}
655
656#[macro_export]
657macro_rules! impl_into_base_ext {
658 ($enum_name:ident::$base_name:ident { $($variant:ident),+ $(,)? }) => {
659 impl<'input, 'arena> $enum_name<'input, 'arena> {
660 fn into_base_ext(self) -> $base_name<'input, 'arena> {
661 match self {
662 $(
663 $enum_name::$variant(inner) => inner.morph(|ctx| ctx.base),
664 )+
665 $enum_name::Error(inner) => inner,
666 }
667 }
668 }
669 };
670}
671
672#[macro_export]
673macro_rules! impl_tree_trait_delegates {
674 ($node_name:ident::$enum_name:ident { $($variant:ident),+ $(,)? }) => {
675 impl<'input, 'arena> $enum_name<'input, 'arena> {
676 fn get_parent(&self) -> Option<&'arena $node_name<'input, 'arena>> {
677 match self {
678 $( $enum_name::$variant(inner) => inner.get_parent(), )+
679 }
680 }
681
682 fn has_parent(&self) -> bool {
683 match self {
684 $( $enum_name::$variant(inner) => inner.has_parent(), )+
685 }
686 }
687
688 fn get_child(&self, i: usize) -> Option<&'arena $node_name<'input, 'arena>> {
689 match self {
690 $( $enum_name::$variant(inner) => inner.get_child(i), )+
691 }
692 }
693
694 fn get_child_count(&self) -> usize {
695 match self {
696 $( $enum_name::$variant(inner) => inner.get_child_count(), )+
697 }
698 }
699
700 fn get_children<'a>(&'a self) -> Box<dyn Iterator<Item = &'arena $node_name<'input, 'arena>> + 'a> {
701 match self {
702 $( $enum_name::$variant(inner) => inner.get_children(), )+
703 }
704 }
705
706 fn set_start(&mut self, t: Option<&'arena dyn $crate::token::Token>) {
707 match self {
708 $( $enum_name::$variant(inner) => inner.set_start(t), )+
709 }
710 }
711
712 fn set_stop(&mut self, t: Option<&'arena dyn $crate::token::Token>) {
713 match self {
714 $( $enum_name::$variant(inner) => inner.set_stop(t), )+
715 }
716 }
717
718 fn set_parent(&mut self, parent: Option<&'arena $node_name<'input, 'arena>>) {
719 match self {
720 $( $enum_name::$variant(inner) => inner.set_parent(parent), )+
721 }
722 }
723
724 fn set_invoking_state(&mut self, t: i32) {
725 match self {
726 $( $enum_name::$variant(inner) => inner.set_invoking_state(t), )+
727 }
728 }
729
730 fn set_alt_number(&mut self, alt_number: i32) {
731 match self {
732 $( $enum_name::$variant(inner) => inner.set_alt_number(alt_number), )+
733 }
734 }
735
736 fn set_exception(&self, e: $crate::errors::ANTLRError, arena: &'arena $crate::Arena) {
737 match self {
738 $( $enum_name::$variant(inner) => inner.set_exception(e, arena), )+
739 }
740 }
741
742 fn remove_last_child(&mut self) {
743 match self {
744 $( $enum_name::$variant(inner) => inner.remove_last_child(), )+
745 }
746 }
747
748 fn add_child(&mut self, child: &'arena $node_name<'input, 'arena>) {
749 match self {
750 $( $enum_name::$variant(inner) => inner.add_child(child), )+
751 }
752 }
753
754 unsafe fn set_self_ref(&mut self, self_ref: *const $node_name<'input, 'arena>) {
755 match self {
756 $( $enum_name::$variant(inner) => inner.set_self_ref(self_ref), )+
757 }
758 }
759 }
760 };
761}
762
763#[macro_export]
764macro_rules! impl_node_inner {
765 ($node_name:ident::$variant_name:ident::$enum_name:ident { $($variant:ident),+ $(,)? }) => {
766 impl<'input, 'arena> NodeInner<'input, 'arena, $node_name<'input, 'arena>>
767 for $enum_name<'input, 'arena>
768 {
769 fn cast_from<'a>(node: &'a $node_name<'input, 'arena>) -> Option<&'a Self> {
770 match node {
771 $node_name::$variant_name(inner) => Some(inner),
772 _ => None,
773 }
774 }
775
776 fn cast_from_mut<'a>(node: &'a mut $node_name<'input, 'arena>) -> Option<&'a mut Self>
777 where
778 Self: Sized,
779 {
780 match node {
781 $node_name::$variant_name(inner) => Some(inner),
782 _ => None,
783 }
784 }
785
786 fn try_as_node(&'arena self) -> Option<&'arena $node_name<'input, 'arena>> {
787 match self {
788 $( $enum_name::$variant(inner) => inner.try_as_node(), )+
789 }
790 }
791
792 fn iter_child_nodes<'a>(&'a self) -> Box<dyn Iterator<Item = &'arena $node_name<'input, 'arena>> + 'a> {
793 match self {
794 $( $enum_name::$variant(inner) => inner.get_children(), )+
795 }
796 }
797 }
798 };
799}
800
801#[macro_export]
802macro_rules! impl_token_source {
803 ($lexer:ident) => {
804 impl<'input, 'arena, Input, TF> $crate::TokenSource<'input, 'arena, TF>
805 for $lexer<'input, 'arena, Input, TF>
806 where
807 TF: $crate::token_factory::TokenFactory<'input, 'arena> + 'arena,
808 Input: $crate::char_stream::CharStream<'input>,
809 {
810 fn next_token(&mut self) -> &'arena mut TF::Tok {
811 self.base.next_token()
812 }
813
814 fn get_line(&self) -> u32 {
815 self.base.get_line()
816 }
817
818 fn get_char_position_in_line(&self) -> i32 {
819 self.base.get_char_position_in_line()
820 }
821
822 fn get_input_stream(&mut self) -> Option<&mut dyn $crate::int_stream::IntStream> {
823 self.base.get_input_stream()
824 }
825
826 fn get_source_name(&self) -> String {
827 self.base.get_source_name()
828 }
829
830 fn get_token_factory(&self) -> &TF {
831 self.base.get_token_factory()
832 }
833
834 fn get_dfa_string(&self) -> String {
835 self.base.get_dfa_string()
836 }
837 }
838 };
839}