// @generated by antlr-rust-runtime v0.14.2 - do not edit
// project: https://github.com/ophi-dev/antlr-rust-runtime
#[allow(warnings, missing_docs, clippy::all, clippy::pedantic, clippy::nursery)]
#[rustfmt::skip]
mod __antlr4_rust_generated {
use antlr4_runtime::recognizer::RecognizerData;
use antlr4_runtime::token::TokenSource;
use antlr4_runtime::token_stream::CommonTokenStream;
use antlr4_runtime::atn::parser_atn::ParserAtn;
use antlr4_runtime::{BaseParser, GeneratedParser, GrammarMetadata, Parser, Recognizer};
use std::sync::OnceLock;
#[allow(unused_imports)]
use std::io::Write as _;
#[allow(unused_imports)]
use antlr4_runtime::{java_style_list, PredictionMode, BailErrorStrategy, TerminalNodeView as RuntimeTerminalNode, ErrorNodeView as RuntimeErrorNode, RuleNodeView, AsRuleNode, FromRuleNode, MissingChildError, Token as _};
pub const EOF: i32 = antlr4_runtime::TOKEN_EOF;
pub const ACTION: i32 = 4;
pub const ARG_ACTION: i32 = 5;
pub const ARG_OR_CHARSET: i32 = 6;
pub const ASSIGN: i32 = 7;
pub const LEXER_CHAR_SET: i32 = 8;
pub const RULE_REF: i32 = 9;
pub const SEMPRED: i32 = 10;
pub const STRING_LITERAL: i32 = 11;
pub const TOKEN_REF: i32 = 12;
pub const UNICODE_ESC: i32 = 13;
pub const UNICODE_EXTENDED_ESC: i32 = 14;
pub const WS: i32 = 15;
pub const ALT: i32 = 16;
pub const BLOCK: i32 = 17;
pub const CLOSURE: i32 = 18;
pub const ELEMENT_OPTIONS: i32 = 19;
pub const EPSILON: i32 = 20;
pub const LEXER_ACTION_CALL: i32 = 21;
pub const LEXER_ALT_ACTION: i32 = 22;
pub const OPTIONAL: i32 = 23;
pub const POSITIVE_CLOSURE: i32 = 24;
pub const RULE: i32 = 25;
pub const RULEMODIFIERS: i32 = 26;
pub const RULES: i32 = 27;
pub const SET: i32 = 28;
pub const WILDCARD: i32 = 29;
pub const DOC_COMMENT: i32 = 30;
pub const BLOCK_COMMENT: i32 = 31;
pub const LINE_COMMENT: i32 = 32;
pub const INT: i32 = 33;
pub const UNTERMINATED_STRING_LITERAL: i32 = 34;
pub const BEGIN_ARGUMENT: i32 = 35;
pub const OPTIONS: i32 = 36;
pub const TOKENS: i32 = 37;
pub const CHANNELS: i32 = 38;
pub const IMPORT: i32 = 39;
pub const FRAGMENT: i32 = 40;
pub const LEXER: i32 = 41;
pub const PARSER: i32 = 42;
pub const GRAMMAR: i32 = 43;
pub const PROTECTED: i32 = 44;
pub const PUBLIC: i32 = 45;
pub const PRIVATE: i32 = 46;
pub const RETURNS: i32 = 47;
pub const LOCALS: i32 = 48;
pub const THROWS: i32 = 49;
pub const CATCH: i32 = 50;
pub const FINALLY: i32 = 51;
pub const MODE: i32 = 52;
pub const COLON: i32 = 53;
pub const COLONCOLON: i32 = 54;
pub const COMMA: i32 = 55;
pub const SEMI: i32 = 56;
pub const LPAREN: i32 = 57;
pub const RPAREN: i32 = 58;
pub const RBRACE: i32 = 59;
pub const RARROW: i32 = 60;
pub const LT: i32 = 61;
pub const GT: i32 = 62;
pub const QUESTION: i32 = 63;
pub const STAR: i32 = 64;
pub const PLUS_ASSIGN: i32 = 65;
pub const PLUS: i32 = 66;
pub const OR: i32 = 67;
pub const DOLLAR: i32 = 68;
pub const RANGE: i32 = 69;
pub const DOT: i32 = 70;
pub const AT: i32 = 71;
pub const POUND: i32 = 72;
pub const NOT: i32 = 73;
pub const ID: i32 = 74;
pub const END_ARGUMENT: i32 = 75;
pub const UNTERMINATED_ARGUMENT: i32 = 76;
pub const ARGUMENT_CONTENT: i32 = 77;
pub const UNTERMINATED_CHAR_SET: i32 = 78;
pub const RULE_GRAMMAR_SPEC: usize = 0;
pub const RULE_GRAMMAR_DECL: usize = 1;
pub const RULE_GRAMMAR_TYPE: usize = 2;
pub const RULE_PREQUEL_CONSTRUCT: usize = 3;
pub const RULE_OPTIONS_SPEC: usize = 4;
pub const RULE_OPTION: usize = 5;
pub const RULE_OPTION_VALUE: usize = 6;
pub const RULE_DELEGATE_GRAMMARS: usize = 7;
pub const RULE_DELEGATE_GRAMMAR: usize = 8;
pub const RULE_TOKENS_SPEC: usize = 9;
pub const RULE_CHANNELS_SPEC: usize = 10;
pub const RULE_ID_LIST: usize = 11;
pub const RULE_ACTION: usize = 12;
pub const RULE_ACTION_SCOPE_NAME: usize = 13;
pub const RULE_ACTION_BLOCK: usize = 14;
pub const RULE_ARG_ACTION_BLOCK: usize = 15;
pub const RULE_MODE_SPEC: usize = 16;
pub const RULE_RULES: usize = 17;
pub const RULE_RULE_SPEC: usize = 18;
pub const RULE_PARSER_RULE_SPEC: usize = 19;
pub const RULE_EXCEPTION_GROUP: usize = 20;
pub const RULE_EXCEPTION_HANDLER: usize = 21;
pub const RULE_FINALLY_CLAUSE: usize = 22;
pub const RULE_RULE_PREQUEL: usize = 23;
pub const RULE_RULE_RETURNS: usize = 24;
pub const RULE_THROWS_SPEC: usize = 25;
pub const RULE_LOCALS_SPEC: usize = 26;
pub const RULE_RULE_ACTION: usize = 27;
pub const RULE_RULE_MODIFIERS: usize = 28;
pub const RULE_RULE_MODIFIER: usize = 29;
pub const RULE_RULE_BLOCK: usize = 30;
pub const RULE_RULE_ALT_LIST: usize = 31;
pub const RULE_LABELED_ALT: usize = 32;
pub const RULE_LEXER_RULE_SPEC: usize = 33;
pub const RULE_LEXER_RULE_BLOCK: usize = 34;
pub const RULE_LEXER_ALT_LIST: usize = 35;
pub const RULE_LEXER_ALT: usize = 36;
pub const RULE_LEXER_ELEMENTS: usize = 37;
pub const RULE_LEXER_ELEMENT: usize = 38;
pub const RULE_LEXER_BLOCK: usize = 39;
pub const RULE_LEXER_COMMANDS: usize = 40;
pub const RULE_LEXER_COMMAND: usize = 41;
pub const RULE_LEXER_COMMAND_NAME: usize = 42;
pub const RULE_LEXER_COMMAND_EXPR: usize = 43;
pub const RULE_ALT_LIST: usize = 44;
pub const RULE_ALTERNATIVE: usize = 45;
pub const RULE_ELEMENT: usize = 46;
pub const RULE_PREDICATE_OPTIONS: usize = 47;
pub const RULE_PREDICATE_OPTION: usize = 48;
pub const RULE_LABELED_ELEMENT: usize = 49;
pub const RULE_EBNF: usize = 50;
pub const RULE_BLOCK_SUFFIX: usize = 51;
pub const RULE_EBNF_SUFFIX: usize = 52;
pub const RULE_LEXER_ATOM: usize = 53;
pub const RULE_ATOM: usize = 54;
pub const RULE_WILDCARD: usize = 55;
pub const RULE_NOT_SET: usize = 56;
pub const RULE_BLOCK_SET: usize = 57;
pub const RULE_SET_ELEMENT: usize = 58;
pub const RULE_BLOCK: usize = 59;
pub const RULE_RULEREF: usize = 60;
pub const RULE_CHARACTER_RANGE: usize = 61;
pub const RULE_TERMINAL_DEF: usize = 62;
pub const RULE_ELEMENT_OPTIONS: usize = 63;
pub const RULE_ELEMENT_OPTION: usize = 64;
pub const RULE_IDENTIFIER: usize = 65;
pub const RULE_QUALIFIED_IDENTIFIER: usize = 66;
pub static METADATA: GrammarMetadata = GrammarMetadata::new(
"ANTLRv4Parser",
&["grammarSpec", "grammarDecl", "grammarType", "prequelConstruct", "optionsSpec", "option", "optionValue", "delegateGrammars", "delegateGrammar", "tokensSpec", "channelsSpec", "idList", "action_", "actionScopeName", "actionBlock", "argActionBlock", "modeSpec", "rules", "ruleSpec", "parserRuleSpec", "exceptionGroup", "exceptionHandler", "finallyClause", "rulePrequel", "ruleReturns", "throwsSpec", "localsSpec", "ruleAction", "ruleModifiers", "ruleModifier", "ruleBlock", "ruleAltList", "labeledAlt", "lexerRuleSpec", "lexerRuleBlock", "lexerAltList", "lexerAlt", "lexerElements", "lexerElement", "lexerBlock", "lexerCommands", "lexerCommand", "lexerCommandName", "lexerCommandExpr", "altList", "alternative", "element", "predicateOptions", "predicateOption", "labeledElement", "ebnf", "blockSuffix", "ebnfSuffix", "lexerAtom", "atom", "wildcard", "notSet", "blockSet", "setElement", "block", "ruleref", "characterRange", "terminalDef", "elementOptions", "elementOption", "identifier", "qualifiedIdentifier"],
&[None, None, None, None, None, None, None, Some("\'=\'"), None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, Some("\'[\'"), None, None, None, Some("\'import\'"), Some("\'fragment\'"), Some("\'lexer\'"), Some("\'parser\'"), Some("\'grammar\'"), Some("\'protected\'"), Some("\'public\'"), Some("\'private\'"), Some("\'returns\'"), Some("\'locals\'"), Some("\'throws\'"), Some("\'catch\'"), Some("\'finally\'"), Some("\'mode\'"), Some("\':\'"), Some("\'::\'"), Some("\',\'"), Some("\';\'"), Some("\'(\'"), Some("\')\'"), Some("\'}\'"), Some("\'->\'"), Some("\'<\'"), Some("\'>\'"), Some("\'?\'"), Some("\'*\'"), Some("\'+=\'"), Some("\'+\'"), Some("\'|\'"), Some("\'$\'"), Some("\'..\'"), Some("\'.\'"), Some("\'@\'"), Some("\'#\'"), Some("\'~\'"), None, None, None, None, None],
&[None, None, None, None, Some("ACTION"), Some("ARG_ACTION"), Some("ARG_OR_CHARSET"), Some("ASSIGN"), Some("LEXER_CHAR_SET"), Some("RULE_REF"), Some("SEMPRED"), Some("STRING_LITERAL"), Some("TOKEN_REF"), Some("UNICODE_ESC"), Some("UNICODE_EXTENDED_ESC"), Some("WS"), Some("ALT"), Some("BLOCK"), Some("CLOSURE"), Some("ELEMENT_OPTIONS"), Some("EPSILON"), Some("LEXER_ACTION_CALL"), Some("LEXER_ALT_ACTION"), Some("OPTIONAL"), Some("POSITIVE_CLOSURE"), Some("RULE"), Some("RULEMODIFIERS"), Some("RULES"), Some("SET"), Some("WILDCARD"), Some("DOC_COMMENT"), Some("BLOCK_COMMENT"), Some("LINE_COMMENT"), Some("INT"), Some("UNTERMINATED_STRING_LITERAL"), Some("BEGIN_ARGUMENT"), Some("OPTIONS"), Some("TOKENS"), Some("CHANNELS"), Some("IMPORT"), Some("FRAGMENT"), Some("LEXER"), Some("PARSER"), Some("GRAMMAR"), Some("PROTECTED"), Some("PUBLIC"), Some("PRIVATE"), Some("RETURNS"), Some("LOCALS"), Some("THROWS"), Some("CATCH"), Some("FINALLY"), Some("MODE"), Some("COLON"), Some("COLONCOLON"), Some("COMMA"), Some("SEMI"), Some("LPAREN"), Some("RPAREN"), Some("RBRACE"), Some("RARROW"), Some("LT"), Some("GT"), Some("QUESTION"), Some("STAR"), Some("PLUS_ASSIGN"), Some("PLUS"), Some("OR"), Some("DOLLAR"), Some("RANGE"), Some("DOT"), Some("AT"), Some("POUND"), Some("NOT"), Some("ID"), Some("END_ARGUMENT"), Some("UNTERMINATED_ARGUMENT"), Some("ARGUMENT_CONTENT"), Some("UNTERMINATED_CHAR_SET")],
&[None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None],
&[],
&[],
&[],
);
pub fn metadata() -> &'static GrammarMetadata {
&METADATA
}
pub fn rule_names() -> &'static [&'static str] {
METADATA.rule_names()
}
fn parser_semantics() -> &'static antlr4_runtime::ParserSemantics {
static SEMANTICS_CELL: OnceLock<antlr4_runtime::ParserSemantics> = OnceLock::new();
SEMANTICS_CELL.get_or_init(|| {
let mut ir = antlr4_runtime::semir::SemIr::new();
let mut predicates = Vec::new();
let actions = Vec::new();
antlr4_runtime::ParserSemantics { ir, predicates, actions }
})
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs0 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs1 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs2 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs3 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs4 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs5 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs6 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs7 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs8 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs9 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs10 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs11 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs12 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs13 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs14 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs15 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs16 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs17 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs18 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs19 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs20 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs21 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs22 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs23 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs24 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs25 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs26 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs27 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs28 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs29 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs30 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs31 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs32 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs33 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs34 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs35 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs36 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs37 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs38 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs39 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs40 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs41 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs42 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs43 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs44 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs45 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs46 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs47 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs48 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs49 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs50 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs51 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs52 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs53 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs54 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs55 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs56 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs57 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs58 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs59 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs60 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs61 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs62 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs63 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs64 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs65 {
}
#[derive(Clone, Debug, Default)]
#[allow(non_snake_case, dead_code)]
pub struct __RuleAttrs66 {
}
#[allow(dead_code)]
pub struct __GeneratedInput<'a, L: TokenSource>(&'a mut CommonTokenStream<L>);
#[allow(dead_code)]
impl<L: TokenSource> __GeneratedInput<'_, L> {
pub fn text(&mut self) -> String {
self.0.text_all()
}
pub fn la(&mut self, offset: isize) -> i32 {
antlr4_runtime::IntStream::la(self.0, offset)
}
pub fn lt(&mut self, offset: isize) -> __GeneratedTokenView {
__GeneratedTokenView {
text: self
.0
.lt(offset)
.map(|token| token.text_or_empty().to_owned())
.unwrap_or_default(),
}
}
}
#[allow(dead_code)]
pub struct __GeneratedTokenView {
text: String,
}
#[allow(dead_code)]
impl __GeneratedTokenView {
pub fn text(&self) -> &str {
&self.text
}
}
#[allow(dead_code)]
#[derive(Clone)]
pub struct TerminalNode<'a> {
__node: RuntimeTerminalNode<'a>,
}
#[allow(dead_code)]
impl<'a> TerminalNode<'a> {
fn new(node: RuntimeTerminalNode<'a>) -> Self {
Self { __node: node }
}
pub fn symbol(&self) -> antlr4_runtime::TokenView<'a> {
self.__node.symbol()
}
}
impl std::fmt::Display for TerminalNode<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str(self.__node.text())
}
}
#[allow(dead_code)]
#[derive(Clone)]
pub struct ErrorNode<'a> {
__node: RuntimeErrorNode<'a>,
}
#[allow(dead_code)]
impl<'a> ErrorNode<'a> {
fn new(node: RuntimeErrorNode<'a>) -> Self {
Self { __node: node }
}
pub fn symbol(&self) -> antlr4_runtime::TokenView<'a> {
self.__node.symbol()
}
}
impl std::fmt::Display for ErrorNode<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str(self.__node.text())
}
}
#[allow(dead_code)]
#[derive(Clone, Copy)]
enum __GeneratedRuleContext<'a> {
Stored(RuleNodeView<'a>),
Active {
context: &'a antlr4_runtime::ParserRuleContext,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
},
}
#[doc(hidden)]
#[derive(Clone, Copy, Debug)]
pub struct StoredTreeContext;
#[derive(Clone, Copy, Debug)]
struct __ActiveParserContext;
#[allow(dead_code)]
fn __context_children<'a>(
source: __GeneratedRuleContext<'a>,
) -> impl Iterator<Item = antlr4_runtime::Node<'a>> + 'a {
let mut stored = match source {
__GeneratedRuleContext::Stored(node) => Some(node.children()),
__GeneratedRuleContext::Active { .. } => None,
};
let mut active = match source {
__GeneratedRuleContext::Stored(_) => None,
__GeneratedRuleContext::Active {
context,
storage,
tokens,
} => Some(context.child_nodes(storage, tokens)),
};
std::iter::from_fn(move || {
stored
.as_mut()
.and_then(Iterator::next)
.or_else(|| active.as_mut().and_then(Iterator::next))
})
}
#[allow(dead_code)]
fn __rule_children<'a>(
source: __GeneratedRuleContext<'a>,
rule_index: usize,
) -> impl Iterator<Item = RuleNodeView<'a>> + 'a {
__context_children(source).filter_map(move |child| {
let rule = child.as_rule()?;
(rule.rule_index() == rule_index).then_some(rule)
})
}
#[allow(dead_code)]
fn __token_children<'a>(
source: __GeneratedRuleContext<'a>,
token_type: i32,
) -> impl Iterator<Item = RuntimeTerminalNode<'a>> + 'a {
__context_children(source).filter_map(move |child| {
let terminal = match child.kind() {
antlr4_runtime::NodeKind::Terminal => child.as_terminal(),
antlr4_runtime::NodeKind::Error => {
child.as_error().map(antlr4_runtime::ErrorNodeView::terminal)
}
antlr4_runtime::NodeKind::Rule => None,
}?;
(terminal.symbol().token_type() == token_type).then_some(terminal)
})
}
#[allow(dead_code)]
fn __token_children_matching<'a>(
source: __GeneratedRuleContext<'a>,
token_types: &'static [i32],
) -> impl Iterator<Item = RuntimeTerminalNode<'a>> + 'a {
__context_children(source).filter_map(move |child| {
let terminal = match child.kind() {
antlr4_runtime::NodeKind::Terminal => child.as_terminal(),
antlr4_runtime::NodeKind::Error => {
child.as_error().map(antlr4_runtime::ErrorNodeView::terminal)
}
antlr4_runtime::NodeKind::Rule => None,
}?;
token_types
.contains(&terminal.symbol().token_type())
.then_some(terminal)
})
}
#[allow(dead_code)]
trait __FromActiveRuleContext<'a>: Sized {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self>;
}
#[allow(dead_code)]
fn __active_context_view<'a, T: __FromActiveRuleContext<'a>>(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<T> {
T::__from_active(context, invocation_states, storage, tokens)
}
#[allow(dead_code)]
fn __context_kind(context: RuleNodeView<'_>) -> usize {
context.rule_index()
}
#[allow(dead_code)]
fn __active_context_kind(
context: &antlr4_runtime::ParserRuleContext,
_storage: &antlr4_runtime::ParseTreeStorage,
_tokens: &antlr4_runtime::TokenStore,
) -> usize {
context.rule_index()
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct GrammarSpecContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for GrammarSpecContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 0 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for GrammarSpecContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> GrammarSpecContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for GrammarSpecContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 0 { return None; }
let __default = __RuleAttrs0::default();
let __attrs = context.generated_attrs::<__RuleAttrs0>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> GrammarSpecContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs0::default();
let __attrs = node.generated_attrs::<__RuleAttrs0>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> GrammarSpecContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn grammar_decl(&self) -> Result<GrammarDeclContext<'a>, MissingChildError> {
__rule_children(self.__node, 1)
.next()
.map(|node| GrammarDeclContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("GrammarSpecContext", "grammarDecl"))
}
pub fn prequel_construct_children(&self) -> impl Iterator<Item = PrequelConstructContext<'a>> + '_ {
__rule_children(self.__node, 3)
.map(move |node| PrequelConstructContext::__from_child_node(node, &self.__invocation_states))
}
pub fn mode_spec_children(&self) -> impl Iterator<Item = ModeSpecContext<'a>> + '_ {
__rule_children(self.__node, 16)
.map(move |node| ModeSpecContext::__from_child_node(node, &self.__invocation_states))
}
pub fn rules(&self) -> Result<RulesContext<'a>, MissingChildError> {
__rule_children(self.__node, 17)
.next()
.map(|node| RulesContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("GrammarSpecContext", "rules"))
}
pub fn eof_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, -1)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("GrammarSpecContext", "EOF"))
}
}
impl<State> std::fmt::Display for GrammarSpecContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct GrammarDeclContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for GrammarDeclContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 1 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for GrammarDeclContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> GrammarDeclContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for GrammarDeclContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 1 { return None; }
let __default = __RuleAttrs1::default();
let __attrs = context.generated_attrs::<__RuleAttrs1>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> GrammarDeclContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs1::default();
let __attrs = node.generated_attrs::<__RuleAttrs1>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> GrammarDeclContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn grammar_type(&self) -> Result<GrammarTypeContext<'a>, MissingChildError> {
__rule_children(self.__node, 2)
.next()
.map(|node| GrammarTypeContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("GrammarDeclContext", "grammarType"))
}
pub fn identifier(&self) -> Result<IdentifierContext<'a>, MissingChildError> {
__rule_children(self.__node, 65)
.next()
.map(|node| IdentifierContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("GrammarDeclContext", "identifier"))
}
pub fn semi_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 56)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("GrammarDeclContext", "SEMI"))
}
}
impl<State> std::fmt::Display for GrammarDeclContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct GrammarTypeContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for GrammarTypeContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 2 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for GrammarTypeContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> GrammarTypeContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for GrammarTypeContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 2 { return None; }
let __default = __RuleAttrs2::default();
let __attrs = context.generated_attrs::<__RuleAttrs2>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> GrammarTypeContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs2::default();
let __attrs = node.generated_attrs::<__RuleAttrs2>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> GrammarTypeContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn lexer_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 41)
.next()
.map(TerminalNode::new)
}
pub fn parser_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 42)
.next()
.map(TerminalNode::new)
}
pub fn grammar_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 43)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("GrammarTypeContext", "GRAMMAR"))
}
}
impl<State> std::fmt::Display for GrammarTypeContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct PrequelConstructContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for PrequelConstructContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 3 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for PrequelConstructContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> PrequelConstructContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for PrequelConstructContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 3 { return None; }
let __default = __RuleAttrs3::default();
let __attrs = context.generated_attrs::<__RuleAttrs3>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> PrequelConstructContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs3::default();
let __attrs = node.generated_attrs::<__RuleAttrs3>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> PrequelConstructContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn options_spec(&self) -> Option<OptionsSpecContext<'a>> {
__rule_children(self.__node, 4)
.next()
.map(|node| OptionsSpecContext::__from_child_node(node, &self.__invocation_states))
}
pub fn delegate_grammars(&self) -> Option<DelegateGrammarsContext<'a>> {
__rule_children(self.__node, 7)
.next()
.map(|node| DelegateGrammarsContext::__from_child_node(node, &self.__invocation_states))
}
pub fn tokens_spec(&self) -> Option<TokensSpecContext<'a>> {
__rule_children(self.__node, 9)
.next()
.map(|node| TokensSpecContext::__from_child_node(node, &self.__invocation_states))
}
pub fn channels_spec(&self) -> Option<ChannelsSpecContext<'a>> {
__rule_children(self.__node, 10)
.next()
.map(|node| ChannelsSpecContext::__from_child_node(node, &self.__invocation_states))
}
pub fn action(&self) -> Option<ActionContext<'a>> {
__rule_children(self.__node, 12)
.next()
.map(|node| ActionContext::__from_child_node(node, &self.__invocation_states))
}
}
impl<State> std::fmt::Display for PrequelConstructContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct OptionsSpecContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for OptionsSpecContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 4 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for OptionsSpecContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> OptionsSpecContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for OptionsSpecContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 4 { return None; }
let __default = __RuleAttrs4::default();
let __attrs = context.generated_attrs::<__RuleAttrs4>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> OptionsSpecContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs4::default();
let __attrs = node.generated_attrs::<__RuleAttrs4>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> OptionsSpecContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn option_children(&self) -> impl Iterator<Item = OptionContext<'a>> + '_ {
__rule_children(self.__node, 5)
.map(move |node| OptionContext::__from_child_node(node, &self.__invocation_states))
}
pub fn options_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 36)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("OptionsSpecContext", "OPTIONS"))
}
pub fn semi_tokens(&self) -> impl Iterator<Item = TerminalNode<'a>> + '_ {
__token_children(self.__node, 56).map(TerminalNode::new)
}
pub fn rbrace_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 59)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("OptionsSpecContext", "RBRACE"))
}
}
impl<State> std::fmt::Display for OptionsSpecContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct OptionContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for OptionContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 5 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for OptionContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> OptionContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for OptionContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 5 { return None; }
let __default = __RuleAttrs5::default();
let __attrs = context.generated_attrs::<__RuleAttrs5>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> OptionContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs5::default();
let __attrs = node.generated_attrs::<__RuleAttrs5>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> OptionContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn option_value(&self) -> Result<OptionValueContext<'a>, MissingChildError> {
__rule_children(self.__node, 6)
.next()
.map(|node| OptionValueContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("OptionContext", "optionValue"))
}
pub fn identifier(&self) -> Result<IdentifierContext<'a>, MissingChildError> {
__rule_children(self.__node, 65)
.next()
.map(|node| IdentifierContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("OptionContext", "identifier"))
}
pub fn assign_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 7)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("OptionContext", "ASSIGN"))
}
}
impl<State> std::fmt::Display for OptionContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct OptionValueContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for OptionValueContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 6 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for OptionValueContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> OptionValueContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for OptionValueContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 6 { return None; }
let __default = __RuleAttrs6::default();
let __attrs = context.generated_attrs::<__RuleAttrs6>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> OptionValueContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs6::default();
let __attrs = node.generated_attrs::<__RuleAttrs6>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> OptionValueContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn action_block(&self) -> Option<ActionBlockContext<'a>> {
__rule_children(self.__node, 14)
.next()
.map(|node| ActionBlockContext::__from_child_node(node, &self.__invocation_states))
}
pub fn identifier_children(&self) -> impl Iterator<Item = IdentifierContext<'a>> + '_ {
__rule_children(self.__node, 65)
.map(move |node| IdentifierContext::__from_child_node(node, &self.__invocation_states))
}
pub fn string_literal_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 11)
.next()
.map(TerminalNode::new)
}
pub fn int_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 33)
.next()
.map(TerminalNode::new)
}
pub fn dot_tokens(&self) -> impl Iterator<Item = TerminalNode<'a>> + '_ {
__token_children(self.__node, 70).map(TerminalNode::new)
}
}
impl<State> std::fmt::Display for OptionValueContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct DelegateGrammarsContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for DelegateGrammarsContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 7 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for DelegateGrammarsContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> DelegateGrammarsContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for DelegateGrammarsContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 7 { return None; }
let __default = __RuleAttrs7::default();
let __attrs = context.generated_attrs::<__RuleAttrs7>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> DelegateGrammarsContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs7::default();
let __attrs = node.generated_attrs::<__RuleAttrs7>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> DelegateGrammarsContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn delegate_grammar_children(&self) -> impl Iterator<Item = DelegateGrammarContext<'a>> + '_ {
__rule_children(self.__node, 8)
.map(move |node| DelegateGrammarContext::__from_child_node(node, &self.__invocation_states))
}
pub fn import_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 39)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("DelegateGrammarsContext", "IMPORT"))
}
pub fn comma_tokens(&self) -> impl Iterator<Item = TerminalNode<'a>> + '_ {
__token_children(self.__node, 55).map(TerminalNode::new)
}
pub fn semi_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 56)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("DelegateGrammarsContext", "SEMI"))
}
}
impl<State> std::fmt::Display for DelegateGrammarsContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct DelegateGrammarContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for DelegateGrammarContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 8 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for DelegateGrammarContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> DelegateGrammarContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for DelegateGrammarContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 8 { return None; }
let __default = __RuleAttrs8::default();
let __attrs = context.generated_attrs::<__RuleAttrs8>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> DelegateGrammarContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs8::default();
let __attrs = node.generated_attrs::<__RuleAttrs8>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> DelegateGrammarContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn identifier_children(&self) -> impl Iterator<Item = IdentifierContext<'a>> + '_ {
__rule_children(self.__node, 65)
.map(move |node| IdentifierContext::__from_child_node(node, &self.__invocation_states))
}
pub fn assign_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 7)
.next()
.map(TerminalNode::new)
}
}
impl<State> std::fmt::Display for DelegateGrammarContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct TokensSpecContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for TokensSpecContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 9 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for TokensSpecContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> TokensSpecContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for TokensSpecContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 9 { return None; }
let __default = __RuleAttrs9::default();
let __attrs = context.generated_attrs::<__RuleAttrs9>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> TokensSpecContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs9::default();
let __attrs = node.generated_attrs::<__RuleAttrs9>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> TokensSpecContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn id_list(&self) -> Option<IdListContext<'a>> {
__rule_children(self.__node, 11)
.next()
.map(|node| IdListContext::__from_child_node(node, &self.__invocation_states))
}
pub fn tokens_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 37)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("TokensSpecContext", "TOKENS"))
}
pub fn rbrace_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 59)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("TokensSpecContext", "RBRACE"))
}
}
impl<State> std::fmt::Display for TokensSpecContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct ChannelsSpecContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for ChannelsSpecContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 10 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for ChannelsSpecContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> ChannelsSpecContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for ChannelsSpecContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 10 { return None; }
let __default = __RuleAttrs10::default();
let __attrs = context.generated_attrs::<__RuleAttrs10>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> ChannelsSpecContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs10::default();
let __attrs = node.generated_attrs::<__RuleAttrs10>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> ChannelsSpecContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn id_list(&self) -> Option<IdListContext<'a>> {
__rule_children(self.__node, 11)
.next()
.map(|node| IdListContext::__from_child_node(node, &self.__invocation_states))
}
pub fn channels_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 38)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("ChannelsSpecContext", "CHANNELS"))
}
pub fn rbrace_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 59)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("ChannelsSpecContext", "RBRACE"))
}
}
impl<State> std::fmt::Display for ChannelsSpecContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct IdListContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for IdListContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 11 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for IdListContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> IdListContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for IdListContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 11 { return None; }
let __default = __RuleAttrs11::default();
let __attrs = context.generated_attrs::<__RuleAttrs11>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> IdListContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs11::default();
let __attrs = node.generated_attrs::<__RuleAttrs11>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> IdListContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn identifier_children(&self) -> impl Iterator<Item = IdentifierContext<'a>> + '_ {
__rule_children(self.__node, 65)
.map(move |node| IdentifierContext::__from_child_node(node, &self.__invocation_states))
}
pub fn comma_tokens(&self) -> impl Iterator<Item = TerminalNode<'a>> + '_ {
__token_children(self.__node, 55).map(TerminalNode::new)
}
}
impl<State> std::fmt::Display for IdListContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct ActionContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for ActionContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 12 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for ActionContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> ActionContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for ActionContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 12 { return None; }
let __default = __RuleAttrs12::default();
let __attrs = context.generated_attrs::<__RuleAttrs12>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> ActionContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs12::default();
let __attrs = node.generated_attrs::<__RuleAttrs12>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> ActionContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn action_scope_name(&self) -> Option<ActionScopeNameContext<'a>> {
__rule_children(self.__node, 13)
.next()
.map(|node| ActionScopeNameContext::__from_child_node(node, &self.__invocation_states))
}
pub fn action_block(&self) -> Result<ActionBlockContext<'a>, MissingChildError> {
__rule_children(self.__node, 14)
.next()
.map(|node| ActionBlockContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("ActionContext", "actionBlock"))
}
pub fn identifier(&self) -> Result<IdentifierContext<'a>, MissingChildError> {
__rule_children(self.__node, 65)
.next()
.map(|node| IdentifierContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("ActionContext", "identifier"))
}
pub fn coloncolon_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 54)
.next()
.map(TerminalNode::new)
}
pub fn at_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 71)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("ActionContext", "AT"))
}
}
impl<State> std::fmt::Display for ActionContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct ActionScopeNameContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for ActionScopeNameContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 13 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for ActionScopeNameContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> ActionScopeNameContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for ActionScopeNameContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 13 { return None; }
let __default = __RuleAttrs13::default();
let __attrs = context.generated_attrs::<__RuleAttrs13>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> ActionScopeNameContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs13::default();
let __attrs = node.generated_attrs::<__RuleAttrs13>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> ActionScopeNameContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn identifier(&self) -> Option<IdentifierContext<'a>> {
__rule_children(self.__node, 65)
.next()
.map(|node| IdentifierContext::__from_child_node(node, &self.__invocation_states))
}
pub fn lexer_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 41)
.next()
.map(TerminalNode::new)
}
pub fn parser_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 42)
.next()
.map(TerminalNode::new)
}
}
impl<State> std::fmt::Display for ActionScopeNameContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct ActionBlockContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for ActionBlockContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 14 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for ActionBlockContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> ActionBlockContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for ActionBlockContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 14 { return None; }
let __default = __RuleAttrs14::default();
let __attrs = context.generated_attrs::<__RuleAttrs14>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> ActionBlockContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs14::default();
let __attrs = node.generated_attrs::<__RuleAttrs14>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> ActionBlockContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn action_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 4)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("ActionBlockContext", "ACTION"))
}
}
impl<State> std::fmt::Display for ActionBlockContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct ArgActionBlockContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for ArgActionBlockContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 15 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for ArgActionBlockContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> ArgActionBlockContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for ArgActionBlockContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 15 { return None; }
let __default = __RuleAttrs15::default();
let __attrs = context.generated_attrs::<__RuleAttrs15>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> ArgActionBlockContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs15::default();
let __attrs = node.generated_attrs::<__RuleAttrs15>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> ArgActionBlockContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn begin_argument_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 35)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("ArgActionBlockContext", "BEGIN_ARGUMENT"))
}
pub fn end_argument_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 75)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("ArgActionBlockContext", "END_ARGUMENT"))
}
pub fn argument_content_tokens(&self) -> impl Iterator<Item = TerminalNode<'a>> + '_ {
__token_children(self.__node, 77).map(TerminalNode::new)
}
}
impl<State> std::fmt::Display for ArgActionBlockContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct ModeSpecContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for ModeSpecContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 16 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for ModeSpecContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> ModeSpecContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for ModeSpecContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 16 { return None; }
let __default = __RuleAttrs16::default();
let __attrs = context.generated_attrs::<__RuleAttrs16>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> ModeSpecContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs16::default();
let __attrs = node.generated_attrs::<__RuleAttrs16>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> ModeSpecContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn lexer_rule_spec_children(&self) -> impl Iterator<Item = LexerRuleSpecContext<'a>> + '_ {
__rule_children(self.__node, 33)
.map(move |node| LexerRuleSpecContext::__from_child_node(node, &self.__invocation_states))
}
pub fn identifier(&self) -> Result<IdentifierContext<'a>, MissingChildError> {
__rule_children(self.__node, 65)
.next()
.map(|node| IdentifierContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("ModeSpecContext", "identifier"))
}
pub fn mode_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 52)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("ModeSpecContext", "MODE"))
}
pub fn semi_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 56)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("ModeSpecContext", "SEMI"))
}
}
impl<State> std::fmt::Display for ModeSpecContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct RulesContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for RulesContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 17 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for RulesContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> RulesContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for RulesContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 17 { return None; }
let __default = __RuleAttrs17::default();
let __attrs = context.generated_attrs::<__RuleAttrs17>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> RulesContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs17::default();
let __attrs = node.generated_attrs::<__RuleAttrs17>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> RulesContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn rule_spec_children(&self) -> impl Iterator<Item = RuleSpecContext<'a>> + '_ {
__rule_children(self.__node, 18)
.map(move |node| RuleSpecContext::__from_child_node(node, &self.__invocation_states))
}
}
impl<State> std::fmt::Display for RulesContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct RuleSpecContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for RuleSpecContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 18 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for RuleSpecContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> RuleSpecContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for RuleSpecContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 18 { return None; }
let __default = __RuleAttrs18::default();
let __attrs = context.generated_attrs::<__RuleAttrs18>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> RuleSpecContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs18::default();
let __attrs = node.generated_attrs::<__RuleAttrs18>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> RuleSpecContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn parser_rule_spec(&self) -> Option<ParserRuleSpecContext<'a>> {
__rule_children(self.__node, 19)
.next()
.map(|node| ParserRuleSpecContext::__from_child_node(node, &self.__invocation_states))
}
pub fn lexer_rule_spec(&self) -> Option<LexerRuleSpecContext<'a>> {
__rule_children(self.__node, 33)
.next()
.map(|node| LexerRuleSpecContext::__from_child_node(node, &self.__invocation_states))
}
}
impl<State> std::fmt::Display for RuleSpecContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct ParserRuleSpecContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for ParserRuleSpecContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 19 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for ParserRuleSpecContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> ParserRuleSpecContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for ParserRuleSpecContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 19 { return None; }
let __default = __RuleAttrs19::default();
let __attrs = context.generated_attrs::<__RuleAttrs19>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> ParserRuleSpecContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs19::default();
let __attrs = node.generated_attrs::<__RuleAttrs19>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> ParserRuleSpecContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn arg_action_block(&self) -> Option<ArgActionBlockContext<'a>> {
__rule_children(self.__node, 15)
.next()
.map(|node| ArgActionBlockContext::__from_child_node(node, &self.__invocation_states))
}
pub fn exception_group(&self) -> Result<ExceptionGroupContext<'a>, MissingChildError> {
__rule_children(self.__node, 20)
.next()
.map(|node| ExceptionGroupContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("ParserRuleSpecContext", "exceptionGroup"))
}
pub fn rule_prequel_children(&self) -> impl Iterator<Item = RulePrequelContext<'a>> + '_ {
__rule_children(self.__node, 23)
.map(move |node| RulePrequelContext::__from_child_node(node, &self.__invocation_states))
}
pub fn rule_returns(&self) -> Option<RuleReturnsContext<'a>> {
__rule_children(self.__node, 24)
.next()
.map(|node| RuleReturnsContext::__from_child_node(node, &self.__invocation_states))
}
pub fn throws_spec(&self) -> Option<ThrowsSpecContext<'a>> {
__rule_children(self.__node, 25)
.next()
.map(|node| ThrowsSpecContext::__from_child_node(node, &self.__invocation_states))
}
pub fn locals_spec(&self) -> Option<LocalsSpecContext<'a>> {
__rule_children(self.__node, 26)
.next()
.map(|node| LocalsSpecContext::__from_child_node(node, &self.__invocation_states))
}
pub fn rule_modifiers(&self) -> Option<RuleModifiersContext<'a>> {
__rule_children(self.__node, 28)
.next()
.map(|node| RuleModifiersContext::__from_child_node(node, &self.__invocation_states))
}
pub fn rule_block(&self) -> Result<RuleBlockContext<'a>, MissingChildError> {
__rule_children(self.__node, 30)
.next()
.map(|node| RuleBlockContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("ParserRuleSpecContext", "ruleBlock"))
}
pub fn rule_ref_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 9)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("ParserRuleSpecContext", "RULE_REF"))
}
pub fn colon_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 53)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("ParserRuleSpecContext", "COLON"))
}
pub fn semi_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 56)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("ParserRuleSpecContext", "SEMI"))
}
}
impl<State> std::fmt::Display for ParserRuleSpecContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct ExceptionGroupContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for ExceptionGroupContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 20 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for ExceptionGroupContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> ExceptionGroupContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for ExceptionGroupContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 20 { return None; }
let __default = __RuleAttrs20::default();
let __attrs = context.generated_attrs::<__RuleAttrs20>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> ExceptionGroupContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs20::default();
let __attrs = node.generated_attrs::<__RuleAttrs20>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> ExceptionGroupContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn exception_handler_children(&self) -> impl Iterator<Item = ExceptionHandlerContext<'a>> + '_ {
__rule_children(self.__node, 21)
.map(move |node| ExceptionHandlerContext::__from_child_node(node, &self.__invocation_states))
}
pub fn finally_clause(&self) -> Option<FinallyClauseContext<'a>> {
__rule_children(self.__node, 22)
.next()
.map(|node| FinallyClauseContext::__from_child_node(node, &self.__invocation_states))
}
}
impl<State> std::fmt::Display for ExceptionGroupContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct ExceptionHandlerContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for ExceptionHandlerContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 21 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for ExceptionHandlerContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> ExceptionHandlerContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for ExceptionHandlerContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 21 { return None; }
let __default = __RuleAttrs21::default();
let __attrs = context.generated_attrs::<__RuleAttrs21>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> ExceptionHandlerContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs21::default();
let __attrs = node.generated_attrs::<__RuleAttrs21>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> ExceptionHandlerContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn action_block(&self) -> Result<ActionBlockContext<'a>, MissingChildError> {
__rule_children(self.__node, 14)
.next()
.map(|node| ActionBlockContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("ExceptionHandlerContext", "actionBlock"))
}
pub fn arg_action_block(&self) -> Result<ArgActionBlockContext<'a>, MissingChildError> {
__rule_children(self.__node, 15)
.next()
.map(|node| ArgActionBlockContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("ExceptionHandlerContext", "argActionBlock"))
}
pub fn catch_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 50)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("ExceptionHandlerContext", "CATCH"))
}
}
impl<State> std::fmt::Display for ExceptionHandlerContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct FinallyClauseContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for FinallyClauseContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 22 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for FinallyClauseContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> FinallyClauseContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for FinallyClauseContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 22 { return None; }
let __default = __RuleAttrs22::default();
let __attrs = context.generated_attrs::<__RuleAttrs22>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> FinallyClauseContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs22::default();
let __attrs = node.generated_attrs::<__RuleAttrs22>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> FinallyClauseContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn action_block(&self) -> Result<ActionBlockContext<'a>, MissingChildError> {
__rule_children(self.__node, 14)
.next()
.map(|node| ActionBlockContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("FinallyClauseContext", "actionBlock"))
}
pub fn finally_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 51)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("FinallyClauseContext", "FINALLY"))
}
}
impl<State> std::fmt::Display for FinallyClauseContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct RulePrequelContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for RulePrequelContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 23 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for RulePrequelContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> RulePrequelContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for RulePrequelContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 23 { return None; }
let __default = __RuleAttrs23::default();
let __attrs = context.generated_attrs::<__RuleAttrs23>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> RulePrequelContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs23::default();
let __attrs = node.generated_attrs::<__RuleAttrs23>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> RulePrequelContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn options_spec(&self) -> Option<OptionsSpecContext<'a>> {
__rule_children(self.__node, 4)
.next()
.map(|node| OptionsSpecContext::__from_child_node(node, &self.__invocation_states))
}
pub fn rule_action(&self) -> Option<RuleActionContext<'a>> {
__rule_children(self.__node, 27)
.next()
.map(|node| RuleActionContext::__from_child_node(node, &self.__invocation_states))
}
}
impl<State> std::fmt::Display for RulePrequelContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct RuleReturnsContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for RuleReturnsContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 24 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for RuleReturnsContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> RuleReturnsContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for RuleReturnsContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 24 { return None; }
let __default = __RuleAttrs24::default();
let __attrs = context.generated_attrs::<__RuleAttrs24>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> RuleReturnsContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs24::default();
let __attrs = node.generated_attrs::<__RuleAttrs24>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> RuleReturnsContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn arg_action_block(&self) -> Result<ArgActionBlockContext<'a>, MissingChildError> {
__rule_children(self.__node, 15)
.next()
.map(|node| ArgActionBlockContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("RuleReturnsContext", "argActionBlock"))
}
pub fn returns_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 47)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("RuleReturnsContext", "RETURNS"))
}
}
impl<State> std::fmt::Display for RuleReturnsContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct ThrowsSpecContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for ThrowsSpecContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 25 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for ThrowsSpecContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> ThrowsSpecContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for ThrowsSpecContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 25 { return None; }
let __default = __RuleAttrs25::default();
let __attrs = context.generated_attrs::<__RuleAttrs25>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> ThrowsSpecContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs25::default();
let __attrs = node.generated_attrs::<__RuleAttrs25>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> ThrowsSpecContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn qualified_identifier_children(&self) -> impl Iterator<Item = QualifiedIdentifierContext<'a>> + '_ {
__rule_children(self.__node, 66)
.map(move |node| QualifiedIdentifierContext::__from_child_node(node, &self.__invocation_states))
}
pub fn throws_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 49)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("ThrowsSpecContext", "THROWS"))
}
pub fn comma_tokens(&self) -> impl Iterator<Item = TerminalNode<'a>> + '_ {
__token_children(self.__node, 55).map(TerminalNode::new)
}
}
impl<State> std::fmt::Display for ThrowsSpecContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct LocalsSpecContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for LocalsSpecContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 26 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for LocalsSpecContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> LocalsSpecContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for LocalsSpecContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 26 { return None; }
let __default = __RuleAttrs26::default();
let __attrs = context.generated_attrs::<__RuleAttrs26>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> LocalsSpecContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs26::default();
let __attrs = node.generated_attrs::<__RuleAttrs26>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> LocalsSpecContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn arg_action_block(&self) -> Result<ArgActionBlockContext<'a>, MissingChildError> {
__rule_children(self.__node, 15)
.next()
.map(|node| ArgActionBlockContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("LocalsSpecContext", "argActionBlock"))
}
pub fn locals_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 48)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("LocalsSpecContext", "LOCALS"))
}
}
impl<State> std::fmt::Display for LocalsSpecContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct RuleActionContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for RuleActionContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 27 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for RuleActionContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> RuleActionContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for RuleActionContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 27 { return None; }
let __default = __RuleAttrs27::default();
let __attrs = context.generated_attrs::<__RuleAttrs27>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> RuleActionContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs27::default();
let __attrs = node.generated_attrs::<__RuleAttrs27>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> RuleActionContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn action_block(&self) -> Result<ActionBlockContext<'a>, MissingChildError> {
__rule_children(self.__node, 14)
.next()
.map(|node| ActionBlockContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("RuleActionContext", "actionBlock"))
}
pub fn identifier(&self) -> Result<IdentifierContext<'a>, MissingChildError> {
__rule_children(self.__node, 65)
.next()
.map(|node| IdentifierContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("RuleActionContext", "identifier"))
}
pub fn at_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 71)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("RuleActionContext", "AT"))
}
}
impl<State> std::fmt::Display for RuleActionContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct RuleModifiersContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for RuleModifiersContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 28 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for RuleModifiersContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> RuleModifiersContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for RuleModifiersContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 28 { return None; }
let __default = __RuleAttrs28::default();
let __attrs = context.generated_attrs::<__RuleAttrs28>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> RuleModifiersContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs28::default();
let __attrs = node.generated_attrs::<__RuleAttrs28>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> RuleModifiersContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn rule_modifier_children(&self) -> impl Iterator<Item = RuleModifierContext<'a>> + '_ {
__rule_children(self.__node, 29)
.map(move |node| RuleModifierContext::__from_child_node(node, &self.__invocation_states))
}
}
impl<State> std::fmt::Display for RuleModifiersContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct RuleModifierContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for RuleModifierContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 29 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for RuleModifierContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> RuleModifierContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for RuleModifierContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 29 { return None; }
let __default = __RuleAttrs29::default();
let __attrs = context.generated_attrs::<__RuleAttrs29>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> RuleModifierContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs29::default();
let __attrs = node.generated_attrs::<__RuleAttrs29>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> RuleModifierContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
}
impl<State> std::fmt::Display for RuleModifierContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct RuleBlockContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for RuleBlockContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 30 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for RuleBlockContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> RuleBlockContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for RuleBlockContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 30 { return None; }
let __default = __RuleAttrs30::default();
let __attrs = context.generated_attrs::<__RuleAttrs30>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> RuleBlockContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs30::default();
let __attrs = node.generated_attrs::<__RuleAttrs30>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> RuleBlockContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn rule_alt_list(&self) -> Result<RuleAltListContext<'a>, MissingChildError> {
__rule_children(self.__node, 31)
.next()
.map(|node| RuleAltListContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("RuleBlockContext", "ruleAltList"))
}
}
impl<State> std::fmt::Display for RuleBlockContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct RuleAltListContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for RuleAltListContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 31 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for RuleAltListContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> RuleAltListContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for RuleAltListContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 31 { return None; }
let __default = __RuleAttrs31::default();
let __attrs = context.generated_attrs::<__RuleAttrs31>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> RuleAltListContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs31::default();
let __attrs = node.generated_attrs::<__RuleAttrs31>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> RuleAltListContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn labeled_alt_children(&self) -> impl Iterator<Item = LabeledAltContext<'a>> + '_ {
__rule_children(self.__node, 32)
.map(move |node| LabeledAltContext::__from_child_node(node, &self.__invocation_states))
}
pub fn or_tokens(&self) -> impl Iterator<Item = TerminalNode<'a>> + '_ {
__token_children(self.__node, 67).map(TerminalNode::new)
}
}
impl<State> std::fmt::Display for RuleAltListContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct LabeledAltContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for LabeledAltContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 32 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for LabeledAltContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> LabeledAltContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for LabeledAltContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 32 { return None; }
let __default = __RuleAttrs32::default();
let __attrs = context.generated_attrs::<__RuleAttrs32>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> LabeledAltContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs32::default();
let __attrs = node.generated_attrs::<__RuleAttrs32>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> LabeledAltContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn alternative(&self) -> Result<AlternativeContext<'a>, MissingChildError> {
__rule_children(self.__node, 45)
.next()
.map(|node| AlternativeContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("LabeledAltContext", "alternative"))
}
pub fn identifier(&self) -> Option<IdentifierContext<'a>> {
__rule_children(self.__node, 65)
.next()
.map(|node| IdentifierContext::__from_child_node(node, &self.__invocation_states))
}
pub fn pound_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 72)
.next()
.map(TerminalNode::new)
}
}
impl<State> std::fmt::Display for LabeledAltContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct LexerRuleSpecContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for LexerRuleSpecContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 33 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for LexerRuleSpecContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> LexerRuleSpecContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for LexerRuleSpecContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 33 { return None; }
let __default = __RuleAttrs33::default();
let __attrs = context.generated_attrs::<__RuleAttrs33>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> LexerRuleSpecContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs33::default();
let __attrs = node.generated_attrs::<__RuleAttrs33>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> LexerRuleSpecContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn options_spec(&self) -> Option<OptionsSpecContext<'a>> {
__rule_children(self.__node, 4)
.next()
.map(|node| OptionsSpecContext::__from_child_node(node, &self.__invocation_states))
}
pub fn lexer_rule_block(&self) -> Result<LexerRuleBlockContext<'a>, MissingChildError> {
__rule_children(self.__node, 34)
.next()
.map(|node| LexerRuleBlockContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("LexerRuleSpecContext", "lexerRuleBlock"))
}
pub fn token_ref_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 12)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("LexerRuleSpecContext", "TOKEN_REF"))
}
pub fn fragment_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 40)
.next()
.map(TerminalNode::new)
}
pub fn colon_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 53)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("LexerRuleSpecContext", "COLON"))
}
pub fn semi_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 56)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("LexerRuleSpecContext", "SEMI"))
}
}
impl<State> std::fmt::Display for LexerRuleSpecContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct LexerRuleBlockContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for LexerRuleBlockContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 34 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for LexerRuleBlockContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> LexerRuleBlockContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for LexerRuleBlockContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 34 { return None; }
let __default = __RuleAttrs34::default();
let __attrs = context.generated_attrs::<__RuleAttrs34>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> LexerRuleBlockContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs34::default();
let __attrs = node.generated_attrs::<__RuleAttrs34>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> LexerRuleBlockContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn lexer_alt_list(&self) -> Result<LexerAltListContext<'a>, MissingChildError> {
__rule_children(self.__node, 35)
.next()
.map(|node| LexerAltListContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("LexerRuleBlockContext", "lexerAltList"))
}
}
impl<State> std::fmt::Display for LexerRuleBlockContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct LexerAltListContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for LexerAltListContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 35 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for LexerAltListContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> LexerAltListContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for LexerAltListContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 35 { return None; }
let __default = __RuleAttrs35::default();
let __attrs = context.generated_attrs::<__RuleAttrs35>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> LexerAltListContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs35::default();
let __attrs = node.generated_attrs::<__RuleAttrs35>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> LexerAltListContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn lexer_alt_children(&self) -> impl Iterator<Item = LexerAltContext<'a>> + '_ {
__rule_children(self.__node, 36)
.map(move |node| LexerAltContext::__from_child_node(node, &self.__invocation_states))
}
pub fn or_tokens(&self) -> impl Iterator<Item = TerminalNode<'a>> + '_ {
__token_children(self.__node, 67).map(TerminalNode::new)
}
}
impl<State> std::fmt::Display for LexerAltListContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct LexerAltContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for LexerAltContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 36 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for LexerAltContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> LexerAltContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for LexerAltContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 36 { return None; }
let __default = __RuleAttrs36::default();
let __attrs = context.generated_attrs::<__RuleAttrs36>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> LexerAltContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs36::default();
let __attrs = node.generated_attrs::<__RuleAttrs36>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> LexerAltContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn lexer_elements(&self) -> Option<LexerElementsContext<'a>> {
__rule_children(self.__node, 37)
.next()
.map(|node| LexerElementsContext::__from_child_node(node, &self.__invocation_states))
}
pub fn lexer_commands(&self) -> Option<LexerCommandsContext<'a>> {
__rule_children(self.__node, 40)
.next()
.map(|node| LexerCommandsContext::__from_child_node(node, &self.__invocation_states))
}
}
impl<State> std::fmt::Display for LexerAltContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct LexerElementsContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for LexerElementsContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 37 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for LexerElementsContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> LexerElementsContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for LexerElementsContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 37 { return None; }
let __default = __RuleAttrs37::default();
let __attrs = context.generated_attrs::<__RuleAttrs37>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> LexerElementsContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs37::default();
let __attrs = node.generated_attrs::<__RuleAttrs37>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> LexerElementsContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn lexer_element_children(&self) -> impl Iterator<Item = LexerElementContext<'a>> + '_ {
__rule_children(self.__node, 38)
.map(move |node| LexerElementContext::__from_child_node(node, &self.__invocation_states))
}
}
impl<State> std::fmt::Display for LexerElementsContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct LexerElementContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for LexerElementContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 38 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for LexerElementContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> LexerElementContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for LexerElementContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 38 { return None; }
let __default = __RuleAttrs38::default();
let __attrs = context.generated_attrs::<__RuleAttrs38>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> LexerElementContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs38::default();
let __attrs = node.generated_attrs::<__RuleAttrs38>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> LexerElementContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn action_block(&self) -> Option<ActionBlockContext<'a>> {
__rule_children(self.__node, 14)
.next()
.map(|node| ActionBlockContext::__from_child_node(node, &self.__invocation_states))
}
pub fn lexer_block(&self) -> Option<LexerBlockContext<'a>> {
__rule_children(self.__node, 39)
.next()
.map(|node| LexerBlockContext::__from_child_node(node, &self.__invocation_states))
}
pub fn ebnf_suffix(&self) -> Option<EbnfSuffixContext<'a>> {
__rule_children(self.__node, 52)
.next()
.map(|node| EbnfSuffixContext::__from_child_node(node, &self.__invocation_states))
}
pub fn lexer_atom(&self) -> Option<LexerAtomContext<'a>> {
__rule_children(self.__node, 53)
.next()
.map(|node| LexerAtomContext::__from_child_node(node, &self.__invocation_states))
}
pub fn question_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 63)
.next()
.map(TerminalNode::new)
}
}
impl<State> std::fmt::Display for LexerElementContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct LexerBlockContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for LexerBlockContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 39 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for LexerBlockContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> LexerBlockContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for LexerBlockContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 39 { return None; }
let __default = __RuleAttrs39::default();
let __attrs = context.generated_attrs::<__RuleAttrs39>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> LexerBlockContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs39::default();
let __attrs = node.generated_attrs::<__RuleAttrs39>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> LexerBlockContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn lexer_alt_list(&self) -> Result<LexerAltListContext<'a>, MissingChildError> {
__rule_children(self.__node, 35)
.next()
.map(|node| LexerAltListContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("LexerBlockContext", "lexerAltList"))
}
pub fn lparen_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 57)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("LexerBlockContext", "LPAREN"))
}
pub fn rparen_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 58)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("LexerBlockContext", "RPAREN"))
}
}
impl<State> std::fmt::Display for LexerBlockContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct LexerCommandsContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for LexerCommandsContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 40 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for LexerCommandsContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> LexerCommandsContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for LexerCommandsContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 40 { return None; }
let __default = __RuleAttrs40::default();
let __attrs = context.generated_attrs::<__RuleAttrs40>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> LexerCommandsContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs40::default();
let __attrs = node.generated_attrs::<__RuleAttrs40>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> LexerCommandsContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn lexer_command_children(&self) -> impl Iterator<Item = LexerCommandContext<'a>> + '_ {
__rule_children(self.__node, 41)
.map(move |node| LexerCommandContext::__from_child_node(node, &self.__invocation_states))
}
pub fn comma_tokens(&self) -> impl Iterator<Item = TerminalNode<'a>> + '_ {
__token_children(self.__node, 55).map(TerminalNode::new)
}
pub fn rarrow_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 60)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("LexerCommandsContext", "RARROW"))
}
}
impl<State> std::fmt::Display for LexerCommandsContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct LexerCommandContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for LexerCommandContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 41 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for LexerCommandContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> LexerCommandContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for LexerCommandContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 41 { return None; }
let __default = __RuleAttrs41::default();
let __attrs = context.generated_attrs::<__RuleAttrs41>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> LexerCommandContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs41::default();
let __attrs = node.generated_attrs::<__RuleAttrs41>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> LexerCommandContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn lexer_command_name(&self) -> Result<LexerCommandNameContext<'a>, MissingChildError> {
__rule_children(self.__node, 42)
.next()
.map(|node| LexerCommandNameContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("LexerCommandContext", "lexerCommandName"))
}
pub fn lexer_command_expr(&self) -> Option<LexerCommandExprContext<'a>> {
__rule_children(self.__node, 43)
.next()
.map(|node| LexerCommandExprContext::__from_child_node(node, &self.__invocation_states))
}
pub fn lparen_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 57)
.next()
.map(TerminalNode::new)
}
pub fn rparen_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 58)
.next()
.map(TerminalNode::new)
}
}
impl<State> std::fmt::Display for LexerCommandContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct LexerCommandNameContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for LexerCommandNameContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 42 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for LexerCommandNameContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> LexerCommandNameContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for LexerCommandNameContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 42 { return None; }
let __default = __RuleAttrs42::default();
let __attrs = context.generated_attrs::<__RuleAttrs42>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> LexerCommandNameContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs42::default();
let __attrs = node.generated_attrs::<__RuleAttrs42>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> LexerCommandNameContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn identifier(&self) -> Option<IdentifierContext<'a>> {
__rule_children(self.__node, 65)
.next()
.map(|node| IdentifierContext::__from_child_node(node, &self.__invocation_states))
}
pub fn mode_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 52)
.next()
.map(TerminalNode::new)
}
}
impl<State> std::fmt::Display for LexerCommandNameContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct LexerCommandExprContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for LexerCommandExprContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 43 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for LexerCommandExprContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> LexerCommandExprContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for LexerCommandExprContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 43 { return None; }
let __default = __RuleAttrs43::default();
let __attrs = context.generated_attrs::<__RuleAttrs43>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> LexerCommandExprContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs43::default();
let __attrs = node.generated_attrs::<__RuleAttrs43>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> LexerCommandExprContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn identifier(&self) -> Option<IdentifierContext<'a>> {
__rule_children(self.__node, 65)
.next()
.map(|node| IdentifierContext::__from_child_node(node, &self.__invocation_states))
}
pub fn int_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 33)
.next()
.map(TerminalNode::new)
}
}
impl<State> std::fmt::Display for LexerCommandExprContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct AltListContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for AltListContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 44 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for AltListContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> AltListContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for AltListContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 44 { return None; }
let __default = __RuleAttrs44::default();
let __attrs = context.generated_attrs::<__RuleAttrs44>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> AltListContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs44::default();
let __attrs = node.generated_attrs::<__RuleAttrs44>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> AltListContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn alternative_children(&self) -> impl Iterator<Item = AlternativeContext<'a>> + '_ {
__rule_children(self.__node, 45)
.map(move |node| AlternativeContext::__from_child_node(node, &self.__invocation_states))
}
pub fn or_tokens(&self) -> impl Iterator<Item = TerminalNode<'a>> + '_ {
__token_children(self.__node, 67).map(TerminalNode::new)
}
}
impl<State> std::fmt::Display for AltListContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct AlternativeContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for AlternativeContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 45 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for AlternativeContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> AlternativeContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for AlternativeContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 45 { return None; }
let __default = __RuleAttrs45::default();
let __attrs = context.generated_attrs::<__RuleAttrs45>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> AlternativeContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs45::default();
let __attrs = node.generated_attrs::<__RuleAttrs45>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> AlternativeContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn element_children(&self) -> impl Iterator<Item = ElementContext<'a>> + '_ {
__rule_children(self.__node, 46)
.map(move |node| ElementContext::__from_child_node(node, &self.__invocation_states))
}
pub fn element_options(&self) -> Option<ElementOptionsContext<'a>> {
__rule_children(self.__node, 63)
.next()
.map(|node| ElementOptionsContext::__from_child_node(node, &self.__invocation_states))
}
}
impl<State> std::fmt::Display for AlternativeContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct ElementContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for ElementContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 46 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for ElementContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> ElementContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for ElementContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 46 { return None; }
let __default = __RuleAttrs46::default();
let __attrs = context.generated_attrs::<__RuleAttrs46>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> ElementContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs46::default();
let __attrs = node.generated_attrs::<__RuleAttrs46>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> ElementContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn action_block(&self) -> Option<ActionBlockContext<'a>> {
__rule_children(self.__node, 14)
.next()
.map(|node| ActionBlockContext::__from_child_node(node, &self.__invocation_states))
}
pub fn predicate_options(&self) -> Option<PredicateOptionsContext<'a>> {
__rule_children(self.__node, 47)
.next()
.map(|node| PredicateOptionsContext::__from_child_node(node, &self.__invocation_states))
}
pub fn labeled_element(&self) -> Option<LabeledElementContext<'a>> {
__rule_children(self.__node, 49)
.next()
.map(|node| LabeledElementContext::__from_child_node(node, &self.__invocation_states))
}
pub fn ebnf(&self) -> Option<EbnfContext<'a>> {
__rule_children(self.__node, 50)
.next()
.map(|node| EbnfContext::__from_child_node(node, &self.__invocation_states))
}
pub fn ebnf_suffix(&self) -> Option<EbnfSuffixContext<'a>> {
__rule_children(self.__node, 52)
.next()
.map(|node| EbnfSuffixContext::__from_child_node(node, &self.__invocation_states))
}
pub fn atom(&self) -> Option<AtomContext<'a>> {
__rule_children(self.__node, 54)
.next()
.map(|node| AtomContext::__from_child_node(node, &self.__invocation_states))
}
pub fn question_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 63)
.next()
.map(TerminalNode::new)
}
}
impl<State> std::fmt::Display for ElementContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct PredicateOptionsContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for PredicateOptionsContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 47 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for PredicateOptionsContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> PredicateOptionsContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for PredicateOptionsContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 47 { return None; }
let __default = __RuleAttrs47::default();
let __attrs = context.generated_attrs::<__RuleAttrs47>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> PredicateOptionsContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs47::default();
let __attrs = node.generated_attrs::<__RuleAttrs47>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> PredicateOptionsContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn predicate_option_children(&self) -> impl Iterator<Item = PredicateOptionContext<'a>> + '_ {
__rule_children(self.__node, 48)
.map(move |node| PredicateOptionContext::__from_child_node(node, &self.__invocation_states))
}
pub fn comma_tokens(&self) -> impl Iterator<Item = TerminalNode<'a>> + '_ {
__token_children(self.__node, 55).map(TerminalNode::new)
}
pub fn lt_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 61)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("PredicateOptionsContext", "LT"))
}
pub fn gt_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 62)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("PredicateOptionsContext", "GT"))
}
}
impl<State> std::fmt::Display for PredicateOptionsContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct PredicateOptionContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for PredicateOptionContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 48 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for PredicateOptionContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> PredicateOptionContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for PredicateOptionContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 48 { return None; }
let __default = __RuleAttrs48::default();
let __attrs = context.generated_attrs::<__RuleAttrs48>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> PredicateOptionContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs48::default();
let __attrs = node.generated_attrs::<__RuleAttrs48>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> PredicateOptionContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn action_block(&self) -> Option<ActionBlockContext<'a>> {
__rule_children(self.__node, 14)
.next()
.map(|node| ActionBlockContext::__from_child_node(node, &self.__invocation_states))
}
pub fn element_option(&self) -> Option<ElementOptionContext<'a>> {
__rule_children(self.__node, 64)
.next()
.map(|node| ElementOptionContext::__from_child_node(node, &self.__invocation_states))
}
pub fn identifier(&self) -> Option<IdentifierContext<'a>> {
__rule_children(self.__node, 65)
.next()
.map(|node| IdentifierContext::__from_child_node(node, &self.__invocation_states))
}
pub fn assign_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 7)
.next()
.map(TerminalNode::new)
}
pub fn string_literal_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 11)
.next()
.map(TerminalNode::new)
}
pub fn int_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 33)
.next()
.map(TerminalNode::new)
}
}
impl<State> std::fmt::Display for PredicateOptionContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct LabeledElementContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for LabeledElementContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 49 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for LabeledElementContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> LabeledElementContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for LabeledElementContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 49 { return None; }
let __default = __RuleAttrs49::default();
let __attrs = context.generated_attrs::<__RuleAttrs49>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> LabeledElementContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs49::default();
let __attrs = node.generated_attrs::<__RuleAttrs49>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> LabeledElementContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn atom(&self) -> Option<AtomContext<'a>> {
__rule_children(self.__node, 54)
.next()
.map(|node| AtomContext::__from_child_node(node, &self.__invocation_states))
}
pub fn block(&self) -> Option<BlockContext<'a>> {
__rule_children(self.__node, 59)
.next()
.map(|node| BlockContext::__from_child_node(node, &self.__invocation_states))
}
pub fn identifier(&self) -> Result<IdentifierContext<'a>, MissingChildError> {
__rule_children(self.__node, 65)
.next()
.map(|node| IdentifierContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("LabeledElementContext", "identifier"))
}
}
impl<State> std::fmt::Display for LabeledElementContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct EbnfContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for EbnfContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 50 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for EbnfContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> EbnfContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for EbnfContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 50 { return None; }
let __default = __RuleAttrs50::default();
let __attrs = context.generated_attrs::<__RuleAttrs50>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> EbnfContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs50::default();
let __attrs = node.generated_attrs::<__RuleAttrs50>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> EbnfContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn block_suffix(&self) -> Option<BlockSuffixContext<'a>> {
__rule_children(self.__node, 51)
.next()
.map(|node| BlockSuffixContext::__from_child_node(node, &self.__invocation_states))
}
pub fn block(&self) -> Result<BlockContext<'a>, MissingChildError> {
__rule_children(self.__node, 59)
.next()
.map(|node| BlockContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("EbnfContext", "block"))
}
}
impl<State> std::fmt::Display for EbnfContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct BlockSuffixContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for BlockSuffixContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 51 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for BlockSuffixContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> BlockSuffixContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for BlockSuffixContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 51 { return None; }
let __default = __RuleAttrs51::default();
let __attrs = context.generated_attrs::<__RuleAttrs51>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> BlockSuffixContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs51::default();
let __attrs = node.generated_attrs::<__RuleAttrs51>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> BlockSuffixContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn ebnf_suffix(&self) -> Result<EbnfSuffixContext<'a>, MissingChildError> {
__rule_children(self.__node, 52)
.next()
.map(|node| EbnfSuffixContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("BlockSuffixContext", "ebnfSuffix"))
}
}
impl<State> std::fmt::Display for BlockSuffixContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct EbnfSuffixContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for EbnfSuffixContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 52 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for EbnfSuffixContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> EbnfSuffixContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for EbnfSuffixContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 52 { return None; }
let __default = __RuleAttrs52::default();
let __attrs = context.generated_attrs::<__RuleAttrs52>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> EbnfSuffixContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs52::default();
let __attrs = node.generated_attrs::<__RuleAttrs52>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> EbnfSuffixContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn question_tokens(&self) -> impl Iterator<Item = TerminalNode<'a>> + '_ {
__token_children(self.__node, 63).map(TerminalNode::new)
}
pub fn star_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 64)
.next()
.map(TerminalNode::new)
}
pub fn plus_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 66)
.next()
.map(TerminalNode::new)
}
}
impl<State> std::fmt::Display for EbnfSuffixContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct LexerAtomContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for LexerAtomContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 53 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for LexerAtomContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> LexerAtomContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for LexerAtomContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 53 { return None; }
let __default = __RuleAttrs53::default();
let __attrs = context.generated_attrs::<__RuleAttrs53>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> LexerAtomContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs53::default();
let __attrs = node.generated_attrs::<__RuleAttrs53>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> LexerAtomContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn wildcard(&self) -> Option<WildcardContext<'a>> {
__rule_children(self.__node, 55)
.next()
.map(|node| WildcardContext::__from_child_node(node, &self.__invocation_states))
}
pub fn not_set(&self) -> Option<NotSetContext<'a>> {
__rule_children(self.__node, 56)
.next()
.map(|node| NotSetContext::__from_child_node(node, &self.__invocation_states))
}
pub fn character_range(&self) -> Option<CharacterRangeContext<'a>> {
__rule_children(self.__node, 61)
.next()
.map(|node| CharacterRangeContext::__from_child_node(node, &self.__invocation_states))
}
pub fn terminal_def(&self) -> Option<TerminalDefContext<'a>> {
__rule_children(self.__node, 62)
.next()
.map(|node| TerminalDefContext::__from_child_node(node, &self.__invocation_states))
}
pub fn lexer_char_set_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 8)
.next()
.map(TerminalNode::new)
}
pub fn rule_ref_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 9)
.next()
.map(TerminalNode::new)
}
}
impl<State> std::fmt::Display for LexerAtomContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct AtomContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for AtomContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 54 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for AtomContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> AtomContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for AtomContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 54 { return None; }
let __default = __RuleAttrs54::default();
let __attrs = context.generated_attrs::<__RuleAttrs54>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> AtomContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs54::default();
let __attrs = node.generated_attrs::<__RuleAttrs54>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> AtomContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn wildcard(&self) -> Option<WildcardContext<'a>> {
__rule_children(self.__node, 55)
.next()
.map(|node| WildcardContext::__from_child_node(node, &self.__invocation_states))
}
pub fn not_set(&self) -> Option<NotSetContext<'a>> {
__rule_children(self.__node, 56)
.next()
.map(|node| NotSetContext::__from_child_node(node, &self.__invocation_states))
}
pub fn ruleref(&self) -> Option<RulerefContext<'a>> {
__rule_children(self.__node, 60)
.next()
.map(|node| RulerefContext::__from_child_node(node, &self.__invocation_states))
}
pub fn terminal_def(&self) -> Option<TerminalDefContext<'a>> {
__rule_children(self.__node, 62)
.next()
.map(|node| TerminalDefContext::__from_child_node(node, &self.__invocation_states))
}
}
impl<State> std::fmt::Display for AtomContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct WildcardContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for WildcardContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 55 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for WildcardContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> WildcardContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for WildcardContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 55 { return None; }
let __default = __RuleAttrs55::default();
let __attrs = context.generated_attrs::<__RuleAttrs55>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> WildcardContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs55::default();
let __attrs = node.generated_attrs::<__RuleAttrs55>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> WildcardContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn element_options(&self) -> Option<ElementOptionsContext<'a>> {
__rule_children(self.__node, 63)
.next()
.map(|node| ElementOptionsContext::__from_child_node(node, &self.__invocation_states))
}
pub fn dot_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 70)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("WildcardContext", "DOT"))
}
}
impl<State> std::fmt::Display for WildcardContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct NotSetContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for NotSetContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 56 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for NotSetContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> NotSetContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for NotSetContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 56 { return None; }
let __default = __RuleAttrs56::default();
let __attrs = context.generated_attrs::<__RuleAttrs56>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> NotSetContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs56::default();
let __attrs = node.generated_attrs::<__RuleAttrs56>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> NotSetContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn block_set(&self) -> Option<BlockSetContext<'a>> {
__rule_children(self.__node, 57)
.next()
.map(|node| BlockSetContext::__from_child_node(node, &self.__invocation_states))
}
pub fn set_element(&self) -> Option<SetElementContext<'a>> {
__rule_children(self.__node, 58)
.next()
.map(|node| SetElementContext::__from_child_node(node, &self.__invocation_states))
}
pub fn not_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 73)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("NotSetContext", "NOT"))
}
}
impl<State> std::fmt::Display for NotSetContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct BlockSetContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for BlockSetContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 57 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for BlockSetContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> BlockSetContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for BlockSetContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 57 { return None; }
let __default = __RuleAttrs57::default();
let __attrs = context.generated_attrs::<__RuleAttrs57>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> BlockSetContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs57::default();
let __attrs = node.generated_attrs::<__RuleAttrs57>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> BlockSetContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn set_element_children(&self) -> impl Iterator<Item = SetElementContext<'a>> + '_ {
__rule_children(self.__node, 58)
.map(move |node| SetElementContext::__from_child_node(node, &self.__invocation_states))
}
pub fn lparen_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 57)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("BlockSetContext", "LPAREN"))
}
pub fn rparen_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 58)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("BlockSetContext", "RPAREN"))
}
pub fn or_tokens(&self) -> impl Iterator<Item = TerminalNode<'a>> + '_ {
__token_children(self.__node, 67).map(TerminalNode::new)
}
}
impl<State> std::fmt::Display for BlockSetContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct SetElementContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for SetElementContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 58 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for SetElementContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> SetElementContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for SetElementContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 58 { return None; }
let __default = __RuleAttrs58::default();
let __attrs = context.generated_attrs::<__RuleAttrs58>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> SetElementContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs58::default();
let __attrs = node.generated_attrs::<__RuleAttrs58>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> SetElementContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn character_range(&self) -> Option<CharacterRangeContext<'a>> {
__rule_children(self.__node, 61)
.next()
.map(|node| CharacterRangeContext::__from_child_node(node, &self.__invocation_states))
}
pub fn element_options(&self) -> Option<ElementOptionsContext<'a>> {
__rule_children(self.__node, 63)
.next()
.map(|node| ElementOptionsContext::__from_child_node(node, &self.__invocation_states))
}
pub fn lexer_char_set_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 8)
.next()
.map(TerminalNode::new)
}
pub fn string_literal_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 11)
.next()
.map(TerminalNode::new)
}
pub fn token_ref_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 12)
.next()
.map(TerminalNode::new)
}
}
impl<State> std::fmt::Display for SetElementContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct BlockContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for BlockContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 59 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for BlockContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> BlockContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for BlockContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 59 { return None; }
let __default = __RuleAttrs59::default();
let __attrs = context.generated_attrs::<__RuleAttrs59>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> BlockContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs59::default();
let __attrs = node.generated_attrs::<__RuleAttrs59>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> BlockContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn options_spec(&self) -> Option<OptionsSpecContext<'a>> {
__rule_children(self.__node, 4)
.next()
.map(|node| OptionsSpecContext::__from_child_node(node, &self.__invocation_states))
}
pub fn rule_action_children(&self) -> impl Iterator<Item = RuleActionContext<'a>> + '_ {
__rule_children(self.__node, 27)
.map(move |node| RuleActionContext::__from_child_node(node, &self.__invocation_states))
}
pub fn alt_list(&self) -> Result<AltListContext<'a>, MissingChildError> {
__rule_children(self.__node, 44)
.next()
.map(|node| AltListContext::__from_child_node(node, &self.__invocation_states))
.ok_or_else(|| MissingChildError::new("BlockContext", "altList"))
}
pub fn colon_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 53)
.next()
.map(TerminalNode::new)
}
pub fn lparen_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 57)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("BlockContext", "LPAREN"))
}
pub fn rparen_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 58)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("BlockContext", "RPAREN"))
}
}
impl<State> std::fmt::Display for BlockContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct RulerefContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for RulerefContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 60 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for RulerefContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> RulerefContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for RulerefContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 60 { return None; }
let __default = __RuleAttrs60::default();
let __attrs = context.generated_attrs::<__RuleAttrs60>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> RulerefContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs60::default();
let __attrs = node.generated_attrs::<__RuleAttrs60>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> RulerefContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn arg_action_block(&self) -> Option<ArgActionBlockContext<'a>> {
__rule_children(self.__node, 15)
.next()
.map(|node| ArgActionBlockContext::__from_child_node(node, &self.__invocation_states))
}
pub fn element_options(&self) -> Option<ElementOptionsContext<'a>> {
__rule_children(self.__node, 63)
.next()
.map(|node| ElementOptionsContext::__from_child_node(node, &self.__invocation_states))
}
pub fn rule_ref_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 9)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("RulerefContext", "RULE_REF"))
}
}
impl<State> std::fmt::Display for RulerefContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct CharacterRangeContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for CharacterRangeContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 61 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for CharacterRangeContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> CharacterRangeContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for CharacterRangeContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 61 { return None; }
let __default = __RuleAttrs61::default();
let __attrs = context.generated_attrs::<__RuleAttrs61>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> CharacterRangeContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs61::default();
let __attrs = node.generated_attrs::<__RuleAttrs61>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> CharacterRangeContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn string_literal_tokens(&self) -> impl Iterator<Item = TerminalNode<'a>> + '_ {
__token_children(self.__node, 11).map(TerminalNode::new)
}
pub fn range_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 69)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("CharacterRangeContext", "RANGE"))
}
}
impl<State> std::fmt::Display for CharacterRangeContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct TerminalDefContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for TerminalDefContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 62 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for TerminalDefContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> TerminalDefContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for TerminalDefContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 62 { return None; }
let __default = __RuleAttrs62::default();
let __attrs = context.generated_attrs::<__RuleAttrs62>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> TerminalDefContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs62::default();
let __attrs = node.generated_attrs::<__RuleAttrs62>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> TerminalDefContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn element_options(&self) -> Option<ElementOptionsContext<'a>> {
__rule_children(self.__node, 63)
.next()
.map(|node| ElementOptionsContext::__from_child_node(node, &self.__invocation_states))
}
pub fn string_literal_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 11)
.next()
.map(TerminalNode::new)
}
pub fn token_ref_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 12)
.next()
.map(TerminalNode::new)
}
}
impl<State> std::fmt::Display for TerminalDefContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct ElementOptionsContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for ElementOptionsContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 63 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for ElementOptionsContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> ElementOptionsContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for ElementOptionsContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 63 { return None; }
let __default = __RuleAttrs63::default();
let __attrs = context.generated_attrs::<__RuleAttrs63>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> ElementOptionsContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs63::default();
let __attrs = node.generated_attrs::<__RuleAttrs63>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> ElementOptionsContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn element_option_children(&self) -> impl Iterator<Item = ElementOptionContext<'a>> + '_ {
__rule_children(self.__node, 64)
.map(move |node| ElementOptionContext::__from_child_node(node, &self.__invocation_states))
}
pub fn comma_tokens(&self) -> impl Iterator<Item = TerminalNode<'a>> + '_ {
__token_children(self.__node, 55).map(TerminalNode::new)
}
pub fn lt_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 61)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("ElementOptionsContext", "LT"))
}
pub fn gt_token(&self) -> Result<TerminalNode<'a>, MissingChildError> {
__token_children(self.__node, 62)
.next()
.map(TerminalNode::new)
.ok_or_else(|| MissingChildError::new("ElementOptionsContext", "GT"))
}
}
impl<State> std::fmt::Display for ElementOptionsContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct ElementOptionContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for ElementOptionContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 64 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for ElementOptionContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> ElementOptionContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for ElementOptionContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 64 { return None; }
let __default = __RuleAttrs64::default();
let __attrs = context.generated_attrs::<__RuleAttrs64>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> ElementOptionContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs64::default();
let __attrs = node.generated_attrs::<__RuleAttrs64>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> ElementOptionContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn identifier(&self) -> Option<IdentifierContext<'a>> {
__rule_children(self.__node, 65)
.next()
.map(|node| IdentifierContext::__from_child_node(node, &self.__invocation_states))
}
pub fn qualified_identifier(&self) -> Option<QualifiedIdentifierContext<'a>> {
__rule_children(self.__node, 66)
.next()
.map(|node| QualifiedIdentifierContext::__from_child_node(node, &self.__invocation_states))
}
pub fn assign_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 7)
.next()
.map(TerminalNode::new)
}
pub fn string_literal_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 11)
.next()
.map(TerminalNode::new)
}
pub fn int_token(&self) -> Option<TerminalNode<'a>> {
__token_children(self.__node, 33)
.next()
.map(TerminalNode::new)
}
}
impl<State> std::fmt::Display for ElementOptionContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct IdentifierContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for IdentifierContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 65 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for IdentifierContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> IdentifierContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for IdentifierContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 65 { return None; }
let __default = __RuleAttrs65::default();
let __attrs = context.generated_attrs::<__RuleAttrs65>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> IdentifierContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs65::default();
let __attrs = node.generated_attrs::<__RuleAttrs65>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> IdentifierContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
}
impl<State> std::fmt::Display for IdentifierContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(non_camel_case_types, dead_code)]
#[derive(Clone)]
pub struct QualifiedIdentifierContext<'a, State = StoredTreeContext> {
__node: __GeneratedRuleContext<'a>,
__invocation_states: Vec<isize>,
__state: std::marker::PhantomData<State>,
}
impl<'a> FromRuleNode<'a> for QualifiedIdentifierContext<'a> {
fn from_rule_node(node: RuleNodeView<'a>) -> Option<Self> {
if node.rule_index() != 66 { return None; }
Some(Self::__from_node(node))
}
}
impl<'a> AsRuleNode<'a> for QualifiedIdentifierContext<'a> {
fn as_rule_node(&self) -> RuleNodeView<'a> { self.rule_node() }
}
impl<'a> QualifiedIdentifierContext<'a> {
pub fn rule_node(&self) -> RuleNodeView<'a> {
match self.__node {
__GeneratedRuleContext::Stored(node) => node,
__GeneratedRuleContext::Active { .. } => unreachable!("stored context type contains an active parser context"),
}
}
}
impl<'a> __FromActiveRuleContext<'a> for QualifiedIdentifierContext<'a, __ActiveParserContext> {
fn __from_active(
context: &'a antlr4_runtime::ParserRuleContext,
invocation_states: Vec<isize>,
storage: &'a antlr4_runtime::ParseTreeStorage,
tokens: &'a antlr4_runtime::TokenStore,
) -> Option<Self> {
if context.rule_index() != 66 { return None; }
let __default = __RuleAttrs66::default();
let __attrs = context.generated_attrs::<__RuleAttrs66>().unwrap_or(&__default);
Some(Self {
__node: __GeneratedRuleContext::Active { context, storage, tokens },
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
})
}
}
#[allow(dead_code, clippy::all)]
impl<'a> QualifiedIdentifierContext<'a> {
fn __from_node(node: RuleNodeView<'a>) -> Self {
let invocation_states = node.invocation_states().collect();
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_child_node(node: RuleNodeView<'a>, parent_invocation_states: &[isize]) -> Self {
let mut invocation_states = Vec::with_capacity(parent_invocation_states.len() + 1);
invocation_states.push(node.invoking_state());
invocation_states.extend_from_slice(parent_invocation_states);
Self::__from_node_with_invocation_states(node, invocation_states)
}
fn __from_listener_node(node: RuleNodeView<'a>, invocation_states: Option<&[isize]>) -> Self {
invocation_states.map_or_else(
|| Self::__from_node(node),
|states| Self::__from_node_with_invocation_states(node, states.to_vec()),
)
}
fn __from_node_with_invocation_states(node: RuleNodeView<'a>, invocation_states: Vec<isize>) -> Self {
let __default = __RuleAttrs66::default();
let __attrs = node.generated_attrs::<__RuleAttrs66>().unwrap_or(&__default);
Self {
__node: __GeneratedRuleContext::Stored(node),
__invocation_states: invocation_states,
__state: std::marker::PhantomData,
}
}
}
#[allow(dead_code, clippy::all)]
impl<'a, State> QualifiedIdentifierContext<'a, State> {
pub fn child_count(&self) -> usize {
match &self.__node {
__GeneratedRuleContext::Stored(node) => node.child_count(),
__GeneratedRuleContext::Active { context, .. } => context.child_count(),
}
}
pub fn start(&self) -> __GeneratedTokenView {
let token = match &self.__node {
__GeneratedRuleContext::Stored(node) => node.start(),
__GeneratedRuleContext::Active { context, tokens, .. } => context.start(tokens),
};
__GeneratedTokenView { text: token.map(|token| token.text_or_empty().to_owned()).unwrap_or_default() }
}
pub fn identifier_children(&self) -> impl Iterator<Item = IdentifierContext<'a>> + '_ {
__rule_children(self.__node, 65)
.map(move |node| IdentifierContext::__from_child_node(node, &self.__invocation_states))
}
pub fn dot_tokens(&self) -> impl Iterator<Item = TerminalNode<'a>> + '_ {
__token_children(self.__node, 70).map(TerminalNode::new)
}
}
impl<State> std::fmt::Display for QualifiedIdentifierContext<'_, State> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let chain: Vec<String> = self.__invocation_states.iter().map(|state| state.to_string()).collect();
write!(f, "[{}]", chain.join(" "))
}
}
#[allow(dead_code, unused_variables)]
pub trait ANTLRv4Listener<E = std::convert::Infallible> {
fn walk(&mut self, tree: antlr4_runtime::Node<'_>) -> Result<(), E>
where
Self: Sized,
{
ANTLRv4TreeWalker::walk(self, tree)
}
fn enter_every_rule(&mut self, _ctx: RuleNodeView<'_>) -> Result<(), E> { Ok(()) }
fn exit_every_rule(&mut self, _ctx: RuleNodeView<'_>) -> Result<(), E> { Ok(()) }
fn enter_grammar_spec(&mut self, _ctx: &GrammarSpecContext) -> Result<(), E> { Ok(()) }
fn exit_grammar_spec(&mut self, _ctx: &GrammarSpecContext) -> Result<(), E> { Ok(()) }
fn enter_grammar_decl(&mut self, _ctx: &GrammarDeclContext) -> Result<(), E> { Ok(()) }
fn exit_grammar_decl(&mut self, _ctx: &GrammarDeclContext) -> Result<(), E> { Ok(()) }
fn enter_grammar_type(&mut self, _ctx: &GrammarTypeContext) -> Result<(), E> { Ok(()) }
fn exit_grammar_type(&mut self, _ctx: &GrammarTypeContext) -> Result<(), E> { Ok(()) }
fn enter_prequel_construct(&mut self, _ctx: &PrequelConstructContext) -> Result<(), E> { Ok(()) }
fn exit_prequel_construct(&mut self, _ctx: &PrequelConstructContext) -> Result<(), E> { Ok(()) }
fn enter_options_spec(&mut self, _ctx: &OptionsSpecContext) -> Result<(), E> { Ok(()) }
fn exit_options_spec(&mut self, _ctx: &OptionsSpecContext) -> Result<(), E> { Ok(()) }
fn enter_option(&mut self, _ctx: &OptionContext) -> Result<(), E> { Ok(()) }
fn exit_option(&mut self, _ctx: &OptionContext) -> Result<(), E> { Ok(()) }
fn enter_option_value(&mut self, _ctx: &OptionValueContext) -> Result<(), E> { Ok(()) }
fn exit_option_value(&mut self, _ctx: &OptionValueContext) -> Result<(), E> { Ok(()) }
fn enter_delegate_grammars(&mut self, _ctx: &DelegateGrammarsContext) -> Result<(), E> { Ok(()) }
fn exit_delegate_grammars(&mut self, _ctx: &DelegateGrammarsContext) -> Result<(), E> { Ok(()) }
fn enter_delegate_grammar(&mut self, _ctx: &DelegateGrammarContext) -> Result<(), E> { Ok(()) }
fn exit_delegate_grammar(&mut self, _ctx: &DelegateGrammarContext) -> Result<(), E> { Ok(()) }
fn enter_tokens_spec(&mut self, _ctx: &TokensSpecContext) -> Result<(), E> { Ok(()) }
fn exit_tokens_spec(&mut self, _ctx: &TokensSpecContext) -> Result<(), E> { Ok(()) }
fn enter_channels_spec(&mut self, _ctx: &ChannelsSpecContext) -> Result<(), E> { Ok(()) }
fn exit_channels_spec(&mut self, _ctx: &ChannelsSpecContext) -> Result<(), E> { Ok(()) }
fn enter_id_list(&mut self, _ctx: &IdListContext) -> Result<(), E> { Ok(()) }
fn exit_id_list(&mut self, _ctx: &IdListContext) -> Result<(), E> { Ok(()) }
fn enter_action(&mut self, _ctx: &ActionContext) -> Result<(), E> { Ok(()) }
fn exit_action(&mut self, _ctx: &ActionContext) -> Result<(), E> { Ok(()) }
fn enter_action_scope_name(&mut self, _ctx: &ActionScopeNameContext) -> Result<(), E> { Ok(()) }
fn exit_action_scope_name(&mut self, _ctx: &ActionScopeNameContext) -> Result<(), E> { Ok(()) }
fn enter_action_block(&mut self, _ctx: &ActionBlockContext) -> Result<(), E> { Ok(()) }
fn exit_action_block(&mut self, _ctx: &ActionBlockContext) -> Result<(), E> { Ok(()) }
fn enter_arg_action_block(&mut self, _ctx: &ArgActionBlockContext) -> Result<(), E> { Ok(()) }
fn exit_arg_action_block(&mut self, _ctx: &ArgActionBlockContext) -> Result<(), E> { Ok(()) }
fn enter_mode_spec(&mut self, _ctx: &ModeSpecContext) -> Result<(), E> { Ok(()) }
fn exit_mode_spec(&mut self, _ctx: &ModeSpecContext) -> Result<(), E> { Ok(()) }
fn enter_rules(&mut self, _ctx: &RulesContext) -> Result<(), E> { Ok(()) }
fn exit_rules(&mut self, _ctx: &RulesContext) -> Result<(), E> { Ok(()) }
fn enter_rule_spec(&mut self, _ctx: &RuleSpecContext) -> Result<(), E> { Ok(()) }
fn exit_rule_spec(&mut self, _ctx: &RuleSpecContext) -> Result<(), E> { Ok(()) }
fn enter_parser_rule_spec(&mut self, _ctx: &ParserRuleSpecContext) -> Result<(), E> { Ok(()) }
fn exit_parser_rule_spec(&mut self, _ctx: &ParserRuleSpecContext) -> Result<(), E> { Ok(()) }
fn enter_exception_group(&mut self, _ctx: &ExceptionGroupContext) -> Result<(), E> { Ok(()) }
fn exit_exception_group(&mut self, _ctx: &ExceptionGroupContext) -> Result<(), E> { Ok(()) }
fn enter_exception_handler(&mut self, _ctx: &ExceptionHandlerContext) -> Result<(), E> { Ok(()) }
fn exit_exception_handler(&mut self, _ctx: &ExceptionHandlerContext) -> Result<(), E> { Ok(()) }
fn enter_finally_clause(&mut self, _ctx: &FinallyClauseContext) -> Result<(), E> { Ok(()) }
fn exit_finally_clause(&mut self, _ctx: &FinallyClauseContext) -> Result<(), E> { Ok(()) }
fn enter_rule_prequel(&mut self, _ctx: &RulePrequelContext) -> Result<(), E> { Ok(()) }
fn exit_rule_prequel(&mut self, _ctx: &RulePrequelContext) -> Result<(), E> { Ok(()) }
fn enter_rule_returns(&mut self, _ctx: &RuleReturnsContext) -> Result<(), E> { Ok(()) }
fn exit_rule_returns(&mut self, _ctx: &RuleReturnsContext) -> Result<(), E> { Ok(()) }
fn enter_throws_spec(&mut self, _ctx: &ThrowsSpecContext) -> Result<(), E> { Ok(()) }
fn exit_throws_spec(&mut self, _ctx: &ThrowsSpecContext) -> Result<(), E> { Ok(()) }
fn enter_locals_spec(&mut self, _ctx: &LocalsSpecContext) -> Result<(), E> { Ok(()) }
fn exit_locals_spec(&mut self, _ctx: &LocalsSpecContext) -> Result<(), E> { Ok(()) }
fn enter_rule_action(&mut self, _ctx: &RuleActionContext) -> Result<(), E> { Ok(()) }
fn exit_rule_action(&mut self, _ctx: &RuleActionContext) -> Result<(), E> { Ok(()) }
fn enter_rule_modifiers(&mut self, _ctx: &RuleModifiersContext) -> Result<(), E> { Ok(()) }
fn exit_rule_modifiers(&mut self, _ctx: &RuleModifiersContext) -> Result<(), E> { Ok(()) }
fn enter_rule_modifier(&mut self, _ctx: &RuleModifierContext) -> Result<(), E> { Ok(()) }
fn exit_rule_modifier(&mut self, _ctx: &RuleModifierContext) -> Result<(), E> { Ok(()) }
fn enter_rule_block(&mut self, _ctx: &RuleBlockContext) -> Result<(), E> { Ok(()) }
fn exit_rule_block(&mut self, _ctx: &RuleBlockContext) -> Result<(), E> { Ok(()) }
fn enter_rule_alt_list(&mut self, _ctx: &RuleAltListContext) -> Result<(), E> { Ok(()) }
fn exit_rule_alt_list(&mut self, _ctx: &RuleAltListContext) -> Result<(), E> { Ok(()) }
fn enter_labeled_alt(&mut self, _ctx: &LabeledAltContext) -> Result<(), E> { Ok(()) }
fn exit_labeled_alt(&mut self, _ctx: &LabeledAltContext) -> Result<(), E> { Ok(()) }
fn enter_lexer_rule_spec(&mut self, _ctx: &LexerRuleSpecContext) -> Result<(), E> { Ok(()) }
fn exit_lexer_rule_spec(&mut self, _ctx: &LexerRuleSpecContext) -> Result<(), E> { Ok(()) }
fn enter_lexer_rule_block(&mut self, _ctx: &LexerRuleBlockContext) -> Result<(), E> { Ok(()) }
fn exit_lexer_rule_block(&mut self, _ctx: &LexerRuleBlockContext) -> Result<(), E> { Ok(()) }
fn enter_lexer_alt_list(&mut self, _ctx: &LexerAltListContext) -> Result<(), E> { Ok(()) }
fn exit_lexer_alt_list(&mut self, _ctx: &LexerAltListContext) -> Result<(), E> { Ok(()) }
fn enter_lexer_alt(&mut self, _ctx: &LexerAltContext) -> Result<(), E> { Ok(()) }
fn exit_lexer_alt(&mut self, _ctx: &LexerAltContext) -> Result<(), E> { Ok(()) }
fn enter_lexer_elements(&mut self, _ctx: &LexerElementsContext) -> Result<(), E> { Ok(()) }
fn exit_lexer_elements(&mut self, _ctx: &LexerElementsContext) -> Result<(), E> { Ok(()) }
fn enter_lexer_element(&mut self, _ctx: &LexerElementContext) -> Result<(), E> { Ok(()) }
fn exit_lexer_element(&mut self, _ctx: &LexerElementContext) -> Result<(), E> { Ok(()) }
fn enter_lexer_block(&mut self, _ctx: &LexerBlockContext) -> Result<(), E> { Ok(()) }
fn exit_lexer_block(&mut self, _ctx: &LexerBlockContext) -> Result<(), E> { Ok(()) }
fn enter_lexer_commands(&mut self, _ctx: &LexerCommandsContext) -> Result<(), E> { Ok(()) }
fn exit_lexer_commands(&mut self, _ctx: &LexerCommandsContext) -> Result<(), E> { Ok(()) }
fn enter_lexer_command(&mut self, _ctx: &LexerCommandContext) -> Result<(), E> { Ok(()) }
fn exit_lexer_command(&mut self, _ctx: &LexerCommandContext) -> Result<(), E> { Ok(()) }
fn enter_lexer_command_name(&mut self, _ctx: &LexerCommandNameContext) -> Result<(), E> { Ok(()) }
fn exit_lexer_command_name(&mut self, _ctx: &LexerCommandNameContext) -> Result<(), E> { Ok(()) }
fn enter_lexer_command_expr(&mut self, _ctx: &LexerCommandExprContext) -> Result<(), E> { Ok(()) }
fn exit_lexer_command_expr(&mut self, _ctx: &LexerCommandExprContext) -> Result<(), E> { Ok(()) }
fn enter_alt_list(&mut self, _ctx: &AltListContext) -> Result<(), E> { Ok(()) }
fn exit_alt_list(&mut self, _ctx: &AltListContext) -> Result<(), E> { Ok(()) }
fn enter_alternative(&mut self, _ctx: &AlternativeContext) -> Result<(), E> { Ok(()) }
fn exit_alternative(&mut self, _ctx: &AlternativeContext) -> Result<(), E> { Ok(()) }
fn enter_element(&mut self, _ctx: &ElementContext) -> Result<(), E> { Ok(()) }
fn exit_element(&mut self, _ctx: &ElementContext) -> Result<(), E> { Ok(()) }
fn enter_predicate_options(&mut self, _ctx: &PredicateOptionsContext) -> Result<(), E> { Ok(()) }
fn exit_predicate_options(&mut self, _ctx: &PredicateOptionsContext) -> Result<(), E> { Ok(()) }
fn enter_predicate_option(&mut self, _ctx: &PredicateOptionContext) -> Result<(), E> { Ok(()) }
fn exit_predicate_option(&mut self, _ctx: &PredicateOptionContext) -> Result<(), E> { Ok(()) }
fn enter_labeled_element(&mut self, _ctx: &LabeledElementContext) -> Result<(), E> { Ok(()) }
fn exit_labeled_element(&mut self, _ctx: &LabeledElementContext) -> Result<(), E> { Ok(()) }
fn enter_ebnf(&mut self, _ctx: &EbnfContext) -> Result<(), E> { Ok(()) }
fn exit_ebnf(&mut self, _ctx: &EbnfContext) -> Result<(), E> { Ok(()) }
fn enter_block_suffix(&mut self, _ctx: &BlockSuffixContext) -> Result<(), E> { Ok(()) }
fn exit_block_suffix(&mut self, _ctx: &BlockSuffixContext) -> Result<(), E> { Ok(()) }
fn enter_ebnf_suffix(&mut self, _ctx: &EbnfSuffixContext) -> Result<(), E> { Ok(()) }
fn exit_ebnf_suffix(&mut self, _ctx: &EbnfSuffixContext) -> Result<(), E> { Ok(()) }
fn enter_lexer_atom(&mut self, _ctx: &LexerAtomContext) -> Result<(), E> { Ok(()) }
fn exit_lexer_atom(&mut self, _ctx: &LexerAtomContext) -> Result<(), E> { Ok(()) }
fn enter_atom(&mut self, _ctx: &AtomContext) -> Result<(), E> { Ok(()) }
fn exit_atom(&mut self, _ctx: &AtomContext) -> Result<(), E> { Ok(()) }
fn enter_wildcard(&mut self, _ctx: &WildcardContext) -> Result<(), E> { Ok(()) }
fn exit_wildcard(&mut self, _ctx: &WildcardContext) -> Result<(), E> { Ok(()) }
fn enter_not_set(&mut self, _ctx: &NotSetContext) -> Result<(), E> { Ok(()) }
fn exit_not_set(&mut self, _ctx: &NotSetContext) -> Result<(), E> { Ok(()) }
fn enter_block_set(&mut self, _ctx: &BlockSetContext) -> Result<(), E> { Ok(()) }
fn exit_block_set(&mut self, _ctx: &BlockSetContext) -> Result<(), E> { Ok(()) }
fn enter_set_element(&mut self, _ctx: &SetElementContext) -> Result<(), E> { Ok(()) }
fn exit_set_element(&mut self, _ctx: &SetElementContext) -> Result<(), E> { Ok(()) }
fn enter_block(&mut self, _ctx: &BlockContext) -> Result<(), E> { Ok(()) }
fn exit_block(&mut self, _ctx: &BlockContext) -> Result<(), E> { Ok(()) }
fn enter_ruleref(&mut self, _ctx: &RulerefContext) -> Result<(), E> { Ok(()) }
fn exit_ruleref(&mut self, _ctx: &RulerefContext) -> Result<(), E> { Ok(()) }
fn enter_character_range(&mut self, _ctx: &CharacterRangeContext) -> Result<(), E> { Ok(()) }
fn exit_character_range(&mut self, _ctx: &CharacterRangeContext) -> Result<(), E> { Ok(()) }
fn enter_terminal_def(&mut self, _ctx: &TerminalDefContext) -> Result<(), E> { Ok(()) }
fn exit_terminal_def(&mut self, _ctx: &TerminalDefContext) -> Result<(), E> { Ok(()) }
fn enter_element_options(&mut self, _ctx: &ElementOptionsContext) -> Result<(), E> { Ok(()) }
fn exit_element_options(&mut self, _ctx: &ElementOptionsContext) -> Result<(), E> { Ok(()) }
fn enter_element_option(&mut self, _ctx: &ElementOptionContext) -> Result<(), E> { Ok(()) }
fn exit_element_option(&mut self, _ctx: &ElementOptionContext) -> Result<(), E> { Ok(()) }
fn enter_identifier(&mut self, _ctx: &IdentifierContext) -> Result<(), E> { Ok(()) }
fn exit_identifier(&mut self, _ctx: &IdentifierContext) -> Result<(), E> { Ok(()) }
fn enter_qualified_identifier(&mut self, _ctx: &QualifiedIdentifierContext) -> Result<(), E> { Ok(()) }
fn exit_qualified_identifier(&mut self, _ctx: &QualifiedIdentifierContext) -> Result<(), E> { Ok(()) }
fn visit_terminal(&mut self, _node: &TerminalNode) -> Result<(), E> { Ok(()) }
fn visit_error_node(&mut self, _node: &ErrorNode) -> Result<(), E> { Ok(()) }
fn output(&mut self) -> std::io::Stdout { std::io::stdout() }
}
#[allow(dead_code)]
pub struct ANTLRv4TreeWalker;
#[allow(dead_code)]
impl ANTLRv4TreeWalker {
pub fn walk<E, T: ANTLRv4Listener<E>>(
listener: &mut T,
tree: antlr4_runtime::Node<'_>,
) -> Result<(), E> {
Self::__walk(listener, tree, None)
}
pub fn walk_with_invocation_states<E, T: ANTLRv4Listener<E>>(
listener: &mut T,
tree: antlr4_runtime::Node<'_>,
parent_invocation_states: Vec<isize>,
) -> Result<(), E> {
Self::__walk(listener, tree, Some(parent_invocation_states))
}
fn __walk<E, T: ANTLRv4Listener<E>>(
listener: &mut T,
tree: antlr4_runtime::Node<'_>,
mut invocation_states: Option<Vec<isize>>,
) -> Result<(), E> {
enum Event<'tree> {
Enter(antlr4_runtime::Node<'tree>),
Exit(RuleNodeView<'tree>),
}
let mut stack = vec![Event::Enter(tree)];
while let Some(event) = stack.pop() {
match event {
Event::Enter(node) => match node.kind() {
antlr4_runtime::NodeKind::Rule => {
let context = node.as_rule().expect("rule node kind checked");
if let Some(states) = &mut invocation_states {
states.insert(0, context.invoking_state());
}
listener.enter_every_rule(context)?;
match __context_kind(context) {
0 => listener.enter_grammar_spec(&GrammarSpecContext::__from_listener_node(context, invocation_states.as_deref()))?,
1 => listener.enter_grammar_decl(&GrammarDeclContext::__from_listener_node(context, invocation_states.as_deref()))?,
2 => listener.enter_grammar_type(&GrammarTypeContext::__from_listener_node(context, invocation_states.as_deref()))?,
3 => listener.enter_prequel_construct(&PrequelConstructContext::__from_listener_node(context, invocation_states.as_deref()))?,
4 => listener.enter_options_spec(&OptionsSpecContext::__from_listener_node(context, invocation_states.as_deref()))?,
5 => listener.enter_option(&OptionContext::__from_listener_node(context, invocation_states.as_deref()))?,
6 => listener.enter_option_value(&OptionValueContext::__from_listener_node(context, invocation_states.as_deref()))?,
7 => listener.enter_delegate_grammars(&DelegateGrammarsContext::__from_listener_node(context, invocation_states.as_deref()))?,
8 => listener.enter_delegate_grammar(&DelegateGrammarContext::__from_listener_node(context, invocation_states.as_deref()))?,
9 => listener.enter_tokens_spec(&TokensSpecContext::__from_listener_node(context, invocation_states.as_deref()))?,
10 => listener.enter_channels_spec(&ChannelsSpecContext::__from_listener_node(context, invocation_states.as_deref()))?,
11 => listener.enter_id_list(&IdListContext::__from_listener_node(context, invocation_states.as_deref()))?,
12 => listener.enter_action(&ActionContext::__from_listener_node(context, invocation_states.as_deref()))?,
13 => listener.enter_action_scope_name(&ActionScopeNameContext::__from_listener_node(context, invocation_states.as_deref()))?,
14 => listener.enter_action_block(&ActionBlockContext::__from_listener_node(context, invocation_states.as_deref()))?,
15 => listener.enter_arg_action_block(&ArgActionBlockContext::__from_listener_node(context, invocation_states.as_deref()))?,
16 => listener.enter_mode_spec(&ModeSpecContext::__from_listener_node(context, invocation_states.as_deref()))?,
17 => listener.enter_rules(&RulesContext::__from_listener_node(context, invocation_states.as_deref()))?,
18 => listener.enter_rule_spec(&RuleSpecContext::__from_listener_node(context, invocation_states.as_deref()))?,
19 => listener.enter_parser_rule_spec(&ParserRuleSpecContext::__from_listener_node(context, invocation_states.as_deref()))?,
20 => listener.enter_exception_group(&ExceptionGroupContext::__from_listener_node(context, invocation_states.as_deref()))?,
21 => listener.enter_exception_handler(&ExceptionHandlerContext::__from_listener_node(context, invocation_states.as_deref()))?,
22 => listener.enter_finally_clause(&FinallyClauseContext::__from_listener_node(context, invocation_states.as_deref()))?,
23 => listener.enter_rule_prequel(&RulePrequelContext::__from_listener_node(context, invocation_states.as_deref()))?,
24 => listener.enter_rule_returns(&RuleReturnsContext::__from_listener_node(context, invocation_states.as_deref()))?,
25 => listener.enter_throws_spec(&ThrowsSpecContext::__from_listener_node(context, invocation_states.as_deref()))?,
26 => listener.enter_locals_spec(&LocalsSpecContext::__from_listener_node(context, invocation_states.as_deref()))?,
27 => listener.enter_rule_action(&RuleActionContext::__from_listener_node(context, invocation_states.as_deref()))?,
28 => listener.enter_rule_modifiers(&RuleModifiersContext::__from_listener_node(context, invocation_states.as_deref()))?,
29 => listener.enter_rule_modifier(&RuleModifierContext::__from_listener_node(context, invocation_states.as_deref()))?,
30 => listener.enter_rule_block(&RuleBlockContext::__from_listener_node(context, invocation_states.as_deref()))?,
31 => listener.enter_rule_alt_list(&RuleAltListContext::__from_listener_node(context, invocation_states.as_deref()))?,
32 => listener.enter_labeled_alt(&LabeledAltContext::__from_listener_node(context, invocation_states.as_deref()))?,
33 => listener.enter_lexer_rule_spec(&LexerRuleSpecContext::__from_listener_node(context, invocation_states.as_deref()))?,
34 => listener.enter_lexer_rule_block(&LexerRuleBlockContext::__from_listener_node(context, invocation_states.as_deref()))?,
35 => listener.enter_lexer_alt_list(&LexerAltListContext::__from_listener_node(context, invocation_states.as_deref()))?,
36 => listener.enter_lexer_alt(&LexerAltContext::__from_listener_node(context, invocation_states.as_deref()))?,
37 => listener.enter_lexer_elements(&LexerElementsContext::__from_listener_node(context, invocation_states.as_deref()))?,
38 => listener.enter_lexer_element(&LexerElementContext::__from_listener_node(context, invocation_states.as_deref()))?,
39 => listener.enter_lexer_block(&LexerBlockContext::__from_listener_node(context, invocation_states.as_deref()))?,
40 => listener.enter_lexer_commands(&LexerCommandsContext::__from_listener_node(context, invocation_states.as_deref()))?,
41 => listener.enter_lexer_command(&LexerCommandContext::__from_listener_node(context, invocation_states.as_deref()))?,
42 => listener.enter_lexer_command_name(&LexerCommandNameContext::__from_listener_node(context, invocation_states.as_deref()))?,
43 => listener.enter_lexer_command_expr(&LexerCommandExprContext::__from_listener_node(context, invocation_states.as_deref()))?,
44 => listener.enter_alt_list(&AltListContext::__from_listener_node(context, invocation_states.as_deref()))?,
45 => listener.enter_alternative(&AlternativeContext::__from_listener_node(context, invocation_states.as_deref()))?,
46 => listener.enter_element(&ElementContext::__from_listener_node(context, invocation_states.as_deref()))?,
47 => listener.enter_predicate_options(&PredicateOptionsContext::__from_listener_node(context, invocation_states.as_deref()))?,
48 => listener.enter_predicate_option(&PredicateOptionContext::__from_listener_node(context, invocation_states.as_deref()))?,
49 => listener.enter_labeled_element(&LabeledElementContext::__from_listener_node(context, invocation_states.as_deref()))?,
50 => listener.enter_ebnf(&EbnfContext::__from_listener_node(context, invocation_states.as_deref()))?,
51 => listener.enter_block_suffix(&BlockSuffixContext::__from_listener_node(context, invocation_states.as_deref()))?,
52 => listener.enter_ebnf_suffix(&EbnfSuffixContext::__from_listener_node(context, invocation_states.as_deref()))?,
53 => listener.enter_lexer_atom(&LexerAtomContext::__from_listener_node(context, invocation_states.as_deref()))?,
54 => listener.enter_atom(&AtomContext::__from_listener_node(context, invocation_states.as_deref()))?,
55 => listener.enter_wildcard(&WildcardContext::__from_listener_node(context, invocation_states.as_deref()))?,
56 => listener.enter_not_set(&NotSetContext::__from_listener_node(context, invocation_states.as_deref()))?,
57 => listener.enter_block_set(&BlockSetContext::__from_listener_node(context, invocation_states.as_deref()))?,
58 => listener.enter_set_element(&SetElementContext::__from_listener_node(context, invocation_states.as_deref()))?,
59 => listener.enter_block(&BlockContext::__from_listener_node(context, invocation_states.as_deref()))?,
60 => listener.enter_ruleref(&RulerefContext::__from_listener_node(context, invocation_states.as_deref()))?,
61 => listener.enter_character_range(&CharacterRangeContext::__from_listener_node(context, invocation_states.as_deref()))?,
62 => listener.enter_terminal_def(&TerminalDefContext::__from_listener_node(context, invocation_states.as_deref()))?,
63 => listener.enter_element_options(&ElementOptionsContext::__from_listener_node(context, invocation_states.as_deref()))?,
64 => listener.enter_element_option(&ElementOptionContext::__from_listener_node(context, invocation_states.as_deref()))?,
65 => listener.enter_identifier(&IdentifierContext::__from_listener_node(context, invocation_states.as_deref()))?,
66 => listener.enter_qualified_identifier(&QualifiedIdentifierContext::__from_listener_node(context, invocation_states.as_deref()))?,
_ => {}
}
stack.push(Event::Exit(context));
stack.extend(context.children().rev().map(Event::Enter));
}
antlr4_runtime::NodeKind::Terminal => {
listener.visit_terminal(&TerminalNode::new(
node.as_terminal().expect("terminal node kind checked"),
))?;
}
antlr4_runtime::NodeKind::Error => {
listener.visit_error_node(&ErrorNode::new(
node.as_error().expect("error node kind checked"),
))?;
}
},
Event::Exit(context) => {
match __context_kind(context) {
0 => listener.exit_grammar_spec(&GrammarSpecContext::__from_listener_node(context, invocation_states.as_deref()))?,
1 => listener.exit_grammar_decl(&GrammarDeclContext::__from_listener_node(context, invocation_states.as_deref()))?,
2 => listener.exit_grammar_type(&GrammarTypeContext::__from_listener_node(context, invocation_states.as_deref()))?,
3 => listener.exit_prequel_construct(&PrequelConstructContext::__from_listener_node(context, invocation_states.as_deref()))?,
4 => listener.exit_options_spec(&OptionsSpecContext::__from_listener_node(context, invocation_states.as_deref()))?,
5 => listener.exit_option(&OptionContext::__from_listener_node(context, invocation_states.as_deref()))?,
6 => listener.exit_option_value(&OptionValueContext::__from_listener_node(context, invocation_states.as_deref()))?,
7 => listener.exit_delegate_grammars(&DelegateGrammarsContext::__from_listener_node(context, invocation_states.as_deref()))?,
8 => listener.exit_delegate_grammar(&DelegateGrammarContext::__from_listener_node(context, invocation_states.as_deref()))?,
9 => listener.exit_tokens_spec(&TokensSpecContext::__from_listener_node(context, invocation_states.as_deref()))?,
10 => listener.exit_channels_spec(&ChannelsSpecContext::__from_listener_node(context, invocation_states.as_deref()))?,
11 => listener.exit_id_list(&IdListContext::__from_listener_node(context, invocation_states.as_deref()))?,
12 => listener.exit_action(&ActionContext::__from_listener_node(context, invocation_states.as_deref()))?,
13 => listener.exit_action_scope_name(&ActionScopeNameContext::__from_listener_node(context, invocation_states.as_deref()))?,
14 => listener.exit_action_block(&ActionBlockContext::__from_listener_node(context, invocation_states.as_deref()))?,
15 => listener.exit_arg_action_block(&ArgActionBlockContext::__from_listener_node(context, invocation_states.as_deref()))?,
16 => listener.exit_mode_spec(&ModeSpecContext::__from_listener_node(context, invocation_states.as_deref()))?,
17 => listener.exit_rules(&RulesContext::__from_listener_node(context, invocation_states.as_deref()))?,
18 => listener.exit_rule_spec(&RuleSpecContext::__from_listener_node(context, invocation_states.as_deref()))?,
19 => listener.exit_parser_rule_spec(&ParserRuleSpecContext::__from_listener_node(context, invocation_states.as_deref()))?,
20 => listener.exit_exception_group(&ExceptionGroupContext::__from_listener_node(context, invocation_states.as_deref()))?,
21 => listener.exit_exception_handler(&ExceptionHandlerContext::__from_listener_node(context, invocation_states.as_deref()))?,
22 => listener.exit_finally_clause(&FinallyClauseContext::__from_listener_node(context, invocation_states.as_deref()))?,
23 => listener.exit_rule_prequel(&RulePrequelContext::__from_listener_node(context, invocation_states.as_deref()))?,
24 => listener.exit_rule_returns(&RuleReturnsContext::__from_listener_node(context, invocation_states.as_deref()))?,
25 => listener.exit_throws_spec(&ThrowsSpecContext::__from_listener_node(context, invocation_states.as_deref()))?,
26 => listener.exit_locals_spec(&LocalsSpecContext::__from_listener_node(context, invocation_states.as_deref()))?,
27 => listener.exit_rule_action(&RuleActionContext::__from_listener_node(context, invocation_states.as_deref()))?,
28 => listener.exit_rule_modifiers(&RuleModifiersContext::__from_listener_node(context, invocation_states.as_deref()))?,
29 => listener.exit_rule_modifier(&RuleModifierContext::__from_listener_node(context, invocation_states.as_deref()))?,
30 => listener.exit_rule_block(&RuleBlockContext::__from_listener_node(context, invocation_states.as_deref()))?,
31 => listener.exit_rule_alt_list(&RuleAltListContext::__from_listener_node(context, invocation_states.as_deref()))?,
32 => listener.exit_labeled_alt(&LabeledAltContext::__from_listener_node(context, invocation_states.as_deref()))?,
33 => listener.exit_lexer_rule_spec(&LexerRuleSpecContext::__from_listener_node(context, invocation_states.as_deref()))?,
34 => listener.exit_lexer_rule_block(&LexerRuleBlockContext::__from_listener_node(context, invocation_states.as_deref()))?,
35 => listener.exit_lexer_alt_list(&LexerAltListContext::__from_listener_node(context, invocation_states.as_deref()))?,
36 => listener.exit_lexer_alt(&LexerAltContext::__from_listener_node(context, invocation_states.as_deref()))?,
37 => listener.exit_lexer_elements(&LexerElementsContext::__from_listener_node(context, invocation_states.as_deref()))?,
38 => listener.exit_lexer_element(&LexerElementContext::__from_listener_node(context, invocation_states.as_deref()))?,
39 => listener.exit_lexer_block(&LexerBlockContext::__from_listener_node(context, invocation_states.as_deref()))?,
40 => listener.exit_lexer_commands(&LexerCommandsContext::__from_listener_node(context, invocation_states.as_deref()))?,
41 => listener.exit_lexer_command(&LexerCommandContext::__from_listener_node(context, invocation_states.as_deref()))?,
42 => listener.exit_lexer_command_name(&LexerCommandNameContext::__from_listener_node(context, invocation_states.as_deref()))?,
43 => listener.exit_lexer_command_expr(&LexerCommandExprContext::__from_listener_node(context, invocation_states.as_deref()))?,
44 => listener.exit_alt_list(&AltListContext::__from_listener_node(context, invocation_states.as_deref()))?,
45 => listener.exit_alternative(&AlternativeContext::__from_listener_node(context, invocation_states.as_deref()))?,
46 => listener.exit_element(&ElementContext::__from_listener_node(context, invocation_states.as_deref()))?,
47 => listener.exit_predicate_options(&PredicateOptionsContext::__from_listener_node(context, invocation_states.as_deref()))?,
48 => listener.exit_predicate_option(&PredicateOptionContext::__from_listener_node(context, invocation_states.as_deref()))?,
49 => listener.exit_labeled_element(&LabeledElementContext::__from_listener_node(context, invocation_states.as_deref()))?,
50 => listener.exit_ebnf(&EbnfContext::__from_listener_node(context, invocation_states.as_deref()))?,
51 => listener.exit_block_suffix(&BlockSuffixContext::__from_listener_node(context, invocation_states.as_deref()))?,
52 => listener.exit_ebnf_suffix(&EbnfSuffixContext::__from_listener_node(context, invocation_states.as_deref()))?,
53 => listener.exit_lexer_atom(&LexerAtomContext::__from_listener_node(context, invocation_states.as_deref()))?,
54 => listener.exit_atom(&AtomContext::__from_listener_node(context, invocation_states.as_deref()))?,
55 => listener.exit_wildcard(&WildcardContext::__from_listener_node(context, invocation_states.as_deref()))?,
56 => listener.exit_not_set(&NotSetContext::__from_listener_node(context, invocation_states.as_deref()))?,
57 => listener.exit_block_set(&BlockSetContext::__from_listener_node(context, invocation_states.as_deref()))?,
58 => listener.exit_set_element(&SetElementContext::__from_listener_node(context, invocation_states.as_deref()))?,
59 => listener.exit_block(&BlockContext::__from_listener_node(context, invocation_states.as_deref()))?,
60 => listener.exit_ruleref(&RulerefContext::__from_listener_node(context, invocation_states.as_deref()))?,
61 => listener.exit_character_range(&CharacterRangeContext::__from_listener_node(context, invocation_states.as_deref()))?,
62 => listener.exit_terminal_def(&TerminalDefContext::__from_listener_node(context, invocation_states.as_deref()))?,
63 => listener.exit_element_options(&ElementOptionsContext::__from_listener_node(context, invocation_states.as_deref()))?,
64 => listener.exit_element_option(&ElementOptionContext::__from_listener_node(context, invocation_states.as_deref()))?,
65 => listener.exit_identifier(&IdentifierContext::__from_listener_node(context, invocation_states.as_deref()))?,
66 => listener.exit_qualified_identifier(&QualifiedIdentifierContext::__from_listener_node(context, invocation_states.as_deref()))?,
_ => {}
}
listener.exit_every_rule(context)?;
if let Some(states) = &mut invocation_states {
states.remove(0);
}
}
}
}
Ok(())
}
}
pub type ParseTreeWalker = ANTLRv4TreeWalker;
static PARSER_ATN_DATA: &[u32] = &[1346458702, 2, 16909060, 29, 78, 650, 823, 3, 6, 85, 67, 29, 4550, 4579, 4115, 8694, 15, 8709, 12, 8733, 85, 8818, 67, 8885, 67, 8952, 6, 8721, 12, 2, 0, 8, 0, 1, 4294967295, 4294967295, 7, 0, 16, 1, 0, 4294967295, 4294967295, 2, 1, 8, 1, 1, 4294967295, 4294967295, 7, 1, 24, 2, 1, 4294967295, 4294967295, 2, 2, 8, 3, 1, 4294967295, 4294967295, 7, 2, 24, 4, 1, 4294967295, 4294967295, 2, 3, 8, 5, 1, 4294967295, 4294967295, 7, 3, 24, 6, 1, 4294967295, 4294967295, 2, 4, 8, 7, 1, 4294967295, 4294967295, 7, 4, 24, 8, 4, 4294967295, 4294967295, 2, 5, 8, 12, 1, 4294967295, 4294967295, 7, 5, 24, 13, 1, 4294967295, 4294967295, 2, 6, 8, 14, 1, 4294967295, 4294967295, 7, 6, 24, 15, 1, 4294967295, 4294967295, 2, 7, 8, 16, 1, 4294967295, 4294967295, 7, 7, 24, 17, 1, 4294967295, 4294967295, 2, 8, 8, 18, 1, 4294967295, 4294967295, 7, 8, 24, 19, 2, 4294967295, 4294967295, 2, 9, 8, 21, 1, 4294967295, 4294967295, 7, 9, 24, 22, 1, 4294967295, 4294967295, 2, 10, 8, 23, 1, 4294967295, 4294967295, 7, 10, 24, 24, 1, 4294967295, 4294967295, 2, 11, 8, 25, 1, 4294967295, 4294967295, 7, 11, 24, 26, 2, 4294967295, 4294967295, 2, 12, 8, 28, 1, 4294967295, 4294967295, 7, 12, 24, 29, 1, 4294967295, 4294967295, 2, 13, 8, 30, 1, 4294967295, 4294967295, 7, 13, 24, 31, 1, 4294967295, 4294967295, 2, 14, 8, 32, 1, 4294967295, 4294967295, 7, 14, 24, 33, 8, 4294967295, 4294967295, 2, 15, 8, 41, 1, 4294967295, 4294967295, 7, 15, 24, 42, 5, 4294967295, 4294967295, 2, 16, 8, 47, 1, 4294967295, 4294967295, 7, 16, 24, 48, 1, 4294967295, 4294967295, 2, 17, 8, 49, 1, 4294967295, 4294967295, 7, 17, 24, 50, 1, 4294967295, 4294967295, 2, 18, 8, 51, 1, 4294967295, 4294967295, 7, 18, 24, 52, 1, 4294967295, 4294967295, 2, 19, 8, 53, 1, 4294967295, 4294967295, 7, 19, 24, 54, 1, 4294967295, 4294967295, 2, 20, 8, 55, 1, 4294967295, 4294967295, 7, 20, 24, 56, 1, 4294967295, 4294967295, 2, 21, 8, 57, 1, 4294967295, 4294967295, 7, 21, 24, 58, 1, 4294967295, 4294967295, 2, 22, 8, 59, 1, 4294967295, 4294967295, 7, 22, 24, 60, 1, 4294967295, 4294967295, 2, 23, 8, 61, 1, 4294967295, 4294967295, 7, 23, 24, 62, 1, 4294967295, 4294967295, 2, 24, 8, 63, 1, 4294967295, 4294967295, 7, 24, 24, 64, 1, 4294967295, 4294967295, 2, 25, 8, 65, 1, 4294967295, 4294967295, 7, 25, 24, 66, 1, 4294967295, 4294967295, 2, 26, 8, 67, 1, 4294967295, 4294967295, 7, 26, 24, 68, 1, 4294967295, 4294967295, 2, 27, 8, 69, 1, 4294967295, 4294967295, 7, 27, 24, 70, 2, 4294967295, 4294967295, 2, 28, 8, 72, 1, 4294967295, 4294967295, 7, 28, 24, 73, 1, 4294967295, 4294967295, 2, 29, 8, 74, 1, 4294967295, 4294967295, 7, 29, 24, 75, 1, 4294967295, 4294967295, 2, 30, 8, 76, 1, 4294967295, 4294967295, 7, 30, 24, 77, 1, 4294967295, 4294967295, 2, 31, 8, 78, 1, 4294967295, 4294967295, 7, 31, 24, 79, 1, 4294967295, 4294967295, 2, 32, 8, 80, 1, 4294967295, 4294967295, 7, 32, 24, 81, 2, 4294967295, 4294967295, 2, 33, 8, 83, 1, 4294967295, 4294967295, 7, 33, 24, 84, 2, 4294967295, 4294967295, 2, 34, 8, 86, 1, 4294967295, 4294967295, 7, 34, 24, 87, 1, 4294967295, 4294967295, 2, 35, 8, 88, 1, 4294967295, 4294967295, 7, 35, 24, 89, 2, 4294967295, 4294967295, 2, 36, 8, 91, 1, 4294967295, 4294967295, 7, 36, 24, 92, 2, 4294967295, 4294967295, 2, 37, 8, 94, 1, 4294967295, 4294967295, 7, 37, 24, 95, 1, 4294967295, 4294967295, 2, 38, 8, 96, 1, 4294967295, 4294967295, 7, 38, 24, 97, 1, 4294967295, 4294967295, 2, 39, 8, 98, 1, 4294967295, 4294967295, 7, 39, 24, 99, 1, 4294967295, 4294967295, 2, 40, 8, 100, 1, 4294967295, 4294967295, 7, 40, 24, 101, 1, 4294967295, 4294967295, 2, 41, 8, 102, 1, 4294967295, 4294967295, 7, 41, 24, 103, 2, 4294967295, 4294967295, 2, 42, 8, 105, 1, 4294967295, 4294967295, 7, 42, 24, 106, 2, 4294967295, 4294967295, 2, 43, 8, 108, 1, 4294967295, 4294967295, 7, 43, 24, 109, 1, 4294967295, 4294967295, 2, 44, 8, 110, 1, 4294967295, 4294967295, 7, 44, 24, 111, 1, 4294967295, 4294967295, 2, 45, 8, 112, 1, 4294967295, 4294967295, 7, 45, 24, 113, 3, 4294967295, 4294967295, 2, 46, 8, 116, 1, 4294967295, 4294967295, 7, 46, 24, 117, 1, 4294967295, 4294967295, 2, 47, 8, 118, 1, 4294967295, 4294967295, 7, 47, 24, 119, 1, 4294967295, 4294967295, 2, 48, 8, 120, 1, 4294967295, 4294967295, 7, 48, 24, 121, 2, 4294967295, 4294967295, 2, 49, 8, 123, 1, 4294967295, 4294967295, 7, 49, 24, 124, 1, 4294967295, 4294967295, 2, 50, 8, 125, 1, 4294967295, 4294967295, 7, 50, 24, 126, 1, 4294967295, 4294967295, 2, 51, 8, 127, 1, 4294967295, 4294967295, 7, 51, 24, 128, 1, 4294967295, 4294967295, 2, 52, 8, 129, 1, 4294967295, 4294967295, 7, 52, 24, 130, 5, 4294967295, 4294967295, 2, 53, 8, 135, 1, 4294967295, 4294967295, 7, 53, 24, 136, 1, 4294967295, 4294967295, 2, 54, 8, 137, 1, 4294967295, 4294967295, 7, 54, 24, 138, 2, 4294967295, 4294967295, 2, 55, 8, 140, 1, 4294967295, 4294967295, 7, 55, 24, 141, 2, 4294967295, 4294967295, 2, 56, 8, 143, 1, 4294967295, 4294967295, 7, 56, 24, 144, 2, 4294967295, 4294967295, 2, 57, 8, 146, 1, 4294967295, 4294967295, 7, 57, 24, 147, 1, 4294967295, 4294967295, 2, 58, 8, 148, 1, 4294967295, 4294967295, 7, 58, 24, 149, 3, 4294967295, 4294967295, 2, 59, 8, 152, 1, 4294967295, 4294967295, 7, 59, 24, 153, 2, 4294967295, 4294967295, 2, 60, 8, 155, 1, 4294967295, 4294967295, 7, 60, 24, 156, 1, 4294967295, 4294967295, 2, 61, 8, 157, 1, 4294967295, 4294967295, 7, 61, 24, 158, 2, 4294967295, 4294967295, 2, 62, 8, 160, 1, 4294967295, 4294967295, 7, 62, 24, 161, 2, 4294967295, 4294967295, 2, 63, 8, 163, 1, 4294967295, 4294967295, 7, 63, 24, 164, 7, 4294967295, 4294967295, 2, 64, 8, 171, 1, 4294967295, 4294967295, 7, 64, 24, 172, 3, 4294967295, 4294967295, 2, 65, 8, 175, 1, 4294967295, 4294967295, 7, 65, 24, 176, 21, 4294967295, 4294967295, 2, 66, 8, 197, 1, 4294967295, 4294967295, 7, 66, 24, 198, 4, 4294967295, 4294967295, 1, 0, 8, 202, 1, 4294967295, 4294967295, 1, 0, 8, 203, 1, 4294967295, 4294967295, 5, 0, 8, 204, 1, 137, 4294967295, 8, 0, 8, 205, 1, 4294967295, 4294967295, 10, 0, 8, 206, 2, 4294967295, 4294967295, 12, 0, 8, 208, 1, 4294967295, 140, 9, 0, 8, 209, 1, 4294967295, 4294967295, 1, 0, 8, 210, 1, 4294967295, 4294967295, 1, 0, 8, 211, 1, 4294967295, 4294967295, 5, 0, 8, 212, 1, 144, 4294967295, 8, 0, 8, 213, 1, 4294967295, 4294967295, 10, 0, 8, 214, 2, 4294967295, 4294967295, 12, 0, 8, 216, 1, 4294967295, 147, 9, 0, 8, 217, 1, 4294967295, 4294967295, 1, 0, 32, 218, 1, 4294967295, 4294967295, 1, 0, 8, 219, 1, 4294967295, 4294967295, 1, 1, 8, 220, 1, 4294967295, 4294967295, 1, 1, 8, 221, 1, 4294967295, 4294967295, 1, 1, 32, 222, 1, 4294967295, 4294967295, 1, 1, 8, 223, 1, 4294967295, 4294967295, 1, 2, 32, 224, 1, 4294967295, 4294967295, 1, 2, 32, 225, 1, 4294967295, 4294967295, 1, 2, 32, 226, 1, 4294967295, 4294967295, 1, 2, 32, 227, 1, 4294967295, 4294967295, 1, 2, 32, 228, 1, 4294967295, 4294967295, 3, 2, 8, 229, 3, 160, 4294967295, 8, 2, 8, 232, 1, 4294967295, 4294967295, 1, 3, 8, 233, 1, 4294967295, 4294967295, 1, 3, 8, 234, 1, 4294967295, 4294967295, 1, 3, 8, 235, 1, 4294967295, 4294967295, 1, 3, 8, 236, 1, 4294967295, 4294967295, 1, 3, 8, 237, 1, 4294967295, 4294967295, 3, 3, 8, 238, 5, 167, 4294967295, 8, 3, 8, 243, 1, 4294967295, 4294967295, 1, 4, 32, 244, 1, 4294967295, 4294967295, 1, 4, 8, 245, 1, 4294967295, 4294967295, 1, 4, 32, 246, 1, 4294967295, 4294967295, 1, 4, 8, 247, 1, 4294967295, 4294967295, 5, 4, 8, 248, 1, 173, 4294967295, 8, 4, 8, 249, 1, 4294967295, 4294967295, 10, 4, 8, 250, 2, 4294967295, 4294967295, 12, 4, 8, 252, 1, 4294967295, 176, 9, 4, 8, 253, 1, 4294967295, 4294967295, 1, 4, 32, 254, 1, 4294967295, 4294967295, 1, 4, 8, 255, 1, 4294967295, 4294967295, 1, 5, 8, 256, 1, 4294967295, 4294967295, 1, 5, 32, 257, 1, 4294967295, 4294967295, 1, 5, 8, 258, 1, 4294967295, 4294967295, 1, 5, 8, 259, 1, 4294967295, 4294967295, 1, 6, 8, 260, 1, 4294967295, 4294967295, 1, 6, 32, 261, 1, 4294967295, 4294967295, 1, 6, 8, 262, 1, 4294967295, 4294967295, 5, 6, 8, 263, 1, 187, 4294967295, 8, 6, 8, 264, 1, 4294967295, 4294967295, 10, 6, 8, 265, 2, 4294967295, 4294967295, 12, 6, 8, 267, 1, 4294967295, 190, 9, 6, 8, 268, 1, 4294967295, 4294967295, 1, 6, 32, 269, 1, 4294967295, 4294967295, 1, 6, 8, 270, 1, 4294967295, 4294967295, 1, 6, 32, 271, 1, 4294967295, 4294967295, 3, 6, 8, 272, 4, 195, 4294967295, 8, 6, 8, 276, 1, 4294967295, 4294967295, 1, 7, 32, 277, 1, 4294967295, 4294967295, 1, 7, 8, 278, 1, 4294967295, 4294967295, 1, 7, 32, 279, 1, 4294967295, 4294967295, 1, 7, 8, 280, 1, 4294967295, 4294967295, 5, 7, 8, 281, 1, 201, 4294967295, 8, 7, 8, 282, 1, 4294967295, 4294967295, 10, 7, 8, 283, 2, 4294967295, 4294967295, 12, 7, 8, 285, 1, 4294967295, 204, 9, 7, 8, 286, 1, 4294967295, 4294967295, 1, 7, 32, 287, 1, 4294967295, 4294967295, 1, 7, 8, 288, 1, 4294967295, 4294967295, 1, 8, 8, 289, 1, 4294967295, 4294967295, 1, 8, 32, 290, 1, 4294967295, 4294967295, 1, 8, 8, 291, 1, 4294967295, 4294967295, 1, 8, 8, 292, 1, 4294967295, 4294967295, 1, 8, 8, 293, 1, 4294967295, 4294967295, 3, 8, 8, 294, 2, 213, 4294967295, 8, 8, 8, 296, 1, 4294967295, 4294967295, 1, 9, 32, 297, 1, 4294967295, 4294967295, 1, 9, 8, 298, 1, 4294967295, 4294967295, 3, 9, 8, 299, 2, 217, 4294967295, 8, 9, 8, 301, 1, 4294967295, 4294967295, 1, 9, 32, 302, 1, 4294967295, 4294967295, 1, 9, 8, 303, 1, 4294967295, 4294967295, 1, 10, 32, 304, 1, 4294967295, 4294967295, 1, 10, 8, 305, 1, 4294967295, 4294967295, 3, 10, 8, 306, 2, 223, 4294967295, 8, 10, 8, 308, 1, 4294967295, 4294967295, 1, 10, 32, 309, 1, 4294967295, 4294967295, 1, 10, 8, 310, 1, 4294967295, 4294967295, 1, 11, 8, 311, 1, 4294967295, 4294967295, 1, 11, 32, 312, 1, 4294967295, 4294967295, 1, 11, 8, 313, 1, 4294967295, 4294967295, 5, 11, 8, 314, 1, 230, 4294967295, 8, 11, 8, 315, 1, 4294967295, 4294967295, 10, 11, 8, 316, 2, 4294967295, 4294967295, 12, 11, 8, 318, 1, 4294967295, 233, 9, 11, 8, 319, 1, 4294967295, 4294967295, 1, 11, 32, 320, 1, 4294967295, 4294967295, 3, 11, 8, 321, 2, 236, 4294967295, 8, 11, 8, 323, 1, 4294967295, 4294967295, 1, 12, 32, 324, 1, 4294967295, 4294967295, 1, 12, 8, 325, 1, 4294967295, 4294967295, 1, 12, 32, 326, 1, 4294967295, 4294967295, 1, 12, 8, 327, 1, 4294967295, 4294967295, 3, 12, 8, 328, 2, 242, 4294967295, 8, 12, 8, 330, 1, 4294967295, 4294967295, 1, 12, 8, 331, 1, 4294967295, 4294967295, 1, 12, 8, 332, 1, 4294967295, 4294967295, 1, 12, 8, 333, 1, 4294967295, 4294967295, 1, 13, 8, 334, 1, 4294967295, 4294967295, 1, 13, 32, 335, 1, 4294967295, 4294967295, 1, 13, 32, 336, 1, 4294967295, 4294967295, 3, 13, 8, 337, 3, 250, 4294967295, 8, 13, 8, 340, 1, 4294967295, 4294967295, 1, 14, 32, 341, 1, 4294967295, 4294967295, 1, 14, 8, 342, 1, 4294967295, 4294967295, 1, 15, 32, 343, 1, 4294967295, 4294967295, 1, 15, 32, 344, 1, 4294967295, 4294967295, 5, 15, 8, 345, 1, 256, 4294967295, 8, 15, 8, 346, 1, 4294967295, 4294967295, 10, 15, 9, 347, 2, 4294967295, 4294967295, 12, 15, 8, 349, 1, 4294967295, 259, 9, 15, 8, 350, 1, 4294967295, 4294967295, 1, 15, 32, 351, 1, 4294967295, 4294967295, 1, 15, 8, 352, 1, 4294967295, 4294967295, 1, 16, 32, 353, 1, 4294967295, 4294967295, 1, 16, 8, 354, 1, 4294967295, 4294967295, 1, 16, 32, 355, 1, 4294967295, 4294967295, 1, 16, 8, 356, 1, 4294967295, 4294967295, 5, 16, 8, 357, 1, 267, 4294967295, 8, 16, 8, 358, 1, 4294967295, 4294967295, 10, 16, 8, 359, 2, 4294967295, 4294967295, 12, 16, 8, 361, 1, 4294967295, 270, 9, 16, 8, 362, 1, 4294967295, 4294967295, 1, 17, 8, 363, 1, 4294967295, 4294967295, 5, 17, 8, 364, 1, 273, 4294967295, 8, 17, 8, 365, 1, 4294967295, 4294967295, 10, 17, 8, 366, 2, 4294967295, 4294967295, 12, 17, 8, 368, 1, 4294967295, 276, 9, 17, 8, 369, 1, 4294967295, 4294967295, 1, 18, 8, 370, 1, 4294967295, 4294967295, 1, 18, 8, 371, 1, 4294967295, 4294967295, 3, 18, 8, 372, 2, 280, 4294967295, 8, 18, 8, 374, 1, 4294967295, 4294967295, 1, 19, 8, 375, 1, 4294967295, 4294967295, 3, 19, 8, 376, 2, 283, 4294967295, 8, 19, 8, 378, 1, 4294967295, 4294967295, 1, 19, 32, 379, 1, 4294967295, 4294967295, 1, 19, 8, 380, 1, 4294967295, 4294967295, 3, 19, 8, 381, 2, 287, 4294967295, 8, 19, 8, 383, 1, 4294967295, 4294967295, 1, 19, 8, 384, 1, 4294967295, 4294967295, 3, 19, 8, 385, 2, 290, 4294967295, 8, 19, 8, 387, 1, 4294967295, 4294967295, 1, 19, 8, 388, 1, 4294967295, 4294967295, 3, 19, 8, 389, 2, 293, 4294967295, 8, 19, 8, 391, 1, 4294967295, 4294967295, 1, 19, 8, 392, 1, 4294967295, 4294967295, 3, 19, 8, 393, 2, 296, 4294967295, 8, 19, 8, 395, 1, 4294967295, 4294967295, 1, 19, 8, 396, 1, 4294967295, 4294967295, 5, 19, 8, 397, 1, 299, 4294967295, 8, 19, 8, 398, 1, 4294967295, 4294967295, 10, 19, 8, 399, 2, 4294967295, 4294967295, 12, 19, 8, 401, 1, 4294967295, 302, 9, 19, 8, 402, 1, 4294967295, 4294967295, 1, 19, 32, 403, 1, 4294967295, 4294967295, 1, 19, 8, 404, 1, 4294967295, 4294967295, 1, 19, 32, 405, 1, 4294967295, 4294967295, 1, 19, 8, 406, 1, 4294967295, 4294967295, 1, 19, 8, 407, 1, 4294967295, 4294967295, 1, 20, 8, 408, 1, 4294967295, 4294967295, 5, 20, 8, 409, 1, 310, 4294967295, 8, 20, 8, 410, 1, 4294967295, 4294967295, 10, 20, 8, 411, 2, 4294967295, 4294967295, 12, 20, 8, 413, 1, 4294967295, 313, 9, 20, 8, 414, 1, 4294967295, 4294967295, 1, 20, 8, 415, 1, 4294967295, 4294967295, 3, 20, 8, 416, 2, 316, 4294967295, 8, 20, 8, 418, 1, 4294967295, 4294967295, 1, 21, 32, 419, 1, 4294967295, 4294967295, 1, 21, 8, 420, 1, 4294967295, 4294967295, 1, 21, 8, 421, 1, 4294967295, 4294967295, 1, 21, 8, 422, 1, 4294967295, 4294967295, 1, 22, 32, 423, 1, 4294967295, 4294967295, 1, 22, 8, 424, 1, 4294967295, 4294967295, 1, 22, 8, 425, 1, 4294967295, 4294967295, 1, 23, 8, 426, 1, 4294967295, 4294967295, 1, 23, 8, 427, 1, 4294967295, 4294967295, 3, 23, 8, 428, 2, 327, 4294967295, 8, 23, 8, 430, 1, 4294967295, 4294967295, 1, 24, 32, 431, 1, 4294967295, 4294967295, 1, 24, 8, 432, 1, 4294967295, 4294967295, 1, 24, 8, 433, 1, 4294967295, 4294967295, 1, 25, 32, 434, 1, 4294967295, 4294967295, 1, 25, 8, 435, 1, 4294967295, 4294967295, 1, 25, 32, 436, 1, 4294967295, 4294967295, 1, 25, 8, 437, 1, 4294967295, 4294967295, 5, 25, 8, 438, 1, 336, 4294967295, 8, 25, 8, 439, 1, 4294967295, 4294967295, 10, 25, 8, 440, 2, 4294967295, 4294967295, 12, 25, 8, 442, 1, 4294967295, 339, 9, 25, 8, 443, 1, 4294967295, 4294967295, 1, 26, 32, 444, 1, 4294967295, 4294967295, 1, 26, 8, 445, 1, 4294967295, 4294967295, 1, 26, 8, 446, 1, 4294967295, 4294967295, 1, 27, 32, 447, 1, 4294967295, 4294967295, 1, 27, 8, 448, 1, 4294967295, 4294967295, 1, 27, 8, 449, 1, 4294967295, 4294967295, 1, 27, 8, 450, 1, 4294967295, 4294967295, 1, 28, 8, 451, 1, 4294967295, 4294967295, 4, 28, 8, 452, 1, 349, 4294967295, 8, 28, 8, 453, 1, 4294967295, 4294967295, 11, 28, 8, 454, 2, 4294967295, 4294967295, 12, 28, 8, 456, 1, 4294967295, 350, 1, 29, 32, 457, 1, 4294967295, 4294967295, 1, 29, 8, 458, 1, 4294967295, 4294967295, 1, 30, 8, 459, 1, 4294967295, 4294967295, 1, 30, 8, 460, 1, 4294967295, 4294967295, 1, 31, 8, 461, 1, 4294967295, 4294967295, 1, 31, 32, 462, 1, 4294967295, 4294967295, 1, 31, 8, 463, 1, 4294967295, 4294967295, 5, 31, 8, 464, 1, 360, 4294967295, 8, 31, 8, 465, 1, 4294967295, 4294967295, 10, 31, 8, 466, 2, 4294967295, 4294967295, 12, 31, 8, 468, 1, 4294967295, 363, 9, 31, 8, 469, 1, 4294967295, 4294967295, 1, 32, 8, 470, 1, 4294967295, 4294967295, 1, 32, 32, 471, 1, 4294967295, 4294967295, 1, 32, 8, 472, 1, 4294967295, 4294967295, 3, 32, 8, 473, 2, 368, 4294967295, 8, 32, 8, 475, 1, 4294967295, 4294967295, 1, 33, 32, 476, 1, 4294967295, 4294967295, 3, 33, 8, 477, 2, 371, 4294967295, 8, 33, 8, 479, 1, 4294967295, 4294967295, 1, 33, 32, 480, 1, 4294967295, 4294967295, 1, 33, 8, 481, 1, 4294967295, 4294967295, 3, 33, 8, 482, 2, 375, 4294967295, 8, 33, 8, 484, 1, 4294967295, 4294967295, 1, 33, 32, 485, 1, 4294967295, 4294967295, 1, 33, 8, 486, 1, 4294967295, 4294967295, 1, 33, 32, 487, 1, 4294967295, 4294967295, 1, 33, 8, 488, 1, 4294967295, 4294967295, 1, 34, 8, 489, 1, 4294967295, 4294967295, 1, 34, 8, 490, 1, 4294967295, 4294967295, 1, 35, 8, 491, 1, 4294967295, 4294967295, 1, 35, 32, 492, 1, 4294967295, 4294967295, 1, 35, 8, 493, 1, 4294967295, 4294967295, 5, 35, 8, 494, 1, 386, 4294967295, 8, 35, 8, 495, 1, 4294967295, 4294967295, 10, 35, 8, 496, 2, 4294967295, 4294967295, 12, 35, 8, 498, 1, 4294967295, 389, 9, 35, 8, 499, 1, 4294967295, 4294967295, 1, 36, 8, 500, 1, 4294967295, 4294967295, 1, 36, 8, 501, 1, 4294967295, 4294967295, 3, 36, 8, 502, 2, 393, 4294967295, 8, 36, 8, 504, 1, 4294967295, 4294967295, 1, 36, 8, 505, 1, 4294967295, 4294967295, 3, 36, 8, 506, 2, 396, 4294967295, 8, 36, 8, 508, 1, 4294967295, 4294967295, 1, 37, 8, 509, 1, 4294967295, 4294967295, 4, 37, 8, 510, 1, 399, 4294967295, 8, 37, 8, 511, 1, 4294967295, 4294967295, 11, 37, 8, 512, 2, 4294967295, 4294967295, 12, 37, 8, 514, 1, 4294967295, 400, 1, 37, 8, 515, 1, 4294967295, 4294967295, 3, 37, 8, 516, 2, 404, 4294967295, 8, 37, 8, 518, 1, 4294967295, 4294967295, 1, 38, 8, 519, 1, 4294967295, 4294967295, 1, 38, 8, 520, 1, 4294967295, 4294967295, 3, 38, 8, 521, 2, 408, 4294967295, 8, 38, 8, 523, 1, 4294967295, 4294967295, 1, 38, 8, 524, 1, 4294967295, 4294967295, 1, 38, 8, 525, 1, 4294967295, 4294967295, 3, 38, 8, 526, 2, 412, 4294967295, 8, 38, 8, 528, 1, 4294967295, 4294967295, 1, 38, 8, 529, 1, 4294967295, 4294967295, 1, 38, 32, 530, 1, 4294967295, 4294967295, 3, 38, 8, 531, 2, 416, 4294967295, 8, 38, 8, 533, 1, 4294967295, 4294967295, 3, 38, 8, 534, 3, 418, 4294967295, 8, 38, 8, 537, 1, 4294967295, 4294967295, 1, 39, 32, 538, 1, 4294967295, 4294967295, 1, 39, 8, 539, 1, 4294967295, 4294967295, 1, 39, 32, 540, 1, 4294967295, 4294967295, 1, 39, 8, 541, 1, 4294967295, 4294967295, 1, 40, 32, 542, 1, 4294967295, 4294967295, 1, 40, 8, 543, 1, 4294967295, 4294967295, 1, 40, 32, 544, 1, 4294967295, 4294967295, 1, 40, 8, 545, 1, 4294967295, 4294967295, 5, 40, 8, 546, 1, 428, 4294967295, 8, 40, 8, 547, 1, 4294967295, 4294967295, 10, 40, 8, 548, 2, 4294967295, 4294967295, 12, 40, 8, 550, 1, 4294967295, 431, 9, 40, 8, 551, 1, 4294967295, 4294967295, 1, 41, 8, 552, 1, 4294967295, 4294967295, 1, 41, 32, 553, 1, 4294967295, 4294967295, 1, 41, 8, 554, 1, 4294967295, 4294967295, 1, 41, 32, 555, 1, 4294967295, 4294967295, 1, 41, 8, 556, 1, 4294967295, 4294967295, 1, 41, 8, 557, 1, 4294967295, 4294967295, 3, 41, 8, 558, 2, 439, 4294967295, 8, 41, 8, 560, 1, 4294967295, 4294967295, 1, 42, 8, 561, 1, 4294967295, 4294967295, 1, 42, 32, 562, 1, 4294967295, 4294967295, 3, 42, 8, 563, 2, 443, 4294967295, 8, 42, 8, 565, 1, 4294967295, 4294967295, 1, 43, 8, 566, 1, 4294967295, 4294967295, 1, 43, 32, 567, 1, 4294967295, 4294967295, 3, 43, 8, 568, 2, 447, 4294967295, 8, 43, 8, 570, 1, 4294967295, 4294967295, 1, 44, 8, 571, 1, 4294967295, 4294967295, 1, 44, 32, 572, 1, 4294967295, 4294967295, 1, 44, 8, 573, 1, 4294967295, 4294967295, 5, 44, 8, 574, 1, 452, 4294967295, 8, 44, 8, 575, 1, 4294967295, 4294967295, 10, 44, 8, 576, 2, 4294967295, 4294967295, 12, 44, 8, 578, 1, 4294967295, 455, 9, 44, 8, 579, 1, 4294967295, 4294967295, 1, 45, 8, 580, 1, 4294967295, 4294967295, 3, 45, 8, 581, 2, 458, 4294967295, 8, 45, 8, 583, 1, 4294967295, 4294967295, 1, 45, 8, 584, 1, 4294967295, 4294967295, 4, 45, 8, 585, 1, 461, 4294967295, 8, 45, 8, 586, 1, 4294967295, 4294967295, 11, 45, 8, 587, 2, 4294967295, 4294967295, 12, 45, 8, 589, 1, 4294967295, 462, 1, 45, 8, 590, 1, 4294967295, 4294967295, 3, 45, 8, 591, 2, 466, 4294967295, 8, 45, 8, 593, 1, 4294967295, 4294967295, 1, 46, 8, 594, 1, 4294967295, 4294967295, 1, 46, 8, 595, 1, 4294967295, 4294967295, 1, 46, 8, 596, 1, 4294967295, 4294967295, 3, 46, 8, 597, 2, 471, 4294967295, 8, 46, 8, 599, 1, 4294967295, 4294967295, 1, 46, 8, 600, 1, 4294967295, 4294967295, 1, 46, 8, 601, 1, 4294967295, 4294967295, 1, 46, 8, 602, 1, 4294967295, 4294967295, 3, 46, 8, 603, 2, 476, 4294967295, 8, 46, 8, 605, 1, 4294967295, 4294967295, 1, 46, 8, 606, 1, 4294967295, 4294967295, 1, 46, 8, 607, 1, 4294967295, 4294967295, 1, 46, 32, 608, 1, 4294967295, 4294967295, 3, 46, 8, 609, 2, 481, 4294967295, 8, 46, 8, 611, 1, 4294967295, 4294967295, 1, 46, 8, 612, 1, 4294967295, 4294967295, 3, 46, 8, 613, 2, 484, 4294967295, 8, 46, 8, 615, 1, 4294967295, 4294967295, 3, 46, 8, 616, 4, 486, 4294967295, 8, 46, 8, 620, 1, 4294967295, 4294967295, 1, 47, 32, 621, 1, 4294967295, 4294967295, 1, 47, 8, 622, 1, 4294967295, 4294967295, 1, 47, 32, 623, 1, 4294967295, 4294967295, 1, 47, 8, 624, 1, 4294967295, 4294967295, 5, 47, 8, 625, 1, 492, 4294967295, 8, 47, 8, 626, 1, 4294967295, 4294967295, 10, 47, 8, 627, 2, 4294967295, 4294967295, 12, 47, 8, 629, 1, 4294967295, 495, 9, 47, 8, 630, 1, 4294967295, 4294967295, 1, 47, 32, 631, 1, 4294967295, 4294967295, 1, 47, 8, 632, 1, 4294967295, 4294967295, 1, 48, 8, 633, 1, 4294967295, 4294967295, 1, 48, 8, 634, 1, 4294967295, 4294967295, 1, 48, 32, 635, 1, 4294967295, 4294967295, 1, 48, 8, 636, 1, 4294967295, 4294967295, 1, 48, 32, 637, 1, 4294967295, 4294967295, 1, 48, 32, 638, 1, 4294967295, 4294967295, 3, 48, 8, 639, 3, 505, 4294967295, 8, 48, 8, 642, 1, 4294967295, 4294967295, 3, 48, 8, 643, 2, 507, 4294967295, 8, 48, 8, 645, 1, 4294967295, 4294967295, 1, 49, 8, 646, 1, 4294967295, 4294967295, 1, 49, 32, 647, 1, 4294967295, 4294967295, 1, 49, 8, 648, 1, 4294967295, 4294967295, 1, 49, 8, 649, 1, 4294967295, 4294967295, 3, 49, 8, 650, 2, 513, 4294967295, 8, 49, 8, 652, 1, 4294967295, 4294967295, 1, 50, 8, 653, 1, 4294967295, 4294967295, 1, 50, 8, 654, 1, 4294967295, 4294967295, 3, 50, 8, 655, 2, 517, 4294967295, 8, 50, 8, 657, 1, 4294967295, 4294967295, 1, 51, 8, 658, 1, 4294967295, 4294967295, 1, 51, 8, 659, 1, 4294967295, 4294967295, 1, 52, 32, 660, 1, 4294967295, 4294967295, 1, 52, 32, 661, 1, 4294967295, 4294967295, 3, 52, 8, 662, 2, 523, 4294967295, 8, 52, 8, 664, 1, 4294967295, 4294967295, 1, 52, 32, 665, 1, 4294967295, 4294967295, 1, 52, 32, 666, 1, 4294967295, 4294967295, 3, 52, 8, 667, 2, 527, 4294967295, 8, 52, 8, 669, 1, 4294967295, 4294967295, 1, 52, 32, 670, 1, 4294967295, 4294967295, 1, 52, 32, 671, 1, 4294967295, 4294967295, 3, 52, 8, 672, 2, 531, 4294967295, 8, 52, 8, 674, 1, 4294967295, 4294967295, 3, 52, 8, 675, 3, 533, 4294967295, 8, 52, 8, 678, 1, 4294967295, 4294967295, 1, 53, 8, 679, 1, 4294967295, 4294967295, 1, 53, 8, 680, 1, 4294967295, 4294967295, 1, 53, 32, 681, 1, 4294967295, 4294967295, 1, 53, 8, 682, 1, 4294967295, 4294967295, 1, 53, 32, 683, 1, 4294967295, 4294967295, 1, 53, 8, 684, 1, 4294967295, 4294967295, 3, 53, 8, 685, 6, 541, 4294967295, 8, 53, 8, 691, 1, 4294967295, 4294967295, 1, 54, 8, 692, 1, 4294967295, 4294967295, 1, 54, 8, 693, 1, 4294967295, 4294967295, 1, 54, 8, 694, 1, 4294967295, 4294967295, 1, 54, 8, 695, 1, 4294967295, 4294967295, 3, 54, 8, 696, 4, 547, 4294967295, 8, 54, 8, 700, 1, 4294967295, 4294967295, 1, 55, 32, 701, 1, 4294967295, 4294967295, 1, 55, 8, 702, 1, 4294967295, 4294967295, 3, 55, 8, 703, 2, 551, 4294967295, 8, 55, 8, 705, 1, 4294967295, 4294967295, 1, 56, 32, 706, 1, 4294967295, 4294967295, 1, 56, 8, 707, 1, 4294967295, 4294967295, 1, 56, 32, 708, 1, 4294967295, 4294967295, 1, 56, 8, 709, 1, 4294967295, 4294967295, 3, 56, 8, 710, 2, 557, 4294967295, 8, 56, 8, 712, 1, 4294967295, 4294967295, 1, 57, 32, 713, 1, 4294967295, 4294967295, 1, 57, 8, 714, 1, 4294967295, 4294967295, 1, 57, 32, 715, 1, 4294967295, 4294967295, 1, 57, 8, 716, 1, 4294967295, 4294967295, 5, 57, 8, 717, 1, 563, 4294967295, 8, 57, 8, 718, 1, 4294967295, 4294967295, 10, 57, 8, 719, 2, 4294967295, 4294967295, 12, 57, 8, 721, 1, 4294967295, 566, 9, 57, 8, 722, 1, 4294967295, 4294967295, 1, 57, 32, 723, 1, 4294967295, 4294967295, 1, 57, 8, 724, 1, 4294967295, 4294967295, 1, 58, 32, 725, 1, 4294967295, 4294967295, 1, 58, 8, 726, 1, 4294967295, 4294967295, 3, 58, 8, 727, 2, 572, 4294967295, 8, 58, 8, 729, 1, 4294967295, 4294967295, 1, 58, 32, 730, 1, 4294967295, 4294967295, 1, 58, 8, 731, 1, 4294967295, 4294967295, 3, 58, 8, 732, 2, 576, 4294967295, 8, 58, 8, 734, 1, 4294967295, 4294967295, 1, 58, 8, 735, 1, 4294967295, 4294967295, 1, 58, 32, 736, 1, 4294967295, 4294967295, 3, 58, 8, 737, 4, 580, 4294967295, 8, 58, 8, 741, 1, 4294967295, 4294967295, 1, 59, 32, 742, 1, 4294967295, 4294967295, 1, 59, 8, 743, 1, 4294967295, 4294967295, 3, 59, 8, 744, 2, 584, 4294967295, 8, 59, 8, 746, 1, 4294967295, 4294967295, 1, 59, 8, 747, 1, 4294967295, 4294967295, 5, 59, 8, 748, 1, 587, 4294967295, 8, 59, 8, 749, 1, 4294967295, 4294967295, 10, 59, 8, 750, 2, 4294967295, 4294967295, 12, 59, 8, 752, 1, 4294967295, 590, 9, 59, 8, 753, 1, 4294967295, 4294967295, 1, 59, 32, 754, 1, 4294967295, 4294967295, 3, 59, 8, 755, 2, 593, 4294967295, 8, 59, 8, 757, 1, 4294967295, 4294967295, 1, 59, 8, 758, 1, 4294967295, 4294967295, 1, 59, 32, 759, 1, 4294967295, 4294967295, 1, 59, 8, 760, 1, 4294967295, 4294967295, 1, 60, 32, 761, 1, 4294967295, 4294967295, 1, 60, 8, 762, 1, 4294967295, 4294967295, 3, 60, 8, 763, 2, 600, 4294967295, 8, 60, 8, 765, 1, 4294967295, 4294967295, 1, 60, 8, 766, 1, 4294967295, 4294967295, 3, 60, 8, 767, 2, 603, 4294967295, 8, 60, 8, 769, 1, 4294967295, 4294967295, 1, 61, 32, 770, 1, 4294967295, 4294967295, 1, 61, 32, 771, 1, 4294967295, 4294967295, 1, 61, 32, 772, 1, 4294967295, 4294967295, 1, 61, 8, 773, 1, 4294967295, 4294967295, 1, 62, 32, 774, 1, 4294967295, 4294967295, 1, 62, 8, 775, 1, 4294967295, 4294967295, 3, 62, 8, 776, 2, 611, 4294967295, 8, 62, 8, 778, 1, 4294967295, 4294967295, 1, 62, 32, 779, 1, 4294967295, 4294967295, 1, 62, 8, 780, 1, 4294967295, 4294967295, 3, 62, 8, 781, 2, 615, 4294967295, 8, 62, 8, 783, 1, 4294967295, 4294967295, 3, 62, 8, 784, 2, 617, 4294967295, 8, 62, 8, 786, 1, 4294967295, 4294967295, 1, 63, 32, 787, 1, 4294967295, 4294967295, 1, 63, 8, 788, 1, 4294967295, 4294967295, 1, 63, 32, 789, 1, 4294967295, 4294967295, 1, 63, 8, 790, 1, 4294967295, 4294967295, 5, 63, 8, 791, 1, 623, 4294967295, 8, 63, 8, 792, 1, 4294967295, 4294967295, 10, 63, 8, 793, 2, 4294967295, 4294967295, 12, 63, 8, 795, 1, 4294967295, 626, 9, 63, 8, 796, 1, 4294967295, 4294967295, 1, 63, 32, 797, 1, 4294967295, 4294967295, 1, 63, 8, 798, 1, 4294967295, 4294967295, 1, 64, 8, 799, 1, 4294967295, 4294967295, 1, 64, 8, 800, 1, 4294967295, 4294967295, 1, 64, 32, 801, 1, 4294967295, 4294967295, 1, 64, 8, 802, 1, 4294967295, 4294967295, 1, 64, 32, 803, 1, 4294967295, 4294967295, 1, 64, 32, 804, 1, 4294967295, 4294967295, 3, 64, 8, 805, 3, 636, 4294967295, 8, 64, 8, 808, 1, 4294967295, 4294967295, 3, 64, 8, 809, 2, 638, 4294967295, 8, 64, 8, 811, 1, 4294967295, 4294967295, 1, 65, 32, 812, 1, 4294967295, 4294967295, 1, 65, 8, 813, 1, 4294967295, 4294967295, 1, 66, 8, 814, 1, 4294967295, 4294967295, 1, 66, 32, 815, 1, 4294967295, 4294967295, 1, 66, 8, 816, 1, 4294967295, 4294967295, 5, 66, 8, 817, 1, 645, 4294967295, 8, 66, 8, 818, 1, 4294967295, 4294967295, 10, 66, 8, 819, 2, 4294967295, 4294967295, 12, 66, 8, 821, 1, 4294967295, 648, 9, 66, 8, 822, 1, 4294967295, 4294967295, 1, 66, 0, 823, 0, 4294967295, 4294967295, 1, 134, 0, 0, 0, 1, 150, 0, 0, 0, 1, 138, 0, 0, 0, 1, 159, 0, 0, 0, 1, 151, 0, 0, 0, 1, 166, 0, 0, 0, 1, 137, 0, 0, 0, 1, 168, 0, 0, 0, 1, 167, 0, 0, 0, 1, 327, 0, 0, 0, 1, 375, 0, 0, 0, 1, 584, 0, 0, 0, 1, 179, 0, 0, 0, 1, 170, 0, 0, 0, 1, 194, 0, 0, 0, 1, 182, 0, 0, 0, 1, 196, 0, 0, 0, 1, 167, 0, 0, 0, 1, 212, 0, 0, 0, 1, 202, 0, 0, 0, 1, 201, 0, 0, 0, 1, 214, 0, 0, 0, 1, 167, 0, 0, 0, 1, 220, 0, 0, 0, 1, 167, 0, 0, 0, 1, 226, 0, 0, 0, 1, 217, 0, 0, 0, 1, 223, 0, 0, 0, 1, 237, 0, 0, 0, 1, 167, 0, 0, 0, 1, 249, 0, 0, 0, 1, 239, 0, 0, 0, 1, 251, 0, 0, 0, 1, 195, 0, 0, 0, 1, 245, 0, 0, 0, 1, 320, 0, 0, 0, 1, 323, 0, 0, 0, 1, 346, 0, 0, 0, 1, 415, 0, 0, 0, 1, 480, 0, 0, 0, 1, 505, 0, 0, 0, 1, 253, 0, 0, 0, 1, 287, 0, 0, 0, 1, 319, 0, 0, 0, 1, 330, 0, 0, 0, 1, 342, 0, 0, 0, 1, 600, 0, 0, 0, 1, 262, 0, 0, 0, 1, 144, 0, 0, 0, 1, 274, 0, 0, 0, 1, 145, 0, 0, 0, 1, 279, 0, 0, 0, 1, 273, 0, 0, 0, 1, 282, 0, 0, 0, 1, 280, 0, 0, 0, 1, 311, 0, 0, 0, 1, 307, 0, 0, 0, 1, 317, 0, 0, 0, 1, 310, 0, 0, 0, 1, 321, 0, 0, 0, 1, 316, 0, 0, 0, 1, 326, 0, 0, 0, 1, 299, 0, 0, 0, 1, 328, 0, 0, 0, 1, 290, 0, 0, 0, 1, 331, 0, 0, 0, 1, 293, 0, 0, 0, 1, 340, 0, 0, 0, 1, 296, 0, 0, 0, 1, 343, 0, 0, 0, 1, 327, 0, 0, 0, 1, 587, 0, 0, 0, 1, 348, 0, 0, 0, 1, 283, 0, 0, 0, 1, 352, 0, 0, 0, 1, 349, 0, 0, 0, 1, 354, 0, 0, 0, 1, 305, 0, 0, 0, 1, 356, 0, 0, 0, 1, 355, 0, 0, 0, 1, 364, 0, 0, 0, 1, 361, 0, 0, 0, 1, 360, 0, 0, 0, 1, 370, 0, 0, 0, 1, 267, 0, 0, 0, 1, 280, 0, 0, 0, 1, 380, 0, 0, 0, 1, 378, 0, 0, 0, 1, 382, 0, 0, 0, 1, 381, 0, 0, 0, 1, 421, 0, 0, 0, 1, 395, 0, 0, 0, 1, 387, 0, 0, 0, 1, 386, 0, 0, 0, 1, 403, 0, 0, 0, 1, 392, 0, 0, 0, 1, 417, 0, 0, 0, 1, 399, 0, 0, 0, 1, 419, 0, 0, 0, 1, 411, 0, 0, 0, 1, 423, 0, 0, 0, 1, 393, 0, 0, 0, 1, 438, 0, 0, 0, 1, 429, 0, 0, 0, 1, 428, 0, 0, 0, 1, 442, 0, 0, 0, 1, 433, 0, 0, 0, 1, 439, 0, 0, 0, 1, 446, 0, 0, 0, 1, 435, 0, 0, 0, 1, 448, 0, 0, 0, 1, 595, 0, 0, 0, 1, 465, 0, 0, 0, 1, 367, 0, 0, 0, 1, 453, 0, 0, 0, 1, 452, 0, 0, 0, 1, 485, 0, 0, 0, 1, 461, 0, 0, 0, 1, 487, 0, 0, 0, 1, 484, 0, 0, 0, 1, 506, 0, 0, 0, 1, 493, 0, 0, 0, 1, 492, 0, 0, 0, 1, 508, 0, 0, 0, 1, 470, 0, 0, 0, 1, 514, 0, 0, 0, 1, 486, 0, 0, 0, 1, 518, 0, 0, 0, 1, 517, 0, 0, 0, 1, 532, 0, 0, 0, 1, 408, 0, 0, 0, 1, 412, 0, 0, 0, 1, 471, 0, 0, 0, 1, 476, 0, 0, 0, 1, 519, 0, 0, 0, 1, 540, 0, 0, 0, 1, 407, 0, 0, 0, 1, 546, 0, 0, 0, 1, 475, 0, 0, 0, 1, 513, 0, 0, 0, 1, 548, 0, 0, 0, 1, 541, 0, 0, 0, 1, 547, 0, 0, 0, 1, 556, 0, 0, 0, 1, 541, 0, 0, 0, 1, 547, 0, 0, 0, 1, 558, 0, 0, 0, 1, 557, 0, 0, 0, 1, 579, 0, 0, 0, 1, 557, 0, 0, 0, 1, 564, 0, 0, 0, 1, 563, 0, 0, 0, 1, 581, 0, 0, 0, 1, 513, 0, 0, 0, 1, 516, 0, 0, 0, 1, 597, 0, 0, 0, 1, 547, 0, 0, 0, 1, 604, 0, 0, 0, 1, 541, 0, 0, 0, 1, 580, 0, 0, 0, 1, 616, 0, 0, 0, 1, 541, 0, 0, 0, 1, 547, 0, 0, 0, 1, 618, 0, 0, 0, 1, 458, 0, 0, 0, 1, 551, 0, 0, 0, 1, 572, 0, 0, 0, 1, 576, 0, 0, 0, 1, 603, 0, 0, 0, 1, 611, 0, 0, 0, 1, 615, 0, 0, 0, 1, 637, 0, 0, 0, 1, 507, 0, 0, 0, 1, 624, 0, 0, 0, 1, 623, 0, 0, 0, 1, 639, 0, 0, 0, 1, 152, 0, 0, 0, 1, 180, 0, 0, 0, 1, 188, 0, 0, 0, 1, 187, 0, 0, 0, 1, 208, 0, 0, 0, 1, 210, 0, 0, 0, 1, 213, 0, 0, 0, 1, 231, 0, 0, 0, 1, 230, 0, 0, 0, 1, 244, 0, 0, 0, 1, 250, 0, 0, 0, 1, 264, 0, 0, 0, 1, 345, 0, 0, 0, 1, 368, 0, 0, 0, 1, 443, 0, 0, 0, 1, 447, 0, 0, 0, 1, 500, 0, 0, 0, 1, 509, 0, 0, 0, 1, 631, 0, 0, 0, 1, 646, 0, 0, 0, 1, 645, 0, 0, 0, 1, 641, 0, 0, 0, 1, 337, 0, 0, 0, 1, 336, 0, 0, 0, 1, 638, 0, 0, 0, 1, 636, 0, 0, 0, 3, 2, 1, 138, 0, 3, 6, 3, 137, 0, 1, 135, 0, 0, 0, 1, 140, 0, 0, 0, 1, 136, 0, 0, 0, 1, 139, 0, 0, 0, 1, 141, 0, 0, 0, 1, 138, 0, 0, 0, 3, 34, 17, 145, 0, 3, 32, 16, 144, 0, 1, 142, 0, 0, 0, 1, 147, 0, 0, 0, 1, 143, 0, 0, 0, 1, 146, 0, 0, 0, 1, 148, 0, 0, 0, 1, 145, 0, 0, 0, 5, 149, 4294967295, 0, 0, 1, 1, 0, 0, 0, 3, 4, 2, 151, 0, 3, 130, 65, 152, 0, 5, 153, 56, 0, 0, 1, 3, 0, 0, 0, 5, 155, 41, 0, 0, 5, 160, 43, 0, 0, 5, 157, 42, 0, 0, 5, 160, 43, 0, 0, 5, 160, 43, 0, 0, 1, 154, 0, 0, 0, 1, 156, 0, 0, 0, 1, 158, 0, 0, 0, 1, 5, 0, 0, 0, 3, 8, 4, 167, 0, 3, 14, 7, 167, 0, 3, 18, 9, 167, 0, 3, 20, 10, 167, 0, 3, 24, 12, 167, 0, 1, 161, 0, 0, 0, 1, 162, 0, 0, 0, 1, 163, 0, 0, 0, 1, 164, 0, 0, 0, 1, 165, 0, 0, 0, 1, 7, 0, 0, 0, 5, 174, 36, 0, 0, 3, 10, 5, 170, 0, 5, 171, 56, 0, 0, 1, 173, 0, 0, 0, 1, 169, 0, 0, 0, 1, 176, 0, 0, 0, 1, 172, 0, 0, 0, 1, 175, 0, 0, 0, 1, 177, 0, 0, 0, 1, 174, 0, 0, 0, 5, 178, 59, 0, 0, 1, 9, 0, 0, 0, 3, 130, 65, 180, 0, 5, 181, 7, 0, 0, 3, 12, 6, 182, 0, 1, 11, 0, 0, 0, 3, 130, 65, 188, 0, 5, 185, 70, 0, 0, 3, 130, 65, 187, 0, 1, 184, 0, 0, 0, 1, 190, 0, 0, 0, 1, 186, 0, 0, 0, 1, 189, 0, 0, 0, 1, 195, 0, 0, 0, 1, 188, 0, 0, 0, 5, 195, 11, 0, 0, 3, 28, 14, 195, 0, 5, 195, 33, 0, 0, 1, 183, 0, 0, 0, 1, 191, 0, 0, 0, 1, 192, 0, 0, 0, 1, 193, 0, 0, 0, 1, 13, 0, 0, 0, 5, 197, 39, 0, 0, 3, 16, 8, 202, 0, 5, 199, 55, 0, 0, 3, 16, 8, 201, 0, 1, 198, 0, 0, 0, 1, 204, 0, 0, 0, 1, 200, 0, 0, 0, 1, 203, 0, 0, 0, 1, 205, 0, 0, 0, 1, 202, 0, 0, 0, 5, 206, 56, 0, 0, 1, 15, 0, 0, 0, 3, 130, 65, 208, 0, 5, 209, 7, 0, 0, 3, 130, 65, 210, 0, 1, 213, 0, 0, 0, 3, 130, 65, 213, 0, 1, 207, 0, 0, 0, 1, 211, 0, 0, 0, 1, 17, 0, 0, 0, 5, 216, 37, 0, 0, 3, 22, 11, 217, 0, 1, 215, 0, 0, 0, 1, 217, 0, 0, 0, 1, 218, 0, 0, 0, 5, 219, 59, 0, 0, 1, 19, 0, 0, 0, 5, 222, 38, 0, 0, 3, 22, 11, 223, 0, 1, 221, 0, 0, 0, 1, 223, 0, 0, 0, 1, 224, 0, 0, 0, 5, 225, 59, 0, 0, 1, 21, 0, 0, 0, 3, 130, 65, 231, 0, 5, 228, 55, 0, 0, 3, 130, 65, 230, 0, 1, 227, 0, 0, 0, 1, 233, 0, 0, 0, 1, 229, 0, 0, 0, 1, 232, 0, 0, 0, 1, 235, 0, 0, 0, 1, 231, 0, 0, 0, 5, 236, 55, 0, 0, 1, 234, 0, 0, 0, 1, 236, 0, 0, 0, 1, 23, 0, 0, 0, 5, 241, 71, 0, 0, 3, 26, 13, 239, 0, 5, 240, 54, 0, 0, 1, 242, 0, 0, 0, 1, 238, 0, 0, 0, 1, 242, 0, 0, 0, 1, 243, 0, 0, 0, 3, 130, 65, 244, 0, 3, 28, 14, 245, 0, 1, 25, 0, 0, 0, 3, 130, 65, 250, 0, 5, 250, 41, 0, 0, 5, 250, 42, 0, 0, 1, 246, 0, 0, 0, 1, 247, 0, 0, 0, 1, 248, 0, 0, 0, 1, 27, 0, 0, 0, 5, 252, 4, 0, 0, 1, 29, 0, 0, 0, 5, 257, 35, 0, 0, 5, 256, 77, 0, 0, 1, 254, 0, 0, 0, 1, 259, 0, 0, 0, 1, 258, 0, 0, 0, 1, 255, 0, 0, 0, 1, 260, 0, 0, 0, 1, 257, 0, 0, 0, 5, 261, 75, 0, 0, 1, 31, 0, 0, 0, 5, 263, 52, 0, 0, 3, 130, 65, 264, 0, 5, 268, 56, 0, 0, 3, 66, 33, 267, 0, 1, 265, 0, 0, 0, 1, 270, 0, 0, 0, 1, 266, 0, 0, 0, 1, 269, 0, 0, 0, 1, 33, 0, 0, 0, 1, 268, 0, 0, 0, 3, 36, 18, 273, 0, 1, 271, 0, 0, 0, 1, 276, 0, 0, 0, 1, 272, 0, 0, 0, 1, 275, 0, 0, 0, 1, 35, 0, 0, 0, 1, 274, 0, 0, 0, 3, 38, 19, 280, 0, 3, 66, 33, 280, 0, 1, 277, 0, 0, 0, 1, 278, 0, 0, 0, 1, 37, 0, 0, 0, 3, 56, 28, 283, 0, 1, 281, 0, 0, 0, 1, 283, 0, 0, 0, 1, 284, 0, 0, 0, 5, 286, 9, 0, 0, 3, 30, 15, 287, 0, 1, 285, 0, 0, 0, 1, 287, 0, 0, 0, 1, 289, 0, 0, 0, 3, 48, 24, 290, 0, 1, 288, 0, 0, 0, 1, 290, 0, 0, 0, 1, 292, 0, 0, 0, 3, 50, 25, 293, 0, 1, 291, 0, 0, 0, 1, 293, 0, 0, 0, 1, 295, 0, 0, 0, 3, 52, 26, 296, 0, 1, 294, 0, 0, 0, 1, 296, 0, 0, 0, 1, 300, 0, 0, 0, 3, 46, 23, 299, 0, 1, 297, 0, 0, 0, 1, 302, 0, 0, 0, 1, 298, 0, 0, 0, 1, 301, 0, 0, 0, 1, 303, 0, 0, 0, 1, 300, 0, 0, 0, 5, 304, 53, 0, 0, 3, 60, 30, 305, 0, 5, 306, 56, 0, 0, 3, 40, 20, 307, 0, 1, 39, 0, 0, 0, 3, 42, 21, 310, 0, 1, 308, 0, 0, 0, 1, 313, 0, 0, 0, 1, 309, 0, 0, 0, 1, 312, 0, 0, 0, 1, 315, 0, 0, 0, 1, 311, 0, 0, 0, 3, 44, 22, 316, 0, 1, 314, 0, 0, 0, 1, 316, 0, 0, 0, 1, 41, 0, 0, 0, 5, 318, 50, 0, 0, 3, 30, 15, 319, 0, 3, 28, 14, 320, 0, 1, 43, 0, 0, 0, 5, 322, 51, 0, 0, 3, 28, 14, 323, 0, 1, 45, 0, 0, 0, 3, 8, 4, 327, 0, 3, 54, 27, 327, 0, 1, 324, 0, 0, 0, 1, 325, 0, 0, 0, 1, 47, 0, 0, 0, 5, 329, 47, 0, 0, 3, 30, 15, 330, 0, 1, 49, 0, 0, 0, 5, 332, 49, 0, 0, 3, 132, 66, 337, 0, 5, 334, 55, 0, 0, 3, 132, 66, 336, 0, 1, 333, 0, 0, 0, 1, 339, 0, 0, 0, 1, 335, 0, 0, 0, 1, 338, 0, 0, 0, 1, 51, 0, 0, 0, 1, 337, 0, 0, 0, 5, 341, 48, 0, 0, 3, 30, 15, 342, 0, 1, 53, 0, 0, 0, 5, 344, 71, 0, 0, 3, 130, 65, 345, 0, 3, 28, 14, 346, 0, 1, 55, 0, 0, 0, 3, 58, 29, 349, 0, 1, 347, 0, 0, 0, 1, 350, 0, 0, 0, 1, 348, 0, 0, 0, 1, 351, 0, 0, 0, 1, 57, 0, 0, 0, 7, 353, 0, 0, 0, 1, 59, 0, 0, 0, 3, 62, 31, 355, 0, 1, 61, 0, 0, 0, 3, 64, 32, 361, 0, 5, 358, 67, 0, 0, 3, 64, 32, 360, 0, 1, 357, 0, 0, 0, 1, 363, 0, 0, 0, 1, 359, 0, 0, 0, 1, 362, 0, 0, 0, 1, 63, 0, 0, 0, 1, 361, 0, 0, 0, 3, 90, 45, 367, 0, 5, 366, 72, 0, 0, 3, 130, 65, 368, 0, 1, 365, 0, 0, 0, 1, 368, 0, 0, 0, 1, 65, 0, 0, 0, 5, 371, 40, 0, 0, 1, 369, 0, 0, 0, 1, 371, 0, 0, 0, 1, 372, 0, 0, 0, 5, 374, 12, 0, 0, 3, 8, 4, 375, 0, 1, 373, 0, 0, 0, 1, 375, 0, 0, 0, 1, 376, 0, 0, 0, 5, 377, 53, 0, 0, 3, 68, 34, 378, 0, 5, 379, 56, 0, 0, 1, 67, 0, 0, 0, 3, 70, 35, 381, 0, 1, 69, 0, 0, 0, 3, 72, 36, 387, 0, 5, 384, 67, 0, 0, 3, 72, 36, 386, 0, 1, 383, 0, 0, 0, 1, 389, 0, 0, 0, 1, 385, 0, 0, 0, 1, 388, 0, 0, 0, 1, 71, 0, 0, 0, 1, 387, 0, 0, 0, 3, 74, 37, 392, 0, 3, 80, 40, 393, 0, 1, 391, 0, 0, 0, 1, 393, 0, 0, 0, 1, 396, 0, 0, 0, 1, 396, 0, 0, 0, 1, 390, 0, 0, 0, 1, 394, 0, 0, 0, 1, 73, 0, 0, 0, 3, 76, 38, 399, 0, 1, 397, 0, 0, 0, 1, 400, 0, 0, 0, 1, 398, 0, 0, 0, 1, 401, 0, 0, 0, 1, 404, 0, 0, 0, 1, 404, 0, 0, 0, 1, 398, 0, 0, 0, 1, 402, 0, 0, 0, 1, 75, 0, 0, 0, 3, 106, 53, 407, 0, 3, 104, 52, 408, 0, 1, 406, 0, 0, 0, 1, 408, 0, 0, 0, 1, 418, 0, 0, 0, 3, 78, 39, 411, 0, 3, 104, 52, 412, 0, 1, 410, 0, 0, 0, 1, 412, 0, 0, 0, 1, 418, 0, 0, 0, 3, 28, 14, 415, 0, 5, 416, 63, 0, 0, 1, 414, 0, 0, 0, 1, 416, 0, 0, 0, 1, 418, 0, 0, 0, 1, 405, 0, 0, 0, 1, 409, 0, 0, 0, 1, 413, 0, 0, 0, 1, 77, 0, 0, 0, 5, 420, 57, 0, 0, 3, 70, 35, 421, 0, 5, 422, 58, 0, 0, 1, 79, 0, 0, 0, 5, 424, 60, 0, 0, 3, 82, 41, 429, 0, 5, 426, 55, 0, 0, 3, 82, 41, 428, 0, 1, 425, 0, 0, 0, 1, 431, 0, 0, 0, 1, 427, 0, 0, 0, 1, 430, 0, 0, 0, 1, 81, 0, 0, 0, 1, 429, 0, 0, 0, 3, 84, 42, 433, 0, 5, 434, 57, 0, 0, 3, 86, 43, 435, 0, 5, 436, 58, 0, 0, 1, 439, 0, 0, 0, 3, 84, 42, 439, 0, 1, 432, 0, 0, 0, 1, 437, 0, 0, 0, 1, 83, 0, 0, 0, 3, 130, 65, 443, 0, 5, 443, 52, 0, 0, 1, 440, 0, 0, 0, 1, 441, 0, 0, 0, 1, 85, 0, 0, 0, 3, 130, 65, 447, 0, 5, 447, 33, 0, 0, 1, 444, 0, 0, 0, 1, 445, 0, 0, 0, 1, 87, 0, 0, 0, 3, 90, 45, 453, 0, 5, 450, 67, 0, 0, 3, 90, 45, 452, 0, 1, 449, 0, 0, 0, 1, 455, 0, 0, 0, 1, 451, 0, 0, 0, 1, 454, 0, 0, 0, 1, 89, 0, 0, 0, 1, 453, 0, 0, 0, 3, 126, 63, 458, 0, 1, 456, 0, 0, 0, 1, 458, 0, 0, 0, 1, 460, 0, 0, 0, 3, 92, 46, 461, 0, 1, 459, 0, 0, 0, 1, 462, 0, 0, 0, 1, 460, 0, 0, 0, 1, 463, 0, 0, 0, 1, 466, 0, 0, 0, 1, 466, 0, 0, 0, 1, 457, 0, 0, 0, 1, 464, 0, 0, 0, 1, 91, 0, 0, 0, 3, 98, 49, 470, 0, 3, 104, 52, 471, 0, 1, 471, 0, 0, 0, 1, 468, 0, 0, 0, 1, 469, 0, 0, 0, 1, 486, 0, 0, 0, 3, 108, 54, 475, 0, 3, 104, 52, 476, 0, 1, 476, 0, 0, 0, 1, 473, 0, 0, 0, 1, 474, 0, 0, 0, 1, 486, 0, 0, 0, 3, 100, 50, 486, 0, 3, 28, 14, 480, 0, 5, 481, 63, 0, 0, 1, 479, 0, 0, 0, 1, 481, 0, 0, 0, 1, 483, 0, 0, 0, 3, 94, 47, 484, 0, 1, 482, 0, 0, 0, 1, 484, 0, 0, 0, 1, 486, 0, 0, 0, 1, 467, 0, 0, 0, 1, 472, 0, 0, 0, 1, 477, 0, 0, 0, 1, 478, 0, 0, 0, 1, 93, 0, 0, 0, 5, 488, 61, 0, 0, 3, 96, 48, 493, 0, 5, 490, 55, 0, 0, 3, 96, 48, 492, 0, 1, 489, 0, 0, 0, 1, 495, 0, 0, 0, 1, 491, 0, 0, 0, 1, 494, 0, 0, 0, 1, 496, 0, 0, 0, 1, 493, 0, 0, 0, 5, 497, 62, 0, 0, 1, 95, 0, 0, 0, 3, 128, 64, 507, 0, 3, 130, 65, 500, 0, 5, 504, 7, 0, 0, 3, 28, 14, 505, 0, 5, 505, 33, 0, 0, 5, 505, 11, 0, 0, 1, 501, 0, 0, 0, 1, 502, 0, 0, 0, 1, 503, 0, 0, 0, 1, 507, 0, 0, 0, 1, 498, 0, 0, 0, 1, 499, 0, 0, 0, 1, 97, 0, 0, 0, 3, 130, 65, 509, 0, 7, 512, 1, 0, 0, 3, 108, 54, 513, 0, 3, 118, 59, 513, 0, 1, 510, 0, 0, 0, 1, 511, 0, 0, 0, 1, 99, 0, 0, 0, 3, 118, 59, 516, 0, 3, 102, 51, 517, 0, 1, 515, 0, 0, 0, 1, 517, 0, 0, 0, 1, 101, 0, 0, 0, 3, 104, 52, 519, 0, 1, 103, 0, 0, 0, 5, 522, 63, 0, 0, 5, 523, 63, 0, 0, 1, 521, 0, 0, 0, 1, 523, 0, 0, 0, 1, 533, 0, 0, 0, 5, 526, 64, 0, 0, 5, 527, 63, 0, 0, 1, 525, 0, 0, 0, 1, 527, 0, 0, 0, 1, 533, 0, 0, 0, 5, 530, 66, 0, 0, 5, 531, 63, 0, 0, 1, 529, 0, 0, 0, 1, 531, 0, 0, 0, 1, 533, 0, 0, 0, 1, 520, 0, 0, 0, 1, 524, 0, 0, 0, 1, 528, 0, 0, 0, 1, 105, 0, 0, 0, 3, 122, 61, 541, 0, 3, 124, 62, 541, 0, 5, 541, 9, 0, 0, 3, 112, 56, 541, 0, 5, 541, 8, 0, 0, 3, 110, 55, 541, 0, 1, 534, 0, 0, 0, 1, 535, 0, 0, 0, 1, 536, 0, 0, 0, 1, 537, 0, 0, 0, 1, 538, 0, 0, 0, 1, 539, 0, 0, 0, 1, 107, 0, 0, 0, 3, 124, 62, 547, 0, 3, 120, 60, 547, 0, 3, 112, 56, 547, 0, 3, 110, 55, 547, 0, 1, 542, 0, 0, 0, 1, 543, 0, 0, 0, 1, 544, 0, 0, 0, 1, 545, 0, 0, 0, 1, 109, 0, 0, 0, 5, 550, 70, 0, 0, 3, 126, 63, 551, 0, 1, 549, 0, 0, 0, 1, 551, 0, 0, 0, 1, 111, 0, 0, 0, 5, 553, 73, 0, 0, 3, 116, 58, 557, 0, 5, 555, 73, 0, 0, 3, 114, 57, 557, 0, 1, 552, 0, 0, 0, 1, 554, 0, 0, 0, 1, 113, 0, 0, 0, 5, 559, 57, 0, 0, 3, 116, 58, 564, 0, 5, 561, 67, 0, 0, 3, 116, 58, 563, 0, 1, 560, 0, 0, 0, 1, 566, 0, 0, 0, 1, 562, 0, 0, 0, 1, 565, 0, 0, 0, 1, 567, 0, 0, 0, 1, 564, 0, 0, 0, 5, 568, 58, 0, 0, 1, 115, 0, 0, 0, 5, 571, 12, 0, 0, 3, 126, 63, 572, 0, 1, 570, 0, 0, 0, 1, 572, 0, 0, 0, 1, 580, 0, 0, 0, 5, 575, 11, 0, 0, 3, 126, 63, 576, 0, 1, 574, 0, 0, 0, 1, 576, 0, 0, 0, 1, 580, 0, 0, 0, 3, 122, 61, 580, 0, 5, 580, 8, 0, 0, 1, 569, 0, 0, 0, 1, 573, 0, 0, 0, 1, 577, 0, 0, 0, 1, 578, 0, 0, 0, 1, 117, 0, 0, 0, 5, 592, 57, 0, 0, 3, 8, 4, 584, 0, 1, 582, 0, 0, 0, 1, 584, 0, 0, 0, 1, 588, 0, 0, 0, 3, 54, 27, 587, 0, 1, 585, 0, 0, 0, 1, 590, 0, 0, 0, 1, 586, 0, 0, 0, 1, 589, 0, 0, 0, 1, 591, 0, 0, 0, 1, 588, 0, 0, 0, 5, 593, 53, 0, 0, 1, 583, 0, 0, 0, 1, 593, 0, 0, 0, 1, 594, 0, 0, 0, 3, 88, 44, 595, 0, 5, 596, 58, 0, 0, 1, 119, 0, 0, 0, 5, 599, 9, 0, 0, 3, 30, 15, 600, 0, 1, 598, 0, 0, 0, 1, 600, 0, 0, 0, 1, 602, 0, 0, 0, 3, 126, 63, 603, 0, 1, 601, 0, 0, 0, 1, 603, 0, 0, 0, 1, 121, 0, 0, 0, 5, 605, 11, 0, 0, 5, 606, 69, 0, 0, 5, 607, 11, 0, 0, 1, 123, 0, 0, 0, 5, 610, 12, 0, 0, 3, 126, 63, 611, 0, 1, 609, 0, 0, 0, 1, 611, 0, 0, 0, 1, 617, 0, 0, 0, 5, 614, 11, 0, 0, 3, 126, 63, 615, 0, 1, 613, 0, 0, 0, 1, 615, 0, 0, 0, 1, 617, 0, 0, 0, 1, 608, 0, 0, 0, 1, 612, 0, 0, 0, 1, 125, 0, 0, 0, 5, 619, 61, 0, 0, 3, 128, 64, 624, 0, 5, 621, 55, 0, 0, 3, 128, 64, 623, 0, 1, 620, 0, 0, 0, 1, 626, 0, 0, 0, 1, 622, 0, 0, 0, 1, 625, 0, 0, 0, 1, 627, 0, 0, 0, 1, 624, 0, 0, 0, 5, 628, 62, 0, 0, 1, 127, 0, 0, 0, 3, 132, 66, 638, 0, 3, 130, 65, 631, 0, 5, 635, 7, 0, 0, 3, 132, 66, 636, 0, 5, 636, 11, 0, 0, 5, 636, 33, 0, 0, 1, 632, 0, 0, 0, 1, 633, 0, 0, 0, 1, 634, 0, 0, 0, 1, 638, 0, 0, 0, 1, 629, 0, 0, 0, 1, 630, 0, 0, 0, 1, 129, 0, 0, 0, 7, 640, 2, 0, 0, 1, 131, 0, 0, 0, 3, 130, 65, 646, 0, 5, 643, 70, 0, 0, 3, 130, 65, 645, 0, 1, 642, 0, 0, 0, 1, 648, 0, 0, 0, 1, 644, 0, 0, 0, 1, 647, 0, 0, 0, 1, 133, 0, 0, 0, 1, 646, 0, 0, 0, 0, 2, 1, 0, 2, 2, 2, 1, 2, 2, 4, 2, 1, 4, 2, 40, 40, 44, 46, 7, 7, 65, 65, 9, 9, 12, 12, 0, 28928, 0, 0, 128, 0, 2, 0, 4608, 0, 0, 0, 138, 145, 159, 166, 174, 188, 194, 202, 212, 216, 222, 231, 235, 241, 249, 257, 268, 274, 279, 282, 286, 289, 292, 295, 300, 311, 315, 326, 337, 350, 361, 367, 370, 374, 387, 392, 395, 400, 403, 407, 411, 415, 417, 429, 438, 442, 446, 453, 457, 462, 465, 470, 475, 480, 483, 485, 493, 504, 506, 512, 516, 522, 526, 530, 532, 540, 546, 550, 556, 564, 571, 575, 579, 583, 588, 592, 599, 602, 610, 614, 616, 624, 635, 637, 646, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133];
static ATN_CELL: OnceLock<ParserAtn> = OnceLock::new();
/// Validates and caches the packed grammar ATN for all parser instances.
fn atn() -> &'static ParserAtn {
ATN_CELL.get_or_init(|| {
ParserAtn::from_static(PARSER_ATN_DATA)
.unwrap_or_else(|error| panic!("generated parser ATN is incompatible with this runtime: {error}"))
})
}
/// Borrows the validated packed parser ATN embedded in this module.
pub fn parser_atn() -> &'static ParserAtn {
atn()
}
/// Result from [`parse_with_parser`].
///
/// Keeps the generated parser available after the entry rule runs so callers
/// can inspect diagnostics or recover the parser-owned token stream.
#[derive(Debug)]
pub struct AntlRv4ParserParseOutput<R, L>
where
L: TokenSource,
{
pub result: R,
pub parser: AntlRv4Parser<L>,
}
/// Parses UTF-8 text by constructing the lexer, token stream, parser, and
/// caller-selected entry rule in one call.
///
/// Pass the generated lexer constructor and a parser entry rule, for example
/// `parse(src, MyGrammarLexer::new, AntlRv4Parser::file)`.
///
/// The returned [`antlr4_runtime::ParsedFile`] owns the canonical token store,
/// flat CST storage, and entry-rule root.
/// Use [`parse_with_parser`] instead when the caller also needs parser
/// diagnostics after the entry rule runs.
pub fn parse<L: TokenSource>(
input: impl AsRef<str>,
lexer: impl FnOnce(antlr4_runtime::InputStream) -> L,
entry: impl FnOnce(&mut AntlRv4Parser<L>) -> Result<antlr4_runtime::NodeId, antlr4_runtime::AntlrError>,
) -> Result<antlr4_runtime::ParsedFile, antlr4_runtime::AntlrError>
{
let AntlRv4ParserParseOutput { result, parser } = parse_with_parser(input, lexer, entry)?;
Ok(parser.into_parsed_file(result))
}
/// Parses UTF-8 text like [`parse`] while returning the parser after the entry
/// rule has run.
///
/// This keeps the compact generated setup path available for callers that also
/// need `Parser::number_of_syntax_errors()` or `AntlRv4Parser::into_token_stream()`.
pub fn parse_with_parser<L: TokenSource, R>(
input: impl AsRef<str>,
lexer: impl FnOnce(antlr4_runtime::InputStream) -> L,
entry: impl FnOnce(&mut AntlRv4Parser<L>) -> Result<R, antlr4_runtime::AntlrError>,
) -> Result<AntlRv4ParserParseOutput<R, L>, antlr4_runtime::AntlrError>
{
let lexer = lexer(antlr4_runtime::InputStream::new(input.as_ref()));
let tokens = CommonTokenStream::new(lexer);
let mut parser = AntlRv4Parser::new(tokens);
let result = entry(&mut parser)?;
Ok(AntlRv4ParserParseOutput { result, parser })
}
/// Generated parser. Each grammar rule is exposed as a public method.
///
/// Pick an entry-rule method that matches the grammar's intended
/// top-level construct for the input being parsed. The generator can
/// identify rules that are not called by another rule, but it cannot
/// infer the semantic choice between multiple candidates.
///
/// Likely parser entry-rule methods (not called by other rules):
/// - `grammar_spec()`
///
/// All parser rule methods:
/// - `grammar_spec()`
/// - `grammar_decl()`
/// - `grammar_type()`
/// - `prequel_construct()`
/// - `options_spec()`
/// - `option()`
/// - `option_value()`
/// - `delegate_grammars()`
/// - `delegate_grammar()`
/// - `tokens_spec()`
/// - `channels_spec()`
/// - `id_list()`
/// - `action()`
/// - `action_scope_name()`
/// - `action_block()`
/// - `arg_action_block()`
/// - `mode_spec()`
/// - `rules()`
/// - `rule_spec()`
/// - `parser_rule_spec()`
/// - `exception_group()`
/// - `exception_handler()`
/// - `finally_clause()`
/// - `rule_prequel()`
/// - `rule_returns()`
/// - `throws_spec()`
/// - `locals_spec()`
/// - `rule_action()`
/// - `rule_modifiers()`
/// - `rule_modifier()`
/// - `rule_block()`
/// - `rule_alt_list()`
/// - `labeled_alt()`
/// - `lexer_rule_spec()`
/// - `lexer_rule_block()`
/// - `lexer_alt_list()`
/// - `lexer_alt()`
/// - `lexer_elements()`
/// - `lexer_element()`
/// - `lexer_block()`
/// - `lexer_commands()`
/// - `lexer_command()`
/// - `lexer_command_name()`
/// - `lexer_command_expr()`
/// - `alt_list()`
/// - `alternative()`
/// - `element()`
/// - `predicate_options()`
/// - `predicate_option()`
/// - `labeled_element()`
/// - `ebnf()`
/// - `block_suffix()`
/// - `ebnf_suffix()`
/// - `lexer_atom()`
/// - `atom()`
/// - `wildcard()`
/// - `not_set()`
/// - `block_set()`
/// - `set_element()`
/// - `block()`
/// - `ruleref()`
/// - `character_range()`
/// - `terminal_def()`
/// - `element_options()`
/// - `element_option()`
/// - `identifier()`
/// - `qualified_identifier()`
#[derive(Debug)]
pub struct AntlRv4Parser<L, H = antlr4_runtime::NoSemanticHooks>
where
L: TokenSource,
H: antlr4_runtime::SemanticHooks,
{
base: BaseParser<L, H>,
simulator: Option<antlr4_runtime::ParserAtnSimulator<'static>>,
generated_only: bool,
}
#[allow(dead_code)]
#[derive(Debug)]
enum GeneratedRuleError {
Fatal(antlr4_runtime::AntlrError),
}
impl GeneratedRuleError {
fn into_error(self) -> antlr4_runtime::AntlrError {
match self {
Self::Fatal(error) => error,
}
}
}
impl<L> AntlRv4Parser<L, antlr4_runtime::NoSemanticHooks>
where
L: TokenSource,
{
pub fn new(input: CommonTokenStream<L>) -> Self {
Self::with_hooks(input, antlr4_runtime::NoSemanticHooks)
}
}
impl<L, H> AntlRv4Parser<L, H>
where
L: TokenSource,
H: antlr4_runtime::SemanticHooks,
{
pub fn with_hooks(input: CommonTokenStream<L>, hooks: H) -> Self {
let grammar_metadata = metadata();
let data = RecognizerData::new(
grammar_metadata.grammar_file_name(),
grammar_metadata.vocabulary(),
)
.with_rule_names(grammar_metadata.rule_names().iter().copied())
.with_channel_names(grammar_metadata.channel_names().iter().copied())
.with_mode_names(grammar_metadata.mode_names().iter().copied());
let mut base = BaseParser::with_semantic_hooks(input, data, hooks);
base.set_unknown_predicate_policy(antlr4_runtime::UnknownSemanticPolicy::Error);
Self {
base,
simulator: None,
generated_only: std::env::var_os("ANTLR4_RUST_GENERATED_ONLY").is_some(),
}
}
pub fn metadata() -> &'static GrammarMetadata {
metadata()
}
/// Adds a listener for parser diagnostics.
pub fn add_error_listener<T>(&mut self, listener: T)
where
T: for<'a> antlr4_runtime::ErrorListener<dyn antlr4_runtime::Recognizer + 'a> + Send + 'static,
{
self.base.add_error_listener(listener);
}
/// Removes every parser error listener, including the default console listener.
pub fn remove_error_listeners(&mut self) {
self.base.remove_error_listeners();
}
/// Fully resets parser-owned state and rewinds the current token stream.
pub fn reset(&mut self) {
self.base.reset();
if let Some(simulator) = self.simulator.as_mut() {
simulator.reset();
}
}
/// Replaces the token stream and fully resets parser-owned state.
pub fn set_token_stream(&mut self, input: CommonTokenStream<L>) {
self.base.set_token_stream(input);
if let Some(simulator) = self.simulator.as_mut() {
simulator.reset();
}
}
#[must_use]
pub const fn token_stream(&self) -> &CommonTokenStream<L> {
self.base.token_stream()
}
#[must_use]
pub const fn token_stream_mut(&mut self) -> &mut CommonTokenStream<L> {
self.base.token_stream_mut()
}
#[must_use]
pub const fn token_store(&self) -> &antlr4_runtime::TokenStore {
self.base.token_store()
}
#[must_use]
pub const fn parse_tree_storage(&self) -> &antlr4_runtime::ParseTreeStorage {
self.base.parse_tree_storage()
}
#[must_use]
pub fn prediction_context_stats(&self) -> antlr4_runtime::PredictionContextStats {
self.simulator.as_ref().map_or_else(
antlr4_runtime::PredictionContextStats::default,
antlr4_runtime::ParserAtnSimulator::prediction_context_stats,
)
}
#[must_use]
pub fn parser_dfa_stats(&self) -> antlr4_runtime::ParserDfaStats {
self.simulator.as_ref().map_or_else(
antlr4_runtime::ParserDfaStats::default,
antlr4_runtime::ParserAtnSimulator::parser_dfa_stats,
)
}
/// Clears this grammar's learned parser decision DFAs.
pub fn clear_dfa(&mut self) {
if let Some(simulator) = self.simulator.as_mut() {
simulator.clear_dfa();
} else {
antlr4_runtime::ParserAtnSimulator::clear_shared_dfa(atn());
}
}
#[must_use]
pub fn node(&self, id: antlr4_runtime::NodeId) -> antlr4_runtime::Node<'_> {
self.base.node(id)
}
#[must_use]
pub fn into_token_stream(self) -> CommonTokenStream<L> {
self.base.into_token_stream()
}
#[must_use]
pub fn into_token_store(self) -> antlr4_runtime::TokenStore {
self.base.into_token_store()
}
#[must_use]
pub fn into_parsed_file(self, root: antlr4_runtime::NodeId) -> antlr4_runtime::ParsedFile {
self.base.into_parsed_file(root)
}
#[allow(dead_code)]
fn simulator(&mut self) -> &mut antlr4_runtime::ParserAtnSimulator<'static> {
self.simulator
.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()))
}
#[allow(dead_code)]
fn generated_only(&self) -> bool {
self.generated_only
}
#[allow(dead_code)]
fn parse_rule(&mut self, rule_index: usize) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule_precedence(rule_index, 0)
}
#[allow(dead_code)]
fn parse_rule_precedence(&mut self, rule_index: usize, precedence: i32) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule_precedence_inner(rule_index, precedence, true)
}
#[allow(dead_code)]
fn parse_rule_precedence_from_generated(&mut self, rule_index: usize, precedence: i32) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule_precedence_inner(rule_index, precedence, false)
}
#[allow(dead_code)]
fn parse_rule_precedence_inner(&mut self, rule_index: usize, precedence: i32, allow_generated_fallback: bool) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
if allow_generated_fallback {
// True top-level entry: drop any fail-loud coordinates left by a
// previous parse so a reused parser starts clean. Mid-parse the hits
// are preserved so a generated parent can surface a recovered child's
// fail-loud coordinate at this boundary.
self.base.reset_unknown_semantic_hits();
}
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let __generated_only = self.generated_only();
let __tree = if let Some(result) = self.parse_generated_rule(rule_index, precedence, allow_generated_fallback) {
match result {
Ok(tree) => tree,
Err(error) => {
antlr4_runtime::IntStream::seek(self.base.input(), __rule_start);
// A generated predicate that consulted an unimplemented hook
// (returning None under the Error policy) fails the alternative
// and surfaces here as a generic failed-predicate/rule error.
// The documented contract is to fail loud with
// `AntlrError::Unsupported`, so prefer a recorded semantic error
// over the generic one — but only at the top-level entry, mirroring
// the post-parse check below: a nested child keeps its hits so the
// generated parent surfaces them at that boundary instead.
if allow_generated_fallback {
if let Some(semantic_error) = self.base.take_unknown_semantic_error() {
return Err(semantic_error);
}
}
return Err(error.into_error());
}
}
} else if __generated_only {
return Err(antlr4_runtime::AntlrError::Unsupported(format!("generated parser did not emit rule {}", rule_index)));
} else {
self.parse_interpreted_rule_precedence(rule_index, precedence)?
};
// Surface unknown-predicate coordinates recorded under the Error policy
// at the top-level entry. Generated predicate steps evaluate on the
// committed path and are recovered as rule errors, so a parse that
// consulted an unimplemented hook predicate must fail with
// `AntlrError::Unsupported` instead of returning a recovered `Ok` tree.
if allow_generated_fallback {
if let Some(error) = self.base.take_unknown_semantic_error() {
return Err(error);
}
}
if allow_generated_fallback {
self.base.report_generated_parser_diagnostics();
if let Some(error) = self.base.take_unknown_semantic_error() {
return Err(error);
}
}
Ok(__tree)
}
#[allow(dead_code)]
fn parse_interpreted_rule(&mut self, rule_index: usize) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_interpreted_rule_precedence(rule_index, 0)
}
#[allow(dead_code)]
fn parse_interpreted_rule_precedence(&mut self, rule_index: usize, precedence: i32) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
if precedence == 0 && false && std::env::var_os("ANTLR4_RUST_ADAPTIVE_DIRECT").is_some() {
let simulator = self
.simulator
.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
self.base
.parse_atn_rule_adaptive_or_fallback(atn(), simulator, rule_index)
} else {
let (tree, actions) = self.base.parse_atn_rule_with_runtime_options_and_precedence(atn(), rule_index, precedence, antlr4_runtime::ParserRuntimeOptions { track_alt_numbers: false, track_context_alt_numbers: false, predicates: &[], semantics: Some(parser_semantics()), rule_args: &[], member_actions: &[], return_actions: &[], unknown_predicate_policy: antlr4_runtime::UnknownSemanticPolicy::Error , ..antlr4_runtime::ParserRuntimeOptions::default() })?;
let _ = actions;
Ok(tree)
}
}
#[allow(dead_code)]
fn parse_generated_rule(&mut self, rule_index: usize, precedence: i32, allow_fallback: bool) -> Option<Result<antlr4_runtime::ParseTree, GeneratedRuleError>> {
let _ = precedence;
let _ = allow_fallback;
match rule_index {
0 => Some(self.parse_generated_rule_0_dispatch(precedence, allow_fallback)),
1 => Some(self.parse_generated_rule_1_dispatch(precedence, allow_fallback)),
2 => Some(self.parse_generated_rule_2_dispatch(precedence, allow_fallback)),
3 => Some(self.parse_generated_rule_3_dispatch(precedence, allow_fallback)),
4 => Some(self.parse_generated_rule_4_dispatch(precedence, allow_fallback)),
5 => Some(self.parse_generated_rule_5_dispatch(precedence, allow_fallback)),
6 => Some(self.parse_generated_rule_6_dispatch(precedence, allow_fallback)),
7 => Some(self.parse_generated_rule_7_dispatch(precedence, allow_fallback)),
8 => Some(self.parse_generated_rule_8_dispatch(precedence, allow_fallback)),
9 => Some(self.parse_generated_rule_9_dispatch(precedence, allow_fallback)),
10 => Some(self.parse_generated_rule_10_dispatch(precedence, allow_fallback)),
11 => Some(self.parse_generated_rule_11_dispatch(precedence, allow_fallback)),
12 => Some(self.parse_generated_rule_12_dispatch(precedence, allow_fallback)),
13 => Some(self.parse_generated_rule_13_dispatch(precedence, allow_fallback)),
14 => Some(self.parse_generated_rule_14_dispatch(precedence, allow_fallback)),
15 => Some(self.parse_generated_rule_15_dispatch(precedence, allow_fallback)),
16 => Some(self.parse_generated_rule_16_dispatch(precedence, allow_fallback)),
17 => Some(self.parse_generated_rule_17_dispatch(precedence, allow_fallback)),
18 => Some(self.parse_generated_rule_18_dispatch(precedence, allow_fallback)),
19 => Some(self.parse_generated_rule_19_dispatch(precedence, allow_fallback)),
20 => Some(self.parse_generated_rule_20_dispatch(precedence, allow_fallback)),
21 => Some(self.parse_generated_rule_21_dispatch(precedence, allow_fallback)),
22 => Some(self.parse_generated_rule_22_dispatch(precedence, allow_fallback)),
23 => Some(self.parse_generated_rule_23_dispatch(precedence, allow_fallback)),
24 => Some(self.parse_generated_rule_24_dispatch(precedence, allow_fallback)),
25 => Some(self.parse_generated_rule_25_dispatch(precedence, allow_fallback)),
26 => Some(self.parse_generated_rule_26_dispatch(precedence, allow_fallback)),
27 => Some(self.parse_generated_rule_27_dispatch(precedence, allow_fallback)),
28 => Some(self.parse_generated_rule_28_dispatch(precedence, allow_fallback)),
29 => Some(self.parse_generated_rule_29_dispatch(precedence, allow_fallback)),
30 => Some(self.parse_generated_rule_30_dispatch(precedence, allow_fallback)),
31 => Some(self.parse_generated_rule_31_dispatch(precedence, allow_fallback)),
32 => Some(self.parse_generated_rule_32_dispatch(precedence, allow_fallback)),
33 => Some(self.parse_generated_rule_33_dispatch(precedence, allow_fallback)),
34 => Some(self.parse_generated_rule_34_dispatch(precedence, allow_fallback)),
35 => Some(self.parse_generated_rule_35_dispatch(precedence, allow_fallback)),
36 => Some(self.parse_generated_rule_36_dispatch(precedence, allow_fallback)),
37 => Some(self.parse_generated_rule_37_dispatch(precedence, allow_fallback)),
38 => Some(self.parse_generated_rule_38_dispatch(precedence, allow_fallback)),
39 => Some(self.parse_generated_rule_39_dispatch(precedence, allow_fallback)),
40 => Some(self.parse_generated_rule_40_dispatch(precedence, allow_fallback)),
41 => Some(self.parse_generated_rule_41_dispatch(precedence, allow_fallback)),
42 => Some(self.parse_generated_rule_42_dispatch(precedence, allow_fallback)),
43 => Some(self.parse_generated_rule_43_dispatch(precedence, allow_fallback)),
44 => Some(self.parse_generated_rule_44_dispatch(precedence, allow_fallback)),
45 => Some(self.parse_generated_rule_45_dispatch(precedence, allow_fallback)),
46 => Some(self.parse_generated_rule_46_dispatch(precedence, allow_fallback)),
47 => Some(self.parse_generated_rule_47_dispatch(precedence, allow_fallback)),
48 => Some(self.parse_generated_rule_48_dispatch(precedence, allow_fallback)),
49 => Some(self.parse_generated_rule_49_dispatch(precedence, allow_fallback)),
50 => Some(self.parse_generated_rule_50_dispatch(precedence, allow_fallback)),
51 => Some(self.parse_generated_rule_51_dispatch(precedence, allow_fallback)),
52 => Some(self.parse_generated_rule_52_dispatch(precedence, allow_fallback)),
53 => Some(self.parse_generated_rule_53_dispatch(precedence, allow_fallback)),
54 => Some(self.parse_generated_rule_54_dispatch(precedence, allow_fallback)),
55 => Some(self.parse_generated_rule_55_dispatch(precedence, allow_fallback)),
56 => Some(self.parse_generated_rule_56_dispatch(precedence, allow_fallback)),
57 => Some(self.parse_generated_rule_57_dispatch(precedence, allow_fallback)),
58 => Some(self.parse_generated_rule_58_dispatch(precedence, allow_fallback)),
59 => Some(self.parse_generated_rule_59_dispatch(precedence, allow_fallback)),
60 => Some(self.parse_generated_rule_60_dispatch(precedence, allow_fallback)),
61 => Some(self.parse_generated_rule_61_dispatch(precedence, allow_fallback)),
62 => Some(self.parse_generated_rule_62_dispatch(precedence, allow_fallback)),
63 => Some(self.parse_generated_rule_63_dispatch(precedence, allow_fallback)),
64 => Some(self.parse_generated_rule_64_dispatch(precedence, allow_fallback)),
65 => Some(self.parse_generated_rule_65_dispatch(precedence, allow_fallback)),
66 => Some(self.parse_generated_rule_66_dispatch(precedence, allow_fallback)),
_ => None,
}
}
#[allow(dead_code)]
fn parse_generated_rule_0_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_0(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_0(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(0isize, 0);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __invoking_marker = self.base.push_invoking_state(134isize);
let __child = self.parse_generated_rule_1_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let mut __loop_iter_138 = false;
loop {
match self.base.sync_decision(atn(), 138, !__ctx.has_matched_child(), __loop_iter_138) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 138) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(0, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(0, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 138, &__prediction);
match __prediction.alt {
1 => {
__loop_iter_138 = true;
let __invoking_marker = self.base.push_invoking_state(135isize);
let __child = self.parse_generated_rule_3_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
break;
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
let __invoking_marker = self.base.push_invoking_state(141isize);
let __child = self.parse_generated_rule_17_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let mut __loop_iter_145 = false;
loop {
match self.base.sync_decision(atn(), 145, !__ctx.has_matched_child(), __loop_iter_145) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 145) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(1, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(1, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 145, &__prediction);
match __prediction.alt {
1 => {
__loop_iter_145 = true;
let __invoking_marker = self.base.push_invoking_state(142isize);
let __child = self.parse_generated_rule_16_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
break;
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
let __match = self.base.match_token_recovering(-1, 149, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_1_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_1(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_1(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(2isize, 1);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __invoking_marker = self.base.push_invoking_state(150isize);
let __child = self.parse_generated_rule_2_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let __invoking_marker = self.base.push_invoking_state(151isize);
let __child = self.parse_generated_rule_65_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let __match = self.base.match_token_recovering(56, 153, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_2_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_2(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_2(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(4isize, 2);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let mut __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = match self.base.la(1) {
41 => antlr4_runtime::ParserAtnPrediction { alt: 1, requires_full_context: false, has_semantic_context: false, diagnostic: None },
42 => antlr4_runtime::ParserAtnPrediction { alt: 2, requires_full_context: false, has_semantic_context: false, diagnostic: None },
43 => antlr4_runtime::ParserAtnPrediction { alt: 3, requires_full_context: false, has_semantic_context: false, diagnostic: None },
_ => {
match self.base.sync_decision(atn(), 159, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
__decision_start = antlr4_runtime::IntStream::index(self.base.input());
if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 159) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(2, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(2, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
}
}
};
self.base.record_generated_prediction_diagnostic(atn(), 159, &__prediction);
match __prediction.alt {
1 => {
let __match = self.base.match_token_recovering(41, 155, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __match = self.base.match_token_recovering(43, 160, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
2 => {
let __match = self.base.match_token_recovering(42, 157, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __match = self.base.match_token_recovering(43, 160, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
3 => {
let __match = self.base.match_token_recovering(43, 160, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_3_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_3(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_3(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(6isize, 3);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let mut __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = match self.base.la(1) {
36 => antlr4_runtime::ParserAtnPrediction { alt: 1, requires_full_context: false, has_semantic_context: false, diagnostic: None },
39 => antlr4_runtime::ParserAtnPrediction { alt: 2, requires_full_context: false, has_semantic_context: false, diagnostic: None },
37 => antlr4_runtime::ParserAtnPrediction { alt: 3, requires_full_context: false, has_semantic_context: false, diagnostic: None },
38 => antlr4_runtime::ParserAtnPrediction { alt: 4, requires_full_context: false, has_semantic_context: false, diagnostic: None },
71 => antlr4_runtime::ParserAtnPrediction { alt: 5, requires_full_context: false, has_semantic_context: false, diagnostic: None },
_ => {
match self.base.sync_decision(atn(), 166, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
__decision_start = antlr4_runtime::IntStream::index(self.base.input());
if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 166) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(3, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(3, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
}
}
};
self.base.record_generated_prediction_diagnostic(atn(), 166, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(161isize);
let __child = self.parse_generated_rule_4_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
let __invoking_marker = self.base.push_invoking_state(162isize);
let __child = self.parse_generated_rule_7_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
3 => {
let __invoking_marker = self.base.push_invoking_state(163isize);
let __child = self.parse_generated_rule_9_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
4 => {
let __invoking_marker = self.base.push_invoking_state(164isize);
let __child = self.parse_generated_rule_10_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
5 => {
let __invoking_marker = self.base.push_invoking_state(165isize);
let __child = self.parse_generated_rule_12_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_4_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_4(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_4(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(8isize, 4);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __match = self.base.match_token_recovering(36, 174, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let mut __loop_iter_174 = false;
loop {
match self.base.sync_decision(atn(), 174, !__ctx.has_matched_child(), __loop_iter_174) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 174) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(4, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(4, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 174, &__prediction);
match __prediction.alt {
1 => {
__loop_iter_174 = true;
let __invoking_marker = self.base.push_invoking_state(169isize);
let __child = self.parse_generated_rule_5_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let __match = self.base.match_token_recovering(56, 171, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
2 => {
break;
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
let __match = self.base.match_token_recovering(59, 178, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_5_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_5(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_5(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(10isize, 5);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __invoking_marker = self.base.push_invoking_state(179isize);
let __child = self.parse_generated_rule_65_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let __match = self.base.match_token_recovering(7, 181, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(181isize);
let __child = self.parse_generated_rule_6_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_6_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_6(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_6(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(12isize, 6);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let mut __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = match self.base.la(1) {
9 | 12 => antlr4_runtime::ParserAtnPrediction { alt: 1, requires_full_context: false, has_semantic_context: false, diagnostic: None },
11 => antlr4_runtime::ParserAtnPrediction { alt: 2, requires_full_context: false, has_semantic_context: false, diagnostic: None },
4 => antlr4_runtime::ParserAtnPrediction { alt: 3, requires_full_context: false, has_semantic_context: false, diagnostic: None },
33 => antlr4_runtime::ParserAtnPrediction { alt: 4, requires_full_context: false, has_semantic_context: false, diagnostic: None },
_ => {
match self.base.sync_decision(atn(), 194, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
__decision_start = antlr4_runtime::IntStream::index(self.base.input());
if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 194) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(6, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(6, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
}
}
};
self.base.record_generated_prediction_diagnostic(atn(), 194, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(183isize);
let __child = self.parse_generated_rule_65_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let mut __loop_iter_188 = false;
loop {
match self.base.sync_decision(atn(), 188, !__ctx.has_matched_child(), __loop_iter_188) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 188) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(5, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(5, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 188, &__prediction);
match __prediction.alt {
1 => {
__loop_iter_188 = true;
let __match = self.base.match_token_recovering(70, 185, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(185isize);
let __child = self.parse_generated_rule_65_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
break;
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
}
2 => {
let __match = self.base.match_token_recovering(11, 195, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
3 => {
let __invoking_marker = self.base.push_invoking_state(192isize);
let __child = self.parse_generated_rule_14_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
4 => {
let __match = self.base.match_token_recovering(33, 195, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_7_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_7(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_7(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(14isize, 7);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __match = self.base.match_token_recovering(39, 197, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(197isize);
let __child = self.parse_generated_rule_8_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let mut __loop_iter_202 = false;
loop {
match self.base.sync_decision(atn(), 202, !__ctx.has_matched_child(), __loop_iter_202) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 202) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(7, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(7, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 202, &__prediction);
match __prediction.alt {
1 => {
__loop_iter_202 = true;
let __match = self.base.match_token_recovering(55, 199, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(199isize);
let __child = self.parse_generated_rule_8_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
break;
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
let __match = self.base.match_token_recovering(56, 206, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_8_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_8(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_8(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(16isize, 8);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
match self.base.sync_decision(atn(), 212, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 212) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(8, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(8, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 212, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(207isize);
let __child = self.parse_generated_rule_65_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let __match = self.base.match_token_recovering(7, 209, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(209isize);
let __child = self.parse_generated_rule_65_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
let __invoking_marker = self.base.push_invoking_state(211isize);
let __child = self.parse_generated_rule_65_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_9_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_9(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_9(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(18isize, 9);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __match = self.base.match_token_recovering(37, 216, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
match self.base.sync_decision(atn(), 216, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 216) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(9, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(9, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 216, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(215isize);
let __child = self.parse_generated_rule_11_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
let __match = self.base.match_token_recovering(59, 219, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_10_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_10(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_10(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(20isize, 10);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __match = self.base.match_token_recovering(38, 222, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
match self.base.sync_decision(atn(), 222, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 222) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(10, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(10, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 222, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(221isize);
let __child = self.parse_generated_rule_11_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
let __match = self.base.match_token_recovering(59, 225, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_11_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_11(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_11(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(22isize, 11);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __invoking_marker = self.base.push_invoking_state(226isize);
let __child = self.parse_generated_rule_65_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let mut __loop_iter_231 = false;
loop {
match self.base.sync_decision(atn(), 231, !__ctx.has_matched_child(), __loop_iter_231) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 231) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(11, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(11, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 231, &__prediction);
match __prediction.alt {
1 => {
__loop_iter_231 = true;
let __match = self.base.match_token_recovering(55, 228, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(228isize);
let __child = self.parse_generated_rule_65_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
break;
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
match self.base.sync_decision(atn(), 235, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 235) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(12, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(12, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 235, &__prediction);
match __prediction.alt {
1 => {
let __match = self.base.match_token_recovering(55, 236, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_12_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_12(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_12(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(24isize, 12);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __match = self.base.match_token_recovering(71, 241, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
match self.base.sync_decision(atn(), 241, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 241) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(13, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(13, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 241, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(238isize);
let __child = self.parse_generated_rule_13_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let __match = self.base.match_token_recovering(54, 240, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
let __invoking_marker = self.base.push_invoking_state(243isize);
let __child = self.parse_generated_rule_65_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let __invoking_marker = self.base.push_invoking_state(244isize);
let __child = self.parse_generated_rule_14_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_13_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_13(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_13(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(26isize, 13);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let mut __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = match self.base.la(1) {
9 | 12 => antlr4_runtime::ParserAtnPrediction { alt: 1, requires_full_context: false, has_semantic_context: false, diagnostic: None },
41 => antlr4_runtime::ParserAtnPrediction { alt: 2, requires_full_context: false, has_semantic_context: false, diagnostic: None },
42 => antlr4_runtime::ParserAtnPrediction { alt: 3, requires_full_context: false, has_semantic_context: false, diagnostic: None },
_ => {
match self.base.sync_decision(atn(), 249, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
__decision_start = antlr4_runtime::IntStream::index(self.base.input());
if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 249) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(14, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(14, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
}
}
};
self.base.record_generated_prediction_diagnostic(atn(), 249, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(246isize);
let __child = self.parse_generated_rule_65_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
let __match = self.base.match_token_recovering(41, 250, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
3 => {
let __match = self.base.match_token_recovering(42, 250, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_14_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_14(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_14(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(28isize, 14);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __match = self.base.match_token_recovering(4, 252, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_15_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_15(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_15(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(30isize, 15);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __match = self.base.match_token_recovering(35, 257, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let mut __loop_iter_257 = false;
loop {
match self.base.sync_decision(atn(), 257, !__ctx.has_matched_child(), __loop_iter_257) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(15, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
self.base.record_generated_prediction_diagnostic(atn(), 257, &__prediction);
match __prediction.alt {
2 => {
__loop_iter_257 = true;
let __match = self.base.match_token_recovering(77, 256, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
1 => {
break;
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
let __match = self.base.match_token_recovering(75, 261, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_16_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_16(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_16(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(32isize, 16);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __match = self.base.match_token_recovering(52, 263, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(263isize);
let __child = self.parse_generated_rule_65_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let __match = self.base.match_token_recovering(56, 268, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let mut __loop_iter_268 = false;
loop {
match self.base.sync_decision(atn(), 268, !__ctx.has_matched_child(), __loop_iter_268) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 268) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(16, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(16, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 268, &__prediction);
match __prediction.alt {
1 => {
__loop_iter_268 = true;
let __invoking_marker = self.base.push_invoking_state(265isize);
let __child = self.parse_generated_rule_33_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
break;
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_17_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_17(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_17(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(34isize, 17);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let mut __loop_iter_274 = false;
loop {
match self.base.sync_decision(atn(), 274, !__ctx.has_matched_child(), __loop_iter_274) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 274) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(17, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(17, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 274, &__prediction);
match __prediction.alt {
1 => {
__loop_iter_274 = true;
let __invoking_marker = self.base.push_invoking_state(271isize);
let __child = self.parse_generated_rule_18_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
break;
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_18_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_18(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_18(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(36isize, 18);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let mut __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = match self.base.la(1) {
9 | 44..=46 => antlr4_runtime::ParserAtnPrediction { alt: 1, requires_full_context: false, has_semantic_context: false, diagnostic: None },
12 => antlr4_runtime::ParserAtnPrediction { alt: 2, requires_full_context: false, has_semantic_context: false, diagnostic: None },
_ => {
match self.base.sync_decision(atn(), 279, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
__decision_start = antlr4_runtime::IntStream::index(self.base.input());
if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 279) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(18, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(18, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
}
}
};
self.base.record_generated_prediction_diagnostic(atn(), 279, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(277isize);
let __child = self.parse_generated_rule_19_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
let __invoking_marker = self.base.push_invoking_state(278isize);
let __child = self.parse_generated_rule_33_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_19_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_19(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_19(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(38isize, 19);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
match self.base.sync_decision(atn(), 282, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 282) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(19, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(19, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 282, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(281isize);
let __child = self.parse_generated_rule_28_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
let __match = self.base.match_token_recovering(9, 286, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
match self.base.sync_decision(atn(), 286, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 286) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(20, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(20, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 286, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(285isize);
let __child = self.parse_generated_rule_15_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
match self.base.sync_decision(atn(), 289, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 289) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(21, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(21, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 289, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(288isize);
let __child = self.parse_generated_rule_24_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
match self.base.sync_decision(atn(), 292, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 292) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(22, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(22, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 292, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(291isize);
let __child = self.parse_generated_rule_25_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
match self.base.sync_decision(atn(), 295, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 295) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(23, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(23, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 295, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(294isize);
let __child = self.parse_generated_rule_26_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
let mut __loop_iter_300 = false;
loop {
match self.base.sync_decision(atn(), 300, !__ctx.has_matched_child(), __loop_iter_300) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 300) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(24, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(24, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 300, &__prediction);
match __prediction.alt {
1 => {
__loop_iter_300 = true;
let __invoking_marker = self.base.push_invoking_state(297isize);
let __child = self.parse_generated_rule_23_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
break;
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
let __match = self.base.match_token_recovering(53, 304, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(304isize);
let __child = self.parse_generated_rule_30_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let __match = self.base.match_token_recovering(56, 306, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(306isize);
let __child = self.parse_generated_rule_20_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_20_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_20(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_20(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(40isize, 20);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let mut __loop_iter_311 = false;
loop {
match self.base.sync_decision(atn(), 311, !__ctx.has_matched_child(), __loop_iter_311) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 311) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(25, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(25, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 311, &__prediction);
match __prediction.alt {
1 => {
__loop_iter_311 = true;
let __invoking_marker = self.base.push_invoking_state(308isize);
let __child = self.parse_generated_rule_21_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
break;
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
match self.base.sync_decision(atn(), 315, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 315) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(26, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(26, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 315, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(314isize);
let __child = self.parse_generated_rule_22_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_21_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_21(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_21(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(42isize, 21);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __match = self.base.match_token_recovering(50, 318, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(318isize);
let __child = self.parse_generated_rule_15_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let __invoking_marker = self.base.push_invoking_state(319isize);
let __child = self.parse_generated_rule_14_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_22_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_22(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_22(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(44isize, 22);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __match = self.base.match_token_recovering(51, 322, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(322isize);
let __child = self.parse_generated_rule_14_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_23_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_23(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_23(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(46isize, 23);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let mut __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = match self.base.la(1) {
36 => antlr4_runtime::ParserAtnPrediction { alt: 1, requires_full_context: false, has_semantic_context: false, diagnostic: None },
71 => antlr4_runtime::ParserAtnPrediction { alt: 2, requires_full_context: false, has_semantic_context: false, diagnostic: None },
_ => {
match self.base.sync_decision(atn(), 326, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
__decision_start = antlr4_runtime::IntStream::index(self.base.input());
if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 326) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(27, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(27, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
}
}
};
self.base.record_generated_prediction_diagnostic(atn(), 326, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(324isize);
let __child = self.parse_generated_rule_4_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
let __invoking_marker = self.base.push_invoking_state(325isize);
let __child = self.parse_generated_rule_27_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_24_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_24(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_24(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(48isize, 24);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __match = self.base.match_token_recovering(47, 329, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(329isize);
let __child = self.parse_generated_rule_15_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_25_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_25(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_25(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(50isize, 25);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __match = self.base.match_token_recovering(49, 332, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(332isize);
let __child = self.parse_generated_rule_66_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let mut __loop_iter_337 = false;
loop {
match self.base.sync_decision(atn(), 337, !__ctx.has_matched_child(), __loop_iter_337) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 337) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(28, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(28, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 337, &__prediction);
match __prediction.alt {
1 => {
__loop_iter_337 = true;
let __match = self.base.match_token_recovering(55, 334, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(334isize);
let __child = self.parse_generated_rule_66_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
break;
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_26_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_26(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_26(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(52isize, 26);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __match = self.base.match_token_recovering(48, 341, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(341isize);
let __child = self.parse_generated_rule_15_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_27_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_27(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_27(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(54isize, 27);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __match = self.base.match_token_recovering(71, 344, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(344isize);
let __child = self.parse_generated_rule_65_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let __invoking_marker = self.base.push_invoking_state(345isize);
let __child = self.parse_generated_rule_14_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_28_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_28(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_28(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(56isize, 28);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __invoking_marker = self.base.push_invoking_state(347isize);
let __child = self.parse_generated_rule_29_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let mut __loop_iter_350 = true;
loop {
match self.base.sync_decision(atn(), 350, !__ctx.has_matched_child(), __loop_iter_350) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 350) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(29, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(29, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 350, &__prediction);
match __prediction.alt {
1 => {
__loop_iter_350 = true;
let __invoking_marker = self.base.push_invoking_state(347isize);
let __child = self.parse_generated_rule_29_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
break;
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_29_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_29(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_29(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(58isize, 29);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __match = self.base.match_set_recovering(&[(40, 40), (44, 46)], 353, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_30_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_30(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_30(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(60isize, 30);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __invoking_marker = self.base.push_invoking_state(354isize);
let __child = self.parse_generated_rule_31_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_31_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_31(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_31(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(62isize, 31);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __invoking_marker = self.base.push_invoking_state(356isize);
let __child = self.parse_generated_rule_32_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let mut __loop_iter_361 = false;
loop {
match self.base.sync_decision(atn(), 361, !__ctx.has_matched_child(), __loop_iter_361) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 361) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(30, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(30, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 361, &__prediction);
match __prediction.alt {
1 => {
__loop_iter_361 = true;
let __match = self.base.match_token_recovering(67, 358, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(358isize);
let __child = self.parse_generated_rule_32_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
break;
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_32_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_32(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_32(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(64isize, 32);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __invoking_marker = self.base.push_invoking_state(364isize);
let __child = self.parse_generated_rule_45_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
match self.base.sync_decision(atn(), 367, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 367) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(31, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(31, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 367, &__prediction);
match __prediction.alt {
1 => {
let __match = self.base.match_token_recovering(72, 366, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(366isize);
let __child = self.parse_generated_rule_65_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_33_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_33(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_33(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(66isize, 33);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
match self.base.sync_decision(atn(), 370, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 370) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(32, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(32, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 370, &__prediction);
match __prediction.alt {
1 => {
let __match = self.base.match_token_recovering(40, 371, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
let __match = self.base.match_token_recovering(12, 374, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
match self.base.sync_decision(atn(), 374, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 374) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(33, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(33, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 374, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(373isize);
let __child = self.parse_generated_rule_4_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
let __match = self.base.match_token_recovering(53, 377, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(377isize);
let __child = self.parse_generated_rule_34_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let __match = self.base.match_token_recovering(56, 379, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_34_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_34(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_34(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(68isize, 34);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __invoking_marker = self.base.push_invoking_state(380isize);
let __child = self.parse_generated_rule_35_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_35_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_35(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_35(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(70isize, 35);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __invoking_marker = self.base.push_invoking_state(382isize);
let __child = self.parse_generated_rule_36_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let mut __loop_iter_387 = false;
loop {
match self.base.sync_decision(atn(), 387, !__ctx.has_matched_child(), __loop_iter_387) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 387) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(34, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(34, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 387, &__prediction);
match __prediction.alt {
1 => {
__loop_iter_387 = true;
let __match = self.base.match_token_recovering(67, 384, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(384isize);
let __child = self.parse_generated_rule_36_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
break;
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_36_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_36(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_36(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(72isize, 36);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
match self.base.sync_decision(atn(), 395, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 395) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(36, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(36, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 395, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(390isize);
let __child = self.parse_generated_rule_37_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
match self.base.sync_decision(atn(), 392, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 392) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(35, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(35, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 392, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(391isize);
let __child = self.parse_generated_rule_40_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_37_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_37(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_37(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(74isize, 37);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
match self.base.sync_decision(atn(), 403, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 403) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(38, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(38, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 403, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(397isize);
let __child = self.parse_generated_rule_38_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let mut __loop_iter_400 = true;
loop {
match self.base.sync_decision(atn(), 400, !__ctx.has_matched_child(), __loop_iter_400) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 400) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(37, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(37, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 400, &__prediction);
match __prediction.alt {
1 => {
__loop_iter_400 = true;
let __invoking_marker = self.base.push_invoking_state(397isize);
let __child = self.parse_generated_rule_38_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
break;
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_38_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_38(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_38(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(76isize, 38);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let mut __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = match self.base.la(1) {
8..=9 | 11..=12 | 70 | 73 => antlr4_runtime::ParserAtnPrediction { alt: 1, requires_full_context: false, has_semantic_context: false, diagnostic: None },
57 => antlr4_runtime::ParserAtnPrediction { alt: 2, requires_full_context: false, has_semantic_context: false, diagnostic: None },
4 => antlr4_runtime::ParserAtnPrediction { alt: 3, requires_full_context: false, has_semantic_context: false, diagnostic: None },
_ => {
match self.base.sync_decision(atn(), 417, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
__decision_start = antlr4_runtime::IntStream::index(self.base.input());
if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 417) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(42, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(42, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
}
}
};
self.base.record_generated_prediction_diagnostic(atn(), 417, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(405isize);
let __child = self.parse_generated_rule_53_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
match self.base.sync_decision(atn(), 407, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 407) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(39, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(39, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 407, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(406isize);
let __child = self.parse_generated_rule_52_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
2 => {
let __invoking_marker = self.base.push_invoking_state(409isize);
let __child = self.parse_generated_rule_39_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
match self.base.sync_decision(atn(), 411, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 411) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(40, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(40, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 411, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(410isize);
let __child = self.parse_generated_rule_52_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
3 => {
let __invoking_marker = self.base.push_invoking_state(413isize);
let __child = self.parse_generated_rule_14_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
match self.base.sync_decision(atn(), 415, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 415) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(41, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(41, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 415, &__prediction);
match __prediction.alt {
1 => {
let __match = self.base.match_token_recovering(63, 416, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_39_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_39(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_39(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(78isize, 39);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __match = self.base.match_token_recovering(57, 420, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(420isize);
let __child = self.parse_generated_rule_35_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let __match = self.base.match_token_recovering(58, 422, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_40_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_40(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_40(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(80isize, 40);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __match = self.base.match_token_recovering(60, 424, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(424isize);
let __child = self.parse_generated_rule_41_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let mut __loop_iter_429 = false;
loop {
match self.base.sync_decision(atn(), 429, !__ctx.has_matched_child(), __loop_iter_429) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 429) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(43, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(43, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 429, &__prediction);
match __prediction.alt {
1 => {
__loop_iter_429 = true;
let __match = self.base.match_token_recovering(55, 426, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(426isize);
let __child = self.parse_generated_rule_41_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
break;
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_41_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_41(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_41(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(82isize, 41);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
match self.base.sync_decision(atn(), 438, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 438) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(44, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(44, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 438, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(432isize);
let __child = self.parse_generated_rule_42_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let __match = self.base.match_token_recovering(57, 434, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(434isize);
let __child = self.parse_generated_rule_43_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let __match = self.base.match_token_recovering(58, 436, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
2 => {
let __invoking_marker = self.base.push_invoking_state(437isize);
let __child = self.parse_generated_rule_42_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_42_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_42(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_42(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(84isize, 42);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let mut __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = match self.base.la(1) {
9 | 12 => antlr4_runtime::ParserAtnPrediction { alt: 1, requires_full_context: false, has_semantic_context: false, diagnostic: None },
52 => antlr4_runtime::ParserAtnPrediction { alt: 2, requires_full_context: false, has_semantic_context: false, diagnostic: None },
_ => {
match self.base.sync_decision(atn(), 442, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
__decision_start = antlr4_runtime::IntStream::index(self.base.input());
if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 442) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(45, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(45, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
}
}
};
self.base.record_generated_prediction_diagnostic(atn(), 442, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(440isize);
let __child = self.parse_generated_rule_65_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
let __match = self.base.match_token_recovering(52, 443, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_43_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_43(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_43(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(86isize, 43);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let mut __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = match self.base.la(1) {
9 | 12 => antlr4_runtime::ParserAtnPrediction { alt: 1, requires_full_context: false, has_semantic_context: false, diagnostic: None },
33 => antlr4_runtime::ParserAtnPrediction { alt: 2, requires_full_context: false, has_semantic_context: false, diagnostic: None },
_ => {
match self.base.sync_decision(atn(), 446, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
__decision_start = antlr4_runtime::IntStream::index(self.base.input());
if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 446) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(46, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(46, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
}
}
};
self.base.record_generated_prediction_diagnostic(atn(), 446, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(444isize);
let __child = self.parse_generated_rule_65_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
let __match = self.base.match_token_recovering(33, 447, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_44_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_44(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_44(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(88isize, 44);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __invoking_marker = self.base.push_invoking_state(448isize);
let __child = self.parse_generated_rule_45_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let mut __loop_iter_453 = false;
loop {
match self.base.sync_decision(atn(), 453, !__ctx.has_matched_child(), __loop_iter_453) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 453) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(47, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(47, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 453, &__prediction);
match __prediction.alt {
1 => {
__loop_iter_453 = true;
let __match = self.base.match_token_recovering(67, 450, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(450isize);
let __child = self.parse_generated_rule_45_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
break;
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_45_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_45(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_45(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(90isize, 45);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
match self.base.sync_decision(atn(), 465, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 465) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(50, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(50, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 465, &__prediction);
match __prediction.alt {
1 => {
match self.base.sync_decision(atn(), 457, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 457) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(48, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(48, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 457, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(456isize);
let __child = self.parse_generated_rule_63_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
let __invoking_marker = self.base.push_invoking_state(459isize);
let __child = self.parse_generated_rule_46_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let mut __loop_iter_462 = true;
loop {
match self.base.sync_decision(atn(), 462, !__ctx.has_matched_child(), __loop_iter_462) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 462) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(49, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(49, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 462, &__prediction);
match __prediction.alt {
1 => {
__loop_iter_462 = true;
let __invoking_marker = self.base.push_invoking_state(459isize);
let __child = self.parse_generated_rule_46_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
break;
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_46_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_46(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_46(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(92isize, 46);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let mut __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = match self.base.la(1) {
11 | 70 | 73 => antlr4_runtime::ParserAtnPrediction { alt: 2, requires_full_context: false, has_semantic_context: false, diagnostic: None },
57 => antlr4_runtime::ParserAtnPrediction { alt: 3, requires_full_context: false, has_semantic_context: false, diagnostic: None },
4 => antlr4_runtime::ParserAtnPrediction { alt: 4, requires_full_context: false, has_semantic_context: false, diagnostic: None },
_ => {
match self.base.sync_decision(atn(), 485, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
__decision_start = antlr4_runtime::IntStream::index(self.base.input());
if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 485) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(55, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(55, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
}
}
};
self.base.record_generated_prediction_diagnostic(atn(), 485, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(467isize);
let __child = self.parse_generated_rule_49_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
match self.base.sync_decision(atn(), 470, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 470) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(51, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(51, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 470, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(468isize);
let __child = self.parse_generated_rule_52_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
2 => {
let __invoking_marker = self.base.push_invoking_state(472isize);
let __child = self.parse_generated_rule_54_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
match self.base.sync_decision(atn(), 475, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 475) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(52, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(52, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 475, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(473isize);
let __child = self.parse_generated_rule_52_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
3 => {
let __invoking_marker = self.base.push_invoking_state(477isize);
let __child = self.parse_generated_rule_50_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
4 => {
let __invoking_marker = self.base.push_invoking_state(478isize);
let __child = self.parse_generated_rule_14_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
match self.base.sync_decision(atn(), 480, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 480) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(53, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(53, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 480, &__prediction);
match __prediction.alt {
1 => {
let __match = self.base.match_token_recovering(63, 481, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
match self.base.sync_decision(atn(), 483, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 483) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(54, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(54, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 483, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(482isize);
let __child = self.parse_generated_rule_47_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_47_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_47(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_47(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(94isize, 47);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __match = self.base.match_token_recovering(61, 488, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(488isize);
let __child = self.parse_generated_rule_48_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let mut __loop_iter_493 = false;
loop {
match self.base.sync_decision(atn(), 493, !__ctx.has_matched_child(), __loop_iter_493) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 493) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(56, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(56, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 493, &__prediction);
match __prediction.alt {
1 => {
__loop_iter_493 = true;
let __match = self.base.match_token_recovering(55, 490, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(490isize);
let __child = self.parse_generated_rule_48_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
break;
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
let __match = self.base.match_token_recovering(62, 497, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_48_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_48(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_48(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(96isize, 48);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
match self.base.sync_decision(atn(), 506, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 506) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(58, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(58, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 506, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(498isize);
let __child = self.parse_generated_rule_64_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
let __invoking_marker = self.base.push_invoking_state(499isize);
let __child = self.parse_generated_rule_65_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let __match = self.base.match_token_recovering(7, 504, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let mut __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = match self.base.la(1) {
4 => antlr4_runtime::ParserAtnPrediction { alt: 1, requires_full_context: false, has_semantic_context: false, diagnostic: None },
33 => antlr4_runtime::ParserAtnPrediction { alt: 2, requires_full_context: false, has_semantic_context: false, diagnostic: None },
11 => antlr4_runtime::ParserAtnPrediction { alt: 3, requires_full_context: false, has_semantic_context: false, diagnostic: None },
_ => {
match self.base.sync_decision(atn(), 504, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
__decision_start = antlr4_runtime::IntStream::index(self.base.input());
if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 504) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(57, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(57, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
}
}
};
self.base.record_generated_prediction_diagnostic(atn(), 504, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(501isize);
let __child = self.parse_generated_rule_14_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
let __match = self.base.match_token_recovering(33, 505, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
3 => {
let __match = self.base.match_token_recovering(11, 505, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_49_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_49(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_49(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(98isize, 49);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __invoking_marker = self.base.push_invoking_state(508isize);
let __child = self.parse_generated_rule_65_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let __match = self.base.match_set_recovering(&[(7, 7), (65, 65)], 512, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let mut __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = match self.base.la(1) {
9 | 11..=12 | 70 | 73 => antlr4_runtime::ParserAtnPrediction { alt: 1, requires_full_context: false, has_semantic_context: false, diagnostic: None },
57 => antlr4_runtime::ParserAtnPrediction { alt: 2, requires_full_context: false, has_semantic_context: false, diagnostic: None },
_ => {
match self.base.sync_decision(atn(), 512, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
__decision_start = antlr4_runtime::IntStream::index(self.base.input());
if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 512) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(59, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(59, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
}
}
};
self.base.record_generated_prediction_diagnostic(atn(), 512, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(510isize);
let __child = self.parse_generated_rule_54_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
let __invoking_marker = self.base.push_invoking_state(511isize);
let __child = self.parse_generated_rule_59_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_50_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_50(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_50(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(100isize, 50);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __invoking_marker = self.base.push_invoking_state(514isize);
let __child = self.parse_generated_rule_59_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
match self.base.sync_decision(atn(), 516, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 516) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(60, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(60, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 516, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(515isize);
let __child = self.parse_generated_rule_51_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_51_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_51(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_51(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(102isize, 51);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __invoking_marker = self.base.push_invoking_state(518isize);
let __child = self.parse_generated_rule_52_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_52_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_52(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_52(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(104isize, 52);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let mut __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = match self.base.la(1) {
63 => antlr4_runtime::ParserAtnPrediction { alt: 1, requires_full_context: false, has_semantic_context: false, diagnostic: None },
64 => antlr4_runtime::ParserAtnPrediction { alt: 2, requires_full_context: false, has_semantic_context: false, diagnostic: None },
66 => antlr4_runtime::ParserAtnPrediction { alt: 3, requires_full_context: false, has_semantic_context: false, diagnostic: None },
_ => {
match self.base.sync_decision(atn(), 532, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
__decision_start = antlr4_runtime::IntStream::index(self.base.input());
if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 532) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(64, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(64, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
}
}
};
self.base.record_generated_prediction_diagnostic(atn(), 532, &__prediction);
match __prediction.alt {
1 => {
let __match = self.base.match_token_recovering(63, 522, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
match self.base.sync_decision(atn(), 522, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 522) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(61, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(61, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 522, &__prediction);
match __prediction.alt {
1 => {
let __match = self.base.match_token_recovering(63, 523, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
2 => {
let __match = self.base.match_token_recovering(64, 526, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
match self.base.sync_decision(atn(), 526, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 526) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(62, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(62, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 526, &__prediction);
match __prediction.alt {
1 => {
let __match = self.base.match_token_recovering(63, 527, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
3 => {
let __match = self.base.match_token_recovering(66, 530, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
match self.base.sync_decision(atn(), 530, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 530) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(63, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(63, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 530, &__prediction);
match __prediction.alt {
1 => {
let __match = self.base.match_token_recovering(63, 531, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_53_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_53(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_53(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(106isize, 53);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let mut __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = match self.base.la(1) {
12 => antlr4_runtime::ParserAtnPrediction { alt: 2, requires_full_context: false, has_semantic_context: false, diagnostic: None },
9 => antlr4_runtime::ParserAtnPrediction { alt: 3, requires_full_context: false, has_semantic_context: false, diagnostic: None },
73 => antlr4_runtime::ParserAtnPrediction { alt: 4, requires_full_context: false, has_semantic_context: false, diagnostic: None },
8 => antlr4_runtime::ParserAtnPrediction { alt: 5, requires_full_context: false, has_semantic_context: false, diagnostic: None },
70 => antlr4_runtime::ParserAtnPrediction { alt: 6, requires_full_context: false, has_semantic_context: false, diagnostic: None },
_ => {
match self.base.sync_decision(atn(), 540, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
__decision_start = antlr4_runtime::IntStream::index(self.base.input());
if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 540) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(65, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(65, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
}
}
};
self.base.record_generated_prediction_diagnostic(atn(), 540, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(534isize);
let __child = self.parse_generated_rule_61_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
let __invoking_marker = self.base.push_invoking_state(535isize);
let __child = self.parse_generated_rule_62_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
3 => {
let __match = self.base.match_token_recovering(9, 541, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
4 => {
let __invoking_marker = self.base.push_invoking_state(537isize);
let __child = self.parse_generated_rule_56_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
5 => {
let __match = self.base.match_token_recovering(8, 541, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
6 => {
let __invoking_marker = self.base.push_invoking_state(539isize);
let __child = self.parse_generated_rule_55_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_54_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_54(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_54(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(108isize, 54);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let mut __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = match self.base.la(1) {
11..=12 => antlr4_runtime::ParserAtnPrediction { alt: 1, requires_full_context: false, has_semantic_context: false, diagnostic: None },
9 => antlr4_runtime::ParserAtnPrediction { alt: 2, requires_full_context: false, has_semantic_context: false, diagnostic: None },
73 => antlr4_runtime::ParserAtnPrediction { alt: 3, requires_full_context: false, has_semantic_context: false, diagnostic: None },
70 => antlr4_runtime::ParserAtnPrediction { alt: 4, requires_full_context: false, has_semantic_context: false, diagnostic: None },
_ => {
match self.base.sync_decision(atn(), 546, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
__decision_start = antlr4_runtime::IntStream::index(self.base.input());
if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 546) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(66, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(66, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
}
}
};
self.base.record_generated_prediction_diagnostic(atn(), 546, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(542isize);
let __child = self.parse_generated_rule_62_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
let __invoking_marker = self.base.push_invoking_state(543isize);
let __child = self.parse_generated_rule_60_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
3 => {
let __invoking_marker = self.base.push_invoking_state(544isize);
let __child = self.parse_generated_rule_56_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
4 => {
let __invoking_marker = self.base.push_invoking_state(545isize);
let __child = self.parse_generated_rule_55_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_55_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_55(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_55(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(110isize, 55);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __match = self.base.match_token_recovering(70, 550, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
match self.base.sync_decision(atn(), 550, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 550) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(67, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(67, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 550, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(549isize);
let __child = self.parse_generated_rule_63_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_56_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_56(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_56(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(112isize, 56);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
match self.base.sync_decision(atn(), 556, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 556) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(68, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(68, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 556, &__prediction);
match __prediction.alt {
1 => {
let __match = self.base.match_token_recovering(73, 553, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(553isize);
let __child = self.parse_generated_rule_58_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
let __match = self.base.match_token_recovering(73, 555, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(555isize);
let __child = self.parse_generated_rule_57_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_57_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_57(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_57(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(114isize, 57);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __match = self.base.match_token_recovering(57, 559, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(559isize);
let __child = self.parse_generated_rule_58_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let mut __loop_iter_564 = false;
loop {
match self.base.sync_decision(atn(), 564, !__ctx.has_matched_child(), __loop_iter_564) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 564) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(69, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(69, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 564, &__prediction);
match __prediction.alt {
1 => {
__loop_iter_564 = true;
let __match = self.base.match_token_recovering(67, 561, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(561isize);
let __child = self.parse_generated_rule_58_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
break;
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
let __match = self.base.match_token_recovering(58, 568, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_58_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_58(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_58(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(116isize, 58);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let mut __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = match self.base.la(1) {
12 => antlr4_runtime::ParserAtnPrediction { alt: 1, requires_full_context: false, has_semantic_context: false, diagnostic: None },
8 => antlr4_runtime::ParserAtnPrediction { alt: 4, requires_full_context: false, has_semantic_context: false, diagnostic: None },
_ => {
match self.base.sync_decision(atn(), 579, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
__decision_start = antlr4_runtime::IntStream::index(self.base.input());
if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 579) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(72, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(72, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
}
}
};
self.base.record_generated_prediction_diagnostic(atn(), 579, &__prediction);
match __prediction.alt {
1 => {
let __match = self.base.match_token_recovering(12, 571, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
match self.base.sync_decision(atn(), 571, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 571) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(70, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(70, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 571, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(570isize);
let __child = self.parse_generated_rule_63_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
2 => {
let __match = self.base.match_token_recovering(11, 575, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
match self.base.sync_decision(atn(), 575, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 575) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(71, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(71, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 575, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(574isize);
let __child = self.parse_generated_rule_63_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
3 => {
let __invoking_marker = self.base.push_invoking_state(577isize);
let __child = self.parse_generated_rule_61_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
4 => {
let __match = self.base.match_token_recovering(8, 580, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_59_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_59(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_59(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(118isize, 59);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __match = self.base.match_token_recovering(57, 592, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
match self.base.sync_decision(atn(), 592, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 592) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(75, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(75, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 592, &__prediction);
match __prediction.alt {
1 => {
match self.base.sync_decision(atn(), 583, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 583) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(73, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(73, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 583, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(582isize);
let __child = self.parse_generated_rule_4_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
let mut __loop_iter_588 = false;
loop {
match self.base.sync_decision(atn(), 588, !__ctx.has_matched_child(), __loop_iter_588) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 588) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(74, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(74, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 588, &__prediction);
match __prediction.alt {
1 => {
__loop_iter_588 = true;
let __invoking_marker = self.base.push_invoking_state(585isize);
let __child = self.parse_generated_rule_27_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
break;
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
let __match = self.base.match_token_recovering(53, 593, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
let __invoking_marker = self.base.push_invoking_state(594isize);
let __child = self.parse_generated_rule_44_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let __match = self.base.match_token_recovering(58, 596, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_60_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_60(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_60(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(120isize, 60);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __match = self.base.match_token_recovering(9, 599, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
match self.base.sync_decision(atn(), 599, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 599) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(76, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(76, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 599, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(598isize);
let __child = self.parse_generated_rule_15_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
match self.base.sync_decision(atn(), 602, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 602) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(77, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(77, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 602, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(601isize);
let __child = self.parse_generated_rule_63_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_61_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_61(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_61(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(122isize, 61);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __match = self.base.match_token_recovering(11, 605, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __match = self.base.match_token_recovering(69, 606, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __match = self.base.match_token_recovering(11, 607, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_62_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_62(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_62(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(124isize, 62);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let mut __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = match self.base.la(1) {
12 => antlr4_runtime::ParserAtnPrediction { alt: 1, requires_full_context: false, has_semantic_context: false, diagnostic: None },
11 => antlr4_runtime::ParserAtnPrediction { alt: 2, requires_full_context: false, has_semantic_context: false, diagnostic: None },
_ => {
match self.base.sync_decision(atn(), 616, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
__decision_start = antlr4_runtime::IntStream::index(self.base.input());
if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 616) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(80, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(80, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
}
}
};
self.base.record_generated_prediction_diagnostic(atn(), 616, &__prediction);
match __prediction.alt {
1 => {
let __match = self.base.match_token_recovering(12, 610, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
match self.base.sync_decision(atn(), 610, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 610) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(78, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(78, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 610, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(609isize);
let __child = self.parse_generated_rule_63_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
2 => {
let __match = self.base.match_token_recovering(11, 614, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
match self.base.sync_decision(atn(), 614, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 614) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(79, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(79, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 614, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(613isize);
let __child = self.parse_generated_rule_63_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_63_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_63(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_63(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(126isize, 63);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __match = self.base.match_token_recovering(61, 619, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(619isize);
let __child = self.parse_generated_rule_64_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let mut __loop_iter_624 = false;
loop {
match self.base.sync_decision(atn(), 624, !__ctx.has_matched_child(), __loop_iter_624) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 624) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(81, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(81, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 624, &__prediction);
match __prediction.alt {
1 => {
__loop_iter_624 = true;
let __match = self.base.match_token_recovering(55, 621, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(621isize);
let __child = self.parse_generated_rule_64_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
break;
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
let __match = self.base.match_token_recovering(62, 628, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_64_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_64(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_64(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(128isize, 64);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
match self.base.sync_decision(atn(), 637, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 637) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(83, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(83, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 637, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(629isize);
let __child = self.parse_generated_rule_66_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
let __invoking_marker = self.base.push_invoking_state(630isize);
let __child = self.parse_generated_rule_65_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let __match = self.base.match_token_recovering(7, 635, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let mut __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = match self.base.la(1) {
9 | 12 => antlr4_runtime::ParserAtnPrediction { alt: 1, requires_full_context: false, has_semantic_context: false, diagnostic: None },
11 => antlr4_runtime::ParserAtnPrediction { alt: 2, requires_full_context: false, has_semantic_context: false, diagnostic: None },
33 => antlr4_runtime::ParserAtnPrediction { alt: 3, requires_full_context: false, has_semantic_context: false, diagnostic: None },
_ => {
match self.base.sync_decision(atn(), 635, !__ctx.has_matched_child(), false) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
__decision_start = antlr4_runtime::IntStream::index(self.base.input());
if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 635) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(82, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(82, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
}
}
};
self.base.record_generated_prediction_diagnostic(atn(), 635, &__prediction);
match __prediction.alt {
1 => {
let __invoking_marker = self.base.push_invoking_state(632isize);
let __child = self.parse_generated_rule_66_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
let __match = self.base.match_token_recovering(11, 636, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
3 => {
let __match = self.base.match_token_recovering(33, 636, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_65_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_65(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_65(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(130isize, 65);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __match = self.base.match_set_recovering(&[(9, 9), (12, 12)], 640, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
#[allow(dead_code)]
fn parse_generated_rule_66_dispatch(&mut self, precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = precedence;
self.parse_generated_rule_66(precedence, allow_fallback)
}
#[allow(dead_code)]
fn parse_generated_rule_66(&mut self, __precedence: i32, allow_fallback: bool) -> Result<antlr4_runtime::ParseTree, GeneratedRuleError> {
let _ = __precedence;
let _ = allow_fallback;
let __generated_diagnostic_marker = self.base.generated_diagnostics_checkpoint();
let mut __ctx = self.base.enter_rule(132isize, 66);
let __rule_start = antlr4_runtime::IntStream::index(self.base.input());
let mut __consumed_eof = false;
let mut __sync_error: Option<antlr4_runtime::AntlrError> = None;
let __result = (|| -> Result<(), antlr4_runtime::AntlrError> {
let __invoking_marker = self.base.push_invoking_state(641isize);
let __child = self.parse_generated_rule_65_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
let mut __loop_iter_646 = false;
loop {
match self.base.sync_decision(atn(), 646, !__ctx.has_matched_child(), __loop_iter_646) {
Ok(__sync_children) => {
for __child in __sync_children { self.base.add_parse_child(&mut __ctx, __child); }
}
Err(__error) => {
__sync_error = Some(__error.clone());
return Err(__error);
}
}
let __decision_start = antlr4_runtime::IntStream::index(self.base.input());
let __prediction = if let Some(__prediction) = self.base.ll1_decision_prediction(atn(), 646) {
__prediction
} else {
let __prediction = {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
__simulator.adaptive_predict_stream_info_sll_probe(84, 0, self.base.input())
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
};
if __prediction.requires_full_context && self.base.prediction_mode() != antlr4_runtime::PredictionMode::Sll {
let __simulator = self.simulator.get_or_insert_with(|| antlr4_runtime::ParserAtnSimulator::new_shared(atn()));
let __prediction_context = __simulator.intern_prediction_context(self.base.rule_context_version(), self.base.prediction_context_return_states(atn()));
__simulator.set_exact_ambig_detection(self.base.prediction_mode() == antlr4_runtime::PredictionMode::LlExactAmbigDetection);
__simulator.adaptive_predict_stream_info_with_context(84, 0, self.base.input(), __prediction_context)
.map_err(|__error| match __error {
antlr4_runtime::ParserAtnSimulatorError::NoViableAlt { index, .. } => self.base.no_viable_alternative_error_at(__decision_start, index),
_ => self.base.no_viable_alternative_error(__decision_start),
})?
} else {
__prediction
}
};
self.base.record_generated_prediction_diagnostic(atn(), 646, &__prediction);
match __prediction.alt {
1 => {
__loop_iter_646 = true;
let __match = self.base.match_token_recovering(70, 643, atn())?;
__consumed_eof |= __match.consumed_eof();
for __child in __match.into_child_iter() { self.base.add_parse_child(&mut __ctx, __child); }
let __invoking_marker = self.base.push_invoking_state(643isize);
let __child = self.parse_generated_rule_65_dispatch(0, false).map_err(GeneratedRuleError::into_error);
self.base.discard_invoking_state(__invoking_marker);
let __child = __child?;
self.base.add_parse_child(&mut __ctx, __child);
}
2 => {
break;
}
_ => return Err(self.base.no_viable_alternative_error(__decision_start)),
}
}
Ok(())
})();
match __result {
Ok(()) => {
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
Err(__error) => {
if let Some(__error) = __sync_error {
if allow_fallback {
self.base.exit_rule();
self.base.restore_generated_diagnostics(__generated_diagnostic_marker);
self.base.record_generated_syntax_error();
return Err(GeneratedRuleError::Fatal(__error));
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
return Ok(__tree);
}
self.base.recover_generated_rule(&mut __ctx, atn(), __error);
let __tree = self.base.finish_rule(__ctx, __consumed_eof);
Ok(__tree)
}
}
}
pub fn grammar_spec(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(0)
}
pub fn grammar_decl(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(1)
}
pub fn grammar_type(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(2)
}
pub fn prequel_construct(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(3)
}
pub fn options_spec(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(4)
}
pub fn option(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(5)
}
pub fn option_value(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(6)
}
pub fn delegate_grammars(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(7)
}
pub fn delegate_grammar(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(8)
}
pub fn tokens_spec(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(9)
}
pub fn channels_spec(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(10)
}
pub fn id_list(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(11)
}
pub fn action(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(12)
}
pub fn action_scope_name(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(13)
}
pub fn action_block(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(14)
}
pub fn arg_action_block(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(15)
}
pub fn mode_spec(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(16)
}
pub fn rules(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(17)
}
pub fn rule_spec(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(18)
}
pub fn parser_rule_spec(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(19)
}
pub fn exception_group(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(20)
}
pub fn exception_handler(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(21)
}
pub fn finally_clause(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(22)
}
pub fn rule_prequel(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(23)
}
pub fn rule_returns(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(24)
}
pub fn throws_spec(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(25)
}
pub fn locals_spec(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(26)
}
pub fn rule_action(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(27)
}
pub fn rule_modifiers(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(28)
}
pub fn rule_modifier(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(29)
}
pub fn rule_block(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(30)
}
pub fn rule_alt_list(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(31)
}
pub fn labeled_alt(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(32)
}
pub fn lexer_rule_spec(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(33)
}
pub fn lexer_rule_block(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(34)
}
pub fn lexer_alt_list(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(35)
}
pub fn lexer_alt(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(36)
}
pub fn lexer_elements(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(37)
}
pub fn lexer_element(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(38)
}
pub fn lexer_block(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(39)
}
pub fn lexer_commands(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(40)
}
pub fn lexer_command(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(41)
}
pub fn lexer_command_name(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(42)
}
pub fn lexer_command_expr(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(43)
}
pub fn alt_list(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(44)
}
pub fn alternative(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(45)
}
pub fn element(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(46)
}
pub fn predicate_options(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(47)
}
pub fn predicate_option(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(48)
}
pub fn labeled_element(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(49)
}
pub fn ebnf(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(50)
}
pub fn block_suffix(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(51)
}
pub fn ebnf_suffix(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(52)
}
pub fn lexer_atom(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(53)
}
pub fn atom(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(54)
}
pub fn wildcard(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(55)
}
pub fn not_set(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(56)
}
pub fn block_set(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(57)
}
pub fn set_element(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(58)
}
pub fn block(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(59)
}
pub fn ruleref(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(60)
}
pub fn character_range(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(61)
}
pub fn terminal_def(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(62)
}
pub fn element_options(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(63)
}
pub fn element_option(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(64)
}
pub fn identifier(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(65)
}
pub fn qualified_identifier(&mut self) -> Result<antlr4_runtime::ParseTree, antlr4_runtime::AntlrError> {
self.parse_rule(66)
}
fn run_action(&mut self, _action: antlr4_runtime::ParserAction, _tree: antlr4_runtime::ParseTree) {}
}
impl<L, H> GeneratedParser for AntlRv4Parser<L, H>
where
L: TokenSource,
H: antlr4_runtime::SemanticHooks,
{
fn metadata() -> &'static GrammarMetadata {
metadata()
}
fn parser_atn() -> &'static ParserAtn {
parser_atn()
}
}
impl<L, H> Recognizer for AntlRv4Parser<L, H>
where
L: TokenSource,
H: antlr4_runtime::SemanticHooks,
{
fn data(&self) -> &antlr4_runtime::RecognizerData {
self.base.data()
}
fn data_mut(&mut self) -> &mut antlr4_runtime::RecognizerData {
self.base.data_mut()
}
}
impl<L, H> Parser for AntlRv4Parser<L, H>
where
L: TokenSource,
H: antlr4_runtime::SemanticHooks,
{
fn build_parse_trees(&self) -> bool { self.base.build_parse_trees() }
fn set_build_parse_trees(&mut self, build: bool) { self.base.set_build_parse_trees(build); }
fn number_of_syntax_errors(&self) -> usize { self.base.number_of_syntax_errors() }
fn report_diagnostic_errors(&self) -> bool { self.base.report_diagnostic_errors() }
fn set_report_diagnostic_errors(&mut self, report: bool) { self.base.set_report_diagnostic_errors(report); }
fn prediction_mode(&self) -> antlr4_runtime::PredictionMode { self.base.prediction_mode() }
fn set_prediction_mode(&mut self, mode: antlr4_runtime::PredictionMode) { self.base.set_prediction_mode(mode); }
}
}
#[allow(warnings, missing_docs, clippy::all, clippy::pedantic, clippy::nursery)]
pub use self::__antlr4_rust_generated::*;