kbnf 0.5.7

A fast constrained decoding engine based on context free grammar.
Documentation
---
source: tests/test.rs
expression: "format!(\"{:#?}\", engine)"
---
Engine {
    union: U16U16U32U32U32(
        EngineBase {
            grammar: Grammar {
                start_nonterminal: "start[0]",
                rules: "start[0] ::= C[1]\"\n\"[0];\nC[1] ::= #\"\\A(?:c)\\z\"[0]C[1] | \"c\"[1];\n",
                id_to_regexes: {
                    "#\"\\A(?:c)\\z\"[0]": Dfa(
                        dense::DFA(
                        D 000000: 
                        Q 000004: 
                         *000008: 
                          000012: \x01 => 20
                          000016: 
                          000020: EOI => 8
                        
                        START-GROUP(unanchored)
                          NonWordByte => 000016
                          WordByte => 000016
                          Text => 000012
                          LineLF => 000016
                          LineCR => 000016
                          CustomLineTerminator => 000016
                        START-GROUP(anchored)
                          NonWordByte => 000016
                          WordByte => 000016
                          Text => 000012
                          LineLF => 000016
                          LineCR => 000016
                          CustomLineTerminator => 000016
                        state length: 6
                        pattern length: 1
                        flags: Flags { has_empty: false, is_utf8: true, is_always_start_anchored: true }
                        )
                        ,
                    ),
                },
                id_to_suffix_automata: {},
                id_to_suffix_automata_first_bytes: [],
                id_to_regex_first_bytes: [
                    (
                        "#\"\\A(?:c)\\z\"[0]",
                        StateID(
                            12,
                        ),
                        [
                            99,
                        ],
                    ),
                ],
                id_to_regex_complement_first_bytes: [],
                id_to_terminals: [
                    (
                        "\"\n\"[0]",
                        [
                            10,
                        ],
                    ),
                    (
                        "\"c\"[1]",
                        [
                            99,
                        ],
                    ),
                ],
            },
            allowed_first_bytes: [],
            allowed_token_ids: [],
            earley_sets: [
                [
                    EarleyItemDebugStruct {
                        dotted_rule: "start[0] -> .C[1]\"\n\"[0]",
                        start_position: 0,
                        state: "",
                    },
                    EarleyItemDebugStruct {
                        dotted_rule: "C[1] -> .#\"\\A(?:c)\\z\"[0]C[1]",
                        start_position: 0,
                        state: "[3(InProgress)]",
                    },
                    EarleyItemDebugStruct {
                        dotted_rule: "C[1] -> .\"c\"[1]",
                        start_position: 0,
                        state: "[0]",
                    },
                ],
                [
                    EarleyItemDebugStruct {
                        dotted_rule: "C[1] -> #\"\\A(?:c)\\z\"[0].C[1]",
                        start_position: 0,
                        state: "",
                    },
                    EarleyItemDebugStruct {
                        dotted_rule: "C[1] -> .#\"\\A(?:c)\\z\"[0]C[1]",
                        start_position: 0,
                        state: "[5(Accept)]",
                    },
                    EarleyItemDebugStruct {
                        dotted_rule: "start[0] -> C[1].\"\n\"[0]",
                        start_position: 0,
                        state: "[0]",
                    },
                    EarleyItemDebugStruct {
                        dotted_rule: "C[1] -> .#\"\\A(?:c)\\z\"[0]C[1]",
                        start_position: 1,
                        state: "[3(InProgress)]",
                    },
                    EarleyItemDebugStruct {
                        dotted_rule: "C[1] -> .\"c\"[1]",
                        start_position: 1,
                        state: "[0]",
                    },
                ],
            ],
            cache: [],
            to_be_completed_items: [],
            to_be_completed_items_buffer: [],
            deduplication_buffer: [],
            postdot_items: [
                (
                    DottedDebugStruct {
                        postdot_nonterminal: "C[1]",
                        column: 0,
                    },
                    NormalItems(
                        [
                            EarleyItemDebugStruct {
                                dotted_rule: "start[0] -> .C[1]\"\n\"[0]",
                                start_position: 0,
                                state: "",
                            },
                        ],
                    ),
                ),
                (
                    DottedDebugStruct {
                        postdot_nonterminal: "C[1]",
                        column: 1,
                    },
                    LeoEligible(
                        EarleyItemDebugStruct {
                            dotted_rule: "C[1] -> #\"\\A(?:c)\\z\"[0].C[1]",
                            start_position: 0,
                            state: "",
                        },
                    ),
                ),
            ],
            leo_items: [],
            leo_items_buffer: [],
            finished: false,
            config: EngineConfig {
                cache_enabled: true,
                compaction_enabled: true,
                rejected_token_prefix_cache_enabled: true,
            },
        },
    ),
}