From 724018a0448d0b71f65bf1e13824dcde7497b054 Mon Sep 17 00:00:00 2001 From: Khashayar Barooti Date: Thu, 24 Oct 2024 14:20:47 +0100 Subject: [PATCH 1/7] fixed the errors with the new release --- .vscode/launch.json | 15 ++++++ .vscode/settings.json | 3 ++ Nargo.toml | 4 +- src/_comparison_tools/lt.nr | 12 ++--- src/_string_tools/slice_field.nr | 8 ++-- src/_string_tools/slice_packed_field.nr | 14 +++--- src/json.nr | 4 +- src/json_entry.nr | 62 ++++++++++++------------- src/keymap.nr | 8 ++-- src/transcript_entry.nr | 26 +++++------ 10 files changed, 87 insertions(+), 69 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..ff05fe5 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "noir", + "request": "launch", + "name": "Noir binary package", + "projectFolder": "${workspaceFolder}", + "proverName": "Prover" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9dae2d8 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "noir.nargoPath": "/Users/khashayarbarooti/.nargo/bin/nargo" +} \ No newline at end of file diff --git a/Nargo.toml b/Nargo.toml index 16b6578..d9fa6a1 100644 --- a/Nargo.toml +++ b/Nargo.toml @@ -2,7 +2,7 @@ name = "json_parser" type = "lib" authors = [""] -compiler_version = ">=0.34.0" +compiler_version = ">=0.36.0" [dependencies] -noir_sort = {tag = "v0.1.0", git = "https://github.com/noir-lang/noir_sort"} \ No newline at end of file +noir_sort = {tag = "v0.2.0", git = "https://github.com/noir-lang/noir_sort"} \ No newline at end of file diff --git a/src/_comparison_tools/lt.nr b/src/_comparison_tools/lt.nr index 15d2e47..002bfc8 100644 --- a/src/_comparison_tools/lt.nr +++ b/src/_comparison_tools/lt.nr @@ -23,7 +23,7 @@ pub fn lte_field_240_bit(x: Field, y: Field) -> bool { // (y - x) * p + (1 - p) * (x - y + 1) // (y - x) * p + x - y + 1 + p * (y - x) let lt_parameter = 2 * (predicate as Field) * delta - predicate as Field - delta + 1; - lt_parameter.assert_max_bit_size(240); + lt_parameter.assert_max_bit_size::<240>(); predicate } @@ -36,14 +36,14 @@ pub fn assert_lte_240_bit(x: Field, y: Field) { // if false, x <= y is wrong therefore x > y => x - y > 0 => x - y + 1 >= 0 // (y - x) * p + (1 - p) * (x - y + 1) // (y - x) * p + x - y + 1 + p * (y - x) - delta.assert_max_bit_size(240); + delta.assert_max_bit_size::<240>(); } pub fn lt_field_16_bit(x: Field, y: Field) -> bool { let predicate = get_lt_predicate_f(x, y); let delta = y as Field - x as Field; let lt_parameter = 2 * (predicate as Field) * delta - predicate as Field - delta; - lt_parameter.assert_max_bit_size(16); + lt_parameter.assert_max_bit_size::<16>(); predicate } @@ -52,7 +52,7 @@ pub fn lt_field_8_bit(x: Field, y: Field) -> bool { let predicate = get_lt_predicate_f(x, y); let delta = y as Field - x as Field; let lt_parameter = 2 * (predicate as Field) * delta - predicate as Field - delta; - lt_parameter.assert_max_bit_size(8); + lt_parameter.assert_max_bit_size::<8>(); predicate } @@ -62,7 +62,7 @@ pub fn assert_gt_240_bit(lhs: Field, rhs: Field) { // -> lhs - rhs > 0 // -> lhs - rhs - 1 >= 0 let diff = lhs - rhs - 1; - diff.assert_max_bit_size(240); + diff.assert_max_bit_size::<240>(); } pub fn assert_lt_240_bit(lhs: Field, rhs: Field) { @@ -70,5 +70,5 @@ pub fn assert_lt_240_bit(lhs: Field, rhs: Field) { // -> rhs - lhs > 0 // -> rhs - lhs - 1 >= 0 let diff = rhs - lhs - 1; - diff.assert_max_bit_size(240); + diff.assert_max_bit_size::<240>(); } diff --git a/src/_string_tools/slice_field.nr b/src/_string_tools/slice_field.nr index eac3be1..2d09496 100644 --- a/src/_string_tools/slice_field.nr +++ b/src/_string_tools/slice_field.nr @@ -66,11 +66,11 @@ unconstrained fn __slice_200_bits_from_field(f: Field) -> (Field, Field, bool) { pub fn slice_200_bits_from_field(f: Field) -> Field { let (lo, hi, borrow) = __slice_200_bits_from_field(f); assert(hi * TWO_POW_200 + lo == f); - lo.assert_max_bit_size(200); - hi.assert_max_bit_size(56); + lo.assert_max_bit_size::<200>(); + hi.assert_max_bit_size::<56>(); let lo_diff = PLO_200_felt - lo + (borrow as Field * TWO_POW_200); let hi_diff = PHI_54_felt - hi - borrow as Field; - lo_diff.assert_max_bit_size(200); - hi_diff.assert_max_bit_size(56); + lo_diff.assert_max_bit_size::<200>(); + hi_diff.assert_max_bit_size::<56>(); lo } diff --git a/src/_string_tools/slice_packed_field.nr b/src/_string_tools/slice_packed_field.nr index 2dbedd8..dd4d651 100644 --- a/src/_string_tools/slice_packed_field.nr +++ b/src/_string_tools/slice_packed_field.nr @@ -458,8 +458,8 @@ fn divmod_31(numerator: Field) -> (Field, Field) { // note: these range checks are because we know the denominator is 31 // TODO: need more checks, atm remainder could equal 31 - qf.assert_max_bit_size(14); - rf.assert_max_bit_size(5); + qf.assert_max_bit_size::<14>(); + rf.assert_max_bit_size::<5>(); // n / d = q // d * q + r = n @@ -505,11 +505,11 @@ pub fn get_last_limb_path(last_limb_index: Field) -> [Fie **/ pub fn slice_field(f: Field, num_bytes: Field) -> (Field, Field) { let chunks = __slice_field(f, num_bytes); - chunks[0].assert_max_bit_size(8); // 1.25 gates - chunks[1].assert_max_bit_size(16); // 1.5 gates - chunks[2].assert_max_bit_size(32); // 1.75 gates - chunks[3].assert_max_bit_size(64); // 3.25 gates - chunks[4].assert_max_bit_size(128); // 7.5 gates + chunks[0].assert_max_bit_size::<8>(); // 1.25 gates + chunks[1].assert_max_bit_size::<16>(); // 1.5 gates + chunks[2].assert_max_bit_size::<32>(); // 1.75 gates + chunks[3].assert_max_bit_size::<64>(); // 3.25 gates + chunks[4].assert_max_bit_size::<128>(); // 7.5 gates let mut head: Field = 0; let mut tail: Field = 0; diff --git a/src/json.nr b/src/json.nr index 397526c..2aebf22 100644 --- a/src/json.nr +++ b/src/json.nr @@ -407,7 +407,7 @@ impl(); raw_transcript } @@ -480,7 +480,7 @@ impl(); JSON { json: self.json, diff --git a/src/json_entry.nr b/src/json_entry.nr index 5c3f462..895fd43 100644 --- a/src/json_entry.nr +++ b/src/json_entry.nr @@ -29,11 +29,11 @@ impl JSONContextStackEntry { fn from_field(f: Field) -> Self { let result = JSONContextStackEntry::__from_field(f); - result.context.assert_max_bit_size(8); // 1.25 - result.num_entries.assert_max_bit_size(16); // 1.5 - result.current_key_index_and_length.assert_max_bit_size(32); // 1.75 - result.json_index.assert_max_bit_size(16); // 1.5 - result.current_identity.assert_max_bit_size(16); // 1.5 + result.context.assert_max_bit_size::<8>(); // 1.25 + result.num_entries.assert_max_bit_size::<16>(); // 1.5 + result.current_key_index_and_length.assert_max_bit_size::<32>(); // 1.75 + result.json_index.assert_max_bit_size::<16>(); // 1.5 + result.current_identity.assert_max_bit_size::<16>(); // 1.5 assert(result.to_field() == f); // 2 result } @@ -110,10 +110,10 @@ impl JSONEntry { // 11.75 gates fn extract_entry_type_id_and_parent_index_from_field(f: Field) -> (Field, Field, Field) { let (id, parent_index, mid, entry_type) = JSONEntry::__extract_entry_type_id_and_parent_index_from_field(f); - id.assert_max_bit_size(8); // 1.25 - parent_index.assert_max_bit_size(16); // 1.5 - entry_type.assert_max_bit_size(16); // 1.5 - mid.assert_max_bit_size(136); // 5.5 + id.assert_max_bit_size::<8>(); // 1.25 + parent_index.assert_max_bit_size::<16>(); // 1.5 + entry_type.assert_max_bit_size::<16>(); // 1.5 + mid.assert_max_bit_size::<136>(); // 5.5 assert( id @@ -127,9 +127,9 @@ impl JSONEntry { } fn extract_entry_type_and_id_from_field(f: Field) -> (Field, Field) { let (id, mid, entry_type) = JSONEntry::__extract_entry_type_and_id_from_field(f); - id.assert_max_bit_size(8); // 1.25 - entry_type.assert_max_bit_size(16); // 1.5 - mid.assert_max_bit_size(136); // 5.5 + id.assert_max_bit_size::<8>(); // 1.25 + entry_type.assert_max_bit_size::<16>(); // 1.5 + mid.assert_max_bit_size::<136>(); // 5.5 assert(id + mid * 0x10000 + entry_type * 0x100000000000000000000000000000000000000 == f); (id, entry_type) @@ -137,9 +137,9 @@ impl JSONEntry { fn extract_parent_index_from_field(f: Field) -> Field { let (low, parent_index, hi) = JSONEntry::__extract_parent_index_from_field(f); - low.assert_max_bit_size(16); // 1.75 - hi.assert_max_bit_size(128); // 5.5 - parent_index.assert_max_bit_size(16); // 1.75 + low.assert_max_bit_size::<16>(); // 1.75 + hi.assert_max_bit_size::<128>(); // 5.5 + parent_index.assert_max_bit_size::<16>(); // 1.75 assert(low + parent_index * 0x10000 + hi * 0x100000000 == f); // 1 // 10 gates? parent_index @@ -173,14 +173,14 @@ impl JSONEntry { } fn from_field(f: Field) -> Self { let result = JSONEntry::__from_field(f); - result.entry_type.assert_max_bit_size(8); - result.json_length.assert_max_bit_size(16); - result.json_pointer.assert_max_bit_size(16); - result.num_children.assert_max_bit_size(16); - result.child_pointer.assert_max_bit_size(16); - result.array_pointer.assert_max_bit_size(16); - result.parent_index.assert_max_bit_size(16); - result.id.assert_max_bit_size(16); + result.entry_type.assert_max_bit_size::<8>(); + result.json_length.assert_max_bit_size::<16>(); + result.json_pointer.assert_max_bit_size::<16>(); + result.num_children.assert_max_bit_size::<16>(); + result.child_pointer.assert_max_bit_size::<16>(); + result.array_pointer.assert_max_bit_size::<16>(); + result.parent_index.assert_max_bit_size::<16>(); + result.id.assert_max_bit_size::<16>(); assert(result.to_field() == f); result } @@ -189,14 +189,14 @@ impl JSONEntry { impl std::convert::From for JSONEntry { fn from(JSONEntryPacked{ value: f }: JSONEntryPacked) -> Self { let result = JSONEntry::__from_field(f); - result.entry_type.assert_max_bit_size(8); - result.json_length.assert_max_bit_size(16); - result.json_pointer.assert_max_bit_size(16); - result.num_children.assert_max_bit_size(16); - result.child_pointer.assert_max_bit_size(16); - result.array_pointer.assert_max_bit_size(16); - result.parent_index.assert_max_bit_size(16); - result.id.assert_max_bit_size(16); + result.entry_type.assert_max_bit_size::<8>(); + result.json_length.assert_max_bit_size::<16>(); + result.json_pointer.assert_max_bit_size::<16>(); + result.num_children.assert_max_bit_size::<16>(); + result.child_pointer.assert_max_bit_size::<16>(); + result.array_pointer.assert_max_bit_size::<16>(); + result.parent_index.assert_max_bit_size::<16>(); + result.id.assert_max_bit_size::<16>(); assert(result.to_field() == f); result } diff --git a/src/keymap.nr b/src/keymap.nr index 1883ab1..5a5dd24 100644 --- a/src/keymap.nr +++ b/src/keymap.nr @@ -36,10 +36,10 @@ impl KeyIndexData { fn from_field(packed: Field) -> Self { let result = KeyIndexData::__from_field(packed); - result.array_index.assert_max_bit_size(16); - result.json_length.assert_max_bit_size(16); - result.json_index.assert_max_bit_size(16); - result.parent_id.assert_max_bit_size(16); + result.array_index.assert_max_bit_size::<16>(); + result.json_length.assert_max_bit_size::<16>(); + result.json_index.assert_max_bit_size::<16>(); + result.parent_id.assert_max_bit_size::<16>(); assert(result.to_field() == packed); result } diff --git a/src/transcript_entry.nr b/src/transcript_entry.nr index 7c8ba2e..782cf41 100644 --- a/src/transcript_entry.nr +++ b/src/transcript_entry.nr @@ -69,9 +69,9 @@ impl RawTranscriptEntry { // 5.25 gates total fn from_field(felt: Field) -> Self { let result = RawTranscriptEntry::__from_field(felt); - result.length.assert_max_bit_size(16); - result.index.assert_max_bit_size(16); - result.encoded_ascii.assert_max_bit_size(14); + result.length.assert_max_bit_size::<16>(); + result.index.assert_max_bit_size::<16>(); + result.encoded_ascii.assert_max_bit_size::<14>(); assert(result.encoded_ascii + result.index * 0x10000 + result.length * 0x100000000 == felt); result @@ -85,8 +85,8 @@ impl RawTranscriptEntry { } fn extract_ascii(f: Field) -> (Field, Field) { let (ascii, remainder) = RawTranscriptEntry::__extract_ascii(f); - ascii.assert_max_bit_size(14); - remainder.assert_max_bit_size(32); + ascii.assert_max_bit_size::<14>(); + remainder.assert_max_bit_size::<32>(); assert(ascii + remainder * 0x10000 == f); (ascii, remainder) } @@ -174,25 +174,25 @@ impl TranscriptEntry { // 4 gates fn get_token(f: Field) -> Field { let (token, remainder) = TranscriptEntry::__get_token(f); - remainder.assert_max_bit_size(32); - token.assert_max_bit_size(8); + remainder.assert_max_bit_size::<32>(); + token.assert_max_bit_size::<8>(); assert(token + remainder * 0x100 == f); token } // 5.25 gates fn from_field(felt: Field) -> Self { let result = TranscriptEntry::__from_field(felt); - result.length.assert_max_bit_size(16); - result.index.assert_max_bit_size(16); - result.token.assert_max_bit_size(8); + result.length.assert_max_bit_size::<16>(); + result.index.assert_max_bit_size::<16>(); + result.token.assert_max_bit_size::<8>(); assert(result.token + result.index * 0x100 + result.length * 0x1000000 == felt); result } fn get_token_and_index_length_combined(f: Field) -> (Field, Field) { let (token, remainder) = TranscriptEntry::__get_token(f); - remainder.assert_max_bit_size(32); - token.assert_max_bit_size(8); + remainder.assert_max_bit_size::<32>(); + token.assert_max_bit_size::<8>(); assert(token + remainder * 0x100 == f); (token, remainder) } @@ -200,7 +200,7 @@ impl TranscriptEntry { // 5.75 gates fn from_raw(raw_encoded: Field) -> Field { let (ascii, remainder) = RawTranscriptEntry::__extract_ascii(raw_encoded); - remainder.assert_max_bit_size(32); + remainder.assert_max_bit_size::<32>(); assert(ascii + remainder * 0x10000 == raw_encoded); // this lookup enforces an implicit 10 bit range check on ascii let token = ASCII_TO_TOKEN_TABLE[ascii]; From 26d4425223a75780dbd35f83eb7689279cd2db1a Mon Sep 17 00:00:00 2001 From: Khashayar Barooti Date: Thu, 24 Oct 2024 14:21:56 +0100 Subject: [PATCH 2/7] formatter --- src/_comparison_tools/bounds_checker.nr | 2 - src/_comparison_tools/lt.nr | 8 +- src/_string_tools/slice_field.nr | 2 +- src/_string_tools/string_chopper.nr | 7 +- src/_string_tools/sum_bytes_into_field.nr | 262 ++++++-- src/enums.nr | 2 +- src/get_array.nr | 51 +- src/get_literal.nr | 94 ++- src/get_number.nr | 77 ++- src/get_string.nr | 220 +++++-- src/getters.nr | 175 +++--- src/json.nr | 158 +++-- src/json_entry.nr | 66 +- src/keyhash.nr | 10 +- src/keymap.nr | 22 +- src/lib.nr | 694 +++++++++++++++++----- src/token_flags.nr | 11 +- src/transcript_entry.nr | 21 +- 18 files changed, 1328 insertions(+), 554 deletions(-) diff --git a/src/_comparison_tools/bounds_checker.nr b/src/_comparison_tools/bounds_checker.nr index 6bec991..cafb377 100644 --- a/src/_comparison_tools/bounds_checker.nr +++ b/src/_comparison_tools/bounds_checker.nr @@ -1,5 +1,3 @@ - - /* when iterating from 0 to N, validate i < M efficiently diff --git a/src/_comparison_tools/lt.nr b/src/_comparison_tools/lt.nr index 002bfc8..ae26de5 100644 --- a/src/_comparison_tools/lt.nr +++ b/src/_comparison_tools/lt.nr @@ -1,14 +1,14 @@ /** * @file helper methods that evaluate comparison operations on Field elements that are known to be of a fixed size (e.g. <2^16) **/ -unconstrained pub fn get_lt_predicate_f(x: Field, y: Field) -> bool { +pub unconstrained fn get_lt_predicate_f(x: Field, y: Field) -> bool { let a = x as u32; let b = y as u32; let r = a < b; r } -unconstrained pub fn get_lte_predicate_large(x: Field, y: Field) -> bool { +pub unconstrained fn get_lte_predicate_large(x: Field, y: Field) -> bool { let r = x.lt(y) | (x == y); r } @@ -17,7 +17,7 @@ pub fn lte_field_240_bit(x: Field, y: Field) -> bool { let predicate = get_lte_predicate_large(x, y); let delta = y as Field - x as Field; - // (x - y) * predicate + // (x - y) * predicate // if true, y - x >= 0 // if false, x <= y is wrong therefore x > y => x - y > 0 => x - y + 1 >= 0 // (y - x) * p + (1 - p) * (x - y + 1) @@ -31,7 +31,7 @@ pub fn lte_field_240_bit(x: Field, y: Field) -> bool { pub fn assert_lte_240_bit(x: Field, y: Field) { let delta = y as Field - x as Field; - // (x - y) * predicate + // (x - y) * predicate // if true, y - x >= 0 // if false, x <= y is wrong therefore x > y => x - y > 0 => x - y + 1 >= 0 // (y - x) * p + (1 - p) * (x - y + 1) diff --git a/src/_string_tools/slice_field.nr b/src/_string_tools/slice_field.nr index 2d09496..44e8f96 100644 --- a/src/_string_tools/slice_field.nr +++ b/src/_string_tools/slice_field.nr @@ -8,7 +8,7 @@ struct Slice200 { hihi: u64, // 7 bytes hilo: u64, // 7 bytes lohi: u64, // 7 bytes - lolo: u32 // 4 bytes + lolo: u32, // 4 bytes } global PHI_54: u64 = 0x30644E72E131A0; global PLO_200: Slice200 = Slice200 { diff --git a/src/_string_tools/string_chopper.nr b/src/_string_tools/string_chopper.nr index 22e6d68..0608152 100644 --- a/src/_string_tools/string_chopper.nr +++ b/src/_string_tools/string_chopper.nr @@ -7,13 +7,16 @@ impl StringChopper { _: Self, haystack: [Field; HaystackPackedFields], start_bytes: Field, - num_bytes: Field + num_bytes: Field, ) -> [u8; StringBytes] { let mut parsed_string: [u8; StringBytes] = [0; StringBytes]; let sliced: [Field; NeedlePackedFields] = slice_fields(haystack, start_bytes, num_bytes); - let sliced_bytes = sliced.map(|x: Field| { let r: [u8; 31] = x.to_be_bytes(); r }); + let sliced_bytes = sliced.map(|x: Field| { + let r: [u8; 31] = x.to_be_bytes(); + r + }); let num_slices = StringBytes / 31; let overflow = StringBytes % 31; diff --git a/src/_string_tools/sum_bytes_into_field.nr b/src/_string_tools/sum_bytes_into_field.nr index 3c60205..a9244b4 100644 --- a/src/_string_tools/sum_bytes_into_field.nr +++ b/src/_string_tools/sum_bytes_into_field.nr @@ -5,54 +5,194 @@ **/ global PATH_LOOKUP: [[bool; 5]; 32] = [ - [false, false, false, false, false], - [true, false, false, false, false], - [false, true, false, false, false], - [true, true, false, false, false], - [false, false, true, false, false], - [true, false, true, false, false], - [false, true, true, false, false], - [true, true, true, false, false], - [false, false, false, true, false], - [true, false, false, true, false], - [false, true, false, true, false], - [true, true, false, true, false], - [false, false, true, true, false], - [true, false, true, true, false], - [false, true, true, true, false], - [true, true, true, true, false], - [false, false, false, false, true], - [true, false, false, false, true], - [false, true, false, false, true], - [true, true, false, false, true], - [false, false, true, false, true], - [true, false, true, false, true], - [false, true, true, false, true], - [true, true, true, false, true], - [false, false, false, true, true], - [true, false, false, true, true], - [false, true, false, true, true], - [true, true, false, true, true], - [false, false, true, true, true], - [true, false, true, true, true], - [false, true, true, true, true], - [true, true, true, true, true] - ]; + [false, false, false, false, false], + [true, false, false, false, false], + [false, true, false, false, false], + [true, true, false, false, false], + [false, false, true, false, false], + [true, false, true, false, false], + [false, true, true, false, false], + [true, true, true, false, false], + [false, false, false, true, false], + [true, false, false, true, false], + [false, true, false, true, false], + [true, true, false, true, false], + [false, false, true, true, false], + [true, false, true, true, false], + [false, true, true, true, false], + [true, true, true, true, false], + [false, false, false, false, true], + [true, false, false, false, true], + [false, true, false, false, true], + [true, true, false, false, true], + [false, false, true, false, true], + [true, false, true, false, true], + [false, true, true, false, true], + [true, true, true, false, true], + [false, false, false, true, true], + [true, false, false, true, true], + [false, true, false, true, true], + [true, true, false, true, true], + [false, false, true, true, true], + [true, false, true, true, true], + [false, true, true, true, true], + [true, true, true, true, true], +]; unconstrained fn get_path(idx: Field) -> [bool; 5] { PATH_LOOKUP[idx] } -global tail_path_multipliers_chunk3: [Field; 32] = [0x0100000000000000000000000000000000, 0x0100000000000000000000000000000000, 0x0100000000000000000000000000000000, 0x0100000000000000000000000000000000, 0x0100000000000000000000000000000000, 0x0100000000000000000000000000000000, 0x0100000000000000000000000000000000, 0x0100000000000000000000000000000000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]; -global tail_path_multipliers_chunk2: [Field; 32] = [0x01000000000000000000000000000000000000000000000000, 0x01000000000000000000000000000000000000000000000000, 0x01000000000000000000000000000000000000000000000000, 0x01000000000000000000000000000000000000000000000000, 0x00, 0x00, 0x00, 0x00, 0x0100000000000000000000000000000000, 0x0100000000000000000000000000000000, 0x0100000000000000000000000000000000, 0x0100000000000000000000000000000000, 0x00, 0x00, 0x00, 0x00, 0x010000000000000000, 0x010000000000000000, 0x010000000000000000, 0x010000000000000000, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00]; -global tail_path_multipliers_chunk1: [Field; 32] = [0x0100000000000000000000000000000000000000000000000000000000, 0x0100000000000000000000000000000000000000000000000000000000, 0x00, 0x00, 0x01000000000000000000000000000000000000000000000000, 0x01000000000000000000000000000000000000000000000000, 0x00, 0x00, 0x010000000000000000000000000000000000000000, 0x010000000000000000000000000000000000000000, 0x00, 0x00, 0x0100000000000000000000000000000000, 0x0100000000000000000000000000000000, 0x00, 0x00, 0x01000000000000000000000000, 0x01000000000000000000000000, 0x00, 0x00, 0x010000000000000000, 0x010000000000000000, 0x00, 0x00, 0x0100000000, 0x0100000000, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00]; -global tail_path_multipliers_chunk0: [Field; 32] = [0x01000000000000000000000000000000000000000000000000000000000000, 0x00, 0x0100000000000000000000000000000000000000000000000000000000, 0x00, 0x010000000000000000000000000000000000000000000000000000, 0x00, 0x01000000000000000000000000000000000000000000000000, 0x00, 0x0100000000000000000000000000000000000000000000, 0x00, 0x010000000000000000000000000000000000000000, 0x00, 0x01000000000000000000000000000000000000, 0x00, 0x0100000000000000000000000000000000, 0x00, 0x010000000000000000000000000000, 0x00, 0x01000000000000000000000000, 0x00, 0x0100000000000000000000, 0x00, 0x010000000000000000, 0x00, 0x01000000000000, 0x00, 0x0100000000, 0x00, 0x010000, 0x00, 0x01, 0x00]; +global tail_path_multipliers_chunk3: [Field; 32] = [ + 0x0100000000000000000000000000000000, + 0x0100000000000000000000000000000000, + 0x0100000000000000000000000000000000, + 0x0100000000000000000000000000000000, + 0x0100000000000000000000000000000000, + 0x0100000000000000000000000000000000, + 0x0100000000000000000000000000000000, + 0x0100000000000000000000000000000000, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x01, + 0x01, + 0x01, + 0x01, + 0x01, + 0x01, + 0x01, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, +]; +global tail_path_multipliers_chunk2: [Field; 32] = [ + 0x01000000000000000000000000000000000000000000000000, + 0x01000000000000000000000000000000000000000000000000, + 0x01000000000000000000000000000000000000000000000000, + 0x01000000000000000000000000000000000000000000000000, + 0x00, + 0x00, + 0x00, + 0x00, + 0x0100000000000000000000000000000000, + 0x0100000000000000000000000000000000, + 0x0100000000000000000000000000000000, + 0x0100000000000000000000000000000000, + 0x00, + 0x00, + 0x00, + 0x00, + 0x010000000000000000, + 0x010000000000000000, + 0x010000000000000000, + 0x010000000000000000, + 0x00, + 0x00, + 0x00, + 0x00, + 0x01, + 0x01, + 0x01, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, +]; +global tail_path_multipliers_chunk1: [Field; 32] = [ + 0x0100000000000000000000000000000000000000000000000000000000, + 0x0100000000000000000000000000000000000000000000000000000000, + 0x00, + 0x00, + 0x01000000000000000000000000000000000000000000000000, + 0x01000000000000000000000000000000000000000000000000, + 0x00, + 0x00, + 0x010000000000000000000000000000000000000000, + 0x010000000000000000000000000000000000000000, + 0x00, + 0x00, + 0x0100000000000000000000000000000000, + 0x0100000000000000000000000000000000, + 0x00, + 0x00, + 0x01000000000000000000000000, + 0x01000000000000000000000000, + 0x00, + 0x00, + 0x010000000000000000, + 0x010000000000000000, + 0x00, + 0x00, + 0x0100000000, + 0x0100000000, + 0x00, + 0x00, + 0x01, + 0x01, + 0x00, + 0x00, +]; +global tail_path_multipliers_chunk0: [Field; 32] = [ + 0x01000000000000000000000000000000000000000000000000000000000000, + 0x00, + 0x0100000000000000000000000000000000000000000000000000000000, + 0x00, + 0x010000000000000000000000000000000000000000000000000000, + 0x00, + 0x01000000000000000000000000000000000000000000000000, + 0x00, + 0x0100000000000000000000000000000000000000000000, + 0x00, + 0x010000000000000000000000000000000000000000, + 0x00, + 0x01000000000000000000000000000000000000, + 0x00, + 0x0100000000000000000000000000000000, + 0x00, + 0x010000000000000000000000000000, + 0x00, + 0x01000000000000000000000000, + 0x00, + 0x0100000000000000000000, + 0x00, + 0x010000000000000000, + 0x00, + 0x01000000000000, + 0x00, + 0x0100000000, + 0x00, + 0x010000, + 0x00, + 0x01, + 0x00, +]; -fn sum_var_bytes_into_field(body_text: [u8; N], body_index: Field, num_bytes: Field) -> Field { +fn sum_var_bytes_into_field( + body_text: [u8; N], + body_index: Field, + num_bytes: Field, +) -> Field { let path = get_path(num_bytes); // 5 gates - let path_f: [Field; 5] = [path[0] as Field, path[1] as Field, path[2] as Field, path[3] as Field, path[4] as Field]; + let path_f: [Field; 5] = + [path[0] as Field, path[1] as Field, path[2] as Field, path[3] as Field, path[4] as Field]; - assert(path_f[0] + path_f[1] * 2 + path_f[2] * 4 + path_f[3] * 8 + path_f[4] * 16 == num_bytes as Field); + assert( + path_f[0] + path_f[1] * 2 + path_f[2] * 4 + path_f[3] * 8 + path_f[4] * 16 + == num_bytes as Field, + ); let mut idx: Field = body_index as Field; @@ -64,24 +204,38 @@ fn sum_var_bytes_into_field(body_text: [u8; N], body_index: Field, n chunks[1] = body_text[idx] as Field * 0x100 + body_text[idx + 1] as Field; idx += path_f[1] * 2; - chunks[2] = body_text[idx] as Field * 0x1000000 + body_text[idx + 1] as Field * 0x10000 - + body_text[idx + 2] as Field * 0x100 + body_text[idx + 3] as Field; + chunks[2] = body_text[idx] as Field * 0x1000000 + + body_text[idx + 1] as Field * 0x10000 + + body_text[idx + 2] as Field * 0x100 + + body_text[idx + 3] as Field; idx += path_f[2] * 4; - chunks[3] = body_text[idx] as Field * 0x100000000000000 + body_text[idx + 1] as Field * 0x1000000000000 - + body_text[idx + 2] as Field * 0x10000000000 + body_text[idx + 3] as Field * 0x100000000 - + body_text[idx + 4] as Field * 0x1000000 + body_text[idx + 5] as Field * 0x10000 - + body_text[idx + 6] as Field * 0x100 + body_text[idx + 7] as Field; + chunks[3] = body_text[idx] as Field * 0x100000000000000 + + body_text[idx + 1] as Field * 0x1000000000000 + + body_text[idx + 2] as Field * 0x10000000000 + + body_text[idx + 3] as Field * 0x100000000 + + body_text[idx + 4] as Field * 0x1000000 + + body_text[idx + 5] as Field * 0x10000 + + body_text[idx + 6] as Field * 0x100 + + body_text[idx + 7] as Field; idx += path_f[3] * 8; - chunks[4] = body_text[idx] as Field * 0x1000000000000000000000000000000 + body_text[idx + 1] as Field * 0x1000000000000000000000000000 - + body_text[idx + 2] as Field * 0x100000000000000000000000000 + body_text[idx + 3] as Field * 0x1000000000000000000000000 - + body_text[idx + 4] as Field * 0x10000000000000000000000 + body_text[idx + 5] as Field * 0x100000000000000000000 - + body_text[idx + 6] as Field * 0x1000000000000000000 + body_text[idx + 7] as Field * 0000000000000000 - + body_text[idx + 8] as Field * 0x100000000000000 + body_text[idx + 9] as Field * 0x100000000000 - + body_text[idx + 10] as Field * 0x10000000000 + body_text[idx + 11] as Field * 0x100000000 - + body_text[idx + 12] as Field * 0x1000000 + body_text[idx + 13] as Field * 0x10000 - + body_text[idx + 14] as Field * 0x100 + body_text[idx + 15] as Field; + chunks[4] = body_text[idx] as Field * 0x1000000000000000000000000000000 + + body_text[idx + 1] as Field * 0x1000000000000000000000000000 + + body_text[idx + 2] as Field * 0x100000000000000000000000000 + + body_text[idx + 3] as Field * 0x1000000000000000000000000 + + body_text[idx + 4] as Field * 0x10000000000000000000000 + + body_text[idx + 5] as Field * 0x100000000000000000000 + + body_text[idx + 6] as Field * 0x1000000000000000000 + + body_text[idx + 7] as Field * 0000000000000000 + + body_text[idx + 8] as Field * 0x100000000000000 + + body_text[idx + 9] as Field * 0x100000000000 + + body_text[idx + 10] as Field * 0x10000000000 + + body_text[idx + 11] as Field * 0x100000000 + + body_text[idx + 12] as Field * 0x1000000 + + body_text[idx + 13] as Field * 0x10000 + + body_text[idx + 14] as Field * 0x100 + + body_text[idx + 15] as Field; chunks[0] *= path_f[0]; chunks[1] *= path_f[1]; diff --git a/src/enums.nr b/src/enums.nr index 093797e..7d5c2aa 100644 --- a/src/enums.nr +++ b/src/enums.nr @@ -15,7 +15,7 @@ mod Token { global VALUE_SEPARATOR_TOKEN = 6; global STRING_TOKEN = 7; global NUMERIC_TOKEN = 8; - global LITERAL_TOKEN =9; + global LITERAL_TOKEN = 9; global KEY_TOKEN = 10; global NUM_TOKENS = 11; global NUM_TOKENS_MUL_2 = 22; diff --git a/src/get_array.nr b/src/get_array.nr index 594298f..3b483c0 100644 --- a/src/get_array.nr +++ b/src/get_array.nr @@ -8,14 +8,15 @@ use crate::getters::JSONValue; /** * @brief getter methods for extracting array types out of a JSON struct **/ -impl JSON { +impl JSON { /** * @brief if the root JSON is an array, return its length **/ fn get_length(self) -> u32 { assert(self.layer_type_of_root == ARRAY_LAYER, "can only get length of an array type"); - let parent_entry: JSONEntry = self.json_entries_packed[self.root_index_in_transcript].into(); + let parent_entry: JSONEntry = + self.json_entries_packed[self.root_index_in_transcript].into(); parent_entry.num_children as u32 } @@ -28,7 +29,8 @@ impl where, if the array exists, the JSON object will have the requested array as its root value **/ fn get_array_from_array(self, array_index: Field) -> Option { - assert(self.layer_type_of_root == ARRAY_LAYER, "can only acceess array elements from array"); + assert( + self.layer_type_of_root == ARRAY_LAYER, + "can only acceess array elements from array", + ); - let parent_entry: JSONEntry = self.json_entries_packed[self.root_index_in_transcript].into(); + let parent_entry: JSONEntry = + self.json_entries_packed[self.root_index_in_transcript].into(); let valid = lt_field_16_bit(array_index, parent_entry.num_children); let entry_index = (parent_entry.child_pointer + array_index) * valid as Field; let entry: JSONEntry = self.json_entries_packed[entry_index].into(); assert( - (entry.entry_type - END_ARRAY_TOKEN) * valid as Field == 0, "get_object_from_array: entry exists but is not an object!" + (entry.entry_type - END_ARRAY_TOKEN) * valid as Field == 0, + "get_object_from_array: entry exists but is not an object!", ); let mut r = self; @@ -128,15 +136,20 @@ impl Self { - assert(self.layer_type_of_root == ARRAY_LAYER, "can only acceess array elements from array"); + assert( + self.layer_type_of_root == ARRAY_LAYER, + "can only acceess array elements from array", + ); - let parent_entry: JSONEntry = self.json_entries_packed[self.root_index_in_transcript].into(); + let parent_entry: JSONEntry = + self.json_entries_packed[self.root_index_in_transcript].into(); let valid = lt_field_16_bit(array_index, parent_entry.num_children); assert(valid, "array overflow"); let entry_index = (parent_entry.child_pointer + array_index); let entry: JSONEntry = self.json_entries_packed[entry_index].into(); assert( - entry.entry_type == END_ARRAY_TOKEN, "get_array_from_array_unchecked: entry exists but is not an array!" + entry.entry_type == END_ARRAY_TOKEN, + "get_array_from_array_unchecked: entry exists but is not an array!", ); let mut r = self; @@ -150,7 +163,13 @@ impl(self, f: fn(JSONValue) -> U) -> [U; MaxElements] where U: std::default::Default { + fn map( + self, + f: fn(JSONValue) -> U, + ) -> [U; MaxElements] + where + U: std::default::Default, + { assert(self.layer_type_of_root == ARRAY_LAYER, "can only call map on an array"); let entry: JSONEntry = self.json_entries_packed[self.root_index_in_transcript].into(); @@ -174,7 +193,13 @@ impl Self { - assert(is_false as Field + is_null as Field + is_true as Field == 1, "parse literal: invalid entry"); + assert( + is_false as Field + is_null as Field + is_true as Field == 1, + "parse literal: invalid entry", + ); JSONLiteral { value: is_true as Field * 2 + is_null as Field } } fn is_true(self) -> bool { @@ -42,7 +44,7 @@ impl JSONLiteral { **/ fn extract_literal_from_array( arr: [u8; MAX_LITERAL_LENGTH_AS_STRING], - json_length: Field + json_length: Field, ) -> JSONLiteral { let false_field = 0x66616c7365; let true_field = 0x74727565; @@ -65,7 +67,7 @@ fn extract_literal_from_array( /** * @brief getter methods for extracting literal values out of a JSON struct **/ -impl JSON { +impl JSON { /** * @brief if the root JSON is an object, extract a literal value given by `key` @@ -76,11 +78,16 @@ impl(self, key: [u8; KeyBytes]) -> JSONLiteral { assert(self.layer_type_of_root != ARRAY_LAYER, "cannot extract array elements via a key"); - let entry= self.get_json_entry_unchecked(key); + let entry = self.get_json_entry_unchecked(key); assert( - entry.entry_type == LITERAL_TOKEN, "get_literal_unchecked_var: entry exists but is not a literal!" + entry.entry_type == LITERAL_TOKEN, + "get_literal_unchecked_var: entry exists but is not a literal!", ); - let mut parsed_string: [u8; MAX_LITERAL_LENGTH_AS_STRING] = self.extract_string_entry(entry); + let mut parsed_string: [u8; MAX_LITERAL_LENGTH_AS_STRING] = + self.extract_string_entry(entry); extract_literal_from_array(parsed_string, entry.json_length) } @@ -102,29 +111,42 @@ impl(self, key: BoundedVec) -> Option { + fn get_literal_var( + self, + key: BoundedVec, + ) -> Option { assert(self.layer_type_of_root != ARRAY_LAYER, "cannot extract array elements via a key"); let (exists, entry) = self.get_json_entry_var(key); assert( - (entry.entry_type - LITERAL_TOKEN) * exists as Field == 0, "get_literal_var: entry exists but is not a literal!" + (entry.entry_type - LITERAL_TOKEN) * exists as Field == 0, + "get_literal_var: entry exists but is not a literal!", ); - let mut parsed_string: [u8; MAX_LITERAL_LENGTH_AS_STRING] = self.extract_string_entry(entry); + let mut parsed_string: [u8; MAX_LITERAL_LENGTH_AS_STRING] = + self.extract_string_entry(entry); - Option { _is_some: exists, _value: extract_literal_from_array(parsed_string, entry.json_length) } + Option { + _is_some: exists, + _value: extract_literal_from_array(parsed_string, entry.json_length), + } } /** * @brief same as `get_literal_unchecked` for where the key length may be less than KeyBytes **/ - fn get_literal_unchecked_var(self, key: BoundedVec) -> JSONLiteral { + fn get_literal_unchecked_var( + self, + key: BoundedVec, + ) -> JSONLiteral { assert(self.layer_type_of_root != ARRAY_LAYER, "cannot extract array elements via a key"); - let entry= self.get_json_entry_unchecked_var(key); + let entry = self.get_json_entry_unchecked_var(key); assert( - entry.entry_type == LITERAL_TOKEN, "get_literal_unchecked_var: entry exists but is not a literal!" + entry.entry_type == LITERAL_TOKEN, + "get_literal_unchecked_var: entry exists but is not a literal!", ); - let mut parsed_string: [u8; MAX_LITERAL_LENGTH_AS_STRING] = self.extract_string_entry(entry); + let mut parsed_string: [u8; MAX_LITERAL_LENGTH_AS_STRING] = + self.extract_string_entry(entry); extract_literal_from_array(parsed_string, entry.json_length) } @@ -134,20 +156,26 @@ impl which will be null if the literal does not exist **/ fn get_literal_from_array(self, array_index: Field) -> Option { - assert(self.layer_type_of_root == ARRAY_LAYER, "can only acceess array elements from array"); + assert( + self.layer_type_of_root == ARRAY_LAYER, + "can only acceess array elements from array", + ); - let parent_entry : JSONEntry = self.json_entries_packed[self.root_index_in_transcript].into(); + let parent_entry: JSONEntry = + self.json_entries_packed[self.root_index_in_transcript].into(); let valid = lt_field_16_bit(array_index, parent_entry.num_children); let entry_index = (parent_entry.child_pointer + array_index) * valid as Field; - let entry : JSONEntry = self.json_entries_packed[entry_index].into(); + let entry: JSONEntry = self.json_entries_packed[entry_index].into(); assert( - (entry.entry_type - LITERAL_TOKEN) * valid as Field == 0, "get_literal_from_array: entry exists but is not a literal!" + (entry.entry_type - LITERAL_TOKEN) * valid as Field == 0, + "get_literal_from_array: entry exists but is not a literal!", ); - let mut parsed_string: [u8; MAX_LITERAL_LENGTH_AS_STRING] = self.extract_string_entry(entry); + let mut parsed_string: [u8; MAX_LITERAL_LENGTH_AS_STRING] = + self.extract_string_entry(entry); let result = extract_literal_from_array(parsed_string, entry.json_length); Option { _is_some: valid, _value: result } @@ -158,21 +186,27 @@ impl JSONLiteral { - assert(self.layer_type_of_root == ARRAY_LAYER, "can only acceess array elements from array"); + assert( + self.layer_type_of_root == ARRAY_LAYER, + "can only acceess array elements from array", + ); - let parent_entry : JSONEntry = self.json_entries_packed[self.root_index_in_transcript].into(); + let parent_entry: JSONEntry = + self.json_entries_packed[self.root_index_in_transcript].into(); let valid = lt_field_16_bit(array_index, parent_entry.num_children); assert(valid, "array overflow"); let entry_index = (parent_entry.child_pointer + array_index); - let entry : JSONEntry = self.json_entries_packed[entry_index].into(); + let entry: JSONEntry = self.json_entries_packed[entry_index].into(); assert( - entry.entry_type == LITERAL_TOKEN, "get_literal_from_array_unchecked: entry exists but is not a literal!" + entry.entry_type == LITERAL_TOKEN, + "get_literal_from_array_unchecked: entry exists but is not a literal!", ); - let mut parsed_string: [u8; MAX_LITERAL_LENGTH_AS_STRING] = self.extract_string_entry(entry); + let mut parsed_string: [u8; MAX_LITERAL_LENGTH_AS_STRING] = + self.extract_string_entry(entry); extract_literal_from_array(parsed_string, entry.json_length) } } diff --git a/src/get_number.nr b/src/get_number.nr index b016741..acf91d4 100644 --- a/src/get_number.nr +++ b/src/get_number.nr @@ -8,7 +8,27 @@ use crate::getters::JSONValue; global U64_LENGTH_AS_BASE10_STRING = 20; global NUMBER_OFFSET_SHIFT: [Field; 21] = [ - 100000000000000000000,10000000000000000000,1000000000000000000,100000000000000000,10000000000000000,1000000000000000,100000000000000,10000000000000, 1000000000000, 100000000000, 10000000000, 1000000000, 100000000,10000000,1000000,100000,10000,1000,100,10,1 + 100000000000000000000, + 10000000000000000000, + 1000000000000000000, + 100000000000000000, + 10000000000000000, + 1000000000000000, + 100000000000000, + 10000000000000, + 1000000000000, + 100000000000, + 10000000000, + 1000000000, + 100000000, + 10000000, + 1000000, + 100000, + 10000, + 1000, + 100, + 10, + 1, ]; fn extract_number_from_array(arr: [u8; U64_LENGTH_AS_BASE10_STRING], json_length: Field) -> u64 { @@ -28,7 +48,7 @@ fn extract_number_from_array(arr: [u8; U64_LENGTH_AS_BASE10_STRING], json_length * @note numeric values must fit into a `u64` type. * decimal values and scientific notation are not yet supported **/ -impl JSON { +impl JSON { /** * @brief if the root JSON is an object, extract a numeric value given by `key` @@ -37,11 +57,15 @@ impl(self, key: [u8; KeyBytes]) -> Option { let (exists, entry) = self.get_json_entry(key); assert( - (entry.entry_type - NUMERIC_TOKEN) * exists as Field == 0, "get_number: entry exists but is not a number!" + (entry.entry_type - NUMERIC_TOKEN) * exists as Field == 0, + "get_number: entry exists but is not a number!", ); let mut parsed_string: [u8; U64_LENGTH_AS_BASE10_STRING] = self.extract_string_entry(entry); - Option { _is_some: exists, _value: extract_number_from_array(parsed_string, entry.json_length) } + Option { + _is_some: exists, + _value: extract_number_from_array(parsed_string, entry.json_length), + } } /** @@ -49,8 +73,11 @@ impl(self, key: [u8; KeyBytes]) -> u64 { - let entry = self.get_json_entry_unchecked(key); - assert(entry.entry_type == NUMERIC_TOKEN, "get_number_unchecked: entry exists but is not a number!"); + let entry = self.get_json_entry_unchecked(key); + assert( + entry.entry_type == NUMERIC_TOKEN, + "get_number_unchecked: entry exists but is not a number!", + ); let mut parsed_string: [u8; U64_LENGTH_AS_BASE10_STRING] = self.extract_string_entry(entry); extract_number_from_array(parsed_string, entry.json_length) @@ -62,19 +89,26 @@ impl(self, key: BoundedVec) -> Option { let (exists, entry) = self.get_json_entry_var(key); assert( - (entry.entry_type - NUMERIC_TOKEN) * exists as Field == 0, "get_number: entry exists but is not a number!" + (entry.entry_type - NUMERIC_TOKEN) * exists as Field == 0, + "get_number: entry exists but is not a number!", ); let mut parsed_string: [u8; U64_LENGTH_AS_BASE10_STRING] = self.extract_string_entry(entry); - Option { _is_some: exists, _value: extract_number_from_array(parsed_string, entry.json_length) } + Option { + _is_some: exists, + _value: extract_number_from_array(parsed_string, entry.json_length), + } } /** * @brief same as `get_number_unchecked` for where the key length may be less than KeyBytes **/ fn get_number_unchecked_var(self, key: BoundedVec) -> u64 { - let entry = self.get_json_entry_unchecked_var(key); - assert(entry.entry_type == NUMERIC_TOKEN, "get_number_unchecked: entry exists but is not a number!"); + let entry = self.get_json_entry_unchecked_var(key); + assert( + entry.entry_type == NUMERIC_TOKEN, + "get_number_unchecked: entry exists but is not a number!", + ); let mut parsed_string: [u8; U64_LENGTH_AS_BASE10_STRING] = self.extract_string_entry(entry); extract_number_from_array(parsed_string, entry.json_length) @@ -85,17 +119,22 @@ impl which will be null if the number does not exist **/ fn get_number_from_array(self, array_index: Field) -> Option { - assert(self.layer_type_of_root == ARRAY_LAYER, "can only acceess array elements from array"); + assert( + self.layer_type_of_root == ARRAY_LAYER, + "can only acceess array elements from array", + ); - let parent_entry : JSONEntry = self.json_entries_packed[self.root_index_in_transcript].into(); + let parent_entry: JSONEntry = + self.json_entries_packed[self.root_index_in_transcript].into(); let valid = lt_field_16_bit(array_index, parent_entry.num_children); let entry_index = (parent_entry.child_pointer + array_index) * valid as Field; - let entry : JSONEntry = self.json_entries_packed[entry_index].into(); + let entry: JSONEntry = self.json_entries_packed[entry_index].into(); assert( - (entry.entry_type - NUMERIC_TOKEN) * valid as Field == 0, "get_number: entry exists but is not a number!" + (entry.entry_type - NUMERIC_TOKEN) * valid as Field == 0, + "get_number: entry exists but is not a number!", ); let mut parsed_string: [u8; U64_LENGTH_AS_BASE10_STRING] = self.extract_string_entry(entry); @@ -109,15 +148,19 @@ impl u64 { - assert(self.layer_type_of_root == ARRAY_LAYER, "can only acceess array elements from array"); + assert( + self.layer_type_of_root == ARRAY_LAYER, + "can only acceess array elements from array", + ); - let parent_entry : JSONEntry = self.json_entries_packed[self.root_index_in_transcript].into(); + let parent_entry: JSONEntry = + self.json_entries_packed[self.root_index_in_transcript].into(); let valid = lt_field_16_bit(array_index, parent_entry.num_children); assert(valid, "array overflow"); let entry_index = (parent_entry.child_pointer + array_index); - let entry : JSONEntry = self.json_entries_packed[entry_index].into(); + let entry: JSONEntry = self.json_entries_packed[entry_index].into(); assert(entry.entry_type == NUMERIC_TOKEN, "get_number: entry exists but is not a number!"); diff --git a/src/get_string.nr b/src/get_string.nr index 8550103..c3a64f9 100644 --- a/src/get_string.nr +++ b/src/get_string.nr @@ -2,7 +2,9 @@ use crate::json_entry::JSONEntry; use crate::json::JSON; use crate::getters::JSONValue; use crate::_comparison_tools::lt::lt_field_16_bit; -use crate::json_tables::{ESCAPE_SEQUENCE_START_CHARS, ESCAPE_SEQUENCE_END_CHARS, ESCAPE_SEQUENCE_REPLACEMENT}; +use crate::json_tables::{ + ESCAPE_SEQUENCE_START_CHARS, ESCAPE_SEQUENCE_END_CHARS, ESCAPE_SEQUENCE_REPLACEMENT, +}; use crate::enums::Token::STRING_TOKEN; use crate::enums::Layer::{OBJECT_LAYER, ARRAY_LAYER}; @@ -21,7 +23,8 @@ fn process_escape_sequences(input: BoundedVec) -> BoundedVec< let escape_sequence_start_candidate = ESCAPE_SEQUENCE_START_CHARS[character]; let escape_sequence_end_candidate = ESCAPE_SEQUENCE_END_CHARS[next_character]; let escape_sequence_replacement_candidate = ESCAPE_SEQUENCE_REPLACEMENT[next_character]; - let mut is_escape_sequence = (escape_sequence_start_candidate & escape_sequence_end_candidate) as Field; + let mut is_escape_sequence = + (escape_sequence_start_candidate & escape_sequence_end_candidate) as Field; is_escape_sequence = is_escape_sequence * (1 - skip); let mut written_byte = is_escape_sequence * escape_sequence_replacement_candidate as Field + (1 - is_escape_sequence) * character as Field; @@ -40,7 +43,7 @@ fn process_escape_sequences(input: BoundedVec) -> BoundedVec< let written_byte: Field = character as Field * (1 - skip) + cached_byte * skip; let written_byte_u8 = to_u8(written_byte); assert(written_byte_u8 as Field == written_byte); - result[result_ptr] = written_byte_u8; + result[result_ptr] = written_byte_u8; result_ptr += 1; let num_removed_chars = N as Field - result_ptr; @@ -60,9 +63,12 @@ fn test_process_escape_sequence_2() { fn test_process_escape_sequence() { // end with escape sequence { - let text = BoundedVec::from_array("the qulick brown fox said \\\"why hello there\\\" \\\\".as_bytes()); + let text = BoundedVec::from_array("the qulick brown fox said \\\"why hello there\\\" \\\\" + .as_bytes()); - let expected: BoundedVec = BoundedVec::from_array("the qulick brown fox said \"why hello there\" \\".as_bytes()); + let expected: BoundedVec = BoundedVec::from_array( + "the qulick brown fox said \"why hello there\" \\".as_bytes(), + ); let result: BoundedVec = process_escape_sequences(text); @@ -70,9 +76,13 @@ fn test_process_escape_sequence() { } // end without escape sequence { - let text = BoundedVec::from_array("\\\"he qulick brown fox said \\n \\r \\\"why hello there\\\" \\\\".as_bytes()); + let text = BoundedVec::from_array( + "\\\"he qulick brown fox said \\n \\r \\\"why hello there\\\" \\\\".as_bytes(), + ); - let expected: BoundedVec = BoundedVec::from_array("\"he qulick brown fox said \n \r \"why hello there\" \\".as_bytes()); + let expected: BoundedVec = BoundedVec::from_array( + "\"he qulick brown fox said \n \r \"why hello there\" \\".as_bytes(), + ); let result = process_escape_sequences(text); @@ -85,21 +95,27 @@ fn test_process_escape_sequence() { * @note returned strings will have escape sequences converted into the relevant ASCII characters. * If you want to avoid this, use `get_value` instead of `get_string` **/ -impl JSON { +impl JSON { /** * @brief if the root JSON is an object, extract a string given by `key` * @description returns an Option which will be null if the key does not exist * @note the `StringBytes` parameter defines the maximum allowable length of the returned string **/ - fn get_string(self, key: [u8; KeyBytes]) -> Option> { + fn get_string( + self, + key: [u8; KeyBytes], + ) -> Option> { let (exists, entry) = self.get_json_entry(key); assert( - (entry.entry_type - STRING_TOKEN) * exists as Field == 0, "get_string: entry exists but is not a string!" + (entry.entry_type - STRING_TOKEN) * exists as Field == 0, + "get_string: entry exists but is not a string!", ); let mut parsed_string: [u8; StringBytes] = self.extract_string_entry(entry); - let parsed_string: BoundedVec = process_escape_sequences(BoundedVec { storage: parsed_string, len: entry.json_length as u32 }); + let parsed_string: BoundedVec = process_escape_sequences( + BoundedVec { storage: parsed_string, len: entry.json_length as u32 }, + ); Option { _is_some: exists, _value: parsed_string } } @@ -108,33 +124,53 @@ impl(self, key: [u8; KeyBytes]) -> BoundedVec { + fn get_string_unchecked( + self, + key: [u8; KeyBytes], + ) -> BoundedVec { let entry = self.get_json_entry_unchecked(key); - assert(entry.entry_type == STRING_TOKEN, "get_string_unchecked: entry exists but is not a string!"); - let parsed_string = BoundedVec { storage: self.extract_string_entry(entry), len: entry.json_length as u32 }; + assert( + entry.entry_type == STRING_TOKEN, + "get_string_unchecked: entry exists but is not a string!", + ); + let parsed_string = + BoundedVec { storage: self.extract_string_entry(entry), len: entry.json_length as u32 }; process_escape_sequences(parsed_string) } /** * @brief same as `get_string` for where the key length may be less than KeyBytes **/ - fn get_string_var(self, key: BoundedVec) -> Option> { + fn get_string_var( + self, + key: BoundedVec, + ) -> Option> { let (exists, entry) = self.get_json_entry_var(key); assert( - (entry.entry_type - STRING_TOKEN) * exists as Field == 0, "get_string: entry exists but is not a string!" + (entry.entry_type - STRING_TOKEN) * exists as Field == 0, + "get_string: entry exists but is not a string!", ); let mut parsed_string: [u8; StringBytes] = self.extract_string_entry(entry); - let parsed_string: BoundedVec = process_escape_sequences(BoundedVec { storage: parsed_string, len: entry.json_length as u32 }); + let parsed_string: BoundedVec = process_escape_sequences( + BoundedVec { storage: parsed_string, len: entry.json_length as u32 }, + ); Option { _is_some: exists, _value: parsed_string } } /** * @brief same as `get_string_unchecked` for where the key length may be less than KeyBytes **/ - fn get_string_unchecked_var(self, key: BoundedVec) -> BoundedVec { + fn get_string_unchecked_var( + self, + key: BoundedVec, + ) -> BoundedVec { let entry = self.get_json_entry_unchecked_var(key); - assert(entry.entry_type == STRING_TOKEN, "get_string_unchecked: entry exists but is not a string!"); - let parsed_string = BoundedVec { storage: self.extract_string_entry(entry), len: entry.json_length as u32 }; + assert( + entry.entry_type == STRING_TOKEN, + "get_string_unchecked: entry exists but is not a string!", + ); + let parsed_string = + BoundedVec { storage: self.extract_string_entry(entry), len: entry.json_length as u32 }; process_escape_sequences(parsed_string) } @@ -142,22 +178,32 @@ impl which will be null if the string does not exist **/ - fn get_string_from_array(self, array_index: Field) -> Option> { - assert(self.layer_type_of_root == ARRAY_LAYER, "can only acceess array elements from array"); + fn get_string_from_array( + self, + array_index: Field, + ) -> Option> { + assert( + self.layer_type_of_root == ARRAY_LAYER, + "can only acceess array elements from array", + ); - let parent_entry : JSONEntry = self.json_entries_packed[self.root_index_in_transcript].into(); + let parent_entry: JSONEntry = + self.json_entries_packed[self.root_index_in_transcript].into(); let valid = lt_field_16_bit(array_index, parent_entry.num_children); let entry_index = (parent_entry.child_pointer + array_index) * valid as Field; - let entry : JSONEntry = self.json_entries_packed[entry_index].into(); + let entry: JSONEntry = self.json_entries_packed[entry_index].into(); assert( - (entry.entry_type - STRING_TOKEN) * valid as Field == 0, "get_array_element_as_string: entry exists but is not a string!" + (entry.entry_type - STRING_TOKEN) * valid as Field == 0, + "get_array_element_as_string: entry exists but is not a string!", ); let mut parsed_string: [u8; StringBytes] = self.extract_string_entry(entry); - let parsed_string: BoundedVec = process_escape_sequences(BoundedVec { storage: parsed_string, len: entry.json_length as u32 }); + let parsed_string: BoundedVec = process_escape_sequences( + BoundedVec { storage: parsed_string, len: entry.json_length as u32 }, + ); Option { _is_some: valid, _value: parsed_string } } @@ -165,23 +211,33 @@ impl(self, array_index: Field) -> BoundedVec { - assert(self.layer_type_of_root == ARRAY_LAYER, "can only acceess array elements from array"); + fn get_string_from_array_unchecked( + self, + array_index: Field, + ) -> BoundedVec { + assert( + self.layer_type_of_root == ARRAY_LAYER, + "can only acceess array elements from array", + ); - let parent_entry : JSONEntry = self.json_entries_packed[self.root_index_in_transcript].into(); + let parent_entry: JSONEntry = + self.json_entries_packed[self.root_index_in_transcript].into(); let valid = lt_field_16_bit(array_index, parent_entry.num_children); assert(valid, "array overflow"); let entry_index = (parent_entry.child_pointer + array_index); - let entry : JSONEntry = self.json_entries_packed[entry_index].into(); + let entry: JSONEntry = self.json_entries_packed[entry_index].into(); assert( - entry.entry_type == STRING_TOKEN, "get_string_from_array_unchecked: entry exists but is not a string!" + entry.entry_type == STRING_TOKEN, + "get_string_from_array_unchecked: entry exists but is not a string!", ); let mut parsed_string: [u8; StringBytes] = self.extract_string_entry(entry); - process_escape_sequences(BoundedVec { storage: parsed_string, len: entry.json_length as u32 }) + process_escape_sequences( + BoundedVec { storage: parsed_string, len: entry.json_length as u32 }, + ) } /** @@ -189,12 +245,12 @@ impl( self, - keys: [BoundedVec; PathDepth] + keys: [BoundedVec; PathDepth], ) -> Option> { let mut target = self; let mut valid = true; for i in 0..PathDepth - 1 { - let child = self.get_object_var(keys[i]); + let child = self.get_object_var(keys[i]); target = child._value; valid = valid & child._is_some; @@ -210,12 +266,19 @@ impl which will be null if the key does not exist * @note the `StringBytes` parameter defines the maximum allowable length of the returned value **/ - fn get_value(self, key: [u8; KeyBytes]) -> Option> { + fn get_value( + self, + key: [u8; KeyBytes], + ) -> Option> { let (exists, entry) = self.get_json_entry(key); let mut parsed_string: [u8; StringBytes] = self.extract_string_entry(entry); - let parsed_string: BoundedVec = BoundedVec { storage: parsed_string, len: entry.json_length as u32 }; - Option { _is_some: exists, _value: JSONValue { value: parsed_string, value_type: entry.entry_type } } + let parsed_string: BoundedVec = + BoundedVec { storage: parsed_string, len: entry.json_length as u32 }; + Option { + _is_some: exists, + _value: JSONValue { value: parsed_string, value_type: entry.entry_type }, + } } /** @@ -223,33 +286,52 @@ impl(self, key: [u8; KeyBytes]) -> JSONValue { + fn get_value_unchecked( + self, + key: [u8; KeyBytes], + ) -> JSONValue { let entry = self.get_json_entry_unchecked(key); JSONValue { - value: BoundedVec { len: entry.json_length as u32, storage: self.extract_string_entry(entry) }, - value_type: entry.entry_type + value: BoundedVec { + len: entry.json_length as u32, + storage: self.extract_string_entry(entry), + }, + value_type: entry.entry_type, } } /** * @brief same as `get_value` for where the key length may be less than KeyBytes **/ - fn get_value_var(self, key: BoundedVec) -> Option> { + fn get_value_var( + self, + key: BoundedVec, + ) -> Option> { let (exists, entry) = self.get_json_entry_var(key); let mut parsed_string: [u8; StringBytes] = self.extract_string_entry(entry); - let parsed_string: BoundedVec = BoundedVec { storage: parsed_string, len: entry.json_length as u32 }; - Option { _is_some: exists, _value: JSONValue { value: parsed_string, value_type: entry.entry_type } } + let parsed_string: BoundedVec = + BoundedVec { storage: parsed_string, len: entry.json_length as u32 }; + Option { + _is_some: exists, + _value: JSONValue { value: parsed_string, value_type: entry.entry_type }, + } } /** * @brief same as `get_value_unchecked` for where the key length may be less than KeyBytes **/ - fn get_value_unchecked_var(self, key: BoundedVec) -> JSONValue { + fn get_value_unchecked_var( + self, + key: BoundedVec, + ) -> JSONValue { let entry = self.get_json_entry_unchecked_var(key); JSONValue { - value: BoundedVec { len: entry.json_length as u32, storage: self.extract_string_entry(entry) }, - value_type: entry.entry_type + value: BoundedVec { + len: entry.json_length as u32, + storage: self.extract_string_entry(entry), + }, + value_type: entry.entry_type, } } @@ -257,18 +339,26 @@ impl which will be null if the value does not exist **/ - fn get_value_from_array(self, array_index: Field) -> Option> { - assert(self.layer_type_of_root == ARRAY_LAYER, "can only acceess array elements from array"); + fn get_value_from_array( + self, + array_index: Field, + ) -> Option> { + assert( + self.layer_type_of_root == ARRAY_LAYER, + "can only acceess array elements from array", + ); - let parent_entry : JSONEntry = self.json_entries_packed[self.root_index_in_transcript].into(); + let parent_entry: JSONEntry = + self.json_entries_packed[self.root_index_in_transcript].into(); let valid = lt_field_16_bit(array_index, parent_entry.num_children); let entry_index = (parent_entry.child_pointer + array_index) * valid as Field; - let entry : JSONEntry = self.json_entries_packed[entry_index].into(); + let entry: JSONEntry = self.json_entries_packed[entry_index].into(); assert( - (entry.entry_type - STRING_TOKEN) * valid as Field == 0, "get_array_element_as_string: entry exists but is not a string!" + (entry.entry_type - STRING_TOKEN) * valid as Field == 0, + "get_array_element_as_string: entry exists but is not a string!", ); let mut parsed_string: [u8; StringBytes] = self.extract_string_entry(entry); @@ -276,8 +366,8 @@ impl(self, array_index: Field) -> JSONValue { - assert(self.layer_type_of_root == ARRAY_LAYER, "can only acceess array elements from array"); + fn get_value_from_array_unchecked( + self, + array_index: Field, + ) -> JSONValue { + assert( + self.layer_type_of_root == ARRAY_LAYER, + "can only acceess array elements from array", + ); - let parent_entry : JSONEntry = self.json_entries_packed[self.root_index_in_transcript].into(); + let parent_entry: JSONEntry = + self.json_entries_packed[self.root_index_in_transcript].into(); let valid = lt_field_16_bit(array_index, parent_entry.num_children); assert(valid, "array overflow"); let entry_index = (parent_entry.child_pointer + array_index); - let entry : JSONEntry = self.json_entries_packed[entry_index].into(); + let entry: JSONEntry = self.json_entries_packed[entry_index].into(); assert( - entry.entry_type == STRING_TOKEN, "get_string_from_array_unchecked: entry exists but is not a string!" + entry.entry_type == STRING_TOKEN, + "get_string_from_array_unchecked: entry exists but is not a string!", ); let mut parsed_string: [u8; StringBytes] = self.extract_string_entry(entry); JSONValue { value: BoundedVec { len: entry.json_length as u32, storage: parsed_string }, - value_type: entry.entry_type + value_type: entry.entry_type, } } @@ -312,12 +410,12 @@ impl( self, - keys: [BoundedVec; PathDepth] + keys: [BoundedVec; PathDepth], ) -> Option> { let mut target = self; let mut valid = true; for i in 0..PathDepth - 1 { - let child = self.get_object_var(keys[i]); + let child = self.get_object_var(keys[i]); target = child._value; valid = valid & child._is_some; diff --git a/src/getters.nr b/src/getters.nr index b0328f0..93e1b48 100644 --- a/src/getters.nr +++ b/src/getters.nr @@ -23,7 +23,7 @@ struct KeySearchResult { /** * @brief helper methods for extracting data out of a processed JSON object **/ -impl JSON { +impl JSON { /** * @brief If the root JSON is an object, extract a JSONEntry that describes an array, object or value that maps to a given key @@ -65,7 +65,7 @@ impl( self, - key: BoundedVec + key: BoundedVec, ) -> (bool, JSONEntry) { // let key_index = self.find_key_in_map(keyhash); // assert(self.key_hashes[key_index] == keyhash); @@ -79,7 +79,10 @@ impl(self, key: BoundedVec) -> JSONEntry { + fn get_json_entry_unchecked_var( + self, + key: BoundedVec, + ) -> JSONEntry { assert(self.layer_type_of_root != ARRAY_LAYER, "cannot extract array elements via a key"); let hasher: ByteHasher = ByteHasher {}; @@ -99,7 +102,10 @@ impl(self, key: [u8; KeyBytes]) -> (JSONEntry, Field) { + fn get_json_entry_unchecked_with_key_index( + self, + key: [u8; KeyBytes], + ) -> (JSONEntry, Field) { assert(self.layer_type_of_root != ARRAY_LAYER, "cannot extract array elements via a key"); let hasher: ByteHasher = ByteHasher {}; @@ -118,7 +124,10 @@ impl(self, key: BoundedVec) -> (JSONEntry, Field) { + fn get_json_entry_unchecked_with_key_index_var( + self, + key: BoundedVec, + ) -> (JSONEntry, Field) { assert(self.layer_type_of_root != ARRAY_LAYER, "cannot extract array elements via a key"); let hasher: ByteHasher = ByteHasher {}; @@ -143,91 +152,63 @@ impl = StringChopper{}; + if (StringBytes <= 31) { + let s: StringChopper<1> = StringChopper {}; result = s.slice_string(self.json_packed, entry.json_pointer, entry.json_length); - } - else if (StringBytes <= 62) - { - let s: StringChopper<2> = StringChopper{}; + } else if (StringBytes <= 62) { + let s: StringChopper<2> = StringChopper {}; result = s.slice_string(self.json_packed, entry.json_pointer, entry.json_length); - } - else if (StringBytes <= 93) - { - let s: StringChopper<3> = StringChopper{}; + } else if (StringBytes <= 93) { + let s: StringChopper<3> = StringChopper {}; result = s.slice_string(self.json_packed, entry.json_pointer, entry.json_length); - } - else if (StringBytes <= 124) - { - let s: StringChopper<4> = StringChopper{}; + } else if (StringBytes <= 124) { + let s: StringChopper<4> = StringChopper {}; result = s.slice_string(self.json_packed, entry.json_pointer, entry.json_length); - } - else if (StringBytes <= 155) - { - let s: StringChopper<5> = StringChopper{}; + } else if (StringBytes <= 155) { + let s: StringChopper<5> = StringChopper {}; result = s.slice_string(self.json_packed, entry.json_pointer, entry.json_length); - } - else if (StringBytes <= 186) - { - let s: StringChopper<6> = StringChopper{}; + } else if (StringBytes <= 186) { + let s: StringChopper<6> = StringChopper {}; result = s.slice_string(self.json_packed, entry.json_pointer, entry.json_length); - } - else if (StringBytes <= 217) - { - let s: StringChopper<7> = StringChopper{}; + } else if (StringBytes <= 217) { + let s: StringChopper<7> = StringChopper {}; result = s.slice_string(self.json_packed, entry.json_pointer, entry.json_length); - } - else if (StringBytes <= 248) // 8 + } else if (StringBytes <= 248) // 8 { - let s: StringChopper<8> = StringChopper{}; + let s: StringChopper<8> = StringChopper {}; result = s.slice_string(self.json_packed, entry.json_pointer, entry.json_length); - } - else if (StringBytes <= 496) // 16 + } else if (StringBytes <= 496) // 16 { - let s: StringChopper<16> = StringChopper{}; + let s: StringChopper<16> = StringChopper {}; result = s.slice_string(self.json_packed, entry.json_pointer, entry.json_length); - } - else if (StringBytes <= 992) // 32 + } else if (StringBytes <= 992) // 32 { - let s: StringChopper<32> = StringChopper{}; + let s: StringChopper<32> = StringChopper {}; result = s.slice_string(self.json_packed, entry.json_pointer, entry.json_length); - } - else if (StringBytes <= 1984) - { - let s: StringChopper<64> = StringChopper{}; + } else if (StringBytes <= 1984) { + let s: StringChopper<64> = StringChopper {}; result = s.slice_string(self.json_packed, entry.json_pointer, entry.json_length); - } - else if (StringBytes <= 3968) - { - let s: StringChopper<128> = StringChopper{}; + } else if (StringBytes <= 3968) { + let s: StringChopper<128> = StringChopper {}; result = s.slice_string(self.json_packed, entry.json_pointer, entry.json_length); - } - else if (StringBytes <= 7936) - { - let s: StringChopper<256> = StringChopper{}; + } else if (StringBytes <= 7936) { + let s: StringChopper<256> = StringChopper {}; result = s.slice_string(self.json_packed, entry.json_pointer, entry.json_length); - } - else if (StringBytes <= 15872) - { - let s: StringChopper<512> = StringChopper{}; + } else if (StringBytes <= 15872) { + let s: StringChopper<512> = StringChopper {}; result = s.slice_string(self.json_packed, entry.json_pointer, entry.json_length); - } - else if (StringBytes <= 31774) - { - let s: StringChopper<1024> = StringChopper{}; - result = s.slice_string(self.json_packed, entry.json_pointer, entry.json_length); - } - else - { + } else if (StringBytes <= 31774) { + let s: StringChopper<1024> = StringChopper {}; + result = s.slice_string(self.json_packed, entry.json_pointer, entry.json_length); + } else { // max 16 bits = 65535 = 2115 31-byte slices - let s: StringChopper<2115> = StringChopper{}; + let s: StringChopper<2115> = StringChopper {}; result = s.slice_string(self.json_packed, entry.json_pointer, entry.json_length); - } result } @@ -236,7 +217,7 @@ impl last entry case 3: entry A > keyhash > entryB - */ let hasher: ByteHasher = ByteHasher {}; let keyhash = hasher.get_keyhash_var(key, 0, KeyBytes); @@ -372,16 +358,17 @@ impl(self, key: BoundedVec) -> (bool, Field) { + fn key_exists_impl_var( + self, + key: BoundedVec, + ) -> (bool, Field) { /* Option A: key exists Option B: key does NOT exist - - If key does NOT exist. 3 cases + If key does NOT exist. 3 cases case 1: keyhash < first entry case 2: keyhash > last entry case 3: entry A > keyhash > entryB - */ let hasher: ByteHasher = ByteHasher {}; let keyhash = hasher.get_keyhash_var(key.storage, 0, key.len as u32); @@ -424,10 +411,14 @@ impl(self) -> BoundedVec { - let mut result: BoundedVec = BoundedVec { len: 0, storage: [0; MaxNumKeys] }; + unconstrained fn __get_keys_at_root( + self, + ) -> BoundedVec { + let mut result: BoundedVec = + BoundedVec { len: 0, storage: [0; MaxNumKeys] }; - let root_object: JSONEntry = JSONEntry::from(self.json_entries_packed[self.root_index_in_transcript]); + let root_object: JSONEntry = + JSONEntry::from(self.json_entries_packed[self.root_index_in_transcript]); let mut result_ptr = 0; for i in 0..MaxNumValues { @@ -441,13 +432,19 @@ impl(self) -> BoundedVec, MaxNumKeys> { - let root_object: JSONEntry = JSONEntry::from(self.json_entries_packed[self.root_index_in_transcript]); + fn get_keys_at_root( + self, + ) -> BoundedVec, MaxNumKeys> { + let root_object: JSONEntry = + JSONEntry::from(self.json_entries_packed[self.root_index_in_transcript]); let key_indices: BoundedVec = self.__get_keys_at_root(); assert(key_indices.len as Field == root_object.num_children); - let mut result: BoundedVec, MaxNumKeys> = BoundedVec { len: 0, storage: [BoundedVec { len: 0, storage: [0; MaxKeyBytes] }; MaxNumKeys] }; + let mut result: BoundedVec, MaxNumKeys> = BoundedVec { + len: 0, + storage: [BoundedVec { len: 0, storage: [0; MaxKeyBytes] }; MaxNumKeys], + }; for i in 0..MaxNumKeys { let key = KeyIndexData::from_field(self.key_data[key_indices.storage[i]]); // just a workaround to the interface for `extract_string_entry` diff --git a/src/json.nr b/src/json.nr index 2aebf22..b2f7b3a 100644 --- a/src/json.nr +++ b/src/json.nr @@ -3,24 +3,26 @@ use crate::_comparison_tools::bounds_checker::get_validity_flags; use crate::enums::Layer::{OBJECT_LAYER, ARRAY_LAYER, SINGLE_VALUE_LAYER}; use crate::enums::Token::{ BEGIN_OBJECT_TOKEN, END_OBJECT_TOKEN, BEGIN_ARRAY_TOKEN, END_ARRAY_TOKEN, KEY_SEPARATOR_TOKEN, - VALUE_SEPARATOR_TOKEN, STRING_TOKEN, NUMERIC_TOKEN, LITERAL_TOKEN, KEY_TOKEN, NUM_TOKENS + VALUE_SEPARATOR_TOKEN, STRING_TOKEN, NUMERIC_TOKEN, LITERAL_TOKEN, KEY_TOKEN, NUM_TOKENS, }; use crate::enums::ScanMode::{GRAMMAR_SCAN, STRING_SCAN, NUMERIC_SCAN, LITERAL_SCAN}; use crate::get_literal::JSONLiteral; use crate::json_entry::{JSONContextStackEntry, JSONEntry, JSONEntryPacked}; use crate::json_tables::{ TOKEN_VALIDATION_TABLE, PROCESS_RAW_TRANSCRIPT_TABLE, JSON_CAPTURE_TABLE, TOKEN_FLAGS_TABLE, - TOKEN_IS_ARRAY_OBJECT_OR_VALUE + TOKEN_IS_ARRAY_OBJECT_OR_VALUE, }; use crate::token_flags::TokenFlags; -use crate::transcript_entry::{ValidationFlags, TranscriptEntry, RawTranscriptEntry, ScanData, PostProcessScanData}; +use crate::transcript_entry::{ + ValidationFlags, TranscriptEntry, RawTranscriptEntry, ScanData, PostProcessScanData, +}; /** * @brief records a value in a json blob **/ struct JSONValue { value: BoundedVec, // raw bytes that constitute the json value entry - value_type: Field // either STRING_TOKEN, NUMERIC_TOKEN or LITERAL_TOKEN + value_type: Field, // either STRING_TOKEN, NUMERIC_TOKEN or LITERAL_TOKEN } impl JSONValue { @@ -52,7 +54,7 @@ struct JSON = JSON::parse_json_from_string(text); - let result: BoundedVec = json.get_string_unchecked("name".as_bytes()); + let result: BoundedVec = json.get_string_unchecked("name".as_bytes()); assert(result.storage == BoundedVec::from_array("\"Ade\nel Solangi\"".as_bytes()).storage); assert(result.len == 16); } #[test] fn test_parse_json() { - let text= "{ \"foo\": 1234, \"bar\": { \"foo\": 9876, \"bar\": true }, \"baz\": \"hello\" }"; + let text = "{ \"foo\": 1234, \"bar\": { \"foo\": 9876, \"bar\": true }, \"baz\": \"hello\" }"; let mut json: JSON<68, 7, 30, 30, 2> = JSON::parse_json_from_string(text); let result = json.get_string_unchecked("baz".as_bytes()); @@ -733,7 +767,9 @@ fn test_parse_json() { assert(result.is_some() == false); let mut nested_json = json.get_object("bar".as_bytes()).unwrap(); - let result: Option = nested_json.get_number_var(BoundedVec { storage: "foounusedkeybyteslolol".as_bytes(), len: 3 }); + let result: Option = nested_json.get_number_var( + BoundedVec { storage: "foounusedkeybyteslolol".as_bytes(), len: 3 }, + ); assert(result.is_some() == true); assert(result.unwrap() == 9876); diff --git a/src/json_entry.nr b/src/json_entry.nr index 895fd43..b2f16aa 100644 --- a/src/json_entry.nr +++ b/src/json_entry.nr @@ -6,7 +6,7 @@ struct JSONContextStackEntry { context: Field, current_key_index_and_length: Field, json_index: Field, - current_identity: Field + current_identity: Field, } impl JSONContextStackEntry { unconstrained fn __from_field(f: Field) -> Self { @@ -18,7 +18,13 @@ impl JSONContextStackEntry { let json_index = bytes[7] as Field * 0x100 + bytes[8] as Field; let current_identity = bytes[9] as Field * 0x100 + bytes[10] as Field; let current_key_index_and_length = current_key_index + current_key_length * 0x10000; - JSONContextStackEntry { num_entries, context, current_key_index_and_length, json_index, current_identity } + JSONContextStackEntry { + num_entries, + context, + current_key_index_and_length, + json_index, + current_identity, + } } /** @@ -75,7 +81,7 @@ impl JSONEntry { json_pointer: 0, json_length: 0, parent_index: 0, - id: 0 + id: 0, } } @@ -97,30 +103,34 @@ impl JSONEntry { let mid = (f - id - entry_type * 0x100000000000000000000000000000000000000) / 0x10000; (id, mid, entry_type) } - unconstrained fn __extract_entry_type_id_and_parent_index_from_field(f: Field) -> (Field, Field, Field, Field) { + unconstrained fn __extract_entry_type_id_and_parent_index_from_field( + f: Field, + ) -> (Field, Field, Field, Field) { let entry = JSONEntry::from_field(f); let id = entry.id; let entry_type = entry.entry_type; let parent_index = entry.parent_index; - let mid = (f - id - parent_index * 0x10000 - entry_type * 0x100000000000000000000000000000000000000) + let mid = ( + f - id - parent_index * 0x10000 - entry_type * 0x100000000000000000000000000000000000000 + ) / 0x100000000; (id, parent_index, mid, entry_type) } // 11.75 gates fn extract_entry_type_id_and_parent_index_from_field(f: Field) -> (Field, Field, Field) { - let (id, parent_index, mid, entry_type) = JSONEntry::__extract_entry_type_id_and_parent_index_from_field(f); + let (id, parent_index, mid, entry_type) = + JSONEntry::__extract_entry_type_id_and_parent_index_from_field(f); id.assert_max_bit_size::<8>(); // 1.25 parent_index.assert_max_bit_size::<16>(); // 1.5 entry_type.assert_max_bit_size::<16>(); // 1.5 mid.assert_max_bit_size::<136>(); // 5.5 - assert( id - + parent_index * 0x10000 - + mid * 0x100000000 - + entry_type * 0x100000000000000000000000000000000000000 - == f + + parent_index * 0x10000 + + mid * 0x100000000 + + entry_type * 0x100000000000000000000000000000000000000 + == f, ); (id, parent_index, entry_type) @@ -130,7 +140,6 @@ impl JSONEntry { id.assert_max_bit_size::<8>(); // 1.25 entry_type.assert_max_bit_size::<16>(); // 1.5 mid.assert_max_bit_size::<136>(); // 5.5 - assert(id + mid * 0x10000 + entry_type * 0x100000000000000000000000000000000000000 == f); (id, entry_type) } @@ -146,7 +155,6 @@ impl JSONEntry { } unconstrained fn __from_field(f: Field) -> Self { let bytes: [u8; 20] = f.to_be_bytes(); // 10.5 gates - let entry_type = bytes[0] as Field; let json_length = bytes[2] as Field * 0x100 + bytes[3] as Field; @@ -156,19 +164,27 @@ impl JSONEntry { let array_pointer = bytes[10] as Field * 0x100 + bytes[11] as Field; let parent_index = bytes[16] as Field * 0x100 + bytes[17] as Field; // 6 gates let id = bytes[18] as Field * 0x100 + bytes[19] as Field; // 6 gates - - JSONEntry { array_pointer, child_pointer, num_children, json_pointer, json_length, entry_type, parent_index, id } + JSONEntry { + array_pointer, + child_pointer, + num_children, + json_pointer, + json_length, + entry_type, + parent_index, + id, + } } fn to_field(self) -> Field { - self.id + - self.parent_index * 0x10000 - + self.array_pointer * 0x10000000000000000 // 2 bytes - + self.child_pointer * 0x100000000000000000000 // 2 bytes - + self.num_children * 0x1000000000000000000000000 // 2 bytes - + self.json_pointer * 0x10000000000000000000000000000 // 2 bytes - + self.json_length * 0x100000000000000000000000000000000 // 2 bytes - + self.entry_type * 0x100000000000000000000000000000000000000 // 1 byte + self.id + + self.parent_index * 0x10000 + + self.array_pointer * 0x10000000000000000 // 2 bytes + + self.child_pointer * 0x100000000000000000000 // 2 bytes + + self.num_children * 0x1000000000000000000000000 // 2 bytes + + self.json_pointer * 0x10000000000000000000000000000 // 2 bytes + + self.json_length * 0x100000000000000000000000000000000 // 2 bytes + + self.entry_type * 0x100000000000000000000000000000000000000 // 1 byte // 4 gates. oof } fn from_field(f: Field) -> Self { @@ -187,7 +203,7 @@ impl JSONEntry { } impl std::convert::From for JSONEntry { - fn from(JSONEntryPacked{ value: f }: JSONEntryPacked) -> Self { + fn from(JSONEntryPacked { value: f }: JSONEntryPacked) -> Self { let result = JSONEntry::__from_field(f); result.entry_type.assert_max_bit_size::<8>(); result.json_length.assert_max_bit_size::<16>(); @@ -220,7 +236,7 @@ impl std::cmp::Eq for JSONEntry { * @description We do this to minimize the number of array lookups we perform **/ struct JSONEntryPacked { - value: Field + value: Field, } impl std::cmp::Eq for JSONEntryPacked { diff --git a/src/keyhash.nr b/src/keyhash.nr index 0a44d2b..b4fa6c9 100644 --- a/src/keyhash.nr +++ b/src/keyhash.nr @@ -6,8 +6,7 @@ use crate::_string_tools::slice_field::slice_200_bits_from_field; * when the bytes are represented as packed 31 byte Field elements * @note we wrap `get_keyhash` in a struct so that the KeyFields parameter can be defined ahead of time **/ -struct FieldHasher -{} +struct FieldHasher {} impl FieldHasher { @@ -15,7 +14,7 @@ impl FieldHasher { _: Self, packed_fields: [Field; NumPackedFields], body_index: Field, - key_length: Field + key_length: Field, ) -> Field { let key_fields: [Field; KeyFields] = slice_fields(packed_fields, body_index, key_length); let hashed = dep::std::hash::poseidon2::Poseidon2::hash(key_fields, KeyFields as u32); @@ -29,8 +28,7 @@ impl FieldHasher { * @note we wrap `get_keyhash` in a struct so that the KeyFields parameter can be defined ahead of time * @note produces identical hash outputs when compared w. FieldHasher **/ -struct ByteHasher -{} +struct ByteHasher {} impl ByteHasher { @@ -38,7 +36,7 @@ impl ByteHasher { _: Self, body_text: [u8; N], body_index: u32, - key_length: u32 + key_length: u32, ) -> Field { assert(key_length < KeyFields * 31, "key too large"); diff --git a/src/keymap.nr b/src/keymap.nr index 5a5dd24..d445ccf 100644 --- a/src/keymap.nr +++ b/src/keymap.nr @@ -54,18 +54,19 @@ impl Field { let mut found_index = 0; for i in 0..MaxNumValues { - let entry : JSONEntry = self.json_entries_packed[i].into(); + let entry: JSONEntry = self.json_entries_packed[i].into(); if (entry.parent_index == 0) & (self.json_entries_packed[i].value != 0) { found_index = i as Field; break; diff --git a/src/lib.nr b/src/lib.nr index 8aed082..7c17181 100644 --- a/src/lib.nr +++ b/src/lib.nr @@ -23,8 +23,7 @@ use crate::json_entry::JSONEntry; use crate::_string_tools::slice_packed_field::slice_fields; use crate::get_literal::JSONLiteral; -trait JSONParserTrait -{ +trait JSONParserTrait { fn parse_json_from_string(s: str) -> Self; fn parse_json(s: [u8; StringBytes]) -> Self; fn get_length(self) -> u32; @@ -34,7 +33,12 @@ trait JSONParserTrait fn get_array_unchecked_var(self, key: BoundedVec) -> Self; fn get_array_from_array(self, array_index: Field) -> Option; fn get_array_from_array_unchecked(self, array_index: Field) -> Self; - fn map(self, f: fn(JSONValue) -> U) -> [U; MaxElements] where U: std::default::Default; + fn map( + self, + f: fn(JSONValue) -> U, + ) -> [U; MaxElements] + where + U: std::default::Default; fn get_object(self, key: [u8; KeyBytes]) -> Option; fn get_object_unchecked(self, key: [u8; KeyBytes]) -> Self; fn get_object_var(self, key: BoundedVec) -> Option; @@ -43,8 +47,14 @@ trait JSONParserTrait fn get_object_from_array_unchecked(self, array_index: Field) -> Self; fn get_literal(self, key: [u8; KeyBytes]) -> Option; fn get_literal_unchecked(self, key: [u8; KeyBytes]) -> JSONLiteral; - fn get_literal_var(self, key: BoundedVec) -> Option; - fn get_literal_unchecked_var(self, key: BoundedVec) -> JSONLiteral; + fn get_literal_var( + self, + key: BoundedVec, + ) -> Option; + fn get_literal_unchecked_var( + self, + key: BoundedVec, + ) -> JSONLiteral; fn get_literal_from_array(self, array_index: Field) -> Option; fn get_literal_from_array_unchecked(self, array_index: Field) -> JSONLiteral; fn get_number(self, key: [u8; KeyBytes]) -> Option; @@ -53,28 +63,71 @@ trait JSONParserTrait fn get_number_unchecked_var(self, key: BoundedVec) -> u64; fn get_number_from_array(self, array_index: Field) -> Option; fn get_number_from_array_unchecked(self, array_index: Field) -> u64; - fn get_string(self, key: [u8; KeyBytes]) -> Option>; - fn get_string_unchecked(self, key: [u8; KeyBytes]) -> BoundedVec; - fn get_string_var(self, key: BoundedVec) -> Option>; - fn get_string_unchecked_var(self, key: BoundedVec) -> BoundedVec; - fn get_string_from_array(self, array_index: Field) -> Option>; - fn get_string_from_array_unchecked(self, array_index: Field) -> BoundedVec; - fn get_string_from_path(self, keys: [BoundedVec; PathDepth]) -> Option>; - fn get_value(self, key: [u8; KeyBytes]) -> Option>; - fn get_value_unchecked(self, key: [u8; KeyBytes]) -> JSONValue; - fn get_value_var(self, key: BoundedVec) -> Option>; - fn get_value_unchecked_var(self, key: BoundedVec) -> JSONValue; - fn get_value_from_array(self, array_index: Field) -> Option>; - fn get_value_from_array_unchecked(self, array_index: Field) -> JSONValue; - fn get_value_from_path(self,keys: [BoundedVec; PathDepth]) -> Option>; + fn get_string( + self, + key: [u8; KeyBytes], + ) -> Option>; + fn get_string_unchecked( + self, + key: [u8; KeyBytes], + ) -> BoundedVec; + fn get_string_var( + self, + key: BoundedVec, + ) -> Option>; + fn get_string_unchecked_var( + self, + key: BoundedVec, + ) -> BoundedVec; + fn get_string_from_array( + self, + array_index: Field, + ) -> Option>; + fn get_string_from_array_unchecked( + self, + array_index: Field, + ) -> BoundedVec; + fn get_string_from_path( + self, + keys: [BoundedVec; PathDepth], + ) -> Option>; + fn get_value( + self, + key: [u8; KeyBytes], + ) -> Option>; + fn get_value_unchecked( + self, + key: [u8; KeyBytes], + ) -> JSONValue; + fn get_value_var( + self, + key: BoundedVec, + ) -> Option>; + fn get_value_unchecked_var( + self, + key: BoundedVec, + ) -> JSONValue; + fn get_value_from_array( + self, + array_index: Field, + ) -> Option>; + fn get_value_from_array_unchecked( + self, + array_index: Field, + ) -> JSONValue; + fn get_value_from_path( + self, + keys: [BoundedVec; PathDepth], + ) -> Option>; fn key_exists(self, key: BoundedVec) -> bool; - fn get_keys_at_root(self) -> BoundedVec, MaxNumKeys>; + fn get_keys_at_root( + self, + ) -> BoundedVec, MaxNumKeys>; } mod JSON512b { - struct JSON - { - inner: crate::json::JSON<512, 20, 64, 33, 2> + struct JSON { + inner: crate::json::JSON<512, 20, 64, 33, 2>, } impl JSON { @@ -115,8 +168,11 @@ mod JSON512b { } fn map( self, - f: fn(crate::JSONValue) -> U - ) -> [U; MaxElements] where U: std::default::Default { + f: fn(crate::JSONValue) -> U, + ) -> [U; MaxElements] + where + U: std::default::Default, + { self.inner.map(f) } fn get_object(self, key: [u8; KeyBytes]) -> Option { @@ -132,7 +188,10 @@ mod JSON512b { JSON::convert(self.inner.get_object_var(key)) } } - fn get_object_unchecked_var(self, key: BoundedVec) -> Self { + fn get_object_unchecked_var( + self, + key: BoundedVec, + ) -> Self { JSON { inner: self.inner.get_object_unchecked_var(key) } } fn get_object_from_array(self, array_index: Field) -> Option { @@ -144,13 +203,22 @@ mod JSON512b { fn get_literal(self, key: [u8; KeyBytes]) -> Option { self.inner.get_literal(key) } - fn get_literal_unchecked(self, key: [u8; KeyBytes]) -> crate::JSONLiteral { + fn get_literal_unchecked( + self, + key: [u8; KeyBytes], + ) -> crate::JSONLiteral { self.inner.get_literal_unchecked(key) } - fn get_literal_var(self, key: BoundedVec) -> Option { + fn get_literal_var( + self, + key: BoundedVec, + ) -> Option { self.inner.get_literal_var(key) } - fn get_literal_unchecked_var(self, key: BoundedVec) -> crate::JSONLiteral { + fn get_literal_unchecked_var( + self, + key: BoundedVec, + ) -> crate::JSONLiteral { self.inner.get_literal_unchecked_var(key) } fn get_literal_from_array(self, array_index: Field) -> Option { @@ -178,51 +246,87 @@ mod JSON512b { self.inner.get_number_from_array_unchecked(array_index) } - fn get_string(self, key: [u8; KeyBytes]) -> Option> { + fn get_string( + self, + key: [u8; KeyBytes], + ) -> Option> { self.inner.get_string(key) } - fn get_string_unchecked(self, key: [u8; KeyBytes]) -> BoundedVec { + fn get_string_unchecked( + self, + key: [u8; KeyBytes], + ) -> BoundedVec { self.inner.get_string_unchecked(key) } - fn get_string_var(self, key: BoundedVec) -> Option> { + fn get_string_var( + self, + key: BoundedVec, + ) -> Option> { self.inner.get_string_var(key) } - fn get_string_unchecked_var(self, key: BoundedVec) -> BoundedVec { + fn get_string_unchecked_var( + self, + key: BoundedVec, + ) -> BoundedVec { self.inner.get_string_unchecked_var(key) } - fn get_string_from_array(self, array_index: Field) -> Option> { + fn get_string_from_array( + self, + array_index: Field, + ) -> Option> { self.inner.get_string_from_array(array_index) } - fn get_string_from_array_unchecked(self, array_index: Field) -> BoundedVec { + fn get_string_from_array_unchecked( + self, + array_index: Field, + ) -> BoundedVec { self.inner.get_string_from_array_unchecked(array_index) } fn get_string_from_path( self, - keys: [BoundedVec; PathDepth] + keys: [BoundedVec; PathDepth], ) -> Option> { self.inner.get_string_from_path(keys) } - fn get_value(self, key: [u8; KeyBytes]) -> Option> { + fn get_value( + self, + key: [u8; KeyBytes], + ) -> Option> { self.inner.get_value(key) } - fn get_value_unchecked(self, key: [u8; KeyBytes]) -> crate::JSONValue { + fn get_value_unchecked( + self, + key: [u8; KeyBytes], + ) -> crate::JSONValue { self.inner.get_value_unchecked(key) } - fn get_value_var(self, key: BoundedVec) -> Option> { + fn get_value_var( + self, + key: BoundedVec, + ) -> Option> { self.inner.get_value_var(key) } - fn get_value_unchecked_var(self, key: BoundedVec) -> crate::JSONValue { + fn get_value_unchecked_var( + self, + key: BoundedVec, + ) -> crate::JSONValue { self.inner.get_value_unchecked_var(key) } - fn get_value_from_array(self, array_index: Field) -> Option> { + fn get_value_from_array( + self, + array_index: Field, + ) -> Option> { self.inner.get_value_from_array(array_index) } - fn get_value_from_array_unchecked(self, array_index: Field) -> crate::JSONValue { + fn get_value_from_array_unchecked( + self, + array_index: Field, + ) -> crate::JSONValue { self.inner.get_value_from_array_unchecked(array_index) } fn get_value_from_path( self, - keys: [BoundedVec; PathDepth] + keys: [BoundedVec; PathDepth], ) -> Option> { self.inner.get_value_from_path(keys) } @@ -230,16 +334,17 @@ mod JSON512b { fn key_exists(self, key: BoundedVec) -> bool { self.inner.key_exists(key) } - fn get_keys_at_root(self) -> BoundedVec, MaxNumKeys> { + fn get_keys_at_root( + self, + ) -> BoundedVec, MaxNumKeys> { self.inner.get_keys_at_root() } } } mod JSON1kb { - struct JSON - { - inner: crate::json::JSON<1024, 37, 128, 65, 2> + struct JSON { + inner: crate::json::JSON<1024, 37, 128, 65, 2>, } impl JSON { fn convert(inner: Option>) -> Option { @@ -279,8 +384,11 @@ mod JSON1kb { } fn map( self, - f: fn(crate::JSONValue) -> U - ) -> [U; MaxElements] where U: std::default::Default { + f: fn(crate::JSONValue) -> U, + ) -> [U; MaxElements] + where + U: std::default::Default, + { self.inner.map(f) } fn get_object(self, key: [u8; KeyBytes]) -> Option { @@ -296,7 +404,10 @@ mod JSON1kb { JSON::convert(self.inner.get_object_var(key)) } } - fn get_object_unchecked_var(self, key: BoundedVec) -> Self { + fn get_object_unchecked_var( + self, + key: BoundedVec, + ) -> Self { JSON { inner: self.inner.get_object_unchecked_var(key) } } fn get_object_from_array(self, array_index: Field) -> Option { @@ -308,13 +419,22 @@ mod JSON1kb { fn get_literal(self, key: [u8; KeyBytes]) -> Option { self.inner.get_literal(key) } - fn get_literal_unchecked(self, key: [u8; KeyBytes]) -> crate::JSONLiteral { + fn get_literal_unchecked( + self, + key: [u8; KeyBytes], + ) -> crate::JSONLiteral { self.inner.get_literal_unchecked(key) } - fn get_literal_var(self, key: BoundedVec) -> Option { + fn get_literal_var( + self, + key: BoundedVec, + ) -> Option { self.inner.get_literal_var(key) } - fn get_literal_unchecked_var(self, key: BoundedVec) -> crate::JSONLiteral { + fn get_literal_unchecked_var( + self, + key: BoundedVec, + ) -> crate::JSONLiteral { self.inner.get_literal_unchecked_var(key) } fn get_literal_from_array(self, array_index: Field) -> Option { @@ -341,67 +461,104 @@ mod JSON1kb { fn get_number_from_array_unchecked(self, array_index: Field) -> u64 { self.inner.get_number_from_array_unchecked(array_index) } - fn get_string(self, key: [u8; KeyBytes]) -> Option> { + fn get_string( + self, + key: [u8; KeyBytes], + ) -> Option> { self.inner.get_string(key) } - fn get_string_unchecked(self, key: [u8; KeyBytes]) -> BoundedVec { + fn get_string_unchecked( + self, + key: [u8; KeyBytes], + ) -> BoundedVec { self.inner.get_string_unchecked(key) } - fn get_string_var(self, key: BoundedVec) -> Option> { + fn get_string_var( + self, + key: BoundedVec, + ) -> Option> { self.inner.get_string_var(key) } - fn get_string_unchecked_var(self, key: BoundedVec) -> BoundedVec { + fn get_string_unchecked_var( + self, + key: BoundedVec, + ) -> BoundedVec { self.inner.get_string_unchecked_var(key) } - fn get_string_from_array(self, array_index: Field) -> Option> { + fn get_string_from_array( + self, + array_index: Field, + ) -> Option> { self.inner.get_string_from_array(array_index) } - fn get_string_from_array_unchecked(self, array_index: Field) -> BoundedVec { + fn get_string_from_array_unchecked( + self, + array_index: Field, + ) -> BoundedVec { self.inner.get_string_from_array_unchecked(array_index) } fn get_string_from_path( self, - keys: [BoundedVec; PathDepth] + keys: [BoundedVec; PathDepth], ) -> Option> { self.inner.get_string_from_path(keys) } - fn get_value(self, key: [u8; KeyBytes]) -> Option> { + fn get_value( + self, + key: [u8; KeyBytes], + ) -> Option> { self.inner.get_value(key) } - fn get_value_unchecked(self, key: [u8; KeyBytes]) -> crate::JSONValue { + fn get_value_unchecked( + self, + key: [u8; KeyBytes], + ) -> crate::JSONValue { self.inner.get_value_unchecked(key) } - fn get_value_var(self, key: BoundedVec) -> Option> { + fn get_value_var( + self, + key: BoundedVec, + ) -> Option> { self.inner.get_value_var(key) } - fn get_value_unchecked_var(self, key: BoundedVec) -> crate::JSONValue { + fn get_value_unchecked_var( + self, + key: BoundedVec, + ) -> crate::JSONValue { self.inner.get_value_unchecked_var(key) } - fn get_value_from_array(self, array_index: Field) -> Option> { + fn get_value_from_array( + self, + array_index: Field, + ) -> Option> { self.inner.get_value_from_array(array_index) } - fn get_value_from_array_unchecked(self, array_index: Field) -> crate::JSONValue { + fn get_value_from_array_unchecked( + self, + array_index: Field, + ) -> crate::JSONValue { self.inner.get_value_from_array_unchecked(array_index) } fn get_value_from_path( self, - keys: [BoundedVec; PathDepth] + keys: [BoundedVec; PathDepth], ) -> Option> { self.inner.get_value_from_path(keys) } fn key_exists(self, key: BoundedVec) -> bool { self.inner.key_exists(key) } - fn get_keys_at_root(self) -> BoundedVec, MaxNumKeys> { + fn get_keys_at_root( + self, + ) -> BoundedVec, MaxNumKeys> { self.inner.get_keys_at_root() } } } mod JSON2kb { - struct JSON - { - inner: crate::json::JSON<2048, 70, 256, 129, 2> + struct JSON { + inner: crate::json::JSON<2048, 70, 256, 129, 2>, } impl JSON { fn convert(inner: Option>) -> Option { @@ -441,8 +598,11 @@ mod JSON2kb { } fn map( self, - f: fn(crate::JSONValue) -> U - ) -> [U; MaxElements] where U: std::default::Default { + f: fn(crate::JSONValue) -> U, + ) -> [U; MaxElements] + where + U: std::default::Default, + { self.inner.map(f) } fn get_object(self, key: [u8; KeyBytes]) -> Option { @@ -458,7 +618,10 @@ mod JSON2kb { JSON::convert(self.inner.get_object_var(key)) } } - fn get_object_unchecked_var(self, key: BoundedVec) -> Self { + fn get_object_unchecked_var( + self, + key: BoundedVec, + ) -> Self { JSON { inner: self.inner.get_object_unchecked_var(key) } } fn get_object_from_array(self, array_index: Field) -> Option { @@ -470,13 +633,22 @@ mod JSON2kb { fn get_literal(self, key: [u8; KeyBytes]) -> Option { self.inner.get_literal(key) } - fn get_literal_unchecked(self, key: [u8; KeyBytes]) -> crate::JSONLiteral { + fn get_literal_unchecked( + self, + key: [u8; KeyBytes], + ) -> crate::JSONLiteral { self.inner.get_literal_unchecked(key) } - fn get_literal_var(self, key: BoundedVec) -> Option { + fn get_literal_var( + self, + key: BoundedVec, + ) -> Option { self.inner.get_literal_var(key) } - fn get_literal_unchecked_var(self, key: BoundedVec) -> crate::JSONLiteral { + fn get_literal_unchecked_var( + self, + key: BoundedVec, + ) -> crate::JSONLiteral { self.inner.get_literal_unchecked_var(key) } fn get_literal_from_array(self, array_index: Field) -> Option { @@ -503,67 +675,104 @@ mod JSON2kb { fn get_number_from_array_unchecked(self, array_index: Field) -> u64 { self.inner.get_number_from_array_unchecked(array_index) } - fn get_string(self, key: [u8; KeyBytes]) -> Option> { + fn get_string( + self, + key: [u8; KeyBytes], + ) -> Option> { self.inner.get_string(key) } - fn get_string_unchecked(self, key: [u8; KeyBytes]) -> BoundedVec { + fn get_string_unchecked( + self, + key: [u8; KeyBytes], + ) -> BoundedVec { self.inner.get_string_unchecked(key) } - fn get_string_var(self, key: BoundedVec) -> Option> { + fn get_string_var( + self, + key: BoundedVec, + ) -> Option> { self.inner.get_string_var(key) } - fn get_string_unchecked_var(self, key: BoundedVec) -> BoundedVec { + fn get_string_unchecked_var( + self, + key: BoundedVec, + ) -> BoundedVec { self.inner.get_string_unchecked_var(key) } - fn get_string_from_array(self, array_index: Field) -> Option> { + fn get_string_from_array( + self, + array_index: Field, + ) -> Option> { self.inner.get_string_from_array(array_index) } - fn get_string_from_array_unchecked(self, array_index: Field) -> BoundedVec { + fn get_string_from_array_unchecked( + self, + array_index: Field, + ) -> BoundedVec { self.inner.get_string_from_array_unchecked(array_index) } fn get_string_from_path( self, - keys: [BoundedVec; PathDepth] + keys: [BoundedVec; PathDepth], ) -> Option> { self.inner.get_string_from_path(keys) } - fn get_value(self, key: [u8; KeyBytes]) -> Option> { + fn get_value( + self, + key: [u8; KeyBytes], + ) -> Option> { self.inner.get_value(key) } - fn get_value_unchecked(self, key: [u8; KeyBytes]) -> crate::JSONValue { + fn get_value_unchecked( + self, + key: [u8; KeyBytes], + ) -> crate::JSONValue { self.inner.get_value_unchecked(key) } - fn get_value_var(self, key: BoundedVec) -> Option> { + fn get_value_var( + self, + key: BoundedVec, + ) -> Option> { self.inner.get_value_var(key) } - fn get_value_unchecked_var(self, key: BoundedVec) -> crate::JSONValue { + fn get_value_unchecked_var( + self, + key: BoundedVec, + ) -> crate::JSONValue { self.inner.get_value_unchecked_var(key) } - fn get_value_from_array(self, array_index: Field) -> Option> { + fn get_value_from_array( + self, + array_index: Field, + ) -> Option> { self.inner.get_value_from_array(array_index) } - fn get_value_from_array_unchecked(self, array_index: Field) -> crate::JSONValue { + fn get_value_from_array_unchecked( + self, + array_index: Field, + ) -> crate::JSONValue { self.inner.get_value_from_array_unchecked(array_index) } fn get_value_from_path( self, - keys: [BoundedVec; PathDepth] + keys: [BoundedVec; PathDepth], ) -> Option> { self.inner.get_value_from_path(keys) } fn key_exists(self, key: BoundedVec) -> bool { self.inner.key_exists(key) } - fn get_keys_at_root(self) -> BoundedVec, MaxNumKeys> { + fn get_keys_at_root( + self, + ) -> BoundedVec, MaxNumKeys> { self.inner.get_keys_at_root() } } } mod JSON4kb { - struct JSON - { - inner: crate::json::JSON<4096, 136, 512, 257, 2> + struct JSON { + inner: crate::json::JSON<4096, 136, 512, 257, 2>, } impl JSON { fn convert(inner: Option>) -> Option { @@ -603,8 +812,11 @@ mod JSON4kb { } fn map( self, - f: fn(crate::JSONValue) -> U - ) -> [U; MaxElements] where U: std::default::Default { + f: fn(crate::JSONValue) -> U, + ) -> [U; MaxElements] + where + U: std::default::Default, + { self.inner.map(f) } fn get_object(self, key: [u8; KeyBytes]) -> Option { @@ -620,7 +832,10 @@ mod JSON4kb { JSON::convert(self.inner.get_object_var(key)) } } - fn get_object_unchecked_var(self, key: BoundedVec) -> Self { + fn get_object_unchecked_var( + self, + key: BoundedVec, + ) -> Self { JSON { inner: self.inner.get_object_unchecked_var(key) } } fn get_object_from_array(self, array_index: Field) -> Option { @@ -632,13 +847,22 @@ mod JSON4kb { fn get_literal(self, key: [u8; KeyBytes]) -> Option { self.inner.get_literal(key) } - fn get_literal_unchecked(self, key: [u8; KeyBytes]) -> crate::JSONLiteral { + fn get_literal_unchecked( + self, + key: [u8; KeyBytes], + ) -> crate::JSONLiteral { self.inner.get_literal_unchecked(key) } - fn get_literal_var(self, key: BoundedVec) -> Option { + fn get_literal_var( + self, + key: BoundedVec, + ) -> Option { self.inner.get_literal_var(key) } - fn get_literal_unchecked_var(self, key: BoundedVec) -> crate::JSONLiteral { + fn get_literal_unchecked_var( + self, + key: BoundedVec, + ) -> crate::JSONLiteral { self.inner.get_literal_unchecked_var(key) } fn get_literal_from_array(self, array_index: Field) -> Option { @@ -665,67 +889,104 @@ mod JSON4kb { fn get_number_from_array_unchecked(self, array_index: Field) -> u64 { self.inner.get_number_from_array_unchecked(array_index) } - fn get_string(self, key: [u8; KeyBytes]) -> Option> { + fn get_string( + self, + key: [u8; KeyBytes], + ) -> Option> { self.inner.get_string(key) } - fn get_string_unchecked(self, key: [u8; KeyBytes]) -> BoundedVec { + fn get_string_unchecked( + self, + key: [u8; KeyBytes], + ) -> BoundedVec { self.inner.get_string_unchecked(key) } - fn get_string_var(self, key: BoundedVec) -> Option> { + fn get_string_var( + self, + key: BoundedVec, + ) -> Option> { self.inner.get_string_var(key) } - fn get_string_unchecked_var(self, key: BoundedVec) -> BoundedVec { + fn get_string_unchecked_var( + self, + key: BoundedVec, + ) -> BoundedVec { self.inner.get_string_unchecked_var(key) } - fn get_string_from_array(self, array_index: Field) -> Option> { + fn get_string_from_array( + self, + array_index: Field, + ) -> Option> { self.inner.get_string_from_array(array_index) } - fn get_string_from_array_unchecked(self, array_index: Field) -> BoundedVec { + fn get_string_from_array_unchecked( + self, + array_index: Field, + ) -> BoundedVec { self.inner.get_string_from_array_unchecked(array_index) } fn get_string_from_path( self, - keys: [BoundedVec; PathDepth] + keys: [BoundedVec; PathDepth], ) -> Option> { self.inner.get_string_from_path(keys) } - fn get_value(self, key: [u8; KeyBytes]) -> Option> { + fn get_value( + self, + key: [u8; KeyBytes], + ) -> Option> { self.inner.get_value(key) } - fn get_value_unchecked(self, key: [u8; KeyBytes]) -> crate::JSONValue { + fn get_value_unchecked( + self, + key: [u8; KeyBytes], + ) -> crate::JSONValue { self.inner.get_value_unchecked(key) } - fn get_value_var(self, key: BoundedVec) -> Option> { + fn get_value_var( + self, + key: BoundedVec, + ) -> Option> { self.inner.get_value_var(key) } - fn get_value_unchecked_var(self, key: BoundedVec) -> crate::JSONValue { + fn get_value_unchecked_var( + self, + key: BoundedVec, + ) -> crate::JSONValue { self.inner.get_value_unchecked_var(key) } - fn get_value_from_array(self, array_index: Field) -> Option> { + fn get_value_from_array( + self, + array_index: Field, + ) -> Option> { self.inner.get_value_from_array(array_index) } - fn get_value_from_array_unchecked(self, array_index: Field) -> crate::JSONValue { + fn get_value_from_array_unchecked( + self, + array_index: Field, + ) -> crate::JSONValue { self.inner.get_value_from_array_unchecked(array_index) } fn get_value_from_path( self, - keys: [BoundedVec; PathDepth] + keys: [BoundedVec; PathDepth], ) -> Option> { self.inner.get_value_from_path(keys) } fn key_exists(self, key: BoundedVec) -> bool { self.inner.key_exists(key) } - fn get_keys_at_root(self) -> BoundedVec, MaxNumKeys> { + fn get_keys_at_root( + self, + ) -> BoundedVec, MaxNumKeys> { self.inner.get_keys_at_root() } } } mod JSON8kb { - struct JSON - { - inner: crate::json::JSON<8192, 268, 1024, 513, 2> + struct JSON { + inner: crate::json::JSON<8192, 268, 1024, 513, 2>, } impl JSON { fn convert(inner: Option>) -> Option { @@ -765,8 +1026,11 @@ mod JSON8kb { } fn map( self, - f: fn(crate::JSONValue) -> U - ) -> [U; MaxElements] where U: std::default::Default { + f: fn(crate::JSONValue) -> U, + ) -> [U; MaxElements] + where + U: std::default::Default, + { self.inner.map(f) } fn get_object(self, key: [u8; KeyBytes]) -> Option { @@ -782,7 +1046,10 @@ mod JSON8kb { JSON::convert(self.inner.get_object_var(key)) } } - fn get_object_unchecked_var(self, key: BoundedVec) -> Self { + fn get_object_unchecked_var( + self, + key: BoundedVec, + ) -> Self { JSON { inner: self.inner.get_object_unchecked_var(key) } } fn get_object_from_array(self, array_index: Field) -> Option { @@ -794,13 +1061,22 @@ mod JSON8kb { fn get_literal(self, key: [u8; KeyBytes]) -> Option { self.inner.get_literal(key) } - fn get_literal_unchecked(self, key: [u8; KeyBytes]) -> crate::JSONLiteral { + fn get_literal_unchecked( + self, + key: [u8; KeyBytes], + ) -> crate::JSONLiteral { self.inner.get_literal_unchecked(key) } - fn get_literal_var(self, key: BoundedVec) -> Option { + fn get_literal_var( + self, + key: BoundedVec, + ) -> Option { self.inner.get_literal_var(key) } - fn get_literal_unchecked_var(self, key: BoundedVec) -> crate::JSONLiteral { + fn get_literal_unchecked_var( + self, + key: BoundedVec, + ) -> crate::JSONLiteral { self.inner.get_literal_unchecked_var(key) } fn get_literal_from_array(self, array_index: Field) -> Option { @@ -827,67 +1103,104 @@ mod JSON8kb { fn get_number_from_array_unchecked(self, array_index: Field) -> u64 { self.inner.get_number_from_array_unchecked(array_index) } - fn get_string(self, key: [u8; KeyBytes]) -> Option> { + fn get_string( + self, + key: [u8; KeyBytes], + ) -> Option> { self.inner.get_string(key) } - fn get_string_unchecked(self, key: [u8; KeyBytes]) -> BoundedVec { + fn get_string_unchecked( + self, + key: [u8; KeyBytes], + ) -> BoundedVec { self.inner.get_string_unchecked(key) } - fn get_string_var(self, key: BoundedVec) -> Option> { + fn get_string_var( + self, + key: BoundedVec, + ) -> Option> { self.inner.get_string_var(key) } - fn get_string_unchecked_var(self, key: BoundedVec) -> BoundedVec { + fn get_string_unchecked_var( + self, + key: BoundedVec, + ) -> BoundedVec { self.inner.get_string_unchecked_var(key) } - fn get_string_from_array(self, array_index: Field) -> Option> { + fn get_string_from_array( + self, + array_index: Field, + ) -> Option> { self.inner.get_string_from_array(array_index) } - fn get_string_from_array_unchecked(self, array_index: Field) -> BoundedVec { + fn get_string_from_array_unchecked( + self, + array_index: Field, + ) -> BoundedVec { self.inner.get_string_from_array_unchecked(array_index) } fn get_string_from_path( self, - keys: [BoundedVec; PathDepth] + keys: [BoundedVec; PathDepth], ) -> Option> { self.inner.get_string_from_path(keys) } - fn get_value(self, key: [u8; KeyBytes]) -> Option> { + fn get_value( + self, + key: [u8; KeyBytes], + ) -> Option> { self.inner.get_value(key) } - fn get_value_unchecked(self, key: [u8; KeyBytes]) -> crate::JSONValue { + fn get_value_unchecked( + self, + key: [u8; KeyBytes], + ) -> crate::JSONValue { self.inner.get_value_unchecked(key) } - fn get_value_var(self, key: BoundedVec) -> Option> { + fn get_value_var( + self, + key: BoundedVec, + ) -> Option> { self.inner.get_value_var(key) } - fn get_value_unchecked_var(self, key: BoundedVec) -> crate::JSONValue { + fn get_value_unchecked_var( + self, + key: BoundedVec, + ) -> crate::JSONValue { self.inner.get_value_unchecked_var(key) } - fn get_value_from_array(self, array_index: Field) -> Option> { + fn get_value_from_array( + self, + array_index: Field, + ) -> Option> { self.inner.get_value_from_array(array_index) } - fn get_value_from_array_unchecked(self, array_index: Field) -> crate::JSONValue { + fn get_value_from_array_unchecked( + self, + array_index: Field, + ) -> crate::JSONValue { self.inner.get_value_from_array_unchecked(array_index) } fn get_value_from_path( self, - keys: [BoundedVec; PathDepth] + keys: [BoundedVec; PathDepth], ) -> Option> { self.inner.get_value_from_path(keys) } fn key_exists(self, key: BoundedVec) -> bool { self.inner.key_exists(key) } - fn get_keys_at_root(self) -> BoundedVec, MaxNumKeys> { + fn get_keys_at_root( + self, + ) -> BoundedVec, MaxNumKeys> { self.inner.get_keys_at_root() } } } mod JSON16kb { - struct JSON - { - inner: crate::json::JSON<16384, 532, 2048, 1025, 2> + struct JSON { + inner: crate::json::JSON<16384, 532, 2048, 1025, 2>, } impl JSON { fn convert(inner: Option>) -> Option { @@ -927,8 +1240,11 @@ mod JSON16kb { } fn map( self, - f: fn(crate::JSONValue) -> U - ) -> [U; MaxElements] where U: std::default::Default { + f: fn(crate::JSONValue) -> U, + ) -> [U; MaxElements] + where + U: std::default::Default, + { self.inner.map(f) } fn get_object(self, key: [u8; KeyBytes]) -> Option { @@ -944,7 +1260,10 @@ mod JSON16kb { JSON::convert(self.inner.get_object_var(key)) } } - fn get_object_unchecked_var(self, key: BoundedVec) -> Self { + fn get_object_unchecked_var( + self, + key: BoundedVec, + ) -> Self { JSON { inner: self.inner.get_object_unchecked_var(key) } } fn get_object_from_array(self, array_index: Field) -> Option { @@ -956,13 +1275,22 @@ mod JSON16kb { fn get_literal(self, key: [u8; KeyBytes]) -> Option { self.inner.get_literal(key) } - fn get_literal_unchecked(self, key: [u8; KeyBytes]) -> crate::JSONLiteral { + fn get_literal_unchecked( + self, + key: [u8; KeyBytes], + ) -> crate::JSONLiteral { self.inner.get_literal_unchecked(key) } - fn get_literal_var(self, key: BoundedVec) -> Option { + fn get_literal_var( + self, + key: BoundedVec, + ) -> Option { self.inner.get_literal_var(key) } - fn get_literal_unchecked_var(self, key: BoundedVec) -> crate::JSONLiteral { + fn get_literal_unchecked_var( + self, + key: BoundedVec, + ) -> crate::JSONLiteral { self.inner.get_literal_unchecked_var(key) } fn get_literal_from_array(self, array_index: Field) -> Option { @@ -989,58 +1317,96 @@ mod JSON16kb { fn get_number_from_array_unchecked(self, array_index: Field) -> u64 { self.inner.get_number_from_array_unchecked(array_index) } - fn get_string(self, key: [u8; KeyBytes]) -> Option> { + fn get_string( + self, + key: [u8; KeyBytes], + ) -> Option> { self.inner.get_string(key) } - fn get_string_unchecked(self, key: [u8; KeyBytes]) -> BoundedVec { + fn get_string_unchecked( + self, + key: [u8; KeyBytes], + ) -> BoundedVec { self.inner.get_string_unchecked(key) } - fn get_string_var(self, key: BoundedVec) -> Option> { + fn get_string_var( + self, + key: BoundedVec, + ) -> Option> { self.inner.get_string_var(key) } - fn get_string_unchecked_var(self, key: BoundedVec) -> BoundedVec { + fn get_string_unchecked_var( + self, + key: BoundedVec, + ) -> BoundedVec { self.inner.get_string_unchecked_var(key) } - fn get_string_from_array(self, array_index: Field) -> Option> { + fn get_string_from_array( + self, + array_index: Field, + ) -> Option> { self.inner.get_string_from_array(array_index) } - fn get_string_from_array_unchecked(self, array_index: Field) -> BoundedVec { + fn get_string_from_array_unchecked( + self, + array_index: Field, + ) -> BoundedVec { self.inner.get_string_from_array_unchecked(array_index) } fn get_string_from_path( self, - keys: [BoundedVec; PathDepth] + keys: [BoundedVec; PathDepth], ) -> Option> { self.inner.get_string_from_path(keys) } - fn get_value(self, key: [u8; KeyBytes]) -> Option> { + fn get_value( + self, + key: [u8; KeyBytes], + ) -> Option> { self.inner.get_value(key) } - fn get_value_unchecked(self, key: [u8; KeyBytes]) -> crate::JSONValue { + fn get_value_unchecked( + self, + key: [u8; KeyBytes], + ) -> crate::JSONValue { self.inner.get_value_unchecked(key) } - fn get_value_var(self, key: BoundedVec) -> Option> { + fn get_value_var( + self, + key: BoundedVec, + ) -> Option> { self.inner.get_value_var(key) } - fn get_value_unchecked_var(self, key: BoundedVec) -> crate::JSONValue { + fn get_value_unchecked_var( + self, + key: BoundedVec, + ) -> crate::JSONValue { self.inner.get_value_unchecked_var(key) } - fn get_value_from_array(self, array_index: Field) -> Option> { + fn get_value_from_array( + self, + array_index: Field, + ) -> Option> { self.inner.get_value_from_array(array_index) } - fn get_value_from_array_unchecked(self, array_index: Field) -> crate::JSONValue { + fn get_value_from_array_unchecked( + self, + array_index: Field, + ) -> crate::JSONValue { self.inner.get_value_from_array_unchecked(array_index) } fn get_value_from_path( self, - keys: [BoundedVec; PathDepth] + keys: [BoundedVec; PathDepth], ) -> Option> { self.inner.get_value_from_path(keys) } fn key_exists(self, key: BoundedVec) -> bool { self.inner.key_exists(key) } - fn get_keys_at_root(self) -> BoundedVec, MaxNumKeys> { + fn get_keys_at_root( + self, + ) -> BoundedVec, MaxNumKeys> { self.inner.get_keys_at_root() } } diff --git a/src/token_flags.nr b/src/token_flags.nr index 1fb1c3a..bee575b 100644 --- a/src/token_flags.nr +++ b/src/token_flags.nr @@ -27,7 +27,7 @@ impl TokenFlags { new_context, is_key_token, is_value_token, - preserve_num_entries + preserve_num_entries, } } @@ -36,10 +36,13 @@ impl TokenFlags { let r = TokenFlags::__from_field(f); assert(r.create_json_entry * r.create_json_entry == r.create_json_entry); - assert(r.is_end_of_object_or_array * r.is_end_of_object_or_array == r.is_end_of_object_or_array); + assert( + r.is_end_of_object_or_array * r.is_end_of_object_or_array + == r.is_end_of_object_or_array, + ); assert( r.is_start_of_object_or_array * r.is_start_of_object_or_array - == r.is_start_of_object_or_array + == r.is_start_of_object_or_array, ); assert(r.new_context * r.new_context == r.new_context); assert(r.is_key_token * r.is_key_token == r.is_key_token); @@ -69,7 +72,7 @@ impl TokenFlags { new_context: 0, is_key_token: 0, preserve_num_entries: 0, - is_value_token: 0 + is_value_token: 0, } } } diff --git a/src/transcript_entry.nr b/src/transcript_entry.nr index 782cf41..076cd3f 100644 --- a/src/transcript_entry.nr +++ b/src/transcript_entry.nr @@ -1,10 +1,9 @@ use crate::json_tables::ASCII_TO_TOKEN_TABLE; -struct ValidationFlags -{ +struct ValidationFlags { push_layer: Field, push_layer_type_of_root: Field, - pop_layer: Field + pop_layer: Field, } impl ValidationFlags { @@ -14,7 +13,7 @@ impl ValidationFlags { unconstrained fn __from_field(f: Field) -> Self { let bytes: [u8; 4] = f.to_be_bytes(); - let mut push_layer= bytes[3] as Field; + let mut push_layer = bytes[3] as Field; let push_layer_type_of_root = bytes[2] as Field; let pop_layer = bytes[1] as Field; let error = bytes[0] as Field; @@ -95,7 +94,7 @@ impl RawTranscriptEntry { struct TranscriptEntry { token: Field, index: Field, - length: Field + length: Field, } struct ScanData { @@ -107,7 +106,7 @@ struct ScanData { impl ScanData { unconstrained fn __from_field(f: Field) -> Self { - let bytes : [u8; 6]= f.to_le_bytes(); + let bytes: [u8; 6] = f.to_le_bytes(); let mut scan_token = bytes[0] as Field; let push_transcript = bytes[1] as Field; @@ -126,14 +125,14 @@ impl ScanData { assert(result.push_transcript * result.push_transcript == result.push_transcript); assert( result.is_potential_escape_sequence * result.is_potential_escape_sequence - == result.is_potential_escape_sequence + == result.is_potential_escape_sequence, ); assert( result.scan_token - + result.push_transcript * 0x100 - + result.increase_length * 0x10000 - + result.is_potential_escape_sequence * 0x1000000 - == f + + result.push_transcript * 0x100 + + result.increase_length * 0x10000 + + result.is_potential_escape_sequence * 0x1000000 + == f, ); result } From aefae3b882504cd79d15b4e0e6c02259c5feeaa9 Mon Sep 17 00:00:00 2001 From: Khashayar Barooti Date: Thu, 24 Oct 2024 14:38:56 +0100 Subject: [PATCH 3/7] fixed the test file --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d8ab990..971fc98 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - toolchain: [nightly, 0.34.0] + toolchain: [nightly, 0.36.0] steps: - name: Checkout sources uses: actions/checkout@v4 @@ -38,7 +38,7 @@ jobs: - name: Install Nargo uses: noir-lang/noirup@v0.1.3 with: - toolchain: 0.34.0 + toolchain: 0.36.0 - name: Run formatter run: nargo fmt --check From 1f6276bf472a7724e4aa66197ddf3c07b38d0e7d Mon Sep 17 00:00:00 2001 From: Khashayar Barooti Date: Thu, 31 Oct 2024 10:24:16 +0000 Subject: [PATCH 4/7] formatter --- src/_string_tools/slice_packed_field.nr | 595 +- src/_table_generation/make_tables.nr | 372 +- .../make_tables_subtables.nr | 5302 +++++++++-------- src/get_array.nr | 6 +- src/get_literal.nr | 6 +- src/get_number.nr | 8 +- src/get_object.nr | 62 +- src/get_string.nr | 12 +- src/getters.nr | 16 +- src/json.nr | 14 +- src/json_tables.nr | 3189 ++++++++-- src/keyhash.nr | 2 +- src/keymap.nr | 8 +- src/lib.nr | 6 +- 14 files changed, 6028 insertions(+), 3570 deletions(-) diff --git a/src/_string_tools/slice_packed_field.nr b/src/_string_tools/slice_packed_field.nr index dd4d651..5d4a1a2 100644 --- a/src/_string_tools/slice_packed_field.nr +++ b/src/_string_tools/slice_packed_field.nr @@ -42,7 +42,7 @@ global path_multipliers_chunk4: [Field; 32] = [ /* 28 (11100) */ 1, /* 29 (11101) */ 1, /* 30 (11110) */ 1, - /* 31 (11111) */ 1 + /* 31 (11111) */ 1, ]; // this represents an 8 byte chunk. what do we multiply by? @@ -78,7 +78,7 @@ global path_multipliers_chunk3: [Field; 32] = [ /* 28 (11100) */ two_pow_128, /* 29 (11101) */ two_pow_128, /* 30 (11110) */ two_pow_128, - /* 31 (11111) */ two_pow_128 + /* 31 (11111) */ two_pow_128, ]; // what do we multiply 4 byte chunk by @@ -114,7 +114,7 @@ global path_multipliers_chunk2: [Field; 32] = [ /* 28 (11100) */ two_pow_128 * two_pow_64, /* 29 (11101) */ two_pow_128 * two_pow_64, /* 30 (11110) */ two_pow_128 * two_pow_64, - /* 31 (11111) */ two_pow_128 * two_pow_64 + /* 31 (11111) */ two_pow_128 * two_pow_64, ]; // what do we multiply 2 byte chunk by @@ -150,7 +150,7 @@ global path_multipliers_chunk1: [Field; 32] = [ /* 28 (11100) */ 0, /* 29 (11101) */ 0, /* 30 (11110) */ two_pow_128 * two_pow_64 * two_pow_32, - /* 31 (11111) */ two_pow_128 * two_pow_64 * two_pow_32 + /* 31 (11111) */ two_pow_128 * two_pow_64 * two_pow_32, ]; // what do we multiply 1 byte chunk by @@ -186,51 +186,183 @@ global path_multipliers_chunk0: [Field; 32] = [ /* 28 (11100) */ 0, /* 29 (11101) */ two_pow_128 * two_pow_64 * two_pow_32, /* 30 (11110) */ 0, - /* 31 (11111) */ two_pow_128 * two_pow_64 * two_pow_32 * two_pow_16 + /* 31 (11111) */ two_pow_128 * two_pow_64 * two_pow_32 * two_pow_16, ]; // these are `head_path_multipliers` but in reverse order -global tail_path_multipliers_chunk3: [Field; 32] = [0x0100000000000000000000000000000000, 0x0100000000000000000000000000000000, 0x0100000000000000000000000000000000, 0x0100000000000000000000000000000000, 0x0100000000000000000000000000000000, 0x0100000000000000000000000000000000, 0x0100000000000000000000000000000000, 0x0100000000000000000000000000000000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]; -global tail_path_multipliers_chunk2: [Field; 32] = [0x01000000000000000000000000000000000000000000000000, 0x01000000000000000000000000000000000000000000000000, 0x01000000000000000000000000000000000000000000000000, 0x01000000000000000000000000000000000000000000000000, 0x00, 0x00, 0x00, 0x00, 0x0100000000000000000000000000000000, 0x0100000000000000000000000000000000, 0x0100000000000000000000000000000000, 0x0100000000000000000000000000000000, 0x00, 0x00, 0x00, 0x00, 0x010000000000000000, 0x010000000000000000, 0x010000000000000000, 0x010000000000000000, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00]; -global tail_path_multipliers_chunk1: [Field; 32] = [0x0100000000000000000000000000000000000000000000000000000000, 0x0100000000000000000000000000000000000000000000000000000000, 0x00, 0x00, 0x01000000000000000000000000000000000000000000000000, 0x01000000000000000000000000000000000000000000000000, 0x00, 0x00, 0x010000000000000000000000000000000000000000, 0x010000000000000000000000000000000000000000, 0x00, 0x00, 0x0100000000000000000000000000000000, 0x0100000000000000000000000000000000, 0x00, 0x00, 0x01000000000000000000000000, 0x01000000000000000000000000, 0x00, 0x00, 0x010000000000000000, 0x010000000000000000, 0x00, 0x00, 0x0100000000, 0x0100000000, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00]; -global tail_path_multipliers_chunk0: [Field; 32] = [0x01000000000000000000000000000000000000000000000000000000000000, 0x00, 0x0100000000000000000000000000000000000000000000000000000000, 0x00, 0x010000000000000000000000000000000000000000000000000000, 0x00, 0x01000000000000000000000000000000000000000000000000, 0x00, 0x0100000000000000000000000000000000000000000000, 0x00, 0x010000000000000000000000000000000000000000, 0x00, 0x01000000000000000000000000000000000000, 0x00, 0x0100000000000000000000000000000000, 0x00, 0x010000000000000000000000000000, 0x00, 0x01000000000000000000000000, 0x00, 0x0100000000000000000000, 0x00, 0x010000000000000000, 0x00, 0x01000000000000, 0x00, 0x0100000000, 0x00, 0x010000, 0x00, 0x01, 0x00]; +global tail_path_multipliers_chunk3: [Field; 32] = [ + 0x0100000000000000000000000000000000, + 0x0100000000000000000000000000000000, + 0x0100000000000000000000000000000000, + 0x0100000000000000000000000000000000, + 0x0100000000000000000000000000000000, + 0x0100000000000000000000000000000000, + 0x0100000000000000000000000000000000, + 0x0100000000000000000000000000000000, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x01, + 0x01, + 0x01, + 0x01, + 0x01, + 0x01, + 0x01, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, +]; +global tail_path_multipliers_chunk2: [Field; 32] = [ + 0x01000000000000000000000000000000000000000000000000, + 0x01000000000000000000000000000000000000000000000000, + 0x01000000000000000000000000000000000000000000000000, + 0x01000000000000000000000000000000000000000000000000, + 0x00, + 0x00, + 0x00, + 0x00, + 0x0100000000000000000000000000000000, + 0x0100000000000000000000000000000000, + 0x0100000000000000000000000000000000, + 0x0100000000000000000000000000000000, + 0x00, + 0x00, + 0x00, + 0x00, + 0x010000000000000000, + 0x010000000000000000, + 0x010000000000000000, + 0x010000000000000000, + 0x00, + 0x00, + 0x00, + 0x00, + 0x01, + 0x01, + 0x01, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, +]; +global tail_path_multipliers_chunk1: [Field; 32] = [ + 0x0100000000000000000000000000000000000000000000000000000000, + 0x0100000000000000000000000000000000000000000000000000000000, + 0x00, + 0x00, + 0x01000000000000000000000000000000000000000000000000, + 0x01000000000000000000000000000000000000000000000000, + 0x00, + 0x00, + 0x010000000000000000000000000000000000000000, + 0x010000000000000000000000000000000000000000, + 0x00, + 0x00, + 0x0100000000000000000000000000000000, + 0x0100000000000000000000000000000000, + 0x00, + 0x00, + 0x01000000000000000000000000, + 0x01000000000000000000000000, + 0x00, + 0x00, + 0x010000000000000000, + 0x010000000000000000, + 0x00, + 0x00, + 0x0100000000, + 0x0100000000, + 0x00, + 0x00, + 0x01, + 0x01, + 0x00, + 0x00, +]; +global tail_path_multipliers_chunk0: [Field; 32] = [ + 0x01000000000000000000000000000000000000000000000000000000000000, + 0x00, + 0x0100000000000000000000000000000000000000000000000000000000, + 0x00, + 0x010000000000000000000000000000000000000000000000000000, + 0x00, + 0x01000000000000000000000000000000000000000000000000, + 0x00, + 0x0100000000000000000000000000000000000000000000, + 0x00, + 0x010000000000000000000000000000000000000000, + 0x00, + 0x01000000000000000000000000000000000000, + 0x00, + 0x0100000000000000000000000000000000, + 0x00, + 0x010000000000000000000000000000, + 0x00, + 0x01000000000000000000000000, + 0x00, + 0x0100000000000000000000, + 0x00, + 0x010000000000000000, + 0x00, + 0x01000000000000, + 0x00, + 0x0100000000, + 0x00, + 0x010000, + 0x00, + 0x01, + 0x00, +]; global LIMB_VALID_PATH: [Field; 35] = [ -0x000000000, // 0 0 0 0 0 0 0 0 0 -0x000000001, // 0 0 0 0 0 0 0 0 1 -0x000000003, // 0 0 0 0 0 0 0 1 1 -0x000000007, // 0 0 0 0 0 0 1 1 1 -0x000000008, // 0 0 0 0 0 1 1 1 1 -0x000000010, // 0 0 0 0 1 0 0 0 0 -0x000000020, // 0 0 0 1 0 0 0 0 0 -0x000000040, // 0 0 1 0 0 0 0 0 0 -0x000000080, // 0 1 0 0 0 0 0 0 0 -0x000000100, // 1 0 0 0 0 0 0 0 0 -0x000000200, // 0 0 0 0 0 0 0 1 0 -0x000000400, // 0 0 0 0 0 0 1 0 0 -0x000000800, // 0 0 0 0 0 1 0 0 0 -0x000001000, // 0 0 0 0 1 0 0 0 0 -0x000002000, // 0 0 0 1 0 0 0 0 0 -0x000004000, // 0 0 1 0 0 0 0 0 0 -0x000008000, // 0 1 0 0 0 0 0 0 0 -0x000010000, // 0 0 0 0 0 0 0 0 1 -0x000020000, // 0 0 0 0 0 0 0 1 0 -0x000040000, // 0 0 0 0 0 0 1 0 0 -0x000080000, // 0 0 0 0 0 1 0 0 0 -0x000100000, // 0 0 0 0 1 0 0 0 0 -0x000200000, // 0 0 0 1 0 0 0 0 0 -0x000400000, // 0 0 1 0 0 0 0 0 0 -0x000800000, // 0 1 0 0 0 0 0 0 0 -0x001000000, // 0 0 0 0 0 0 0 0 1 -0x002000000, // 0 0 0 0 0 0 0 1 0 -0x004000000, // 0 0 0 0 0 0 1 0 0 -0x008000000, // 0 0 0 0 0 1 0 0 0 -0x010000000, // 0 0 0 0 1 0 0 0 0 -0x020000000, // 0 0 0 1 0 0 0 0 0 -0x040000000, // 0 0 1 0 0 0 0 0 0 -0x080000000, // 0 1 0 0 0 0 0 0 0 -0x100000000, -0x200000000 + 0x000000000, // 0 0 0 0 0 0 0 0 0 + 0x000000001, // 0 0 0 0 0 0 0 0 1 + 0x000000003, // 0 0 0 0 0 0 0 1 1 + 0x000000007, // 0 0 0 0 0 0 1 1 1 + 0x000000008, // 0 0 0 0 0 1 1 1 1 + 0x000000010, // 0 0 0 0 1 0 0 0 0 + 0x000000020, // 0 0 0 1 0 0 0 0 0 + 0x000000040, // 0 0 1 0 0 0 0 0 0 + 0x000000080, // 0 1 0 0 0 0 0 0 0 + 0x000000100, // 1 0 0 0 0 0 0 0 0 + 0x000000200, // 0 0 0 0 0 0 0 1 0 + 0x000000400, // 0 0 0 0 0 0 1 0 0 + 0x000000800, // 0 0 0 0 0 1 0 0 0 + 0x000001000, // 0 0 0 0 1 0 0 0 0 + 0x000002000, // 0 0 0 1 0 0 0 0 0 + 0x000004000, // 0 0 1 0 0 0 0 0 0 + 0x000008000, // 0 1 0 0 0 0 0 0 0 + 0x000010000, // 0 0 0 0 0 0 0 0 1 + 0x000020000, // 0 0 0 0 0 0 0 1 0 + 0x000040000, // 0 0 0 0 0 0 1 0 0 + 0x000080000, // 0 0 0 0 0 1 0 0 0 + 0x000100000, // 0 0 0 0 1 0 0 0 0 + 0x000200000, // 0 0 0 1 0 0 0 0 0 + 0x000400000, // 0 0 1 0 0 0 0 0 0 + 0x000800000, // 0 1 0 0 0 0 0 0 0 + 0x001000000, // 0 0 0 0 0 0 0 0 1 + 0x002000000, // 0 0 0 0 0 0 0 1 0 + 0x004000000, // 0 0 0 0 0 0 1 0 0 + 0x008000000, // 0 0 0 0 0 1 0 0 0 + 0x010000000, // 0 0 0 0 1 0 0 0 0 + 0x020000000, // 0 0 0 1 0 0 0 0 0 + 0x040000000, // 0 0 1 0 0 0 0 0 0 + 0x080000000, // 0 1 0 0 0 0 0 0 0 + 0x100000000, + 0x200000000, ]; // these path variables describe the location of a limb in an array @@ -240,119 +372,119 @@ global LIMB_VALID_PATH: [Field; 35] = [ // array extends to 0x200000000 which is 2^33 => 33 31 byte limbs = 1,023 bytes // this puts a hard limit on the max size of a key that this program supports. global LAST_LIMB_PATH: [Field; 36] = [ -0x000000000, // 0 0 0 0 0 0 0 0 0 <-- edge case because sometimes array index is -1, so we offset by 1 TODO explain better -0x000000000, // 0 0 0 0 0 0 0 0 1 -0x000000001, // 0 0 0 0 0 0 0 1 0 -0x000000003, // 0 0 0 0 0 0 1 0 0 -0x000000007, // 0 0 0 0 0 1 0 0 0 -0x00000000f, // 0 0 0 0 1 0 0 0 0 -0x00000001f, // 0 0 0 1 0 0 0 0 0 -0x00000003f, // 0 0 1 0 0 0 0 0 0 -0x00000007f, // 0 1 0 0 0 0 0 0 0 -0x0000000ff, // 1 0 0 0 0 0 0 0 0 -0x0000001ff, // 0 0 0 0 0 0 0 1 0 -0x0000003ff, // 0 0 0 0 0 0 1 0 0 -0x0000007ff, // 0 0 0 0 0 1 0 0 0 -0x000000fff, // 0 0 0 0 1 0 0 0 0 -0x000001fff, // 0 0 0 1 0 0 0 0 0 -0x000003fff, // 0 0 1 0 0 0 0 0 0 -0x000007fff, // 0 1 0 0 0 0 0 0 0 -0x00000ffff, // 0 0 0 0 0 0 0 0 1 -0x00001ffff, // 0 0 0 0 0 0 0 1 0 -0x00003ffff, // 0 0 0 0 0 0 1 0 0 -0x00007ffff, // 0 0 0 0 0 1 0 0 0 -0x0000fffff, // 0 0 0 0 1 0 0 0 0 -0x0001fffff, // 0 0 0 1 0 0 0 0 0 -0x0003fffff, // 0 0 1 0 0 0 0 0 0 -0x0007fffff, // 0 1 0 0 0 0 0 0 0 -0x000ffffff, // 0 0 0 0 0 0 0 0 1 -0x001ffffff, // 0 0 0 0 0 0 0 1 0 -0x003ffffff, // 0 0 0 0 0 0 1 0 0 -0x007ffffff, // 0 0 0 0 0 1 0 0 0 -0x00fffffff, // 0 0 0 0 1 0 0 0 0 -0x01fffffff, // 0 0 0 1 0 0 0 0 0 -0x03fffffff, // 0 0 1 0 0 0 0 0 0 -0x07fffffff, // 0 1 0 0 0 0 0 0 0 -0x0ffffffff, -0x1ffffffff, -0x3ffffffff + 0x000000000, // 0 0 0 0 0 0 0 0 0 <-- edge case because sometimes array index is -1, so we offset by 1 TODO explain better + 0x000000000, // 0 0 0 0 0 0 0 0 1 + 0x000000001, // 0 0 0 0 0 0 0 1 0 + 0x000000003, // 0 0 0 0 0 0 1 0 0 + 0x000000007, // 0 0 0 0 0 1 0 0 0 + 0x00000000f, // 0 0 0 0 1 0 0 0 0 + 0x00000001f, // 0 0 0 1 0 0 0 0 0 + 0x00000003f, // 0 0 1 0 0 0 0 0 0 + 0x00000007f, // 0 1 0 0 0 0 0 0 0 + 0x0000000ff, // 1 0 0 0 0 0 0 0 0 + 0x0000001ff, // 0 0 0 0 0 0 0 1 0 + 0x0000003ff, // 0 0 0 0 0 0 1 0 0 + 0x0000007ff, // 0 0 0 0 0 1 0 0 0 + 0x000000fff, // 0 0 0 0 1 0 0 0 0 + 0x000001fff, // 0 0 0 1 0 0 0 0 0 + 0x000003fff, // 0 0 1 0 0 0 0 0 0 + 0x000007fff, // 0 1 0 0 0 0 0 0 0 + 0x00000ffff, // 0 0 0 0 0 0 0 0 1 + 0x00001ffff, // 0 0 0 0 0 0 0 1 0 + 0x00003ffff, // 0 0 0 0 0 0 1 0 0 + 0x00007ffff, // 0 0 0 0 0 1 0 0 0 + 0x0000fffff, // 0 0 0 0 1 0 0 0 0 + 0x0001fffff, // 0 0 0 1 0 0 0 0 0 + 0x0003fffff, // 0 0 1 0 0 0 0 0 0 + 0x0007fffff, // 0 1 0 0 0 0 0 0 0 + 0x000ffffff, // 0 0 0 0 0 0 0 0 1 + 0x001ffffff, // 0 0 0 0 0 0 0 1 0 + 0x003ffffff, // 0 0 0 0 0 0 1 0 0 + 0x007ffffff, // 0 0 0 0 0 1 0 0 0 + 0x00fffffff, // 0 0 0 0 1 0 0 0 0 + 0x01fffffff, // 0 0 0 1 0 0 0 0 0 + 0x03fffffff, // 0 0 1 0 0 0 0 0 0 + 0x07fffffff, // 0 1 0 0 0 0 0 0 0 + 0x0ffffffff, + 0x1ffffffff, + 0x3ffffffff, ]; global INTEGER_UP_TO_62_IS_GREATER_THAN_31: [Field; 63] = [ -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 -]; -global NUM_BYTES_MOD_31_IS_ZERO: [Field; 31] = [ - 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ]; +global NUM_BYTES_MOD_31_IS_ZERO: [Field; 31] = + [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; global BYTE_SHIFT: [Field; 32] = [ - 1, - 0x1000000000000000000000000000000000000000000000000000000000000, - 0x10000000000000000000000000000000000000000000000000000000000, - 0x100000000000000000000000000000000000000000000000000000000, - 0x1000000000000000000000000000000000000000000000000000000, - 0x10000000000000000000000000000000000000000000000000000, - 0x100000000000000000000000000000000000000000000000000, - 0x1000000000000000000000000000000000000000000000000, - 0x10000000000000000000000000000000000000000000000, - 0x100000000000000000000000000000000000000000000, - 0x1000000000000000000000000000000000000000000, - 0x10000000000000000000000000000000000000000, - 0x100000000000000000000000000000000000000, - 0x1000000000000000000000000000000000000, - 0x10000000000000000000000000000000000, - 0x100000000000000000000000000000000, - 0x1000000000000000000000000000000, - 0x10000000000000000000000000000, - 0x100000000000000000000000000, - 0x1000000000000000000000000, - 0x10000000000000000000000, - 0x100000000000000000000, - 0x1000000000000000000, - 0x10000000000000000, - 0x100000000000000, - 0x1000000000000, - 0x10000000000, - 0x100000000, - 0x1000000, - 0x10000, - 0x100, - 1 - ]; + 1, + 0x1000000000000000000000000000000000000000000000000000000000000, + 0x10000000000000000000000000000000000000000000000000000000000, + 0x100000000000000000000000000000000000000000000000000000000, + 0x1000000000000000000000000000000000000000000000000000000, + 0x10000000000000000000000000000000000000000000000000000, + 0x100000000000000000000000000000000000000000000000000, + 0x1000000000000000000000000000000000000000000000000, + 0x10000000000000000000000000000000000000000000000, + 0x100000000000000000000000000000000000000000000, + 0x1000000000000000000000000000000000000000000, + 0x10000000000000000000000000000000000000000, + 0x100000000000000000000000000000000000000, + 0x1000000000000000000000000000000000000, + 0x10000000000000000000000000000000000, + 0x100000000000000000000000000000000, + 0x1000000000000000000000000000000, + 0x10000000000000000000000000000, + 0x100000000000000000000000000, + 0x1000000000000000000000000, + 0x10000000000000000000000, + 0x100000000000000000000, + 0x1000000000000000000, + 0x10000000000000000, + 0x100000000000000, + 0x1000000000000, + 0x10000000000, + 0x100000000, + 0x1000000, + 0x10000, + 0x100, + 1, +]; global PATH_LOOKUP: [[bool; 5]; 32] = [ - [false, false, false, false, false], - [true, false, false, false, false], - [false, true, false, false, false], - [true, true, false, false, false], - [false, false, true, false, false], - [true, false, true, false, false], - [false, true, true, false, false], - [true, true, true, false, false], - [false, false, false, true, false], - [true, false, false, true, false], - [false, true, false, true, false], - [true, true, false, true, false], - [false, false, true, true, false], - [true, false, true, true, false], - [false, true, true, true, false], - [true, true, true, true, false], - [false, false, false, false, true], - [true, false, false, false, true], - [false, true, false, false, true], - [true, true, false, false, true], - [false, false, true, false, true], - [true, false, true, false, true], - [false, true, true, false, true], - [true, true, true, false, true], - [false, false, false, true, true], - [true, false, false, true, true], - [false, true, false, true, true], - [true, true, false, true, true], - [false, false, true, true, true], - [true, false, true, true, true], - [false, true, true, true, true], - [true, true, true, true, true] - ]; + [false, false, false, false, false], + [true, false, false, false, false], + [false, true, false, false, false], + [true, true, false, false, false], + [false, false, true, false, false], + [true, false, true, false, false], + [false, true, true, false, false], + [true, true, true, false, false], + [false, false, false, true, false], + [true, false, false, true, false], + [false, true, false, true, false], + [true, true, false, true, false], + [false, false, true, true, false], + [true, false, true, true, false], + [false, true, true, true, false], + [true, true, true, true, false], + [false, false, false, false, true], + [true, false, false, false, true], + [false, true, false, false, true], + [true, true, false, false, true], + [false, false, true, false, true], + [true, false, true, false, true], + [false, true, true, false, true], + [true, true, true, false, true], + [false, false, false, true, true], + [true, false, false, true, true], + [false, true, false, true, true], + [true, true, false, true, true], + [false, false, true, true, true], + [true, false, true, true, true], + [false, true, true, true, true], + [true, true, true, true, true], +]; // ############################################################# // ### METHODS @@ -392,49 +524,73 @@ unconstrained fn __slice_field(f: Field, num_bytes: Field) -> [Field; 5] { tail_ptr += 2; } if head_path[2] { - chunks[2] = bytes[head_ptr] * 0x1000000 + bytes[head_ptr + 1] * 0x10000 - + bytes[head_ptr + 2] * 0x100 + bytes[head_ptr + 3]; + chunks[2] = bytes[head_ptr] * 0x1000000 + + bytes[head_ptr + 1] * 0x10000 + + bytes[head_ptr + 2] * 0x100 + + bytes[head_ptr + 3]; head_ptr += 4; } else { - chunks[2] = bytes[tail_ptr] * 0x1000000 + bytes[tail_ptr + 1] * 0x10000 - + bytes[tail_ptr + 2] * 0x100 + bytes[tail_ptr + 3]; + chunks[2] = bytes[tail_ptr] * 0x1000000 + + bytes[tail_ptr + 1] * 0x10000 + + bytes[tail_ptr + 2] * 0x100 + + bytes[tail_ptr + 3]; tail_ptr += 4; } if head_path[3] { - chunks[3] = - bytes[head_ptr] * 0x100000000000000 + bytes[head_ptr + 1] * 0x1000000000000 - + bytes[head_ptr + 2] * 0x10000000000 + bytes[head_ptr + 3] * 0x100000000 - + bytes[head_ptr + 4] * 0x1000000 + bytes[head_ptr + 5] * 0x10000 - + bytes[head_ptr + 6] * 0x100 + bytes[head_ptr + 7]; + chunks[3] = bytes[head_ptr] * 0x100000000000000 + + bytes[head_ptr + 1] * 0x1000000000000 + + bytes[head_ptr + 2] * 0x10000000000 + + bytes[head_ptr + 3] * 0x100000000 + + bytes[head_ptr + 4] * 0x1000000 + + bytes[head_ptr + 5] * 0x10000 + + bytes[head_ptr + 6] * 0x100 + + bytes[head_ptr + 7]; head_ptr += 8; } else { - chunks[3] = - bytes[tail_ptr] * 0x100000000000000 + bytes[tail_ptr + 1] * 0x1000000000000 - + bytes[tail_ptr + 2] * 0x10000000000 + bytes[tail_ptr + 3] * 0x100000000 - + bytes[tail_ptr + 4] * 0x1000000 + bytes[tail_ptr + 5] * 0x10000 - + bytes[tail_ptr + 6] * 0x100 + bytes[tail_ptr + 7]; + chunks[3] = bytes[tail_ptr] * 0x100000000000000 + + bytes[tail_ptr + 1] * 0x1000000000000 + + bytes[tail_ptr + 2] * 0x10000000000 + + bytes[tail_ptr + 3] * 0x100000000 + + bytes[tail_ptr + 4] * 0x1000000 + + bytes[tail_ptr + 5] * 0x10000 + + bytes[tail_ptr + 6] * 0x100 + + bytes[tail_ptr + 7]; tail_ptr += 8; } if head_path[4] { - chunks[4] = - bytes[head_ptr] * 0x1000000000000000000000000000000 + bytes[head_ptr + 1] * 0x10000000000000000000000000000 - + bytes[head_ptr + 2] * 0x100000000000000000000000000 + bytes[head_ptr + 3] * 0x1000000000000000000000000 - + bytes[head_ptr + 4] * 0x10000000000000000000000 + bytes[head_ptr + 5] * 0x100000000000000000000 - + bytes[head_ptr + 6] * 0x1000000000000000000 + bytes[head_ptr + 7] * 0x10000000000000000 - + bytes[head_ptr + 8] * 0x100000000000000 + bytes[head_ptr + 9] * 0x1000000000000 - + bytes[head_ptr + 10] * 0x10000000000 + bytes[head_ptr + 11] * 0x100000000 - + bytes[head_ptr + 12] * 0x1000000 + bytes[head_ptr + 13] * 0x10000 - + bytes[head_ptr + 14] * 0x100 + bytes[head_ptr + 15]; + chunks[4] = bytes[head_ptr] * 0x1000000000000000000000000000000 + + bytes[head_ptr + 1] * 0x10000000000000000000000000000 + + bytes[head_ptr + 2] * 0x100000000000000000000000000 + + bytes[head_ptr + 3] * 0x1000000000000000000000000 + + bytes[head_ptr + 4] * 0x10000000000000000000000 + + bytes[head_ptr + 5] * 0x100000000000000000000 + + bytes[head_ptr + 6] * 0x1000000000000000000 + + bytes[head_ptr + 7] * 0x10000000000000000 + + bytes[head_ptr + 8] * 0x100000000000000 + + bytes[head_ptr + 9] * 0x1000000000000 + + bytes[head_ptr + 10] * 0x10000000000 + + bytes[head_ptr + 11] * 0x100000000 + + bytes[head_ptr + 12] * 0x1000000 + + bytes[head_ptr + 13] * 0x10000 + + bytes[head_ptr + 14] * 0x100 + + bytes[head_ptr + 15]; } else { - chunks[4] = - bytes[tail_ptr] * 0x1000000000000000000000000000000 + bytes[tail_ptr + 1] * 0x10000000000000000000000000000 - + bytes[tail_ptr + 2] * 0x100000000000000000000000000 + bytes[tail_ptr + 3] * 0x1000000000000000000000000 - + bytes[tail_ptr + 4] * 0x10000000000000000000000 + bytes[tail_ptr + 5] * 0x100000000000000000000 - + bytes[tail_ptr + 6] * 0x1000000000000000000 + bytes[tail_ptr + 7] * 0x10000000000000000 - + bytes[tail_ptr + 8] * 0x100000000000000 + bytes[tail_ptr + 9] * 0x1000000000000 - + bytes[tail_ptr + 10] * 0x10000000000 + bytes[tail_ptr + 11] * 0x100000000 - + bytes[tail_ptr + 12] * 0x1000000 + bytes[tail_ptr + 13] * 0x10000 - + bytes[tail_ptr + 14] * 0x100 + bytes[tail_ptr + 15]; + chunks[4] = bytes[tail_ptr] * 0x1000000000000000000000000000000 + + bytes[tail_ptr + 1] * 0x10000000000000000000000000000 + + bytes[tail_ptr + 2] * 0x100000000000000000000000000 + + bytes[tail_ptr + 3] * 0x1000000000000000000000000 + + bytes[tail_ptr + 4] * 0x10000000000000000000000 + + bytes[tail_ptr + 5] * 0x100000000000000000000 + + bytes[tail_ptr + 6] * 0x1000000000000000000 + + bytes[tail_ptr + 7] * 0x10000000000000000 + + bytes[tail_ptr + 8] * 0x100000000000000 + + bytes[tail_ptr + 9] * 0x1000000000000 + + bytes[tail_ptr + 10] * 0x10000000000 + + bytes[tail_ptr + 11] * 0x100000000 + + bytes[tail_ptr + 12] * 0x1000000 + + bytes[tail_ptr + 13] * 0x10000 + + bytes[tail_ptr + 14] * 0x100 + + bytes[tail_ptr + 15]; } chunks @@ -485,7 +641,6 @@ unconstrained fn decompose(val: Field) -> [Field; 16] { pub fn get_last_limb_path(last_limb_index: Field) -> [Field; OutputFields] { // TODO we offset by 1 explain why (0 byte length produces 0 - 1 which = invalid array index. we just add 1 and increase array length by 1 to compensate) let path = LAST_LIMB_PATH[last_limb_index + 1]; // 2 - let path_valid_bits = decompose(path); let mut path_valid_sum: Field = 0; let mut path_valid_output: [Field; OutputFields] = [0; OutputFields]; @@ -510,7 +665,6 @@ pub fn slice_field(f: Field, num_bytes: Field) -> (Field, Field) { chunks[2].assert_max_bit_size::<32>(); // 1.75 gates chunks[3].assert_max_bit_size::<64>(); // 3.25 gates chunks[4].assert_max_bit_size::<128>(); // 7.5 gates - let mut head: Field = 0; let mut tail: Field = 0; @@ -553,7 +707,7 @@ pub fn slice_field(f: Field, num_bytes: Field) -> (Field, Field) { pub fn slice_fields( data: [Field; InputFields], start_byte: Field, - num_bytes: Field + num_bytes: Field, ) -> [Field; OutputFields] { // 3.5 let (start_index, start_mod_31) = divmod_31(start_byte); @@ -574,7 +728,8 @@ pub fn slice_fields( std::as_witness(bytes_fit_into_limb); // 2, 17 - let num_unused_bytes_in_start_limb = (num_bytes + start_mod_31 - 31) * bytes_fit_into_limb + (31 - start_mod_31); + let num_unused_bytes_in_start_limb = + (num_bytes + start_mod_31 - 31) * bytes_fit_into_limb + (31 - start_mod_31); std::as_witness(num_unused_bytes_in_start_limb); let num_remaining_bytes = num_bytes - num_unused_bytes_in_start_limb; @@ -588,7 +743,8 @@ pub fn slice_fields( let mut result = [0; OutputFields]; // 4, 69.5 - let extra_head_section = INTEGER_UP_TO_62_IS_GREATER_THAN_31[num_overflow_bytes - start_mod_31 + 31] + let extra_head_section = INTEGER_UP_TO_62_IS_GREATER_THAN_31[num_overflow_bytes - start_mod_31 + + 31] * (1 - bytes_fit_into_limb); // 1, 70.5 @@ -628,7 +784,8 @@ pub fn slice_fields( // 2, 134.5 let last_limb_from_data = data[index_of_overflow_limb]; // 2, 136.5 - let slice_source = (previous - last_limb_from_data) * use_previous_for_last_limb + last_limb_from_data; + let slice_source = + (previous - last_limb_from_data) * use_previous_for_last_limb + last_limb_from_data; // 44, 180.5 let (head, _) = slice_field(slice_source, slice_size); @@ -650,7 +807,7 @@ pub fn slice_fields( let mut path: [Field; OutputFields] = [0; OutputFields]; // 2, 190.5 for i in 1..OutputFields { - path[i] = path_valid_output[i] * -path_valid_output[i-1] + path_valid_output[i-1]; + path[i] = path_valid_output[i] * -path_valid_output[i - 1] + path_valid_output[i - 1]; } // 1, 191.5 path[0] = (1 - path_valid_output[0]); @@ -673,7 +830,7 @@ mod test { unconstrained fn build_slices_for_test( bytes: [u8; N], start: u32, - num_bytes: u32 + num_bytes: u32, ) -> [Field; 3] { let mut slices: [Field; 3] = [0; 3]; for i in 0..3 { @@ -690,7 +847,8 @@ mod test { #[test] fn test_slice_fields_nolength() { - let text: [u8; 1405] = "Charlie is genius, right. He's made from a million pieces of old bubble gum. Imagine that! In the summer of 1976, on his way home from an Alice Cooper concert, Charlie started to melt onto the pavement. It was too hot in L.A., and he melted like a pink bitch. Luckily though, there was Eric Phillips, a local crocodile who dabbled in black magic. He took pity on Charlie and scraped him off the floor with a pair of fish slicers. He poured him into an antique soup ladle, and boarded his magic carpet. Destination: Alaska! Eric Phillips decided to refreeze Charlie, but in his cold-blooded reptilian haste, he refroze him into to the shape of a Hoover. Charlie wasn't fazed though, he just zoomed about the place, sucking up Inuits. Ha ha! Oh. The Inuits didn't mind; they loved it in Charlie's pink, tight warm belly pouch, and they refused to come out. Charlie said, \"I'm cool with that,\" and set fire to a posh hammer to make it official. he downside was that the Inuits suffocated immediately. It was air-tight in there. Charlie panicked and fired the tiny Inuit bullets into Eric's crocodile peepers. The green shape was frozen. After a quick drink, Charlie stole Eric Phillips's magic carpet and left for Seattle. Charlie was racked with guilt: he'd killed 50 Inuits, noone needs that. He decided to spend the rest of his life putting small hairstyles onto boots, monkey nuts, trumpets and spanners.".as_bytes(); + let text: [u8; 1405] = "Charlie is genius, right. He's made from a million pieces of old bubble gum. Imagine that! In the summer of 1976, on his way home from an Alice Cooper concert, Charlie started to melt onto the pavement. It was too hot in L.A., and he melted like a pink bitch. Luckily though, there was Eric Phillips, a local crocodile who dabbled in black magic. He took pity on Charlie and scraped him off the floor with a pair of fish slicers. He poured him into an antique soup ladle, and boarded his magic carpet. Destination: Alaska! Eric Phillips decided to refreeze Charlie, but in his cold-blooded reptilian haste, he refroze him into to the shape of a Hoover. Charlie wasn't fazed though, he just zoomed about the place, sucking up Inuits. Ha ha! Oh. The Inuits didn't mind; they loved it in Charlie's pink, tight warm belly pouch, and they refused to come out. Charlie said, \"I'm cool with that,\" and set fire to a posh hammer to make it official. he downside was that the Inuits suffocated immediately. It was air-tight in there. Charlie panicked and fired the tiny Inuit bullets into Eric's crocodile peepers. The green shape was frozen. After a quick drink, Charlie stole Eric Phillips's magic carpet and left for Seattle. Charlie was racked with guilt: he'd killed 50 Inuits, noone needs that. He decided to spend the rest of his life putting small hairstyles onto boots, monkey nuts, trumpets and spanners." + .as_bytes(); println(f"text = {text}"); let mut slices: [Field; 46 + 3] = [0; 46 + 3]; for i in 0..46 { @@ -703,17 +861,18 @@ mod test { } } // let start_byte = 26; - let num_bytes = 0; let start_byte: u32 = 0; let mut expected_slices: [Field; 3] = build_slices_for_test(text, start_byte, num_bytes); - let result_slices: [Field; 3] = slice_fields(slices, start_byte as Field, num_bytes as Field); + let result_slices: [Field; 3] = + slice_fields(slices, start_byte as Field, num_bytes as Field); assert(result_slices == expected_slices); } #[test] fn test_slice_fields() { - let text: [u8; 1405] = "Charlie is genius, right. He's made from a million pieces of old bubble gum. Imagine that! In the summer of 1976, on his way home from an Alice Cooper concert, Charlie started to melt onto the pavement. It was too hot in L.A., and he melted like a pink bitch. Luckily though, there was Eric Phillips, a local crocodile who dabbled in black magic. He took pity on Charlie and scraped him off the floor with a pair of fish slicers. He poured him into an antique soup ladle, and boarded his magic carpet. Destination: Alaska! Eric Phillips decided to refreeze Charlie, but in his cold-blooded reptilian haste, he refroze him into to the shape of a Hoover. Charlie wasn't fazed though, he just zoomed about the place, sucking up Inuits. Ha ha! Oh. The Inuits didn't mind; they loved it in Charlie's pink, tight warm belly pouch, and they refused to come out. Charlie said, \"I'm cool with that,\" and set fire to a posh hammer to make it official. he downside was that the Inuits suffocated immediately. It was air-tight in there. Charlie panicked and fired the tiny Inuit bullets into Eric's crocodile peepers. The green shape was frozen. After a quick drink, Charlie stole Eric Phillips's magic carpet and left for Seattle. Charlie was racked with guilt: he'd killed 50 Inuits, noone needs that. He decided to spend the rest of his life putting small hairstyles onto boots, monkey nuts, trumpets and spanners.".as_bytes(); + let text: [u8; 1405] = "Charlie is genius, right. He's made from a million pieces of old bubble gum. Imagine that! In the summer of 1976, on his way home from an Alice Cooper concert, Charlie started to melt onto the pavement. It was too hot in L.A., and he melted like a pink bitch. Luckily though, there was Eric Phillips, a local crocodile who dabbled in black magic. He took pity on Charlie and scraped him off the floor with a pair of fish slicers. He poured him into an antique soup ladle, and boarded his magic carpet. Destination: Alaska! Eric Phillips decided to refreeze Charlie, but in his cold-blooded reptilian haste, he refroze him into to the shape of a Hoover. Charlie wasn't fazed though, he just zoomed about the place, sucking up Inuits. Ha ha! Oh. The Inuits didn't mind; they loved it in Charlie's pink, tight warm belly pouch, and they refused to come out. Charlie said, \"I'm cool with that,\" and set fire to a posh hammer to make it official. he downside was that the Inuits suffocated immediately. It was air-tight in there. Charlie panicked and fired the tiny Inuit bullets into Eric's crocodile peepers. The green shape was frozen. After a quick drink, Charlie stole Eric Phillips's magic carpet and left for Seattle. Charlie was racked with guilt: he'd killed 50 Inuits, noone needs that. He decided to spend the rest of his life putting small hairstyles onto boots, monkey nuts, trumpets and spanners." + .as_bytes(); println(f"text = {text}"); let mut slices: [Field; 46 + 3] = [0; 46 + 3]; for i in 0..46 { @@ -726,54 +885,28 @@ mod test { } } // let start_byte = 26; + let byte_sizes: [u32; 10] = [0, 1, 5, 30, 31, 32, 47, 61, 62, 90]; - let byte_sizes: [u32; 10] = [ - 0, - 1, - 5, - 30, - 31, - 32, - 47, - 61, - 62, - 90 - ]; - - let byte_positions: [u32; 18] = [ - 0, - 1, - 14, - 15, - 16, - 20, - 28, - 29, - 30, - 31, - 32, - 33, - 38, - 40, - 55, - 60, - 61, - 62 - ]; + let byte_positions: [u32; 18] = + [0, 1, 14, 15, 16, 20, 28, 29, 30, 31, 32, 33, 38, 40, 55, 60, 61, 62]; for i in 0..10 { let num_bytes = byte_sizes[i]; for j in 0..18 { let start_byte: u32 = byte_positions[j]; - let mut expected_slices: [Field; 3] = build_slices_for_test(text, start_byte, num_bytes); - let result_slices: [Field; 3] = slice_fields(slices, start_byte as Field, num_bytes as Field); + let mut expected_slices: [Field; 3] = + build_slices_for_test(text, start_byte, num_bytes); + let result_slices: [Field; 3] = + slice_fields(slices, start_byte as Field, num_bytes as Field); assert(result_slices == expected_slices); } for j in 0..18 { let start_byte: u32 = text.len() - num_bytes - byte_positions[j]; - let mut expected_slices: [Field; 3] = build_slices_for_test(text, start_byte, num_bytes); - let result_slices: [Field; 3] = slice_fields(slices, start_byte as Field, num_bytes as Field); + let mut expected_slices: [Field; 3] = + build_slices_for_test(text, start_byte, num_bytes); + let result_slices: [Field; 3] = + slice_fields(slices, start_byte as Field, num_bytes as Field); assert(result_slices == expected_slices); } } diff --git a/src/_table_generation/make_tables.nr b/src/_table_generation/make_tables.nr index 2302f90..9d19e4f 100644 --- a/src/_table_generation/make_tables.nr +++ b/src/_table_generation/make_tables.nr @@ -7,30 +7,47 @@ mod CaptureMode { global LITERAL_CAPTURE = 3; global ERROR_CAPTURE = 4; } -use crate::enums::Token::{ - BEGIN_ARRAY_TOKEN, NO_TOKEN, END_OBJECT_TOKEN, END_ARRAY_TOKEN, KEY_SEPARATOR_TOKEN, - VALUE_SEPARATOR_TOKEN, KEY_TOKEN, BEGIN_OBJECT_TOKEN, NUMERIC_TOKEN, STRING_TOKEN, LITERAL_TOKEN, - NUM_TOKENS -}; use crate::_table_generation::make_tables::CaptureMode::STRING_CAPTURE; use crate::_table_generation::make_tables_subtables::{ - GRAMMAR_CAPTURE_TABLE, STRING_CAPTURE_TABLE, NUMERIC_CAPTURE_TABLE, LITERAL_CAPTURE_TABLE, - GRAMMAR_CAPTURE_TOKEN, STRING_CAPTURE_TOKEN, NUMERIC_CAPTURE_TOKEN, LITERAL_CAPTURE_TOKEN, - GRAMMAR_CAPTURE_PUSH_TRANSCRIPT, STRING_CAPTURE_PUSH_TRANSCRIPT, NUMERIC_CAPTURE_PUSH_TRANSCRIPT, - LITERAL_CAPTURE_PUSH_TRANSCRIPT, GRAMMAR_CAPTURE_INCREASE_LENGTH, STRING_CAPTURE_INCREASE_LENGTH, - NUMERIC_CAPTURE_INCREASE_LENGTH, LITERAL_CAPTURE_INCREASE_LENGTH, GRAMMAR_CAPTURE_ERROR_FLAG, - STRING_CAPTURE_ERROR_FLAG, NUMERIC_CAPTURE_ERROR_FLAG, LITERAL_CAPTURE_ERROR_FLAG, - TOKEN_IS_NUMERIC_OR_LITERAL + GRAMMAR_CAPTURE_ERROR_FLAG, GRAMMAR_CAPTURE_INCREASE_LENGTH, GRAMMAR_CAPTURE_PUSH_TRANSCRIPT, + GRAMMAR_CAPTURE_TABLE, GRAMMAR_CAPTURE_TOKEN, LITERAL_CAPTURE_ERROR_FLAG, + LITERAL_CAPTURE_INCREASE_LENGTH, LITERAL_CAPTURE_PUSH_TRANSCRIPT, LITERAL_CAPTURE_TABLE, + LITERAL_CAPTURE_TOKEN, NUMERIC_CAPTURE_ERROR_FLAG, NUMERIC_CAPTURE_INCREASE_LENGTH, + NUMERIC_CAPTURE_PUSH_TRANSCRIPT, NUMERIC_CAPTURE_TABLE, NUMERIC_CAPTURE_TOKEN, + STRING_CAPTURE_ERROR_FLAG, STRING_CAPTURE_INCREASE_LENGTH, STRING_CAPTURE_PUSH_TRANSCRIPT, + STRING_CAPTURE_TABLE, STRING_CAPTURE_TOKEN, TOKEN_IS_NUMERIC_OR_LITERAL, +}; +use crate::enums::Layer::{ARRAY_LAYER, OBJECT_LAYER, SINGLE_VALUE_LAYER}; +use crate::enums::Token::{ + BEGIN_ARRAY_TOKEN, BEGIN_OBJECT_TOKEN, END_ARRAY_TOKEN, END_OBJECT_TOKEN, KEY_SEPARATOR_TOKEN, + KEY_TOKEN, LITERAL_TOKEN, NO_TOKEN, NUM_TOKENS, NUMERIC_TOKEN, STRING_TOKEN, + VALUE_SEPARATOR_TOKEN, }; -use crate::enums::Layer::{OBJECT_LAYER, ARRAY_LAYER, SINGLE_VALUE_LAYER}; use crate::token_flags::TokenFlags; use crate::transcript_entry::ValidationFlags; -global CAPTURE_TABLE: [[Field; 128]; 4] = [GRAMMAR_CAPTURE_TABLE, STRING_CAPTURE_TABLE, NUMERIC_CAPTURE_TABLE, LITERAL_CAPTURE_TABLE]; -global CAPTURE_TOKEN: [[Field; 128]; 4] = [GRAMMAR_CAPTURE_TOKEN, STRING_CAPTURE_TOKEN, NUMERIC_CAPTURE_TOKEN, LITERAL_CAPTURE_TOKEN]; -global CAPTURE_PUSH_TRANSCRIPT: [[bool; 128]; 4] = [GRAMMAR_CAPTURE_PUSH_TRANSCRIPT, STRING_CAPTURE_PUSH_TRANSCRIPT, NUMERIC_CAPTURE_PUSH_TRANSCRIPT, LITERAL_CAPTURE_PUSH_TRANSCRIPT]; -global CAPTURE_INCREASE_LENGTH: [[bool; 128]; 4] = [GRAMMAR_CAPTURE_INCREASE_LENGTH, STRING_CAPTURE_INCREASE_LENGTH, NUMERIC_CAPTURE_INCREASE_LENGTH, LITERAL_CAPTURE_INCREASE_LENGTH]; -global CAPTURE_ERROR_FLAG: [[bool; 128]; 4] = [GRAMMAR_CAPTURE_ERROR_FLAG, STRING_CAPTURE_ERROR_FLAG, NUMERIC_CAPTURE_ERROR_FLAG, LITERAL_CAPTURE_ERROR_FLAG]; +global CAPTURE_TABLE: [[Field; 128]; 4] = + [GRAMMAR_CAPTURE_TABLE, STRING_CAPTURE_TABLE, NUMERIC_CAPTURE_TABLE, LITERAL_CAPTURE_TABLE]; +global CAPTURE_TOKEN: [[Field; 128]; 4] = + [GRAMMAR_CAPTURE_TOKEN, STRING_CAPTURE_TOKEN, NUMERIC_CAPTURE_TOKEN, LITERAL_CAPTURE_TOKEN]; +global CAPTURE_PUSH_TRANSCRIPT: [[bool; 128]; 4] = [ + GRAMMAR_CAPTURE_PUSH_TRANSCRIPT, + STRING_CAPTURE_PUSH_TRANSCRIPT, + NUMERIC_CAPTURE_PUSH_TRANSCRIPT, + LITERAL_CAPTURE_PUSH_TRANSCRIPT, +]; +global CAPTURE_INCREASE_LENGTH: [[bool; 128]; 4] = [ + GRAMMAR_CAPTURE_INCREASE_LENGTH, + STRING_CAPTURE_INCREASE_LENGTH, + NUMERIC_CAPTURE_INCREASE_LENGTH, + LITERAL_CAPTURE_INCREASE_LENGTH, +]; +global CAPTURE_ERROR_FLAG: [[bool; 128]; 4] = [ + GRAMMAR_CAPTURE_ERROR_FLAG, + STRING_CAPTURE_ERROR_FLAG, + NUMERIC_CAPTURE_ERROR_FLAG, + LITERAL_CAPTURE_ERROR_FLAG, +]; unconstrained fn make_capture_table_full() -> [[Field; 128]; 4] { let mut result: [[Field; 128]; 4] = [[0; 128]; 4]; @@ -74,119 +91,97 @@ unconstrained fn make_token_validation_table() -> [Field; NUM_TOKENS * NUM_TOKEN // 11 tokens , 3 layers = 11 * 11 * 3 = 121 * 3 = 343 // object contexts let no_change = ValidationFlags { push_layer: 0, push_layer_type_of_root: 0, pop_layer: 0 }; - let error_flags = ValidationFlags { push_layer: 0x1000000, push_layer_type_of_root: 0, pop_layer: 0 }; - let begin_new_object_flags = ValidationFlags { push_layer: 1, push_layer_type_of_root: OBJECT_LAYER, pop_layer: 0 }; - let begin_new_array_flags = ValidationFlags { push_layer: 1, push_layer_type_of_root: ARRAY_LAYER, pop_layer: 0 }; - let end_object_or_array_flags: ValidationFlags = ValidationFlags { push_layer: 0, push_layer_type_of_root: 0, pop_layer: 1 }; + let error_flags = + ValidationFlags { push_layer: 0x1000000, push_layer_type_of_root: 0, pop_layer: 0 }; + let begin_new_object_flags = + ValidationFlags { push_layer: 1, push_layer_type_of_root: OBJECT_LAYER, pop_layer: 0 }; + let begin_new_array_flags = + ValidationFlags { push_layer: 1, push_layer_type_of_root: ARRAY_LAYER, pop_layer: 0 }; + let end_object_or_array_flags: ValidationFlags = + ValidationFlags { push_layer: 0, push_layer_type_of_root: 0, pop_layer: 1 }; let token_ids: [Field; NUM_TOKENS] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; let error_token_outcomes: [Field; NUM_TOKENS] = token_ids.map(|_| error_flags.to_field()); - let object_layer_begin_object_token_outcomes: [Field; NUM_TOKENS] = token_ids.map( - |token| { + let object_layer_begin_object_token_outcomes: [Field; NUM_TOKENS] = token_ids.map(|token| { let mut result = error_flags.to_field(); - if (token == KEY_TOKEN) - { + if (token == KEY_TOKEN) { result = no_change.to_field(); } - if (token == END_OBJECT_TOKEN) - { + if (token == END_OBJECT_TOKEN) { result = end_object_or_array_flags.to_field(); } result - } - ); - - let object_layer_key_token_outcomes: [Field; NUM_TOKENS] = token_ids.map( - |token| { - let mut result = no_change.to_field(); - if (token != KEY_SEPARATOR_TOKEN) - { - result = error_flags.to_field(); - } - result + }); + + let object_layer_key_token_outcomes: [Field; NUM_TOKENS] = token_ids.map(|token| { + let mut result = no_change.to_field(); + if (token != KEY_SEPARATOR_TOKEN) { + result = error_flags.to_field(); } - ); + result + }); - let object_layer_key_separator_token_outcomes: [Field; NUM_TOKENS] = token_ids.map( - |token| { - let mut result = error_flags.to_field(); - if (token == STRING_TOKEN) | (token == LITERAL_TOKEN) | (token == NUMERIC_TOKEN) - { - result = no_change.to_field(); - } - if (token == BEGIN_ARRAY_TOKEN) - { - result = begin_new_array_flags.to_field(); - } - if (token == BEGIN_OBJECT_TOKEN) - { - result = begin_new_object_flags.to_field(); - } - result + let object_layer_key_separator_token_outcomes: [Field; NUM_TOKENS] = token_ids.map(|token| { + let mut result = error_flags.to_field(); + if (token == STRING_TOKEN) | (token == LITERAL_TOKEN) | (token == NUMERIC_TOKEN) { + result = no_change.to_field(); } - ); + if (token == BEGIN_ARRAY_TOKEN) { + result = begin_new_array_flags.to_field(); + } + if (token == BEGIN_OBJECT_TOKEN) { + result = begin_new_object_flags.to_field(); + } + result + }); - let object_layer_value_token_outcomes: [Field; NUM_TOKENS] = token_ids.map( - |token| { - let mut result = error_flags.to_field(); - if (token == VALUE_SEPARATOR_TOKEN) - { - result = no_change.to_field(); - } - if (token == END_OBJECT_TOKEN) - { - result = end_object_or_array_flags.to_field(); - } - result + let object_layer_value_token_outcomes: [Field; NUM_TOKENS] = token_ids.map(|token| { + let mut result = error_flags.to_field(); + if (token == VALUE_SEPARATOR_TOKEN) { + result = no_change.to_field(); } - ); + if (token == END_OBJECT_TOKEN) { + result = end_object_or_array_flags.to_field(); + } + result + }); - let object_layer_end_object_outcomes: [Field; NUM_TOKENS] = token_ids.map( - |token| { - let mut result = error_flags.to_field(); - if (token == VALUE_SEPARATOR_TOKEN) - { - result = no_change.to_field(); - } - if (token == END_OBJECT_TOKEN) - { - result = end_object_or_array_flags.to_field(); - } - // we can reach the end of the JSON via this path - if (token == NO_TOKEN) - { - result = no_change.to_field(); - } - result + let object_layer_end_object_outcomes: [Field; NUM_TOKENS] = token_ids.map(|token| { + let mut result = error_flags.to_field(); + if (token == VALUE_SEPARATOR_TOKEN) { + result = no_change.to_field(); + } + if (token == END_OBJECT_TOKEN) { + result = end_object_or_array_flags.to_field(); } - ); + // we can reach the end of the JSON via this path + if (token == NO_TOKEN) { + result = no_change.to_field(); + } + result + }); - let object_layer_value_separator_token_outcomes: [Field; NUM_TOKENS] = token_ids.map( - |token| { - let mut result = error_flags.to_field(); - if (token == KEY_TOKEN) - { - result = no_change.to_field(); - } - result + let object_layer_value_separator_token_outcomes: [Field; NUM_TOKENS] = token_ids.map(|token| { + let mut result = error_flags.to_field(); + if (token == KEY_TOKEN) { + result = no_change.to_field(); } - ); + result + }); let mut object_layer_flags: [[Field; NUM_TOKENS]; NUM_TOKENS] = [[0; NUM_TOKENS]; NUM_TOKENS]; let mut array_layer_flags: [[Field; NUM_TOKENS]; NUM_TOKENS] = [[0; NUM_TOKENS]; NUM_TOKENS]; - let mut single_value_layer_flags: [[Field; NUM_TOKENS]; NUM_TOKENS] = [[0; NUM_TOKENS]; NUM_TOKENS]; + let mut single_value_layer_flags: [[Field; NUM_TOKENS]; NUM_TOKENS] = + [[0; NUM_TOKENS]; NUM_TOKENS]; - let no_token_outcomes: [Field; NUM_TOKENS] = token_ids.map( - |token| { + let no_token_outcomes: [Field; NUM_TOKENS] = token_ids.map(|token| { let mut result = error_flags.to_field(); - if (token == NO_TOKEN) - { + if (token == NO_TOKEN) { result = no_change.to_field(); } result - } - ); + }); object_layer_flags[NO_TOKEN] = no_token_outcomes; object_layer_flags[BEGIN_OBJECT_TOKEN] = object_layer_begin_object_token_outcomes; @@ -200,110 +195,82 @@ unconstrained fn make_token_validation_table() -> [Field; NUM_TOKENS * NUM_TOKEN object_layer_flags[LITERAL_TOKEN] = object_layer_value_token_outcomes; object_layer_flags[KEY_TOKEN] = object_layer_key_token_outcomes; - let array_layer_begin_array_token_outcomes: [Field; NUM_TOKENS] = token_ids.map( - |token| { + let array_layer_begin_array_token_outcomes: [Field; NUM_TOKENS] = token_ids.map(|token| { let mut result = error_flags.to_field(); - if (token == STRING_TOKEN ) | (token == LITERAL_TOKEN) | (token == NUMERIC_TOKEN) - { + if (token == STRING_TOKEN) | (token == LITERAL_TOKEN) | (token == NUMERIC_TOKEN) { result = no_change.to_field(); } - if (token == BEGIN_OBJECT_TOKEN) - { + if (token == BEGIN_OBJECT_TOKEN) { result = begin_new_object_flags.to_field(); } - if (token == BEGIN_ARRAY_TOKEN) - { + if (token == BEGIN_ARRAY_TOKEN) { result = begin_new_array_flags.to_field(); } - if (token == END_ARRAY_TOKEN) - { + if (token == END_ARRAY_TOKEN) { result = end_object_or_array_flags.to_field(); } result - } - ); + }); - let array_layer_value_token_outcomes: [Field; NUM_TOKENS] = token_ids.map( - |token| { + let array_layer_value_token_outcomes: [Field; NUM_TOKENS] = token_ids.map(|token| { let mut result = error_flags.to_field(); - if (token == VALUE_SEPARATOR_TOKEN ) - { + if (token == VALUE_SEPARATOR_TOKEN) { result = no_change.to_field(); } - if (token == END_ARRAY_TOKEN) - { + if (token == END_ARRAY_TOKEN) { result = end_object_or_array_flags.to_field(); } result - } - ); + }); - let array_layer_value_separator_token_outcomes: [Field; NUM_TOKENS] = token_ids.map( - |token| { + let array_layer_value_separator_token_outcomes: [Field; NUM_TOKENS] = token_ids.map(|token| { let mut result = error_flags.to_field(); - if (token == STRING_TOKEN ) | (token == LITERAL_TOKEN) | (token == NUMERIC_TOKEN) - { + if (token == STRING_TOKEN) | (token == LITERAL_TOKEN) | (token == NUMERIC_TOKEN) { result = no_change.to_field(); } - if (token == BEGIN_OBJECT_TOKEN) - { + if (token == BEGIN_OBJECT_TOKEN) { result = begin_new_object_flags.to_field(); } - if (token == BEGIN_ARRAY_TOKEN) - { + if (token == BEGIN_ARRAY_TOKEN) { result = begin_new_array_flags.to_field(); } result - } - ); - - let array_layer_value_token_outcomes: [Field; NUM_TOKENS] = token_ids.map( - |token| { - let mut result = error_flags.to_field(); - if (token == VALUE_SEPARATOR_TOKEN) - { - result = no_change.to_field(); - } - if (token == END_ARRAY_TOKEN) - { - result = end_object_or_array_flags.to_field(); - } - result - } - ); - let array_layer_end_array_outcomes: [Field; NUM_TOKENS] = token_ids.map( - |token| { - let mut result = error_flags.to_field(); - if (token == VALUE_SEPARATOR_TOKEN) - { - result = no_change.to_field(); - } - if (token == END_ARRAY_TOKEN) - { - result = end_object_or_array_flags.to_field(); - } - // we can reach the end of the JSON via this path - if (token == NO_TOKEN) - { - result = no_change.to_field(); - } - result - } - ); - let array_layer_end_object_outcomes: [Field; NUM_TOKENS] = token_ids.map( - |token| { - let mut result = error_flags.to_field(); - if (token == VALUE_SEPARATOR_TOKEN) - { - result = no_change.to_field(); - } - if (token == END_ARRAY_TOKEN) - { - result = end_object_or_array_flags.to_field(); - } - result + }); + + let array_layer_value_token_outcomes: [Field; NUM_TOKENS] = token_ids.map(|token| { + let mut result = error_flags.to_field(); + if (token == VALUE_SEPARATOR_TOKEN) { + result = no_change.to_field(); } - ); + if (token == END_ARRAY_TOKEN) { + result = end_object_or_array_flags.to_field(); + } + result + }); + let array_layer_end_array_outcomes: [Field; NUM_TOKENS] = token_ids.map(|token| { + let mut result = error_flags.to_field(); + if (token == VALUE_SEPARATOR_TOKEN) { + result = no_change.to_field(); + } + if (token == END_ARRAY_TOKEN) { + result = end_object_or_array_flags.to_field(); + } + // we can reach the end of the JSON via this path + if (token == NO_TOKEN) { + result = no_change.to_field(); + } + result + }); + let array_layer_end_object_outcomes: [Field; NUM_TOKENS] = token_ids.map(|token| { + let mut result = error_flags.to_field(); + if (token == VALUE_SEPARATOR_TOKEN) { + result = no_change.to_field(); + } + if (token == END_ARRAY_TOKEN) { + result = end_object_or_array_flags.to_field(); + } + result + }); array_layer_flags[NO_TOKEN] = no_token_outcomes; array_layer_flags[BEGIN_OBJECT_TOKEN] = error_token_outcomes; @@ -317,17 +284,14 @@ unconstrained fn make_token_validation_table() -> [Field; NUM_TOKENS * NUM_TOKEN array_layer_flags[LITERAL_TOKEN] = array_layer_value_token_outcomes; array_layer_flags[KEY_TOKEN] = error_token_outcomes; - let single_value_layer_value_token_outcomes: [Field; NUM_TOKENS] = token_ids.map( - |token| { + let single_value_layer_value_token_outcomes: [Field; NUM_TOKENS] = token_ids.map(|token| { let mut result = error_flags.to_field(); // we have reached the end of json - if (token == NO_TOKEN) - { + if (token == NO_TOKEN) { result = no_change.to_field(); } result - } - ); + }); single_value_layer_flags[NO_TOKEN] = no_token_outcomes; single_value_layer_flags[BEGIN_OBJECT_TOKEN] = error_token_outcomes; single_value_layer_flags[END_OBJECT_TOKEN] = single_value_layer_value_token_outcomes; @@ -340,13 +304,17 @@ unconstrained fn make_token_validation_table() -> [Field; NUM_TOKENS * NUM_TOKEN single_value_layer_flags[LITERAL_TOKEN] = single_value_layer_value_token_outcomes; single_value_layer_flags[KEY_TOKEN] = no_token_outcomes; - let mut flattened_flags: [Field; NUM_TOKENS * NUM_TOKENS * 3] = [0; NUM_TOKENS * NUM_TOKENS * 3]; + let mut flattened_flags: [Field; NUM_TOKENS * NUM_TOKENS * 3] = + [0; NUM_TOKENS * NUM_TOKENS * 3]; let NN = (NUM_TOKENS * NUM_TOKENS) as Field; for j in 0..NUM_TOKENS as u32 { for k in 0..NUM_TOKENS as u32 { - flattened_flags[OBJECT_LAYER * NN + j as Field * (NUM_TOKENS as Field) + k as Field] = object_layer_flags[j][k]; - flattened_flags[ARRAY_LAYER * NN + j as Field * (NUM_TOKENS as Field) + k as Field] = array_layer_flags[j][k]; - flattened_flags[SINGLE_VALUE_LAYER * NN + j as Field * (NUM_TOKENS as Field) + k as Field] = single_value_layer_flags[j][k]; + flattened_flags[OBJECT_LAYER * NN + j as Field * (NUM_TOKENS as Field) + k as Field] = + object_layer_flags[j][k]; + flattened_flags[ARRAY_LAYER * NN + j as Field * (NUM_TOKENS as Field) + k as Field] = + array_layer_flags[j][k]; + flattened_flags[SINGLE_VALUE_LAYER * NN + j as Field * (NUM_TOKENS as Field) + k as Field] = + single_value_layer_flags[j][k]; } } flattened_flags @@ -416,9 +384,7 @@ unconstrained fn make_process_raw_transcript_table() -> [Field; 1024] { let new_grammar = GRAMMAR_CAPTURE_PUSH_TRANSCRIPT[j] as Field; let scan_token = GRAMMAR_CAPTURE_TOKEN[j]; let new_grammar = ((new_grammar == 1) & (token_is_numeric_or_literal == 1)) as Field; - result[i * 256 + j] = token - + new_grammar * 0x100 - + scan_token * 0x10000; + result[i * 256 + j] = token + new_grammar * 0x100 + scan_token * 0x10000; } for j in 128..256 { result[i * 256 + j] = 0; @@ -442,7 +408,7 @@ unconstrained fn generate_token_flags_table() -> [Field; NUM_TOKENS * 2] { new_context: OBJECT_LAYER, is_key_token: 0, is_value_token: 0, - preserve_num_entries: 1 + preserve_num_entries: 1, }; let mut key_token_flags: TokenFlags = TokenFlags { create_json_entry: 0, @@ -451,7 +417,7 @@ unconstrained fn generate_token_flags_table() -> [Field; NUM_TOKENS * 2] { new_context: OBJECT_LAYER, is_key_token: 1, is_value_token: 0, - preserve_num_entries: 1 + preserve_num_entries: 1, }; let begin_object_flags = TokenFlags { create_json_entry: 0, @@ -460,7 +426,7 @@ unconstrained fn generate_token_flags_table() -> [Field; NUM_TOKENS * 2] { new_context: OBJECT_LAYER, is_key_token: 0, is_value_token: 0, - preserve_num_entries: 0 + preserve_num_entries: 0, }; let begin_array_flags = TokenFlags { @@ -470,7 +436,7 @@ unconstrained fn generate_token_flags_table() -> [Field; NUM_TOKENS * 2] { new_context: ARRAY_LAYER, is_key_token: 0, is_value_token: 0, - preserve_num_entries: 0 + preserve_num_entries: 0, }; let mut end_object_flags = TokenFlags { @@ -480,7 +446,7 @@ unconstrained fn generate_token_flags_table() -> [Field; NUM_TOKENS * 2] { new_context: 0, is_key_token: 0, is_value_token: 0, - preserve_num_entries: 0 + preserve_num_entries: 0, }; let mut end_array_flags = TokenFlags { @@ -490,7 +456,7 @@ unconstrained fn generate_token_flags_table() -> [Field; NUM_TOKENS * 2] { new_context: 0, is_key_token: 0, is_value_token: 0, - preserve_num_entries: 0 + preserve_num_entries: 0, }; let mut string_flags = TokenFlags { @@ -500,7 +466,7 @@ unconstrained fn generate_token_flags_table() -> [Field; NUM_TOKENS * 2] { new_context: OBJECT_LAYER, is_key_token: 0, is_value_token: 1, - preserve_num_entries: 1 + preserve_num_entries: 1, }; let mut numeric_flags = TokenFlags { @@ -510,7 +476,7 @@ unconstrained fn generate_token_flags_table() -> [Field; NUM_TOKENS * 2] { new_context: OBJECT_LAYER, is_key_token: 0, is_value_token: 1, - preserve_num_entries: 1 + preserve_num_entries: 1, }; let mut literal_flags = TokenFlags { @@ -520,7 +486,7 @@ unconstrained fn generate_token_flags_table() -> [Field; NUM_TOKENS * 2] { new_context: OBJECT_LAYER, is_key_token: 0, is_value_token: 1, - preserve_num_entries: 1 + preserve_num_entries: 1, }; flags[NO_TOKEN] = no_token_flags; diff --git a/src/_table_generation/make_tables_subtables.nr b/src/_table_generation/make_tables_subtables.nr index 7a031cd..92b6885 100644 --- a/src/_table_generation/make_tables_subtables.nr +++ b/src/_table_generation/make_tables_subtables.nr @@ -1,2631 +1,2761 @@ -use crate::_table_generation::make_tables::CaptureMode::{GRAMMAR_CAPTURE, STRING_CAPTURE, NUMERIC_CAPTURE, LITERAL_CAPTURE, ERROR_CAPTURE}; +use crate::_table_generation::make_tables::CaptureMode::{ + ERROR_CAPTURE, GRAMMAR_CAPTURE, LITERAL_CAPTURE, NUMERIC_CAPTURE, STRING_CAPTURE, +}; use crate::enums::Token::{ - NO_TOKEN, BEGIN_OBJECT_TOKEN, END_OBJECT_TOKEN, BEGIN_ARRAY_TOKEN, END_ARRAY_TOKEN, - KEY_SEPARATOR_TOKEN, VALUE_SEPARATOR_TOKEN, STRING_TOKEN, NUMERIC_TOKEN, LITERAL_TOKEN, KEY_TOKEN + BEGIN_ARRAY_TOKEN, BEGIN_OBJECT_TOKEN, END_ARRAY_TOKEN, END_OBJECT_TOKEN, KEY_SEPARATOR_TOKEN, + KEY_TOKEN, LITERAL_TOKEN, NO_TOKEN, NUMERIC_TOKEN, STRING_TOKEN, VALUE_SEPARATOR_TOKEN, }; -global TOKEN_IS_NUMERIC_OR_LITERAL: [Field; 11] = [ -0,0,0,0,0,0,0,0,1,1,0 -]; +global TOKEN_IS_NUMERIC_OR_LITERAL: [Field; 11] = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0]; global GRAMMAR_CAPTURE_TABLE: [Field; 128] = [ - /* NULL */ ERROR_CAPTURE, - /* SOH */ ERROR_CAPTURE, - /* TXT */ ERROR_CAPTURE, - /* ETX */ ERROR_CAPTURE, - /* EOT */ ERROR_CAPTURE, - /* ENQ */ ERROR_CAPTURE, - /* ACK */ ERROR_CAPTURE, - /* BEL */ ERROR_CAPTURE, - /* BS */ ERROR_CAPTURE, - /* TAB */ GRAMMAR_CAPTURE, - /* NL */ GRAMMAR_CAPTURE, - /* VT */ ERROR_CAPTURE, - /* FF */ ERROR_CAPTURE, - /* CR */ GRAMMAR_CAPTURE, - /* SI */ ERROR_CAPTURE, - /* SO */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* SPACE */ GRAMMAR_CAPTURE, - /*"!"*/ ERROR_CAPTURE, - /* " */ STRING_CAPTURE, - /*"#"*/ ERROR_CAPTURE, - /*"$"*/ ERROR_CAPTURE, - /*"%"*/ ERROR_CAPTURE, - /*"&"*/ ERROR_CAPTURE, - /*"'"*/ ERROR_CAPTURE, - /*"("*/ ERROR_CAPTURE, - /*")"*/ ERROR_CAPTURE, - /*"*"*/ ERROR_CAPTURE, - /*"+"*/ ERROR_CAPTURE, - /*","*/ GRAMMAR_CAPTURE, - /*"-"*/ ERROR_CAPTURE, - /*"."*/ ERROR_CAPTURE, - /*"/"*/ ERROR_CAPTURE, - /*"0"*/ NUMERIC_CAPTURE, - /*"1"*/ NUMERIC_CAPTURE, - /*"2"*/ NUMERIC_CAPTURE, - /*"3"*/ NUMERIC_CAPTURE, - /*"4"*/ NUMERIC_CAPTURE, - /*"5"*/ NUMERIC_CAPTURE, - /*"6"*/ NUMERIC_CAPTURE, - /*"7"*/ NUMERIC_CAPTURE, - /*"8"*/ NUMERIC_CAPTURE, - /*"9"*/ NUMERIC_CAPTURE, - /*":"*/ GRAMMAR_CAPTURE, - /*";"*/ ERROR_CAPTURE, - /*"<"*/ ERROR_CAPTURE, - /*"="*/ ERROR_CAPTURE, - /*">"*/ ERROR_CAPTURE, - /*"?"*/ ERROR_CAPTURE, - /*"@"*/ ERROR_CAPTURE, - /*"A"*/ ERROR_CAPTURE, - /*"B"*/ ERROR_CAPTURE, - /*"C"*/ ERROR_CAPTURE, - /*"D"*/ ERROR_CAPTURE, - /*"E"*/ ERROR_CAPTURE, - /*"F"*/ ERROR_CAPTURE, - /*"G"*/ ERROR_CAPTURE, - /*"H"*/ ERROR_CAPTURE, - /*"I"*/ ERROR_CAPTURE, - /*"J"*/ ERROR_CAPTURE, - /*"K"*/ ERROR_CAPTURE, - /*"L"*/ ERROR_CAPTURE, - /*"M"*/ ERROR_CAPTURE, - /*"N"*/ ERROR_CAPTURE, - /*"O"*/ ERROR_CAPTURE, - /*"P"*/ ERROR_CAPTURE, - /*"Q"*/ ERROR_CAPTURE, - /*"R"*/ ERROR_CAPTURE, - /*"S"*/ ERROR_CAPTURE, - /*"T"*/ ERROR_CAPTURE, - /*"U"*/ ERROR_CAPTURE, - /*"V"*/ ERROR_CAPTURE, - /*"W"*/ ERROR_CAPTURE, - /*"X"*/ ERROR_CAPTURE, - /*"Y"*/ ERROR_CAPTURE, - /*"Z"*/ ERROR_CAPTURE, - /*"["*/ GRAMMAR_CAPTURE, - /*"\"*/ ERROR_CAPTURE, - /*"]"*/ GRAMMAR_CAPTURE, - /*"^"*/ ERROR_CAPTURE, - /*"_"*/ ERROR_CAPTURE, - /*"`"*/ ERROR_CAPTURE, - /*"a"*/ ERROR_CAPTURE, - /*"b"*/ ERROR_CAPTURE, - /*"c"*/ ERROR_CAPTURE, - /*"d"*/ ERROR_CAPTURE, - /*"e"*/ ERROR_CAPTURE, - /*"f"*/ LITERAL_CAPTURE, // false = literal - /*"g"*/ ERROR_CAPTURE, - /*"h"*/ ERROR_CAPTURE, - /*"i"*/ ERROR_CAPTURE, - /*"j"*/ ERROR_CAPTURE, - /*"k"*/ ERROR_CAPTURE, - /*"l"*/ ERROR_CAPTURE, - /*"m"*/ ERROR_CAPTURE, - /*"n"*/ LITERAL_CAPTURE, // null = literal - /*"o"*/ ERROR_CAPTURE, - /*"p"*/ ERROR_CAPTURE, - /*"q"*/ ERROR_CAPTURE, - /*"r"*/ ERROR_CAPTURE, - /*"s"*/ ERROR_CAPTURE, - /*"t"*/ LITERAL_CAPTURE, // true = literal - /*"u"*/ ERROR_CAPTURE, - /*"v"*/ ERROR_CAPTURE, - /*"w"*/ ERROR_CAPTURE, - /*"x"*/ ERROR_CAPTURE, - /*"y"*/ ERROR_CAPTURE, - /*"z"*/ ERROR_CAPTURE, - /*"{"*/ GRAMMAR_CAPTURE, - /*"|"*/ ERROR_CAPTURE, - /*"}"*/ GRAMMAR_CAPTURE, - /*"~"*/ ERROR_CAPTURE, - /*DEL*/ ERROR_CAPTURE, - ]; + /* NULL */ ERROR_CAPTURE, + /* SOH */ ERROR_CAPTURE, + /* TXT */ ERROR_CAPTURE, + /* ETX */ ERROR_CAPTURE, + /* EOT */ ERROR_CAPTURE, + /* ENQ */ ERROR_CAPTURE, + /* ACK */ ERROR_CAPTURE, + /* BEL */ ERROR_CAPTURE, + /* BS */ ERROR_CAPTURE, + /* TAB */ GRAMMAR_CAPTURE, + /* NL */ GRAMMAR_CAPTURE, + /* VT */ ERROR_CAPTURE, + /* FF */ ERROR_CAPTURE, + /* CR */ GRAMMAR_CAPTURE, + /* SI */ ERROR_CAPTURE, + /* SO */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* SPACE */ GRAMMAR_CAPTURE, + /*"!"*/ ERROR_CAPTURE, + /* " */ STRING_CAPTURE, + /*"#"*/ ERROR_CAPTURE, + /*"$"*/ ERROR_CAPTURE, + /*"%"*/ ERROR_CAPTURE, + /*"&"*/ ERROR_CAPTURE, + /*"'"*/ ERROR_CAPTURE, + /*"("*/ ERROR_CAPTURE, + /*")"*/ ERROR_CAPTURE, + /*"*"*/ ERROR_CAPTURE, + /*"+"*/ ERROR_CAPTURE, + /*","*/ GRAMMAR_CAPTURE, + /*"-"*/ ERROR_CAPTURE, + /*"."*/ ERROR_CAPTURE, + /*"/"*/ ERROR_CAPTURE, + /*"0"*/ NUMERIC_CAPTURE, + /*"1"*/ NUMERIC_CAPTURE, + /*"2"*/ NUMERIC_CAPTURE, + /*"3"*/ NUMERIC_CAPTURE, + /*"4"*/ NUMERIC_CAPTURE, + /*"5"*/ NUMERIC_CAPTURE, + /*"6"*/ NUMERIC_CAPTURE, + /*"7"*/ NUMERIC_CAPTURE, + /*"8"*/ NUMERIC_CAPTURE, + /*"9"*/ NUMERIC_CAPTURE, + /*":"*/ GRAMMAR_CAPTURE, + /*";"*/ ERROR_CAPTURE, + /*"<"*/ ERROR_CAPTURE, + /*"="*/ ERROR_CAPTURE, + /*">"*/ ERROR_CAPTURE, + /*"?"*/ ERROR_CAPTURE, + /*"@"*/ ERROR_CAPTURE, + /*"A"*/ ERROR_CAPTURE, + /*"B"*/ ERROR_CAPTURE, + /*"C"*/ ERROR_CAPTURE, + /*"D"*/ ERROR_CAPTURE, + /*"E"*/ ERROR_CAPTURE, + /*"F"*/ ERROR_CAPTURE, + /*"G"*/ ERROR_CAPTURE, + /*"H"*/ ERROR_CAPTURE, + /*"I"*/ ERROR_CAPTURE, + /*"J"*/ ERROR_CAPTURE, + /*"K"*/ ERROR_CAPTURE, + /*"L"*/ ERROR_CAPTURE, + /*"M"*/ ERROR_CAPTURE, + /*"N"*/ ERROR_CAPTURE, + /*"O"*/ ERROR_CAPTURE, + /*"P"*/ ERROR_CAPTURE, + /*"Q"*/ ERROR_CAPTURE, + /*"R"*/ ERROR_CAPTURE, + /*"S"*/ ERROR_CAPTURE, + /*"T"*/ ERROR_CAPTURE, + /*"U"*/ ERROR_CAPTURE, + /*"V"*/ ERROR_CAPTURE, + /*"W"*/ ERROR_CAPTURE, + /*"X"*/ ERROR_CAPTURE, + /*"Y"*/ ERROR_CAPTURE, + /*"Z"*/ ERROR_CAPTURE, + /*"["*/ GRAMMAR_CAPTURE, + /*"\"*/ ERROR_CAPTURE, + /*"]"*/ GRAMMAR_CAPTURE, + /*"^"*/ ERROR_CAPTURE, + /*"_"*/ ERROR_CAPTURE, + /*"`"*/ ERROR_CAPTURE, + /*"a"*/ ERROR_CAPTURE, + /*"b"*/ ERROR_CAPTURE, + /*"c"*/ ERROR_CAPTURE, + /*"d"*/ ERROR_CAPTURE, + /*"e"*/ ERROR_CAPTURE, + /*"f"*/ LITERAL_CAPTURE, // false = literal + /*"g"*/ + ERROR_CAPTURE, + /*"h"*/ ERROR_CAPTURE, + /*"i"*/ ERROR_CAPTURE, + /*"j"*/ ERROR_CAPTURE, + /*"k"*/ ERROR_CAPTURE, + /*"l"*/ ERROR_CAPTURE, + /*"m"*/ ERROR_CAPTURE, + /*"n"*/ LITERAL_CAPTURE, // null = literal + /*"o"*/ + ERROR_CAPTURE, + /*"p"*/ ERROR_CAPTURE, + /*"q"*/ ERROR_CAPTURE, + /*"r"*/ ERROR_CAPTURE, + /*"s"*/ ERROR_CAPTURE, + /*"t"*/ LITERAL_CAPTURE, // true = literal + /*"u"*/ + ERROR_CAPTURE, + /*"v"*/ ERROR_CAPTURE, + /*"w"*/ ERROR_CAPTURE, + /*"x"*/ ERROR_CAPTURE, + /*"y"*/ ERROR_CAPTURE, + /*"z"*/ ERROR_CAPTURE, + /*"{"*/ GRAMMAR_CAPTURE, + /*"|"*/ ERROR_CAPTURE, + /*"}"*/ GRAMMAR_CAPTURE, + /*"~"*/ ERROR_CAPTURE, + /*DEL*/ ERROR_CAPTURE, +]; global STRING_CAPTURE_TABLE: [Field; 128] = [ - /* NULL */ ERROR_CAPTURE, - /* SOH */ ERROR_CAPTURE, - /* TXT */ ERROR_CAPTURE, - /* ETX */ ERROR_CAPTURE, - /* EOT */ ERROR_CAPTURE, - /* ENQ */ ERROR_CAPTURE, - /* ACK */ ERROR_CAPTURE, - /* BEL */ ERROR_CAPTURE, - /* BS */ ERROR_CAPTURE, - /* TAB */ STRING_CAPTURE, - /* NL */ STRING_CAPTURE, - /* VT */ ERROR_CAPTURE, - /* FF */ ERROR_CAPTURE, - /* CR */ STRING_CAPTURE, - /* SI */ ERROR_CAPTURE, - /* SO */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* SPACE */ STRING_CAPTURE, - /*"!"*/ STRING_CAPTURE, - /* " */ GRAMMAR_CAPTURE, - /*"#"*/ STRING_CAPTURE, - /*"$"*/ STRING_CAPTURE, - /*"%"*/ STRING_CAPTURE, - /*"&"*/ STRING_CAPTURE, - /*"'"*/ STRING_CAPTURE, - /*"("*/ STRING_CAPTURE, - /*")"*/ STRING_CAPTURE, - /*"*"*/ STRING_CAPTURE, - /*"+"*/ STRING_CAPTURE, - /*","*/ STRING_CAPTURE, - /*"-"*/ STRING_CAPTURE, - /*"."*/ STRING_CAPTURE, - /*"/"*/ STRING_CAPTURE, - /*"0"*/ STRING_CAPTURE, - /*"1"*/ STRING_CAPTURE, - /*"2"*/ STRING_CAPTURE, - /*"3"*/ STRING_CAPTURE, - /*"4"*/ STRING_CAPTURE, - /*"5"*/ STRING_CAPTURE, - /*"6"*/ STRING_CAPTURE, - /*"7"*/ STRING_CAPTURE, - /*"8"*/ STRING_CAPTURE, - /*"9"*/ STRING_CAPTURE, - /*":"*/ STRING_CAPTURE, - /*";"*/ STRING_CAPTURE, - /*"<"*/ STRING_CAPTURE, - /*"="*/ STRING_CAPTURE, - /*">"*/ STRING_CAPTURE, - /*"?"*/ STRING_CAPTURE, - /*"@"*/ STRING_CAPTURE, - /*"A"*/ STRING_CAPTURE, - /*"B"*/ STRING_CAPTURE, - /*"C"*/ STRING_CAPTURE, - /*"D"*/ STRING_CAPTURE, - /*"E"*/ STRING_CAPTURE, - /*"F"*/ STRING_CAPTURE, - /*"G"*/ STRING_CAPTURE, - /*"H"*/ STRING_CAPTURE, - /*"I"*/ STRING_CAPTURE, - /*"J"*/ STRING_CAPTURE, - /*"K"*/ STRING_CAPTURE, - /*"L"*/ STRING_CAPTURE, - /*"M"*/ STRING_CAPTURE, - /*"N"*/ STRING_CAPTURE, - /*"O"*/ STRING_CAPTURE, - /*"P"*/ STRING_CAPTURE, - /*"Q"*/ STRING_CAPTURE, - /*"R"*/ STRING_CAPTURE, - /*"S"*/ STRING_CAPTURE, - /*"T"*/ STRING_CAPTURE, - /*"U"*/ STRING_CAPTURE, - /*"V"*/ STRING_CAPTURE, - /*"W"*/ STRING_CAPTURE, - /*"X"*/ STRING_CAPTURE, - /*"Y"*/ STRING_CAPTURE, - /*"Z"*/ STRING_CAPTURE, - /*"["*/ STRING_CAPTURE, - /*"\"*/ STRING_CAPTURE, - /*"]"*/ STRING_CAPTURE, - /*"^"*/ STRING_CAPTURE, - /*"_"*/ STRING_CAPTURE, - /*"`"*/ STRING_CAPTURE, - /*"a"*/ STRING_CAPTURE, - /*"b"*/ STRING_CAPTURE, - /*"c"*/ STRING_CAPTURE, - /*"d"*/ STRING_CAPTURE, - /*"e"*/ STRING_CAPTURE, - /*"f"*/ STRING_CAPTURE, - /*"g"*/ STRING_CAPTURE, - /*"h"*/ STRING_CAPTURE, - /*"i"*/ STRING_CAPTURE, - /*"j"*/ STRING_CAPTURE, - /*"k"*/ STRING_CAPTURE, - /*"l"*/ STRING_CAPTURE, - /*"m"*/ STRING_CAPTURE, - /*"n"*/ STRING_CAPTURE, - /*"o"*/ STRING_CAPTURE, - /*"p"*/ STRING_CAPTURE, - /*"q"*/ STRING_CAPTURE, - /*"r"*/ STRING_CAPTURE, - /*"s"*/ STRING_CAPTURE, - /*"t"*/ STRING_CAPTURE, - /*"u"*/ STRING_CAPTURE, - /*"v"*/ STRING_CAPTURE, - /*"w"*/ STRING_CAPTURE, - /*"x"*/ STRING_CAPTURE, - /*"y"*/ STRING_CAPTURE, - /*"z"*/ STRING_CAPTURE, - /*"{"*/ STRING_CAPTURE, - /*"|"*/ STRING_CAPTURE, - /*"}"*/ STRING_CAPTURE, - /*"~"*/ STRING_CAPTURE, - /*DEL*/ ERROR_CAPTURE, - ]; + /* NULL */ ERROR_CAPTURE, + /* SOH */ ERROR_CAPTURE, + /* TXT */ ERROR_CAPTURE, + /* ETX */ ERROR_CAPTURE, + /* EOT */ ERROR_CAPTURE, + /* ENQ */ ERROR_CAPTURE, + /* ACK */ ERROR_CAPTURE, + /* BEL */ ERROR_CAPTURE, + /* BS */ ERROR_CAPTURE, + /* TAB */ STRING_CAPTURE, + /* NL */ STRING_CAPTURE, + /* VT */ ERROR_CAPTURE, + /* FF */ ERROR_CAPTURE, + /* CR */ STRING_CAPTURE, + /* SI */ ERROR_CAPTURE, + /* SO */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* SPACE */ STRING_CAPTURE, + /*"!"*/ STRING_CAPTURE, + /* " */ GRAMMAR_CAPTURE, + /*"#"*/ STRING_CAPTURE, + /*"$"*/ STRING_CAPTURE, + /*"%"*/ STRING_CAPTURE, + /*"&"*/ STRING_CAPTURE, + /*"'"*/ STRING_CAPTURE, + /*"("*/ STRING_CAPTURE, + /*")"*/ STRING_CAPTURE, + /*"*"*/ STRING_CAPTURE, + /*"+"*/ STRING_CAPTURE, + /*","*/ STRING_CAPTURE, + /*"-"*/ STRING_CAPTURE, + /*"."*/ STRING_CAPTURE, + /*"/"*/ STRING_CAPTURE, + /*"0"*/ STRING_CAPTURE, + /*"1"*/ STRING_CAPTURE, + /*"2"*/ STRING_CAPTURE, + /*"3"*/ STRING_CAPTURE, + /*"4"*/ STRING_CAPTURE, + /*"5"*/ STRING_CAPTURE, + /*"6"*/ STRING_CAPTURE, + /*"7"*/ STRING_CAPTURE, + /*"8"*/ STRING_CAPTURE, + /*"9"*/ STRING_CAPTURE, + /*":"*/ STRING_CAPTURE, + /*";"*/ STRING_CAPTURE, + /*"<"*/ STRING_CAPTURE, + /*"="*/ STRING_CAPTURE, + /*">"*/ STRING_CAPTURE, + /*"?"*/ STRING_CAPTURE, + /*"@"*/ STRING_CAPTURE, + /*"A"*/ STRING_CAPTURE, + /*"B"*/ STRING_CAPTURE, + /*"C"*/ STRING_CAPTURE, + /*"D"*/ STRING_CAPTURE, + /*"E"*/ STRING_CAPTURE, + /*"F"*/ STRING_CAPTURE, + /*"G"*/ STRING_CAPTURE, + /*"H"*/ STRING_CAPTURE, + /*"I"*/ STRING_CAPTURE, + /*"J"*/ STRING_CAPTURE, + /*"K"*/ STRING_CAPTURE, + /*"L"*/ STRING_CAPTURE, + /*"M"*/ STRING_CAPTURE, + /*"N"*/ STRING_CAPTURE, + /*"O"*/ STRING_CAPTURE, + /*"P"*/ STRING_CAPTURE, + /*"Q"*/ STRING_CAPTURE, + /*"R"*/ STRING_CAPTURE, + /*"S"*/ STRING_CAPTURE, + /*"T"*/ STRING_CAPTURE, + /*"U"*/ STRING_CAPTURE, + /*"V"*/ STRING_CAPTURE, + /*"W"*/ STRING_CAPTURE, + /*"X"*/ STRING_CAPTURE, + /*"Y"*/ STRING_CAPTURE, + /*"Z"*/ STRING_CAPTURE, + /*"["*/ STRING_CAPTURE, + /*"\"*/ STRING_CAPTURE, + /*"]"*/ STRING_CAPTURE, + /*"^"*/ STRING_CAPTURE, + /*"_"*/ STRING_CAPTURE, + /*"`"*/ STRING_CAPTURE, + /*"a"*/ STRING_CAPTURE, + /*"b"*/ STRING_CAPTURE, + /*"c"*/ STRING_CAPTURE, + /*"d"*/ STRING_CAPTURE, + /*"e"*/ STRING_CAPTURE, + /*"f"*/ STRING_CAPTURE, + /*"g"*/ STRING_CAPTURE, + /*"h"*/ STRING_CAPTURE, + /*"i"*/ STRING_CAPTURE, + /*"j"*/ STRING_CAPTURE, + /*"k"*/ STRING_CAPTURE, + /*"l"*/ STRING_CAPTURE, + /*"m"*/ STRING_CAPTURE, + /*"n"*/ STRING_CAPTURE, + /*"o"*/ STRING_CAPTURE, + /*"p"*/ STRING_CAPTURE, + /*"q"*/ STRING_CAPTURE, + /*"r"*/ STRING_CAPTURE, + /*"s"*/ STRING_CAPTURE, + /*"t"*/ STRING_CAPTURE, + /*"u"*/ STRING_CAPTURE, + /*"v"*/ STRING_CAPTURE, + /*"w"*/ STRING_CAPTURE, + /*"x"*/ STRING_CAPTURE, + /*"y"*/ STRING_CAPTURE, + /*"z"*/ STRING_CAPTURE, + /*"{"*/ STRING_CAPTURE, + /*"|"*/ STRING_CAPTURE, + /*"}"*/ STRING_CAPTURE, + /*"~"*/ STRING_CAPTURE, + /*DEL*/ ERROR_CAPTURE, +]; global NUMERIC_CAPTURE_TABLE: [Field; 128] = [ - /* NULL */ ERROR_CAPTURE, - /* SOH */ ERROR_CAPTURE, - /* TXT */ ERROR_CAPTURE, - /* ETX */ ERROR_CAPTURE, - /* EOT */ ERROR_CAPTURE, - /* ENQ */ ERROR_CAPTURE, - /* ACK */ ERROR_CAPTURE, - /* BEL */ ERROR_CAPTURE, - /* BS */ ERROR_CAPTURE, - /* TAB */ GRAMMAR_CAPTURE, - /* NL */ GRAMMAR_CAPTURE, - /* VT */ ERROR_CAPTURE, - /* FF */ ERROR_CAPTURE, - /* CR */ GRAMMAR_CAPTURE, - /* SI */ ERROR_CAPTURE, - /* SO */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* SPACE */ GRAMMAR_CAPTURE, - /*"!"*/ ERROR_CAPTURE, - /* " */ ERROR_CAPTURE, - /*"#"*/ ERROR_CAPTURE, - /*"$"*/ ERROR_CAPTURE, - /*"%"*/ ERROR_CAPTURE, - /*"&"*/ ERROR_CAPTURE, - /*"'"*/ ERROR_CAPTURE, - /*"("*/ ERROR_CAPTURE, - /*")"*/ ERROR_CAPTURE, - /*"*"*/ ERROR_CAPTURE, - /*"+"*/ ERROR_CAPTURE, - /*","*/ GRAMMAR_CAPTURE, - /*"-"*/ ERROR_CAPTURE, - /*"."*/ ERROR_CAPTURE, - /*"/"*/ ERROR_CAPTURE, - /*"0"*/ NUMERIC_CAPTURE, - /*"1"*/ NUMERIC_CAPTURE, - /*"2"*/ NUMERIC_CAPTURE, - /*"3"*/ NUMERIC_CAPTURE, - /*"4"*/ NUMERIC_CAPTURE, - /*"5"*/ NUMERIC_CAPTURE, - /*"6"*/ NUMERIC_CAPTURE, - /*"7"*/ NUMERIC_CAPTURE, - /*"8"*/ NUMERIC_CAPTURE, - /*"9"*/ NUMERIC_CAPTURE, - /*":"*/ ERROR_CAPTURE, - /*";"*/ ERROR_CAPTURE, - /*"<"*/ ERROR_CAPTURE, - /*"="*/ ERROR_CAPTURE, - /*">"*/ ERROR_CAPTURE, - /*"?"*/ ERROR_CAPTURE, - /*"@"*/ ERROR_CAPTURE, - /*"A"*/ ERROR_CAPTURE, - /*"B"*/ ERROR_CAPTURE, - /*"C"*/ ERROR_CAPTURE, - /*"D"*/ ERROR_CAPTURE, - /*"E"*/ ERROR_CAPTURE, - /*"F"*/ ERROR_CAPTURE, - /*"G"*/ ERROR_CAPTURE, - /*"H"*/ ERROR_CAPTURE, - /*"I"*/ ERROR_CAPTURE, - /*"J"*/ ERROR_CAPTURE, - /*"K"*/ ERROR_CAPTURE, - /*"L"*/ ERROR_CAPTURE, - /*"M"*/ ERROR_CAPTURE, - /*"N"*/ ERROR_CAPTURE, - /*"O"*/ ERROR_CAPTURE, - /*"P"*/ ERROR_CAPTURE, - /*"Q"*/ ERROR_CAPTURE, - /*"R"*/ ERROR_CAPTURE, - /*"S"*/ ERROR_CAPTURE, - /*"T"*/ ERROR_CAPTURE, - /*"U"*/ ERROR_CAPTURE, - /*"V"*/ ERROR_CAPTURE, - /*"W"*/ ERROR_CAPTURE, - /*"X"*/ ERROR_CAPTURE, - /*"Y"*/ ERROR_CAPTURE, - /*"Z"*/ ERROR_CAPTURE, - /*"["*/ ERROR_CAPTURE, - /*"\"*/ ERROR_CAPTURE, - /*"]"*/ GRAMMAR_CAPTURE, - /*"^"*/ ERROR_CAPTURE, - /*"_"*/ ERROR_CAPTURE, - /*"`"*/ ERROR_CAPTURE, - /*"a"*/ ERROR_CAPTURE, - /*"b"*/ ERROR_CAPTURE, - /*"c"*/ ERROR_CAPTURE, - /*"d"*/ ERROR_CAPTURE, - /*"e"*/ ERROR_CAPTURE, - /*"f"*/ ERROR_CAPTURE, - /*"g"*/ ERROR_CAPTURE, - /*"h"*/ ERROR_CAPTURE, - /*"i"*/ ERROR_CAPTURE, - /*"j"*/ ERROR_CAPTURE, - /*"k"*/ ERROR_CAPTURE, - /*"l"*/ ERROR_CAPTURE, - /*"m"*/ ERROR_CAPTURE, - /*"n"*/ ERROR_CAPTURE, - /*"o"*/ ERROR_CAPTURE, - /*"p"*/ ERROR_CAPTURE, - /*"q"*/ ERROR_CAPTURE, - /*"r"*/ ERROR_CAPTURE, - /*"s"*/ ERROR_CAPTURE, - /*"t"*/ ERROR_CAPTURE, - /*"u"*/ ERROR_CAPTURE, - /*"v"*/ ERROR_CAPTURE, - /*"w"*/ ERROR_CAPTURE, - /*"x"*/ ERROR_CAPTURE, - /*"y"*/ ERROR_CAPTURE, - /*"z"*/ ERROR_CAPTURE, - /*"{"*/ ERROR_CAPTURE, - /*"|"*/ ERROR_CAPTURE, - /*"}"*/ GRAMMAR_CAPTURE, - /*"~"*/ ERROR_CAPTURE, - /*DEL*/ ERROR_CAPTURE, - ]; + /* NULL */ ERROR_CAPTURE, + /* SOH */ ERROR_CAPTURE, + /* TXT */ ERROR_CAPTURE, + /* ETX */ ERROR_CAPTURE, + /* EOT */ ERROR_CAPTURE, + /* ENQ */ ERROR_CAPTURE, + /* ACK */ ERROR_CAPTURE, + /* BEL */ ERROR_CAPTURE, + /* BS */ ERROR_CAPTURE, + /* TAB */ GRAMMAR_CAPTURE, + /* NL */ GRAMMAR_CAPTURE, + /* VT */ ERROR_CAPTURE, + /* FF */ ERROR_CAPTURE, + /* CR */ GRAMMAR_CAPTURE, + /* SI */ ERROR_CAPTURE, + /* SO */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* SPACE */ GRAMMAR_CAPTURE, + /*"!"*/ ERROR_CAPTURE, + /* " */ ERROR_CAPTURE, + /*"#"*/ ERROR_CAPTURE, + /*"$"*/ ERROR_CAPTURE, + /*"%"*/ ERROR_CAPTURE, + /*"&"*/ ERROR_CAPTURE, + /*"'"*/ ERROR_CAPTURE, + /*"("*/ ERROR_CAPTURE, + /*")"*/ ERROR_CAPTURE, + /*"*"*/ ERROR_CAPTURE, + /*"+"*/ ERROR_CAPTURE, + /*","*/ GRAMMAR_CAPTURE, + /*"-"*/ ERROR_CAPTURE, + /*"."*/ ERROR_CAPTURE, + /*"/"*/ ERROR_CAPTURE, + /*"0"*/ NUMERIC_CAPTURE, + /*"1"*/ NUMERIC_CAPTURE, + /*"2"*/ NUMERIC_CAPTURE, + /*"3"*/ NUMERIC_CAPTURE, + /*"4"*/ NUMERIC_CAPTURE, + /*"5"*/ NUMERIC_CAPTURE, + /*"6"*/ NUMERIC_CAPTURE, + /*"7"*/ NUMERIC_CAPTURE, + /*"8"*/ NUMERIC_CAPTURE, + /*"9"*/ NUMERIC_CAPTURE, + /*":"*/ ERROR_CAPTURE, + /*";"*/ ERROR_CAPTURE, + /*"<"*/ ERROR_CAPTURE, + /*"="*/ ERROR_CAPTURE, + /*">"*/ ERROR_CAPTURE, + /*"?"*/ ERROR_CAPTURE, + /*"@"*/ ERROR_CAPTURE, + /*"A"*/ ERROR_CAPTURE, + /*"B"*/ ERROR_CAPTURE, + /*"C"*/ ERROR_CAPTURE, + /*"D"*/ ERROR_CAPTURE, + /*"E"*/ ERROR_CAPTURE, + /*"F"*/ ERROR_CAPTURE, + /*"G"*/ ERROR_CAPTURE, + /*"H"*/ ERROR_CAPTURE, + /*"I"*/ ERROR_CAPTURE, + /*"J"*/ ERROR_CAPTURE, + /*"K"*/ ERROR_CAPTURE, + /*"L"*/ ERROR_CAPTURE, + /*"M"*/ ERROR_CAPTURE, + /*"N"*/ ERROR_CAPTURE, + /*"O"*/ ERROR_CAPTURE, + /*"P"*/ ERROR_CAPTURE, + /*"Q"*/ ERROR_CAPTURE, + /*"R"*/ ERROR_CAPTURE, + /*"S"*/ ERROR_CAPTURE, + /*"T"*/ ERROR_CAPTURE, + /*"U"*/ ERROR_CAPTURE, + /*"V"*/ ERROR_CAPTURE, + /*"W"*/ ERROR_CAPTURE, + /*"X"*/ ERROR_CAPTURE, + /*"Y"*/ ERROR_CAPTURE, + /*"Z"*/ ERROR_CAPTURE, + /*"["*/ ERROR_CAPTURE, + /*"\"*/ ERROR_CAPTURE, + /*"]"*/ GRAMMAR_CAPTURE, + /*"^"*/ ERROR_CAPTURE, + /*"_"*/ ERROR_CAPTURE, + /*"`"*/ ERROR_CAPTURE, + /*"a"*/ ERROR_CAPTURE, + /*"b"*/ ERROR_CAPTURE, + /*"c"*/ ERROR_CAPTURE, + /*"d"*/ ERROR_CAPTURE, + /*"e"*/ ERROR_CAPTURE, + /*"f"*/ ERROR_CAPTURE, + /*"g"*/ ERROR_CAPTURE, + /*"h"*/ ERROR_CAPTURE, + /*"i"*/ ERROR_CAPTURE, + /*"j"*/ ERROR_CAPTURE, + /*"k"*/ ERROR_CAPTURE, + /*"l"*/ ERROR_CAPTURE, + /*"m"*/ ERROR_CAPTURE, + /*"n"*/ ERROR_CAPTURE, + /*"o"*/ ERROR_CAPTURE, + /*"p"*/ ERROR_CAPTURE, + /*"q"*/ ERROR_CAPTURE, + /*"r"*/ ERROR_CAPTURE, + /*"s"*/ ERROR_CAPTURE, + /*"t"*/ ERROR_CAPTURE, + /*"u"*/ ERROR_CAPTURE, + /*"v"*/ ERROR_CAPTURE, + /*"w"*/ ERROR_CAPTURE, + /*"x"*/ ERROR_CAPTURE, + /*"y"*/ ERROR_CAPTURE, + /*"z"*/ ERROR_CAPTURE, + /*"{"*/ ERROR_CAPTURE, + /*"|"*/ ERROR_CAPTURE, + /*"}"*/ GRAMMAR_CAPTURE, + /*"~"*/ ERROR_CAPTURE, + /*DEL*/ ERROR_CAPTURE, +]; global LITERAL_CAPTURE_TABLE: [Field; 128] = [ - /* NULL */ ERROR_CAPTURE, - /* SOH */ ERROR_CAPTURE, - /* TXT */ ERROR_CAPTURE, - /* ETX */ ERROR_CAPTURE, - /* EOT */ ERROR_CAPTURE, - /* ENQ */ ERROR_CAPTURE, - /* ACK */ ERROR_CAPTURE, - /* BEL */ ERROR_CAPTURE, - /* BS */ ERROR_CAPTURE, - /* TAB */ GRAMMAR_CAPTURE, - /* NL */ GRAMMAR_CAPTURE, - /* VT */ ERROR_CAPTURE, - /* FF */ ERROR_CAPTURE, - /* CR */ GRAMMAR_CAPTURE, - /* SI */ ERROR_CAPTURE, - /* SO */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* */ ERROR_CAPTURE, - /* SPACE */ GRAMMAR_CAPTURE, - /*"!"*/ ERROR_CAPTURE, - /* " */ ERROR_CAPTURE, - /*"#"*/ ERROR_CAPTURE, - /*"$"*/ ERROR_CAPTURE, - /*"%"*/ ERROR_CAPTURE, - /*"&"*/ ERROR_CAPTURE, - /*"'"*/ ERROR_CAPTURE, - /*"("*/ ERROR_CAPTURE, - /*")"*/ ERROR_CAPTURE, - /*"*"*/ ERROR_CAPTURE, - /*"+"*/ ERROR_CAPTURE, - /*","*/ GRAMMAR_CAPTURE, - /*"-"*/ ERROR_CAPTURE, - /*"."*/ ERROR_CAPTURE, - /*"/"*/ ERROR_CAPTURE, - /*"0"*/ ERROR_CAPTURE, - /*"1"*/ ERROR_CAPTURE, - /*"2"*/ ERROR_CAPTURE, - /*"3"*/ ERROR_CAPTURE, - /*"4"*/ ERROR_CAPTURE, - /*"5"*/ ERROR_CAPTURE, - /*"6"*/ ERROR_CAPTURE, - /*"7"*/ ERROR_CAPTURE, - /*"8"*/ ERROR_CAPTURE, - /*"9"*/ ERROR_CAPTURE, - /*":"*/ ERROR_CAPTURE, - /*";"*/ ERROR_CAPTURE, - /*"<"*/ ERROR_CAPTURE, - /*"="*/ ERROR_CAPTURE, - /*">"*/ ERROR_CAPTURE, - /*"?"*/ ERROR_CAPTURE, - /*"@"*/ ERROR_CAPTURE, - /*"A"*/ ERROR_CAPTURE, - /*"B"*/ ERROR_CAPTURE, - /*"C"*/ ERROR_CAPTURE, - /*"D"*/ ERROR_CAPTURE, - /*"E"*/ ERROR_CAPTURE, - /*"F"*/ ERROR_CAPTURE, - /*"G"*/ ERROR_CAPTURE, - /*"H"*/ ERROR_CAPTURE, - /*"I"*/ ERROR_CAPTURE, - /*"J"*/ ERROR_CAPTURE, - /*"K"*/ ERROR_CAPTURE, - /*"L"*/ ERROR_CAPTURE, - /*"M"*/ ERROR_CAPTURE, - /*"N"*/ ERROR_CAPTURE, - /*"O"*/ ERROR_CAPTURE, - /*"P"*/ ERROR_CAPTURE, - /*"Q"*/ ERROR_CAPTURE, - /*"R"*/ ERROR_CAPTURE, - /*"S"*/ ERROR_CAPTURE, - /*"T"*/ ERROR_CAPTURE, - /*"U"*/ ERROR_CAPTURE, - /*"V"*/ ERROR_CAPTURE, - /*"W"*/ ERROR_CAPTURE, - /*"X"*/ ERROR_CAPTURE, - /*"Y"*/ ERROR_CAPTURE, - /*"Z"*/ ERROR_CAPTURE, - /*"["*/ ERROR_CAPTURE, - /*"\"*/ ERROR_CAPTURE, - /*"]"*/ GRAMMAR_CAPTURE, - /*"^"*/ ERROR_CAPTURE, - /*"_"*/ ERROR_CAPTURE, - /*"`"*/ ERROR_CAPTURE, - /*"a"*/ LITERAL_CAPTURE, - /*"b"*/ ERROR_CAPTURE, - /*"c"*/ ERROR_CAPTURE, - /*"d"*/ ERROR_CAPTURE, - /*"e"*/ LITERAL_CAPTURE, - /*"f"*/ LITERAL_CAPTURE, - /*"g"*/ ERROR_CAPTURE, - /*"h"*/ ERROR_CAPTURE, - /*"i"*/ ERROR_CAPTURE, - /*"j"*/ ERROR_CAPTURE, - /*"k"*/ ERROR_CAPTURE, - /*"l"*/ LITERAL_CAPTURE, - /*"m"*/ ERROR_CAPTURE, - /*"n"*/ LITERAL_CAPTURE, - /*"o"*/ ERROR_CAPTURE, - /*"p"*/ ERROR_CAPTURE, - /*"q"*/ ERROR_CAPTURE, - /*"r"*/ LITERAL_CAPTURE, - /*"s"*/ LITERAL_CAPTURE, - /*"t"*/ ERROR_CAPTURE, - /*"u"*/ LITERAL_CAPTURE, - /*"v"*/ ERROR_CAPTURE, - /*"w"*/ ERROR_CAPTURE, - /*"x"*/ ERROR_CAPTURE, - /*"y"*/ ERROR_CAPTURE, - /*"z"*/ ERROR_CAPTURE, - /*"{"*/ ERROR_CAPTURE, - /*"|"*/ ERROR_CAPTURE, - /*"}"*/ GRAMMAR_CAPTURE, - /*"~"*/ ERROR_CAPTURE, - /*DEL*/ ERROR_CAPTURE, - ]; + /* NULL */ ERROR_CAPTURE, + /* SOH */ ERROR_CAPTURE, + /* TXT */ ERROR_CAPTURE, + /* ETX */ ERROR_CAPTURE, + /* EOT */ ERROR_CAPTURE, + /* ENQ */ ERROR_CAPTURE, + /* ACK */ ERROR_CAPTURE, + /* BEL */ ERROR_CAPTURE, + /* BS */ ERROR_CAPTURE, + /* TAB */ GRAMMAR_CAPTURE, + /* NL */ GRAMMAR_CAPTURE, + /* VT */ ERROR_CAPTURE, + /* FF */ ERROR_CAPTURE, + /* CR */ GRAMMAR_CAPTURE, + /* SI */ ERROR_CAPTURE, + /* SO */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* */ ERROR_CAPTURE, + /* SPACE */ GRAMMAR_CAPTURE, + /*"!"*/ ERROR_CAPTURE, + /* " */ ERROR_CAPTURE, + /*"#"*/ ERROR_CAPTURE, + /*"$"*/ ERROR_CAPTURE, + /*"%"*/ ERROR_CAPTURE, + /*"&"*/ ERROR_CAPTURE, + /*"'"*/ ERROR_CAPTURE, + /*"("*/ ERROR_CAPTURE, + /*")"*/ ERROR_CAPTURE, + /*"*"*/ ERROR_CAPTURE, + /*"+"*/ ERROR_CAPTURE, + /*","*/ GRAMMAR_CAPTURE, + /*"-"*/ ERROR_CAPTURE, + /*"."*/ ERROR_CAPTURE, + /*"/"*/ ERROR_CAPTURE, + /*"0"*/ ERROR_CAPTURE, + /*"1"*/ ERROR_CAPTURE, + /*"2"*/ ERROR_CAPTURE, + /*"3"*/ ERROR_CAPTURE, + /*"4"*/ ERROR_CAPTURE, + /*"5"*/ ERROR_CAPTURE, + /*"6"*/ ERROR_CAPTURE, + /*"7"*/ ERROR_CAPTURE, + /*"8"*/ ERROR_CAPTURE, + /*"9"*/ ERROR_CAPTURE, + /*":"*/ ERROR_CAPTURE, + /*";"*/ ERROR_CAPTURE, + /*"<"*/ ERROR_CAPTURE, + /*"="*/ ERROR_CAPTURE, + /*">"*/ ERROR_CAPTURE, + /*"?"*/ ERROR_CAPTURE, + /*"@"*/ ERROR_CAPTURE, + /*"A"*/ ERROR_CAPTURE, + /*"B"*/ ERROR_CAPTURE, + /*"C"*/ ERROR_CAPTURE, + /*"D"*/ ERROR_CAPTURE, + /*"E"*/ ERROR_CAPTURE, + /*"F"*/ ERROR_CAPTURE, + /*"G"*/ ERROR_CAPTURE, + /*"H"*/ ERROR_CAPTURE, + /*"I"*/ ERROR_CAPTURE, + /*"J"*/ ERROR_CAPTURE, + /*"K"*/ ERROR_CAPTURE, + /*"L"*/ ERROR_CAPTURE, + /*"M"*/ ERROR_CAPTURE, + /*"N"*/ ERROR_CAPTURE, + /*"O"*/ ERROR_CAPTURE, + /*"P"*/ ERROR_CAPTURE, + /*"Q"*/ ERROR_CAPTURE, + /*"R"*/ ERROR_CAPTURE, + /*"S"*/ ERROR_CAPTURE, + /*"T"*/ ERROR_CAPTURE, + /*"U"*/ ERROR_CAPTURE, + /*"V"*/ ERROR_CAPTURE, + /*"W"*/ ERROR_CAPTURE, + /*"X"*/ ERROR_CAPTURE, + /*"Y"*/ ERROR_CAPTURE, + /*"Z"*/ ERROR_CAPTURE, + /*"["*/ ERROR_CAPTURE, + /*"\"*/ ERROR_CAPTURE, + /*"]"*/ GRAMMAR_CAPTURE, + /*"^"*/ ERROR_CAPTURE, + /*"_"*/ ERROR_CAPTURE, + /*"`"*/ ERROR_CAPTURE, + /*"a"*/ LITERAL_CAPTURE, + /*"b"*/ ERROR_CAPTURE, + /*"c"*/ ERROR_CAPTURE, + /*"d"*/ ERROR_CAPTURE, + /*"e"*/ LITERAL_CAPTURE, + /*"f"*/ LITERAL_CAPTURE, + /*"g"*/ ERROR_CAPTURE, + /*"h"*/ ERROR_CAPTURE, + /*"i"*/ ERROR_CAPTURE, + /*"j"*/ ERROR_CAPTURE, + /*"k"*/ ERROR_CAPTURE, + /*"l"*/ LITERAL_CAPTURE, + /*"m"*/ ERROR_CAPTURE, + /*"n"*/ LITERAL_CAPTURE, + /*"o"*/ ERROR_CAPTURE, + /*"p"*/ ERROR_CAPTURE, + /*"q"*/ ERROR_CAPTURE, + /*"r"*/ LITERAL_CAPTURE, + /*"s"*/ LITERAL_CAPTURE, + /*"t"*/ ERROR_CAPTURE, + /*"u"*/ LITERAL_CAPTURE, + /*"v"*/ ERROR_CAPTURE, + /*"w"*/ ERROR_CAPTURE, + /*"x"*/ ERROR_CAPTURE, + /*"y"*/ ERROR_CAPTURE, + /*"z"*/ ERROR_CAPTURE, + /*"{"*/ ERROR_CAPTURE, + /*"|"*/ ERROR_CAPTURE, + /*"}"*/ GRAMMAR_CAPTURE, + /*"~"*/ ERROR_CAPTURE, + /*DEL*/ ERROR_CAPTURE, +]; global GRAMMAR_CAPTURE_TOKEN: [Field; 128] = [ - /* NULL */ NO_TOKEN, - /* SOH */ NO_TOKEN, - /* TXT */ NO_TOKEN, - /* ETX */ NO_TOKEN, - /* EOT */ NO_TOKEN, - /* ENQ */ NO_TOKEN, - /* ACK */ NO_TOKEN, - /* BEL */ NO_TOKEN, - /* BS */ NO_TOKEN, - /* TAB */ NO_TOKEN, - /* NL */ NO_TOKEN, - /* VT */ NO_TOKEN, - /* FF */ NO_TOKEN, - /* CR */ NO_TOKEN, - /* SI */ NO_TOKEN, - /* SO */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* SPACE */ NO_TOKEN, - /*"!"*/ NO_TOKEN, - /* " */ NO_TOKEN, /* I THINK? */ - /*"#"*/ NO_TOKEN, - /*"$"*/ NO_TOKEN, - /*"%"*/ NO_TOKEN, - /*"&"*/ NO_TOKEN, - /*"'"*/ NO_TOKEN, - /*"("*/ NO_TOKEN, - /*")"*/ NO_TOKEN, - /*"*"*/ NO_TOKEN, - /*"+"*/ NO_TOKEN, - /*","*/ VALUE_SEPARATOR_TOKEN, - /*"-"*/ NO_TOKEN, - /*"."*/ NO_TOKEN, - /*"/"*/ NO_TOKEN, - /*"0"*/ NO_TOKEN, /* I THINK? */ - /*"1"*/ NO_TOKEN, /* I THINK? */ - /*"2"*/ NO_TOKEN, /* I THINK? */ - /*"3"*/ NO_TOKEN, /* I THINK? */ - /*"4"*/ NO_TOKEN, /* I THINK? */ - /*"5"*/ NO_TOKEN, /* I THINK? */ - /*"6"*/ NO_TOKEN, /* I THINK? */ - /*"7"*/ NO_TOKEN, /* I THINK? */ - /*"8"*/ NO_TOKEN, /* I THINK? */ - /*"9"*/ NO_TOKEN, /* I THINK? */ - /*":"*/ KEY_SEPARATOR_TOKEN, - /*";"*/ NO_TOKEN, - /*"<"*/ NO_TOKEN, - /*"="*/ NO_TOKEN, - /*">"*/ NO_TOKEN, - /*"?"*/ NO_TOKEN, - /*"@"*/ NO_TOKEN, - /*"A"*/ NO_TOKEN, - /*"B"*/ NO_TOKEN, - /*"C"*/ NO_TOKEN, - /*"D"*/ NO_TOKEN, - /*"E"*/ NO_TOKEN, - /*"F"*/ NO_TOKEN, - /*"G"*/ NO_TOKEN, - /*"H"*/ NO_TOKEN, - /*"I"*/ NO_TOKEN, - /*"J"*/ NO_TOKEN, - /*"K"*/ NO_TOKEN, - /*"L"*/ NO_TOKEN, - /*"M"*/ NO_TOKEN, - /*"N"*/ NO_TOKEN, - /*"O"*/ NO_TOKEN, - /*"P"*/ NO_TOKEN, - /*"Q"*/ NO_TOKEN, - /*"R"*/ NO_TOKEN, - /*"S"*/ NO_TOKEN, - /*"T"*/ NO_TOKEN, - /*"U"*/ NO_TOKEN, - /*"V"*/ NO_TOKEN, - /*"W"*/ NO_TOKEN, - /*"X"*/ NO_TOKEN, - /*"Y"*/ NO_TOKEN, - /*"Z"*/ NO_TOKEN, - /*"["*/ BEGIN_ARRAY_TOKEN, - /*"\"*/ NO_TOKEN, - /*"]"*/ END_ARRAY_TOKEN, - /*"^"*/ NO_TOKEN, - /*"_"*/ NO_TOKEN, - /*"`"*/ NO_TOKEN, - /*"a"*/ LITERAL_TOKEN, - /*"b"*/ NO_TOKEN, - /*"c"*/ NO_TOKEN, - /*"d"*/ NO_TOKEN, - /*"e"*/ LITERAL_TOKEN, - /*"f"*/ NO_TOKEN, - /*"g"*/ NO_TOKEN, - /*"h"*/ NO_TOKEN, - /*"i"*/ NO_TOKEN, - /*"j"*/ NO_TOKEN, - /*"k"*/ NO_TOKEN, - /*"l"*/ LITERAL_TOKEN, - /*"m"*/ NO_TOKEN, - /*"n"*/ LITERAL_TOKEN, - /*"o"*/ NO_TOKEN, - /*"p"*/ NO_TOKEN, - /*"q"*/ NO_TOKEN, - /*"r"*/ LITERAL_TOKEN, - /*"s"*/ LITERAL_TOKEN, - /*"t"*/ LITERAL_TOKEN, - /*"u"*/ LITERAL_TOKEN, - /*"v"*/ NO_TOKEN, - /*"w"*/ NO_TOKEN, - /*"x"*/ NO_TOKEN, - /*"y"*/ NO_TOKEN, - /*"z"*/ NO_TOKEN, - /*"{"*/ BEGIN_OBJECT_TOKEN, - /*"|"*/ NO_TOKEN, - /*"}"*/ END_OBJECT_TOKEN, - /*"~"*/ NO_TOKEN, - /*DEL*/ NO_TOKEN, - ]; + /* NULL */ NO_TOKEN, + /* SOH */ NO_TOKEN, + /* TXT */ NO_TOKEN, + /* ETX */ NO_TOKEN, + /* EOT */ NO_TOKEN, + /* ENQ */ NO_TOKEN, + /* ACK */ NO_TOKEN, + /* BEL */ NO_TOKEN, + /* BS */ NO_TOKEN, + /* TAB */ NO_TOKEN, + /* NL */ NO_TOKEN, + /* VT */ NO_TOKEN, + /* FF */ NO_TOKEN, + /* CR */ NO_TOKEN, + /* SI */ NO_TOKEN, + /* SO */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* SPACE */ NO_TOKEN, + /*"!"*/ NO_TOKEN, + /* " */ NO_TOKEN, + /* I THINK? */ + /*"#"*/ NO_TOKEN, + /*"$"*/ NO_TOKEN, + /*"%"*/ NO_TOKEN, + /*"&"*/ NO_TOKEN, + /*"'"*/ NO_TOKEN, + /*"("*/ NO_TOKEN, + /*")"*/ NO_TOKEN, + /*"*"*/ NO_TOKEN, + /*"+"*/ NO_TOKEN, + /*","*/ VALUE_SEPARATOR_TOKEN, + /*"-"*/ NO_TOKEN, + /*"."*/ NO_TOKEN, + /*"/"*/ NO_TOKEN, + /*"0"*/ NO_TOKEN, + /* I THINK? */ + /*"1"*/ NO_TOKEN, + /* I THINK? */ + /*"2"*/ NO_TOKEN, + /* I THINK? */ + /*"3"*/ NO_TOKEN, + /* I THINK? */ + /*"4"*/ NO_TOKEN, + /* I THINK? */ + /*"5"*/ NO_TOKEN, + /* I THINK? */ + /*"6"*/ NO_TOKEN, + /* I THINK? */ + /*"7"*/ NO_TOKEN, + /* I THINK? */ + /*"8"*/ NO_TOKEN, + /* I THINK? */ + /*"9"*/ NO_TOKEN, + /* I THINK? */ + /*":"*/ KEY_SEPARATOR_TOKEN, + /*";"*/ NO_TOKEN, + /*"<"*/ NO_TOKEN, + /*"="*/ NO_TOKEN, + /*">"*/ NO_TOKEN, + /*"?"*/ NO_TOKEN, + /*"@"*/ NO_TOKEN, + /*"A"*/ NO_TOKEN, + /*"B"*/ NO_TOKEN, + /*"C"*/ NO_TOKEN, + /*"D"*/ NO_TOKEN, + /*"E"*/ NO_TOKEN, + /*"F"*/ NO_TOKEN, + /*"G"*/ NO_TOKEN, + /*"H"*/ NO_TOKEN, + /*"I"*/ NO_TOKEN, + /*"J"*/ NO_TOKEN, + /*"K"*/ NO_TOKEN, + /*"L"*/ NO_TOKEN, + /*"M"*/ NO_TOKEN, + /*"N"*/ NO_TOKEN, + /*"O"*/ NO_TOKEN, + /*"P"*/ NO_TOKEN, + /*"Q"*/ NO_TOKEN, + /*"R"*/ NO_TOKEN, + /*"S"*/ NO_TOKEN, + /*"T"*/ NO_TOKEN, + /*"U"*/ NO_TOKEN, + /*"V"*/ NO_TOKEN, + /*"W"*/ NO_TOKEN, + /*"X"*/ NO_TOKEN, + /*"Y"*/ NO_TOKEN, + /*"Z"*/ NO_TOKEN, + /*"["*/ BEGIN_ARRAY_TOKEN, + /*"\"*/ NO_TOKEN, + /*"]"*/ END_ARRAY_TOKEN, + /*"^"*/ NO_TOKEN, + /*"_"*/ NO_TOKEN, + /*"`"*/ NO_TOKEN, + /*"a"*/ LITERAL_TOKEN, + /*"b"*/ NO_TOKEN, + /*"c"*/ NO_TOKEN, + /*"d"*/ NO_TOKEN, + /*"e"*/ LITERAL_TOKEN, + /*"f"*/ NO_TOKEN, + /*"g"*/ NO_TOKEN, + /*"h"*/ NO_TOKEN, + /*"i"*/ NO_TOKEN, + /*"j"*/ NO_TOKEN, + /*"k"*/ NO_TOKEN, + /*"l"*/ LITERAL_TOKEN, + /*"m"*/ NO_TOKEN, + /*"n"*/ LITERAL_TOKEN, + /*"o"*/ NO_TOKEN, + /*"p"*/ NO_TOKEN, + /*"q"*/ NO_TOKEN, + /*"r"*/ LITERAL_TOKEN, + /*"s"*/ LITERAL_TOKEN, + /*"t"*/ LITERAL_TOKEN, + /*"u"*/ LITERAL_TOKEN, + /*"v"*/ NO_TOKEN, + /*"w"*/ NO_TOKEN, + /*"x"*/ NO_TOKEN, + /*"y"*/ NO_TOKEN, + /*"z"*/ NO_TOKEN, + /*"{"*/ BEGIN_OBJECT_TOKEN, + /*"|"*/ NO_TOKEN, + /*"}"*/ END_OBJECT_TOKEN, + /*"~"*/ NO_TOKEN, + /*DEL*/ NO_TOKEN, +]; global GRAMMAR_CAPTURE_PUSH_TRANSCRIPT: [bool; 128] = [ - /* NULL */ false, - /* SOH */ false, - /* TXT */ false, - /* ETX */ false, - /* EOT */ false, - /* ENQ */ false, - /* ACK */ false, - /* BEL */ false, - /* BS */ false, - /* TAB */ false, - /* NL */ false, - /* VT */ false, - /* FF */ false, - /* CR */ false, - /* SI */ false, - /* SO */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* SPACE */ false, - /*"!"*/ false, - /* " */ false, /* I THINK? */ - /*"#"*/ false, - /*"$"*/ false, - /*"%"*/ false, - /*"&"*/ false, - /*"'"*/ false, - /*"("*/ false, - /*")"*/ false, - /*"*"*/ false, - /*"+"*/ false, - /*","*/ true, - /*"-"*/ false, - /*"."*/ false, - /*"/"*/ false, - /*"0"*/ false, /* I THINK? */ - /*"1"*/ false, /* I THINK? */ - /*"2"*/ false, /* I THINK? */ - /*"3"*/ false, /* I THINK? */ - /*"4"*/ false, /* I THINK? */ - /*"5"*/ false, /* I THINK? */ - /*"6"*/ false, /* I THINK? */ - /*"7"*/ false, /* I THINK? */ - /*"8"*/ false, /* I THINK? */ - /*"9"*/ false, /* I THINK? */ - /*":"*/ true, - /*";"*/ false, - /*"<"*/ false, - /*"="*/ false, - /*">"*/ false, - /*"?"*/ false, - /*"@"*/ false, - /*"A"*/ false, - /*"B"*/ false, - /*"C"*/ false, - /*"D"*/ false, - /*"E"*/ false, - /*"F"*/ false, - /*"G"*/ false, - /*"H"*/ false, - /*"I"*/ false, - /*"J"*/ false, - /*"K"*/ false, - /*"L"*/ false, - /*"M"*/ false, - /*"N"*/ false, - /*"O"*/ false, - /*"P"*/ false, - /*"Q"*/ false, - /*"R"*/ false, - /*"S"*/ false, - /*"T"*/ false, - /*"U"*/ false, - /*"V"*/ false, - /*"W"*/ false, - /*"X"*/ false, - /*"Y"*/ false, - /*"Z"*/ false, - /*"["*/ true, - /*"\"*/ false, - /*"]"*/ true, - /*"^"*/ false, - /*"_"*/ false, - /*"`"*/ false, - /*"a"*/ false, - /*"b"*/ false, - /*"c"*/ false, - /*"d"*/ false, - /*"e"*/ false, - /*"f"*/ false, - /*"g"*/ false, - /*"h"*/ false, - /*"i"*/ false, - /*"j"*/ false, - /*"k"*/ false, - /*"l"*/ false, - /*"m"*/ false, - /*"n"*/ false, - /*"o"*/ false, - /*"p"*/ false, - /*"q"*/ false, - /*"r"*/ false, - /*"s"*/ false, - /*"t"*/ false, - /*"u"*/ false, - /*"v"*/ false, - /*"w"*/ false, - /*"x"*/ false, - /*"y"*/ false, - /*"z"*/ false, - /*"{"*/ true, - /*"|"*/ false, - /*"}"*/ true, - /*"~"*/ false, - /*DEL*/ false, - ]; + /* NULL */ false, + /* SOH */ false, + /* TXT */ false, + /* ETX */ false, + /* EOT */ false, + /* ENQ */ false, + /* ACK */ false, + /* BEL */ false, + /* BS */ false, + /* TAB */ false, + /* NL */ false, + /* VT */ false, + /* FF */ false, + /* CR */ false, + /* SI */ false, + /* SO */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* SPACE */ false, + /*"!"*/ false, + /* " */ false, + /* I THINK? */ + /*"#"*/ false, + /*"$"*/ false, + /*"%"*/ false, + /*"&"*/ false, + /*"'"*/ false, + /*"("*/ false, + /*")"*/ false, + /*"*"*/ false, + /*"+"*/ false, + /*","*/ true, + /*"-"*/ false, + /*"."*/ false, + /*"/"*/ false, + /*"0"*/ false, + /* I THINK? */ + /*"1"*/ false, + /* I THINK? */ + /*"2"*/ false, + /* I THINK? */ + /*"3"*/ false, + /* I THINK? */ + /*"4"*/ false, + /* I THINK? */ + /*"5"*/ false, + /* I THINK? */ + /*"6"*/ false, + /* I THINK? */ + /*"7"*/ false, + /* I THINK? */ + /*"8"*/ false, + /* I THINK? */ + /*"9"*/ false, + /* I THINK? */ + /*":"*/ true, + /*";"*/ false, + /*"<"*/ false, + /*"="*/ false, + /*">"*/ false, + /*"?"*/ false, + /*"@"*/ false, + /*"A"*/ false, + /*"B"*/ false, + /*"C"*/ false, + /*"D"*/ false, + /*"E"*/ false, + /*"F"*/ false, + /*"G"*/ false, + /*"H"*/ false, + /*"I"*/ false, + /*"J"*/ false, + /*"K"*/ false, + /*"L"*/ false, + /*"M"*/ false, + /*"N"*/ false, + /*"O"*/ false, + /*"P"*/ false, + /*"Q"*/ false, + /*"R"*/ false, + /*"S"*/ false, + /*"T"*/ false, + /*"U"*/ false, + /*"V"*/ false, + /*"W"*/ false, + /*"X"*/ false, + /*"Y"*/ false, + /*"Z"*/ false, + /*"["*/ true, + /*"\"*/ false, + /*"]"*/ true, + /*"^"*/ false, + /*"_"*/ false, + /*"`"*/ false, + /*"a"*/ false, + /*"b"*/ false, + /*"c"*/ false, + /*"d"*/ false, + /*"e"*/ false, + /*"f"*/ false, + /*"g"*/ false, + /*"h"*/ false, + /*"i"*/ false, + /*"j"*/ false, + /*"k"*/ false, + /*"l"*/ false, + /*"m"*/ false, + /*"n"*/ false, + /*"o"*/ false, + /*"p"*/ false, + /*"q"*/ false, + /*"r"*/ false, + /*"s"*/ false, + /*"t"*/ false, + /*"u"*/ false, + /*"v"*/ false, + /*"w"*/ false, + /*"x"*/ false, + /*"y"*/ false, + /*"z"*/ false, + /*"{"*/ true, + /*"|"*/ false, + /*"}"*/ true, + /*"~"*/ false, + /*DEL*/ false, +]; global GRAMMAR_CAPTURE_INCREASE_LENGTH: [bool; 128] = [ - /* NULL */ false, - /* SOH */ false, - /* TXT */ false, - /* ETX */ false, - /* EOT */ false, - /* ENQ */ false, - /* ACK */ false, - /* BEL */ false, - /* BS */ false, - /* TAB */ false, - /* NL */ false, - /* VT */ false, - /* FF */ false, - /* CR */ false, - /* SI */ false, - /* SO */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* SPACE */ false, - /*"!"*/ false, - /* " */ false, /* I THINK? */ - /*"#"*/ false, - /*"$"*/ false, - /*"%"*/ false, - /*"&"*/ false, - /*"'"*/ false, - /*"("*/ false, - /*")"*/ false, - /*"*"*/ false, - /*"+"*/ false, - /*","*/ false, - /*"-"*/ false, - /*"."*/ false, - /*"/"*/ false, - /*"0"*/ true, /* I THINK? */ - /*"1"*/ true, /* I THINK? */ - /*"2"*/ true, /* I THINK? */ - /*"3"*/ true, /* I THINK? */ - /*"4"*/ true, /* I THINK? */ - /*"5"*/ true, /* I THINK? */ - /*"6"*/ true, /* I THINK? */ - /*"7"*/ true, /* I THINK? */ - /*"8"*/ true, /* I THINK? */ - /*"9"*/ true, /* I THINK? */ - /*":"*/ false, - /*";"*/ false, - /*"<"*/ false, - /*"="*/ false, - /*">"*/ false, - /*"?"*/ false, - /*"@"*/ false, - /*"A"*/ false, - /*"B"*/ false, - /*"C"*/ false, - /*"D"*/ false, - /*"E"*/ false, - /*"F"*/ false, - /*"G"*/ false, - /*"H"*/ false, - /*"I"*/ false, - /*"J"*/ false, - /*"K"*/ false, - /*"L"*/ false, - /*"M"*/ false, - /*"N"*/ false, - /*"O"*/ false, - /*"P"*/ false, - /*"Q"*/ false, - /*"R"*/ false, - /*"S"*/ false, - /*"T"*/ false, - /*"U"*/ false, - /*"V"*/ false, - /*"W"*/ false, - /*"X"*/ false, - /*"Y"*/ false, - /*"Z"*/ false, - /*"["*/ false, - /*"\"*/ false, - /*"]"*/ false, - /*"^"*/ false, - /*"_"*/ false, - /*"`"*/ false, - /*"a"*/ true, - /*"b"*/ false, - /*"c"*/ false, - /*"d"*/ false, - /*"e"*/ true, - /*"f"*/ true, - /*"g"*/ false, - /*"h"*/ false, - /*"i"*/ false, - /*"j"*/ false, - /*"k"*/ false, - /*"l"*/ true, - /*"m"*/ false, - /*"n"*/ true, - /*"o"*/ false, - /*"p"*/ false, - /*"q"*/ false, - /*"r"*/ false, - /*"s"*/ true, - /*"t"*/ true, - /*"u"*/ true, - /*"v"*/ false, - /*"w"*/ false, - /*"x"*/ false, - /*"y"*/ false, - /*"z"*/ false, - /*"{"*/ false, - /*"|"*/ false, - /*"}"*/ false, - /*"~"*/ false, - /*DEL*/ false, - ]; + /* NULL */ false, + /* SOH */ false, + /* TXT */ false, + /* ETX */ false, + /* EOT */ false, + /* ENQ */ false, + /* ACK */ false, + /* BEL */ false, + /* BS */ false, + /* TAB */ false, + /* NL */ false, + /* VT */ false, + /* FF */ false, + /* CR */ false, + /* SI */ false, + /* SO */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* SPACE */ false, + /*"!"*/ false, + /* " */ false, + /* I THINK? */ + /*"#"*/ false, + /*"$"*/ false, + /*"%"*/ false, + /*"&"*/ false, + /*"'"*/ false, + /*"("*/ false, + /*")"*/ false, + /*"*"*/ false, + /*"+"*/ false, + /*","*/ false, + /*"-"*/ false, + /*"."*/ false, + /*"/"*/ false, + /*"0"*/ true, + /* I THINK? */ + /*"1"*/ true, + /* I THINK? */ + /*"2"*/ true, + /* I THINK? */ + /*"3"*/ true, + /* I THINK? */ + /*"4"*/ true, + /* I THINK? */ + /*"5"*/ true, + /* I THINK? */ + /*"6"*/ true, + /* I THINK? */ + /*"7"*/ true, + /* I THINK? */ + /*"8"*/ true, + /* I THINK? */ + /*"9"*/ true, + /* I THINK? */ + /*":"*/ false, + /*";"*/ false, + /*"<"*/ false, + /*"="*/ false, + /*">"*/ false, + /*"?"*/ false, + /*"@"*/ false, + /*"A"*/ false, + /*"B"*/ false, + /*"C"*/ false, + /*"D"*/ false, + /*"E"*/ false, + /*"F"*/ false, + /*"G"*/ false, + /*"H"*/ false, + /*"I"*/ false, + /*"J"*/ false, + /*"K"*/ false, + /*"L"*/ false, + /*"M"*/ false, + /*"N"*/ false, + /*"O"*/ false, + /*"P"*/ false, + /*"Q"*/ false, + /*"R"*/ false, + /*"S"*/ false, + /*"T"*/ false, + /*"U"*/ false, + /*"V"*/ false, + /*"W"*/ false, + /*"X"*/ false, + /*"Y"*/ false, + /*"Z"*/ false, + /*"["*/ false, + /*"\"*/ false, + /*"]"*/ false, + /*"^"*/ false, + /*"_"*/ false, + /*"`"*/ false, + /*"a"*/ true, + /*"b"*/ false, + /*"c"*/ false, + /*"d"*/ false, + /*"e"*/ true, + /*"f"*/ true, + /*"g"*/ false, + /*"h"*/ false, + /*"i"*/ false, + /*"j"*/ false, + /*"k"*/ false, + /*"l"*/ true, + /*"m"*/ false, + /*"n"*/ true, + /*"o"*/ false, + /*"p"*/ false, + /*"q"*/ false, + /*"r"*/ false, + /*"s"*/ true, + /*"t"*/ true, + /*"u"*/ true, + /*"v"*/ false, + /*"w"*/ false, + /*"x"*/ false, + /*"y"*/ false, + /*"z"*/ false, + /*"{"*/ false, + /*"|"*/ false, + /*"}"*/ false, + /*"~"*/ false, + /*DEL*/ false, +]; global STRING_CAPTURE_TOKEN: [Field; 128] = [ - /* NULL */ NO_TOKEN, - /* SOH */ NO_TOKEN, - /* TXT */ NO_TOKEN, - /* ETX */ NO_TOKEN, - /* EOT */ NO_TOKEN, - /* ENQ */ NO_TOKEN, - /* ACK */ NO_TOKEN, - /* BEL */ NO_TOKEN, - /* BS */ NO_TOKEN, - /* TAB */ NO_TOKEN, - /* NL */ NO_TOKEN, - /* VT */ NO_TOKEN, - /* FF */ NO_TOKEN, - /* CR */ NO_TOKEN, - /* SI */ NO_TOKEN, - /* SO */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* SPACE */ NO_TOKEN, - /*"!"*/ NO_TOKEN, - /* " */ STRING_TOKEN, /* I THINK? */ - /*"#"*/ NO_TOKEN, - /*"$"*/ NO_TOKEN, - /*"%"*/ NO_TOKEN, - /*"&"*/ NO_TOKEN, - /*"'"*/ NO_TOKEN, - /*"("*/ NO_TOKEN, - /*")"*/ NO_TOKEN, - /*"*"*/ NO_TOKEN, - /*"+"*/ NO_TOKEN, - /*","*/ NO_TOKEN, - /*"-"*/ NO_TOKEN, - /*"."*/ NO_TOKEN, - /*"/"*/ NO_TOKEN, - /*"0"*/ NO_TOKEN, /* I THINK? */ - /*"1"*/ NO_TOKEN, /* I THINK? */ - /*"2"*/ NO_TOKEN, /* I THINK? */ - /*"3"*/ NO_TOKEN, /* I THINK? */ - /*"4"*/ NO_TOKEN, /* I THINK? */ - /*"5"*/ NO_TOKEN, /* I THINK? */ - /*"6"*/ NO_TOKEN, /* I THINK? */ - /*"7"*/ NO_TOKEN, /* I THINK? */ - /*"8"*/ NO_TOKEN, /* I THINK? */ - /*"9"*/ NO_TOKEN, /* I THINK? */ - /*":"*/ NO_TOKEN, - /*";"*/ NO_TOKEN, - /*"<"*/ NO_TOKEN, - /*"="*/ NO_TOKEN, - /*">"*/ NO_TOKEN, - /*"?"*/ NO_TOKEN, - /*"@"*/ NO_TOKEN, - /*"A"*/ NO_TOKEN, - /*"B"*/ NO_TOKEN, - /*"C"*/ NO_TOKEN, - /*"D"*/ NO_TOKEN, - /*"E"*/ NO_TOKEN, - /*"F"*/ NO_TOKEN, - /*"G"*/ NO_TOKEN, - /*"H"*/ NO_TOKEN, - /*"I"*/ NO_TOKEN, - /*"J"*/ NO_TOKEN, - /*"K"*/ NO_TOKEN, - /*"L"*/ NO_TOKEN, - /*"M"*/ NO_TOKEN, - /*"N"*/ NO_TOKEN, - /*"O"*/ NO_TOKEN, - /*"P"*/ NO_TOKEN, - /*"Q"*/ NO_TOKEN, - /*"R"*/ NO_TOKEN, - /*"S"*/ NO_TOKEN, - /*"T"*/ NO_TOKEN, - /*"U"*/ NO_TOKEN, - /*"V"*/ NO_TOKEN, - /*"W"*/ NO_TOKEN, - /*"X"*/ NO_TOKEN, - /*"Y"*/ NO_TOKEN, - /*"Z"*/ NO_TOKEN, - /*"["*/ NO_TOKEN, - /*"\"*/ NO_TOKEN, - /*"]"*/ NO_TOKEN, - /*"^"*/ NO_TOKEN, - /*"_"*/ NO_TOKEN, - /*"`"*/ NO_TOKEN, - /*"a"*/ NO_TOKEN, - /*"b"*/ NO_TOKEN, - /*"c"*/ NO_TOKEN, - /*"d"*/ NO_TOKEN, - /*"e"*/ NO_TOKEN, - /*"f"*/ NO_TOKEN, - /*"g"*/ NO_TOKEN, - /*"h"*/ NO_TOKEN, - /*"i"*/ NO_TOKEN, - /*"j"*/ NO_TOKEN, - /*"k"*/ NO_TOKEN, - /*"l"*/ NO_TOKEN, - /*"m"*/ NO_TOKEN, - /*"n"*/ NO_TOKEN, - /*"o"*/ NO_TOKEN, - /*"p"*/ NO_TOKEN, - /*"q"*/ NO_TOKEN, - /*"r"*/ NO_TOKEN, - /*"s"*/ NO_TOKEN, - /*"t"*/ NO_TOKEN, - /*"u"*/ NO_TOKEN, - /*"v"*/ NO_TOKEN, - /*"w"*/ NO_TOKEN, - /*"x"*/ NO_TOKEN, - /*"y"*/ NO_TOKEN, - /*"z"*/ NO_TOKEN, - /*"{"*/ NO_TOKEN, - /*"|"*/ NO_TOKEN, - /*"}"*/ NO_TOKEN, - /*"~"*/ NO_TOKEN, - /*DEL*/ NO_TOKEN, - ]; + /* NULL */ NO_TOKEN, + /* SOH */ NO_TOKEN, + /* TXT */ NO_TOKEN, + /* ETX */ NO_TOKEN, + /* EOT */ NO_TOKEN, + /* ENQ */ NO_TOKEN, + /* ACK */ NO_TOKEN, + /* BEL */ NO_TOKEN, + /* BS */ NO_TOKEN, + /* TAB */ NO_TOKEN, + /* NL */ NO_TOKEN, + /* VT */ NO_TOKEN, + /* FF */ NO_TOKEN, + /* CR */ NO_TOKEN, + /* SI */ NO_TOKEN, + /* SO */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* SPACE */ NO_TOKEN, + /*"!"*/ NO_TOKEN, + /* " */ STRING_TOKEN, + /* I THINK? */ + /*"#"*/ NO_TOKEN, + /*"$"*/ NO_TOKEN, + /*"%"*/ NO_TOKEN, + /*"&"*/ NO_TOKEN, + /*"'"*/ NO_TOKEN, + /*"("*/ NO_TOKEN, + /*")"*/ NO_TOKEN, + /*"*"*/ NO_TOKEN, + /*"+"*/ NO_TOKEN, + /*","*/ NO_TOKEN, + /*"-"*/ NO_TOKEN, + /*"."*/ NO_TOKEN, + /*"/"*/ NO_TOKEN, + /*"0"*/ NO_TOKEN, + /* I THINK? */ + /*"1"*/ NO_TOKEN, + /* I THINK? */ + /*"2"*/ NO_TOKEN, + /* I THINK? */ + /*"3"*/ NO_TOKEN, + /* I THINK? */ + /*"4"*/ NO_TOKEN, + /* I THINK? */ + /*"5"*/ NO_TOKEN, + /* I THINK? */ + /*"6"*/ NO_TOKEN, + /* I THINK? */ + /*"7"*/ NO_TOKEN, + /* I THINK? */ + /*"8"*/ NO_TOKEN, + /* I THINK? */ + /*"9"*/ NO_TOKEN, + /* I THINK? */ + /*":"*/ NO_TOKEN, + /*";"*/ NO_TOKEN, + /*"<"*/ NO_TOKEN, + /*"="*/ NO_TOKEN, + /*">"*/ NO_TOKEN, + /*"?"*/ NO_TOKEN, + /*"@"*/ NO_TOKEN, + /*"A"*/ NO_TOKEN, + /*"B"*/ NO_TOKEN, + /*"C"*/ NO_TOKEN, + /*"D"*/ NO_TOKEN, + /*"E"*/ NO_TOKEN, + /*"F"*/ NO_TOKEN, + /*"G"*/ NO_TOKEN, + /*"H"*/ NO_TOKEN, + /*"I"*/ NO_TOKEN, + /*"J"*/ NO_TOKEN, + /*"K"*/ NO_TOKEN, + /*"L"*/ NO_TOKEN, + /*"M"*/ NO_TOKEN, + /*"N"*/ NO_TOKEN, + /*"O"*/ NO_TOKEN, + /*"P"*/ NO_TOKEN, + /*"Q"*/ NO_TOKEN, + /*"R"*/ NO_TOKEN, + /*"S"*/ NO_TOKEN, + /*"T"*/ NO_TOKEN, + /*"U"*/ NO_TOKEN, + /*"V"*/ NO_TOKEN, + /*"W"*/ NO_TOKEN, + /*"X"*/ NO_TOKEN, + /*"Y"*/ NO_TOKEN, + /*"Z"*/ NO_TOKEN, + /*"["*/ NO_TOKEN, + /*"\"*/ NO_TOKEN, + /*"]"*/ NO_TOKEN, + /*"^"*/ NO_TOKEN, + /*"_"*/ NO_TOKEN, + /*"`"*/ NO_TOKEN, + /*"a"*/ NO_TOKEN, + /*"b"*/ NO_TOKEN, + /*"c"*/ NO_TOKEN, + /*"d"*/ NO_TOKEN, + /*"e"*/ NO_TOKEN, + /*"f"*/ NO_TOKEN, + /*"g"*/ NO_TOKEN, + /*"h"*/ NO_TOKEN, + /*"i"*/ NO_TOKEN, + /*"j"*/ NO_TOKEN, + /*"k"*/ NO_TOKEN, + /*"l"*/ NO_TOKEN, + /*"m"*/ NO_TOKEN, + /*"n"*/ NO_TOKEN, + /*"o"*/ NO_TOKEN, + /*"p"*/ NO_TOKEN, + /*"q"*/ NO_TOKEN, + /*"r"*/ NO_TOKEN, + /*"s"*/ NO_TOKEN, + /*"t"*/ NO_TOKEN, + /*"u"*/ NO_TOKEN, + /*"v"*/ NO_TOKEN, + /*"w"*/ NO_TOKEN, + /*"x"*/ NO_TOKEN, + /*"y"*/ NO_TOKEN, + /*"z"*/ NO_TOKEN, + /*"{"*/ NO_TOKEN, + /*"|"*/ NO_TOKEN, + /*"}"*/ NO_TOKEN, + /*"~"*/ NO_TOKEN, + /*DEL*/ NO_TOKEN, +]; global STRING_CAPTURE_PUSH_TRANSCRIPT: [bool; 128] = [ - /* NULL */ false, - /* SOH */ false, - /* TXT */ false, - /* ETX */ false, - /* EOT */ false, - /* ENQ */ false, - /* ACK */ false, - /* BEL */ false, - /* BS */ false, - /* TAB */ false, - /* NL */ false, - /* VT */ false, - /* FF */ false, - /* CR */ false, - /* SI */ false, - /* SO */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* SPACE */ false, - /*"!"*/ false, - /* " */ true, /* I THINK? */ - /*"#"*/ false, - /*"$"*/ false, - /*"%"*/ false, - /*"&"*/ false, - /*"'"*/ false, - /*"("*/ false, - /*")"*/ false, - /*"*"*/ false, - /*"+"*/ false, - /*","*/ false, - /*"-"*/ false, - /*"."*/ false, - /*"/"*/ false, - /*"0"*/ false, /* I THINK? */ - /*"1"*/ false, /* I THINK? */ - /*"2"*/ false, /* I THINK? */ - /*"3"*/ false, /* I THINK? */ - /*"4"*/ false, /* I THINK? */ - /*"5"*/ false, /* I THINK? */ - /*"6"*/ false, /* I THINK? */ - /*"7"*/ false, /* I THINK? */ - /*"8"*/ false, /* I THINK? */ - /*"9"*/ false, /* I THINK? */ - /*":"*/ false, - /*";"*/ false, - /*"<"*/ false, - /*"="*/ false, - /*">"*/ false, - /*"?"*/ false, - /*"@"*/ false, - /*"A"*/ false, - /*"B"*/ false, - /*"C"*/ false, - /*"D"*/ false, - /*"E"*/ false, - /*"F"*/ false, - /*"G"*/ false, - /*"H"*/ false, - /*"I"*/ false, - /*"J"*/ false, - /*"K"*/ false, - /*"L"*/ false, - /*"M"*/ false, - /*"N"*/ false, - /*"O"*/ false, - /*"P"*/ false, - /*"Q"*/ false, - /*"R"*/ false, - /*"S"*/ false, - /*"T"*/ false, - /*"U"*/ false, - /*"V"*/ false, - /*"W"*/ false, - /*"X"*/ false, - /*"Y"*/ false, - /*"Z"*/ false, - /*"["*/ false, - /*"\"*/ false, - /*"]"*/ false, - /*"^"*/ false, - /*"_"*/ false, - /*"`"*/ false, - /*"a"*/ false, - /*"b"*/ false, - /*"c"*/ false, - /*"d"*/ false, - /*"e"*/ false, - /*"f"*/ false, - /*"g"*/ false, - /*"h"*/ false, - /*"i"*/ false, - /*"j"*/ false, - /*"k"*/ false, - /*"l"*/ false, - /*"m"*/ false, - /*"n"*/ false, - /*"o"*/ false, - /*"p"*/ false, - /*"q"*/ false, - /*"r"*/ false, - /*"s"*/ false, - /*"t"*/ false, - /*"u"*/ false, - /*"v"*/ false, - /*"w"*/ false, - /*"x"*/ false, - /*"y"*/ false, - /*"z"*/ false, - /*"{"*/ false, - /*"|"*/ false, - /*"}"*/ false, - /*"~"*/ false, - /*DEL*/ false, - ]; + /* NULL */ false, + /* SOH */ false, + /* TXT */ false, + /* ETX */ false, + /* EOT */ false, + /* ENQ */ false, + /* ACK */ false, + /* BEL */ false, + /* BS */ false, + /* TAB */ false, + /* NL */ false, + /* VT */ false, + /* FF */ false, + /* CR */ false, + /* SI */ false, + /* SO */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* SPACE */ false, + /*"!"*/ false, + /* " */ true, + /* I THINK? */ + /*"#"*/ false, + /*"$"*/ false, + /*"%"*/ false, + /*"&"*/ false, + /*"'"*/ false, + /*"("*/ false, + /*")"*/ false, + /*"*"*/ false, + /*"+"*/ false, + /*","*/ false, + /*"-"*/ false, + /*"."*/ false, + /*"/"*/ false, + /*"0"*/ false, + /* I THINK? */ + /*"1"*/ false, + /* I THINK? */ + /*"2"*/ false, + /* I THINK? */ + /*"3"*/ false, + /* I THINK? */ + /*"4"*/ false, + /* I THINK? */ + /*"5"*/ false, + /* I THINK? */ + /*"6"*/ false, + /* I THINK? */ + /*"7"*/ false, + /* I THINK? */ + /*"8"*/ false, + /* I THINK? */ + /*"9"*/ false, + /* I THINK? */ + /*":"*/ false, + /*";"*/ false, + /*"<"*/ false, + /*"="*/ false, + /*">"*/ false, + /*"?"*/ false, + /*"@"*/ false, + /*"A"*/ false, + /*"B"*/ false, + /*"C"*/ false, + /*"D"*/ false, + /*"E"*/ false, + /*"F"*/ false, + /*"G"*/ false, + /*"H"*/ false, + /*"I"*/ false, + /*"J"*/ false, + /*"K"*/ false, + /*"L"*/ false, + /*"M"*/ false, + /*"N"*/ false, + /*"O"*/ false, + /*"P"*/ false, + /*"Q"*/ false, + /*"R"*/ false, + /*"S"*/ false, + /*"T"*/ false, + /*"U"*/ false, + /*"V"*/ false, + /*"W"*/ false, + /*"X"*/ false, + /*"Y"*/ false, + /*"Z"*/ false, + /*"["*/ false, + /*"\"*/ false, + /*"]"*/ false, + /*"^"*/ false, + /*"_"*/ false, + /*"`"*/ false, + /*"a"*/ false, + /*"b"*/ false, + /*"c"*/ false, + /*"d"*/ false, + /*"e"*/ false, + /*"f"*/ false, + /*"g"*/ false, + /*"h"*/ false, + /*"i"*/ false, + /*"j"*/ false, + /*"k"*/ false, + /*"l"*/ false, + /*"m"*/ false, + /*"n"*/ false, + /*"o"*/ false, + /*"p"*/ false, + /*"q"*/ false, + /*"r"*/ false, + /*"s"*/ false, + /*"t"*/ false, + /*"u"*/ false, + /*"v"*/ false, + /*"w"*/ false, + /*"x"*/ false, + /*"y"*/ false, + /*"z"*/ false, + /*"{"*/ false, + /*"|"*/ false, + /*"}"*/ false, + /*"~"*/ false, + /*DEL*/ false, +]; global STRING_CAPTURE_INCREASE_LENGTH: [bool; 128] = [ - /* NULL */ false, - /* SOH */ false, - /* TXT */ false, - /* ETX */ false, - /* EOT */ false, - /* ENQ */ false, - /* ACK */ false, - /* BEL */ false, - /* BS */ false, - /* TAB */ false, - /* NL */ false, - /* VT */ false, - /* FF */ false, - /* CR */ false, - /* SI */ false, - /* SO */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* SPACE */ true, - /*"!"*/ true, - /* " */ false, /* I THINK? */ - /*"#"*/ true, - /*"$"*/ true, - /*"%"*/ true, - /*"&"*/ true, - /*"'"*/ true, - /*"("*/ true, - /*")"*/ true, - /*"*"*/ true, - /*"+"*/ true, - /*","*/ true, - /*"-"*/ true, - /*"."*/ true, - /*"/"*/ true, - /*"0"*/ true, /* I THINK? */ - /*"1"*/ true, /* I THINK? */ - /*"2"*/ true, /* I THINK? */ - /*"3"*/ true, /* I THINK? */ - /*"4"*/ true, /* I THINK? */ - /*"5"*/ true, /* I THINK? */ - /*"6"*/ true, /* I THINK? */ - /*"7"*/ true, /* I THINK? */ - /*"8"*/ true, /* I THINK? */ - /*"9"*/ true, /* I THINK? */ - /*":"*/ true, - /*";"*/ true, - /*"<"*/ true, - /*"="*/ true, - /*">"*/ true, - /*"?"*/ true, - /*"@"*/ true, - /*"A"*/ true, - /*"B"*/ true, - /*"C"*/ true, - /*"D"*/ true, - /*"E"*/ true, - /*"F"*/ true, - /*"G"*/ true, - /*"H"*/ true, - /*"I"*/ true, - /*"J"*/ true, - /*"K"*/ true, - /*"L"*/ true, - /*"M"*/ true, - /*"N"*/ true, - /*"O"*/ true, - /*"P"*/ true, - /*"Q"*/ true, - /*"R"*/ true, - /*"S"*/ true, - /*"T"*/ true, - /*"U"*/ true, - /*"V"*/ true, - /*"W"*/ true, - /*"X"*/ true, - /*"Y"*/ true, - /*"Z"*/ true, - /*"["*/ true, - /*"\"*/ true, - /*"]"*/ true, - /*"^"*/ true, - /*"_"*/ true, - /*"`"*/ true, - /*"a"*/ true, - /*"b"*/ true, - /*"c"*/ true, - /*"d"*/ true, - /*"e"*/ true, - /*"f"*/ true, - /*"g"*/ true, - /*"h"*/ true, - /*"i"*/ true, - /*"j"*/ true, - /*"k"*/ true, - /*"l"*/ true, - /*"m"*/ true, - /*"n"*/ true, - /*"o"*/ true, - /*"p"*/ true, - /*"q"*/ true, - /*"r"*/ true, - /*"s"*/ true, - /*"t"*/ true, - /*"u"*/ true, - /*"v"*/ true, - /*"w"*/ true, - /*"x"*/ true, - /*"y"*/ true, - /*"z"*/ true, - /*"{"*/ true, - /*"|"*/ true, - /*"}"*/ true, - /*"~"*/ true, - /*DEL*/ false, - ]; + /* NULL */ false, + /* SOH */ false, + /* TXT */ false, + /* ETX */ false, + /* EOT */ false, + /* ENQ */ false, + /* ACK */ false, + /* BEL */ false, + /* BS */ false, + /* TAB */ false, + /* NL */ false, + /* VT */ false, + /* FF */ false, + /* CR */ false, + /* SI */ false, + /* SO */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* SPACE */ true, + /*"!"*/ true, + /* " */ false, + /* I THINK? */ + /*"#"*/ true, + /*"$"*/ true, + /*"%"*/ true, + /*"&"*/ true, + /*"'"*/ true, + /*"("*/ true, + /*")"*/ true, + /*"*"*/ true, + /*"+"*/ true, + /*","*/ true, + /*"-"*/ true, + /*"."*/ true, + /*"/"*/ true, + /*"0"*/ true, + /* I THINK? */ + /*"1"*/ true, + /* I THINK? */ + /*"2"*/ true, + /* I THINK? */ + /*"3"*/ true, + /* I THINK? */ + /*"4"*/ true, + /* I THINK? */ + /*"5"*/ true, + /* I THINK? */ + /*"6"*/ true, + /* I THINK? */ + /*"7"*/ true, + /* I THINK? */ + /*"8"*/ true, + /* I THINK? */ + /*"9"*/ true, + /* I THINK? */ + /*":"*/ true, + /*";"*/ true, + /*"<"*/ true, + /*"="*/ true, + /*">"*/ true, + /*"?"*/ true, + /*"@"*/ true, + /*"A"*/ true, + /*"B"*/ true, + /*"C"*/ true, + /*"D"*/ true, + /*"E"*/ true, + /*"F"*/ true, + /*"G"*/ true, + /*"H"*/ true, + /*"I"*/ true, + /*"J"*/ true, + /*"K"*/ true, + /*"L"*/ true, + /*"M"*/ true, + /*"N"*/ true, + /*"O"*/ true, + /*"P"*/ true, + /*"Q"*/ true, + /*"R"*/ true, + /*"S"*/ true, + /*"T"*/ true, + /*"U"*/ true, + /*"V"*/ true, + /*"W"*/ true, + /*"X"*/ true, + /*"Y"*/ true, + /*"Z"*/ true, + /*"["*/ true, + /*"\"*/ true, + /*"]"*/ true, + /*"^"*/ true, + /*"_"*/ true, + /*"`"*/ true, + /*"a"*/ true, + /*"b"*/ true, + /*"c"*/ true, + /*"d"*/ true, + /*"e"*/ true, + /*"f"*/ true, + /*"g"*/ true, + /*"h"*/ true, + /*"i"*/ true, + /*"j"*/ true, + /*"k"*/ true, + /*"l"*/ true, + /*"m"*/ true, + /*"n"*/ true, + /*"o"*/ true, + /*"p"*/ true, + /*"q"*/ true, + /*"r"*/ true, + /*"s"*/ true, + /*"t"*/ true, + /*"u"*/ true, + /*"v"*/ true, + /*"w"*/ true, + /*"x"*/ true, + /*"y"*/ true, + /*"z"*/ true, + /*"{"*/ true, + /*"|"*/ true, + /*"}"*/ true, + /*"~"*/ true, + /*DEL*/ false, +]; global NUMERIC_CAPTURE_TOKEN: [Field; 128] = [ - /* NULL */ NO_TOKEN, - /* SOH */ NO_TOKEN, - /* TXT */ NO_TOKEN, - /* ETX */ NO_TOKEN, - /* EOT */ NO_TOKEN, - /* ENQ */ NO_TOKEN, - /* ACK */ NO_TOKEN, - /* BEL */ NO_TOKEN, - /* BS */ NO_TOKEN, - /* TAB */ NUMERIC_TOKEN, - /* NL */ NUMERIC_TOKEN, - /* VT */ NO_TOKEN, - /* FF */ NO_TOKEN, - /* CR */ NUMERIC_TOKEN, - /* SI */ NO_TOKEN, - /* SO */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* SPACE */ NUMERIC_TOKEN, - /*"!"*/ NO_TOKEN, - /* " */ NUMERIC_TOKEN, /* I THINK? */ - /*"#"*/ NO_TOKEN, - /*"$"*/ NO_TOKEN, - /*"%"*/ NO_TOKEN, - /*"&"*/ NO_TOKEN, - /*"'"*/ NO_TOKEN, - /*"("*/ NO_TOKEN, - /*")"*/ NO_TOKEN, - /*"*"*/ NO_TOKEN, - /*"+"*/ NO_TOKEN, - /*","*/ NUMERIC_TOKEN, - /*"-"*/ NO_TOKEN, - /*"."*/ NO_TOKEN, - /*"/"*/ NO_TOKEN, - /*"0"*/ NO_TOKEN, /* I THINK? */ - /*"1"*/ NO_TOKEN, /* I THINK? */ - /*"2"*/ NO_TOKEN, /* I THINK? */ - /*"3"*/ NO_TOKEN, /* I THINK? */ - /*"4"*/ NO_TOKEN, /* I THINK? */ - /*"5"*/ NO_TOKEN, /* I THINK? */ - /*"6"*/ NO_TOKEN, /* I THINK? */ - /*"7"*/ NO_TOKEN, /* I THINK? */ - /*"8"*/ NO_TOKEN, /* I THINK? */ - /*"9"*/ NO_TOKEN, /* I THINK? */ - /*":"*/ NO_TOKEN, - /*";"*/ NO_TOKEN, - /*"<"*/ NO_TOKEN, - /*"="*/ NO_TOKEN, - /*">"*/ NO_TOKEN, - /*"?"*/ NO_TOKEN, - /*"@"*/ NO_TOKEN, - /*"A"*/ NO_TOKEN, - /*"B"*/ NO_TOKEN, - /*"C"*/ NO_TOKEN, - /*"D"*/ NO_TOKEN, - /*"E"*/ NO_TOKEN, - /*"F"*/ NO_TOKEN, - /*"G"*/ NO_TOKEN, - /*"H"*/ NO_TOKEN, - /*"I"*/ NO_TOKEN, - /*"J"*/ NO_TOKEN, - /*"K"*/ NO_TOKEN, - /*"L"*/ NO_TOKEN, - /*"M"*/ NO_TOKEN, - /*"N"*/ NO_TOKEN, - /*"O"*/ NO_TOKEN, - /*"P"*/ NO_TOKEN, - /*"Q"*/ NO_TOKEN, - /*"R"*/ NO_TOKEN, - /*"S"*/ NO_TOKEN, - /*"T"*/ NO_TOKEN, - /*"U"*/ NO_TOKEN, - /*"V"*/ NO_TOKEN, - /*"W"*/ NO_TOKEN, - /*"X"*/ NO_TOKEN, - /*"Y"*/ NO_TOKEN, - /*"Z"*/ NO_TOKEN, - /*"["*/ NO_TOKEN, - /*"\"*/ NO_TOKEN, - /*"]"*/ NUMERIC_TOKEN, - /*"^"*/ NO_TOKEN, - /*"_"*/ NO_TOKEN, - /*"`"*/ NO_TOKEN, - /*"a"*/ NO_TOKEN, - /*"b"*/ NO_TOKEN, - /*"c"*/ NO_TOKEN, - /*"d"*/ NO_TOKEN, - /*"e"*/ NO_TOKEN, - /*"f"*/ NO_TOKEN, - /*"g"*/ NO_TOKEN, - /*"h"*/ NO_TOKEN, - /*"i"*/ NO_TOKEN, - /*"j"*/ NO_TOKEN, - /*"k"*/ NO_TOKEN, - /*"l"*/ NO_TOKEN, - /*"m"*/ NO_TOKEN, - /*"n"*/ NO_TOKEN, - /*"o"*/ NO_TOKEN, - /*"p"*/ NO_TOKEN, - /*"q"*/ NO_TOKEN, - /*"r"*/ NO_TOKEN, - /*"s"*/ NO_TOKEN, - /*"t"*/ NO_TOKEN, - /*"u"*/ NO_TOKEN, - /*"v"*/ NO_TOKEN, - /*"w"*/ NO_TOKEN, - /*"x"*/ NO_TOKEN, - /*"y"*/ NO_TOKEN, - /*"z"*/ NO_TOKEN, - /*"{"*/ NO_TOKEN, - /*"|"*/ NO_TOKEN, - /*"}"*/ NUMERIC_TOKEN, - /*"~"*/ NO_TOKEN, - /*DEL*/ NO_TOKEN, - ]; + /* NULL */ NO_TOKEN, + /* SOH */ NO_TOKEN, + /* TXT */ NO_TOKEN, + /* ETX */ NO_TOKEN, + /* EOT */ NO_TOKEN, + /* ENQ */ NO_TOKEN, + /* ACK */ NO_TOKEN, + /* BEL */ NO_TOKEN, + /* BS */ NO_TOKEN, + /* TAB */ NUMERIC_TOKEN, + /* NL */ NUMERIC_TOKEN, + /* VT */ NO_TOKEN, + /* FF */ NO_TOKEN, + /* CR */ NUMERIC_TOKEN, + /* SI */ NO_TOKEN, + /* SO */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* SPACE */ NUMERIC_TOKEN, + /*"!"*/ NO_TOKEN, + /* " */ NUMERIC_TOKEN, + /* I THINK? */ + /*"#"*/ NO_TOKEN, + /*"$"*/ NO_TOKEN, + /*"%"*/ NO_TOKEN, + /*"&"*/ NO_TOKEN, + /*"'"*/ NO_TOKEN, + /*"("*/ NO_TOKEN, + /*")"*/ NO_TOKEN, + /*"*"*/ NO_TOKEN, + /*"+"*/ NO_TOKEN, + /*","*/ NUMERIC_TOKEN, + /*"-"*/ NO_TOKEN, + /*"."*/ NO_TOKEN, + /*"/"*/ NO_TOKEN, + /*"0"*/ NO_TOKEN, + /* I THINK? */ + /*"1"*/ NO_TOKEN, + /* I THINK? */ + /*"2"*/ NO_TOKEN, + /* I THINK? */ + /*"3"*/ NO_TOKEN, + /* I THINK? */ + /*"4"*/ NO_TOKEN, + /* I THINK? */ + /*"5"*/ NO_TOKEN, + /* I THINK? */ + /*"6"*/ NO_TOKEN, + /* I THINK? */ + /*"7"*/ NO_TOKEN, + /* I THINK? */ + /*"8"*/ NO_TOKEN, + /* I THINK? */ + /*"9"*/ NO_TOKEN, + /* I THINK? */ + /*":"*/ NO_TOKEN, + /*";"*/ NO_TOKEN, + /*"<"*/ NO_TOKEN, + /*"="*/ NO_TOKEN, + /*">"*/ NO_TOKEN, + /*"?"*/ NO_TOKEN, + /*"@"*/ NO_TOKEN, + /*"A"*/ NO_TOKEN, + /*"B"*/ NO_TOKEN, + /*"C"*/ NO_TOKEN, + /*"D"*/ NO_TOKEN, + /*"E"*/ NO_TOKEN, + /*"F"*/ NO_TOKEN, + /*"G"*/ NO_TOKEN, + /*"H"*/ NO_TOKEN, + /*"I"*/ NO_TOKEN, + /*"J"*/ NO_TOKEN, + /*"K"*/ NO_TOKEN, + /*"L"*/ NO_TOKEN, + /*"M"*/ NO_TOKEN, + /*"N"*/ NO_TOKEN, + /*"O"*/ NO_TOKEN, + /*"P"*/ NO_TOKEN, + /*"Q"*/ NO_TOKEN, + /*"R"*/ NO_TOKEN, + /*"S"*/ NO_TOKEN, + /*"T"*/ NO_TOKEN, + /*"U"*/ NO_TOKEN, + /*"V"*/ NO_TOKEN, + /*"W"*/ NO_TOKEN, + /*"X"*/ NO_TOKEN, + /*"Y"*/ NO_TOKEN, + /*"Z"*/ NO_TOKEN, + /*"["*/ NO_TOKEN, + /*"\"*/ NO_TOKEN, + /*"]"*/ NUMERIC_TOKEN, + /*"^"*/ NO_TOKEN, + /*"_"*/ NO_TOKEN, + /*"`"*/ NO_TOKEN, + /*"a"*/ NO_TOKEN, + /*"b"*/ NO_TOKEN, + /*"c"*/ NO_TOKEN, + /*"d"*/ NO_TOKEN, + /*"e"*/ NO_TOKEN, + /*"f"*/ NO_TOKEN, + /*"g"*/ NO_TOKEN, + /*"h"*/ NO_TOKEN, + /*"i"*/ NO_TOKEN, + /*"j"*/ NO_TOKEN, + /*"k"*/ NO_TOKEN, + /*"l"*/ NO_TOKEN, + /*"m"*/ NO_TOKEN, + /*"n"*/ NO_TOKEN, + /*"o"*/ NO_TOKEN, + /*"p"*/ NO_TOKEN, + /*"q"*/ NO_TOKEN, + /*"r"*/ NO_TOKEN, + /*"s"*/ NO_TOKEN, + /*"t"*/ NO_TOKEN, + /*"u"*/ NO_TOKEN, + /*"v"*/ NO_TOKEN, + /*"w"*/ NO_TOKEN, + /*"x"*/ NO_TOKEN, + /*"y"*/ NO_TOKEN, + /*"z"*/ NO_TOKEN, + /*"{"*/ NO_TOKEN, + /*"|"*/ NO_TOKEN, + /*"}"*/ NUMERIC_TOKEN, + /*"~"*/ NO_TOKEN, + /*DEL*/ NO_TOKEN, +]; global NUMERIC_CAPTURE_PUSH_TRANSCRIPT: [bool; 128] = [ - /* NULL */ false, - /* SOH */ false, - /* TXT */ false, - /* ETX */ false, - /* EOT */ false, - /* ENQ */ false, - /* ACK */ false, - /* BEL */ false, - /* BS */ false, - /* TAB */ true, - /* NL */ true, - /* VT */ false, - /* FF */ false, - /* CR */ true, - /* SI */ false, - /* SO */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* SPACE */ true, - /*"!"*/ false, - /* " */ true, /* I THINK? */ - /*"#"*/ false, - /*"$"*/ false, - /*"%"*/ false, - /*"&"*/ false, - /*"'"*/ false, - /*"("*/ false, - /*")"*/ false, - /*"*"*/ false, - /*"+"*/ false, - /*","*/ true, - /*"-"*/ false, - /*"."*/ false, - /*"/"*/ false, - /*"0"*/ false, /* I THINK? */ - /*"1"*/ false, /* I THINK? */ - /*"2"*/ false, /* I THINK? */ - /*"3"*/ false, /* I THINK? */ - /*"4"*/ false, /* I THINK? */ - /*"5"*/ false, /* I THINK? */ - /*"6"*/ false, /* I THINK? */ - /*"7"*/ false, /* I THINK? */ - /*"8"*/ false, /* I THINK? */ - /*"9"*/ false, /* I THINK? */ - /*":"*/ false, - /*";"*/ false, - /*"<"*/ false, - /*"="*/ false, - /*">"*/ false, - /*"?"*/ false, - /*"@"*/ false, - /*"A"*/ false, - /*"B"*/ false, - /*"C"*/ false, - /*"D"*/ false, - /*"E"*/ false, - /*"F"*/ false, - /*"G"*/ false, - /*"H"*/ false, - /*"I"*/ false, - /*"J"*/ false, - /*"K"*/ false, - /*"L"*/ false, - /*"M"*/ false, - /*"N"*/ false, - /*"O"*/ false, - /*"P"*/ false, - /*"Q"*/ false, - /*"R"*/ false, - /*"S"*/ false, - /*"T"*/ false, - /*"U"*/ false, - /*"V"*/ false, - /*"W"*/ false, - /*"X"*/ false, - /*"Y"*/ false, - /*"Z"*/ false, - /*"["*/ false, - /*"\"*/ false, - /*"]"*/ true, - /*"^"*/ false, - /*"_"*/ false, - /*"`"*/ false, - /*"a"*/ false, - /*"b"*/ false, - /*"c"*/ false, - /*"d"*/ false, - /*"e"*/ false, - /*"f"*/ false, - /*"g"*/ false, - /*"h"*/ false, - /*"i"*/ false, - /*"j"*/ false, - /*"k"*/ false, - /*"l"*/ false, - /*"m"*/ false, - /*"n"*/ false, - /*"o"*/ false, - /*"p"*/ false, - /*"q"*/ false, - /*"r"*/ false, - /*"s"*/ false, - /*"t"*/ false, - /*"u"*/ false, - /*"v"*/ false, - /*"w"*/ false, - /*"x"*/ false, - /*"y"*/ false, - /*"z"*/ false, - /*"{"*/ false, - /*"|"*/ false, - /*"}"*/ true, - /*"~"*/ false, - /*DEL*/ false, - ]; + /* NULL */ false, + /* SOH */ false, + /* TXT */ false, + /* ETX */ false, + /* EOT */ false, + /* ENQ */ false, + /* ACK */ false, + /* BEL */ false, + /* BS */ false, + /* TAB */ true, + /* NL */ true, + /* VT */ false, + /* FF */ false, + /* CR */ true, + /* SI */ false, + /* SO */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* SPACE */ true, + /*"!"*/ false, + /* " */ true, + /* I THINK? */ + /*"#"*/ false, + /*"$"*/ false, + /*"%"*/ false, + /*"&"*/ false, + /*"'"*/ false, + /*"("*/ false, + /*")"*/ false, + /*"*"*/ false, + /*"+"*/ false, + /*","*/ true, + /*"-"*/ false, + /*"."*/ false, + /*"/"*/ false, + /*"0"*/ false, + /* I THINK? */ + /*"1"*/ false, + /* I THINK? */ + /*"2"*/ false, + /* I THINK? */ + /*"3"*/ false, + /* I THINK? */ + /*"4"*/ false, + /* I THINK? */ + /*"5"*/ false, + /* I THINK? */ + /*"6"*/ false, + /* I THINK? */ + /*"7"*/ false, + /* I THINK? */ + /*"8"*/ false, + /* I THINK? */ + /*"9"*/ false, + /* I THINK? */ + /*":"*/ false, + /*";"*/ false, + /*"<"*/ false, + /*"="*/ false, + /*">"*/ false, + /*"?"*/ false, + /*"@"*/ false, + /*"A"*/ false, + /*"B"*/ false, + /*"C"*/ false, + /*"D"*/ false, + /*"E"*/ false, + /*"F"*/ false, + /*"G"*/ false, + /*"H"*/ false, + /*"I"*/ false, + /*"J"*/ false, + /*"K"*/ false, + /*"L"*/ false, + /*"M"*/ false, + /*"N"*/ false, + /*"O"*/ false, + /*"P"*/ false, + /*"Q"*/ false, + /*"R"*/ false, + /*"S"*/ false, + /*"T"*/ false, + /*"U"*/ false, + /*"V"*/ false, + /*"W"*/ false, + /*"X"*/ false, + /*"Y"*/ false, + /*"Z"*/ false, + /*"["*/ false, + /*"\"*/ false, + /*"]"*/ true, + /*"^"*/ false, + /*"_"*/ false, + /*"`"*/ false, + /*"a"*/ false, + /*"b"*/ false, + /*"c"*/ false, + /*"d"*/ false, + /*"e"*/ false, + /*"f"*/ false, + /*"g"*/ false, + /*"h"*/ false, + /*"i"*/ false, + /*"j"*/ false, + /*"k"*/ false, + /*"l"*/ false, + /*"m"*/ false, + /*"n"*/ false, + /*"o"*/ false, + /*"p"*/ false, + /*"q"*/ false, + /*"r"*/ false, + /*"s"*/ false, + /*"t"*/ false, + /*"u"*/ false, + /*"v"*/ false, + /*"w"*/ false, + /*"x"*/ false, + /*"y"*/ false, + /*"z"*/ false, + /*"{"*/ false, + /*"|"*/ false, + /*"}"*/ true, + /*"~"*/ false, + /*DEL*/ false, +]; global NUMERIC_CAPTURE_INCREASE_LENGTH: [bool; 128] = [ - /* NULL */ false, - /* SOH */ false, - /* TXT */ false, - /* ETX */ false, - /* EOT */ false, - /* ENQ */ false, - /* ACK */ false, - /* BEL */ false, - /* BS */ false, - /* TAB */ false, - /* NL */ false, - /* VT */ false, - /* FF */ false, - /* CR */ false, - /* SI */ false, - /* SO */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* SPACE */ false, - /*"!"*/ false, - /* " */ false, /* I THINK? */ - /*"#"*/ false, - /*"$"*/ false, - /*"%"*/ false, - /*"&"*/ false, - /*"'"*/ false, - /*"("*/ false, - /*")"*/ false, - /*"*"*/ false, - /*"+"*/ false, - /*","*/ false, - /*"-"*/ false, - /*"."*/ false, - /*"/"*/ false, - /*"0"*/ true, /* I THINK? */ - /*"1"*/ true, /* I THINK? */ - /*"2"*/ true, /* I THINK? */ - /*"3"*/ true, /* I THINK? */ - /*"4"*/ true, /* I THINK? */ - /*"5"*/ true, /* I THINK? */ - /*"6"*/ true, /* I THINK? */ - /*"7"*/ true, /* I THINK? */ - /*"8"*/ true, /* I THINK? */ - /*"9"*/ true, /* I THINK? */ - /*":"*/ false, - /*";"*/ false, - /*"<"*/ false, - /*"="*/ false, - /*">"*/ false, - /*"?"*/ false, - /*"@"*/ false, - /*"A"*/ false, - /*"B"*/ false, - /*"C"*/ false, - /*"D"*/ false, - /*"E"*/ false, - /*"F"*/ false, - /*"G"*/ false, - /*"H"*/ false, - /*"I"*/ false, - /*"J"*/ false, - /*"K"*/ false, - /*"L"*/ false, - /*"M"*/ false, - /*"N"*/ false, - /*"O"*/ false, - /*"P"*/ false, - /*"Q"*/ false, - /*"R"*/ false, - /*"S"*/ false, - /*"T"*/ false, - /*"U"*/ false, - /*"V"*/ false, - /*"W"*/ false, - /*"X"*/ false, - /*"Y"*/ false, - /*"Z"*/ false, - /*"["*/ false, - /*"\"*/ false, - /*"]"*/ false, - /*"^"*/ false, - /*"_"*/ false, - /*"`"*/ false, - /*"a"*/ false, - /*"b"*/ false, - /*"c"*/ false, - /*"d"*/ false, - /*"e"*/ false, - /*"f"*/ false, - /*"g"*/ false, - /*"h"*/ false, - /*"i"*/ false, - /*"j"*/ false, - /*"k"*/ false, - /*"l"*/ false, - /*"m"*/ false, - /*"n"*/ false, - /*"o"*/ false, - /*"p"*/ false, - /*"q"*/ false, - /*"r"*/ false, - /*"s"*/ false, - /*"t"*/ false, - /*"u"*/ false, - /*"v"*/ false, - /*"w"*/ false, - /*"x"*/ false, - /*"y"*/ false, - /*"z"*/ false, - /*"{"*/ false, - /*"|"*/ false, - /*"}"*/ false, - /*"~"*/ false, - /*DEL*/ false, - ]; + /* NULL */ false, + /* SOH */ false, + /* TXT */ false, + /* ETX */ false, + /* EOT */ false, + /* ENQ */ false, + /* ACK */ false, + /* BEL */ false, + /* BS */ false, + /* TAB */ false, + /* NL */ false, + /* VT */ false, + /* FF */ false, + /* CR */ false, + /* SI */ false, + /* SO */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* SPACE */ false, + /*"!"*/ false, + /* " */ false, + /* I THINK? */ + /*"#"*/ false, + /*"$"*/ false, + /*"%"*/ false, + /*"&"*/ false, + /*"'"*/ false, + /*"("*/ false, + /*")"*/ false, + /*"*"*/ false, + /*"+"*/ false, + /*","*/ false, + /*"-"*/ false, + /*"."*/ false, + /*"/"*/ false, + /*"0"*/ true, + /* I THINK? */ + /*"1"*/ true, + /* I THINK? */ + /*"2"*/ true, + /* I THINK? */ + /*"3"*/ true, + /* I THINK? */ + /*"4"*/ true, + /* I THINK? */ + /*"5"*/ true, + /* I THINK? */ + /*"6"*/ true, + /* I THINK? */ + /*"7"*/ true, + /* I THINK? */ + /*"8"*/ true, + /* I THINK? */ + /*"9"*/ true, + /* I THINK? */ + /*":"*/ false, + /*";"*/ false, + /*"<"*/ false, + /*"="*/ false, + /*">"*/ false, + /*"?"*/ false, + /*"@"*/ false, + /*"A"*/ false, + /*"B"*/ false, + /*"C"*/ false, + /*"D"*/ false, + /*"E"*/ false, + /*"F"*/ false, + /*"G"*/ false, + /*"H"*/ false, + /*"I"*/ false, + /*"J"*/ false, + /*"K"*/ false, + /*"L"*/ false, + /*"M"*/ false, + /*"N"*/ false, + /*"O"*/ false, + /*"P"*/ false, + /*"Q"*/ false, + /*"R"*/ false, + /*"S"*/ false, + /*"T"*/ false, + /*"U"*/ false, + /*"V"*/ false, + /*"W"*/ false, + /*"X"*/ false, + /*"Y"*/ false, + /*"Z"*/ false, + /*"["*/ false, + /*"\"*/ false, + /*"]"*/ false, + /*"^"*/ false, + /*"_"*/ false, + /*"`"*/ false, + /*"a"*/ false, + /*"b"*/ false, + /*"c"*/ false, + /*"d"*/ false, + /*"e"*/ false, + /*"f"*/ false, + /*"g"*/ false, + /*"h"*/ false, + /*"i"*/ false, + /*"j"*/ false, + /*"k"*/ false, + /*"l"*/ false, + /*"m"*/ false, + /*"n"*/ false, + /*"o"*/ false, + /*"p"*/ false, + /*"q"*/ false, + /*"r"*/ false, + /*"s"*/ false, + /*"t"*/ false, + /*"u"*/ false, + /*"v"*/ false, + /*"w"*/ false, + /*"x"*/ false, + /*"y"*/ false, + /*"z"*/ false, + /*"{"*/ false, + /*"|"*/ false, + /*"}"*/ false, + /*"~"*/ false, + /*DEL*/ false, +]; global LITERAL_CAPTURE_TOKEN: [Field; 128] = [ - /* NULL */ NO_TOKEN, - /* SOH */ NO_TOKEN, - /* TXT */ NO_TOKEN, - /* ETX */ NO_TOKEN, - /* EOT */ NO_TOKEN, - /* ENQ */ NO_TOKEN, - /* ACK */ NO_TOKEN, - /* BEL */ NO_TOKEN, - /* BS */ NO_TOKEN, - /* TAB */ LITERAL_TOKEN, - /* NL */ LITERAL_TOKEN, - /* VT */ NO_TOKEN, - /* FF */ NO_TOKEN, - /* CR */ LITERAL_TOKEN, - /* SI */ NO_TOKEN, - /* SO */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* */ NO_TOKEN, - /* SPACE */ LITERAL_TOKEN, - /*"!"*/ NO_TOKEN, - /* " */ NO_TOKEN, - /*"#"*/ NO_TOKEN, - /*"$"*/ NO_TOKEN, - /*"%"*/ NO_TOKEN, - /*"&"*/ NO_TOKEN, - /*"'"*/ NO_TOKEN, - /*"("*/ NO_TOKEN, - /*")"*/ NO_TOKEN, - /*"*"*/ NO_TOKEN, - /*"+"*/ NO_TOKEN, - /*","*/ LITERAL_TOKEN, - /*"-"*/ NO_TOKEN, - /*"."*/ NO_TOKEN, - /*"/"*/ NO_TOKEN, - /*"0"*/ NO_TOKEN, - /*"1"*/ NO_TOKEN, - /*"2"*/ NO_TOKEN, - /*"3"*/ NO_TOKEN, - /*"4"*/ NO_TOKEN, - /*"5"*/ NO_TOKEN, - /*"6"*/ NO_TOKEN, - /*"7"*/ NO_TOKEN, - /*"8"*/ NO_TOKEN, - /*"9"*/ NO_TOKEN, - /*":"*/ NO_TOKEN, - /*";"*/ NO_TOKEN, - /*"<"*/ NO_TOKEN, - /*"="*/ NO_TOKEN, - /*">"*/ NO_TOKEN, - /*"?"*/ NO_TOKEN, - /*"@"*/ NO_TOKEN, - /*"A"*/ NO_TOKEN, - /*"B"*/ NO_TOKEN, - /*"C"*/ NO_TOKEN, - /*"D"*/ NO_TOKEN, - /*"E"*/ NO_TOKEN, - /*"F"*/ NO_TOKEN, - /*"G"*/ NO_TOKEN, - /*"H"*/ NO_TOKEN, - /*"I"*/ NO_TOKEN, - /*"J"*/ NO_TOKEN, - /*"K"*/ NO_TOKEN, - /*"L"*/ NO_TOKEN, - /*"M"*/ NO_TOKEN, - /*"N"*/ NO_TOKEN, - /*"O"*/ NO_TOKEN, - /*"P"*/ NO_TOKEN, - /*"Q"*/ NO_TOKEN, - /*"R"*/ NO_TOKEN, - /*"S"*/ NO_TOKEN, - /*"T"*/ NO_TOKEN, - /*"U"*/ NO_TOKEN, - /*"V"*/ NO_TOKEN, - /*"W"*/ NO_TOKEN, - /*"X"*/ NO_TOKEN, - /*"Y"*/ NO_TOKEN, - /*"Z"*/ NO_TOKEN, - /*"["*/ NO_TOKEN, - /*"\"*/ NO_TOKEN, - /*"]"*/ LITERAL_TOKEN, - /*"^"*/ NO_TOKEN, - /*"_"*/ NO_TOKEN, - /*"`"*/ NO_TOKEN, - /*"a"*/ NO_TOKEN, - /*"b"*/ NO_TOKEN, - /*"c"*/ NO_TOKEN, - /*"d"*/ NO_TOKEN, - /*"e"*/ NO_TOKEN, - /*"f"*/ NO_TOKEN, - /*"g"*/ NO_TOKEN, - /*"h"*/ NO_TOKEN, - /*"i"*/ NO_TOKEN, - /*"j"*/ NO_TOKEN, - /*"k"*/ NO_TOKEN, - /*"l"*/ NO_TOKEN, - /*"m"*/ NO_TOKEN, - /*"n"*/ NO_TOKEN, - /*"o"*/ NO_TOKEN, - /*"p"*/ NO_TOKEN, - /*"q"*/ NO_TOKEN, - /*"r"*/ NO_TOKEN, - /*"s"*/ NO_TOKEN, - /*"t"*/ NO_TOKEN, - /*"u"*/ NO_TOKEN, - /*"v"*/ NO_TOKEN, - /*"w"*/ NO_TOKEN, - /*"x"*/ NO_TOKEN, - /*"y"*/ NO_TOKEN, - /*"z"*/ NO_TOKEN, - /*"{"*/ NO_TOKEN, - /*"|"*/ NO_TOKEN, - /*"}"*/ LITERAL_TOKEN, - /*"~"*/ NO_TOKEN, - /*DEL*/ NO_TOKEN, - ]; + /* NULL */ NO_TOKEN, + /* SOH */ NO_TOKEN, + /* TXT */ NO_TOKEN, + /* ETX */ NO_TOKEN, + /* EOT */ NO_TOKEN, + /* ENQ */ NO_TOKEN, + /* ACK */ NO_TOKEN, + /* BEL */ NO_TOKEN, + /* BS */ NO_TOKEN, + /* TAB */ LITERAL_TOKEN, + /* NL */ LITERAL_TOKEN, + /* VT */ NO_TOKEN, + /* FF */ NO_TOKEN, + /* CR */ LITERAL_TOKEN, + /* SI */ NO_TOKEN, + /* SO */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* */ NO_TOKEN, + /* SPACE */ LITERAL_TOKEN, + /*"!"*/ NO_TOKEN, + /* " */ NO_TOKEN, + /*"#"*/ NO_TOKEN, + /*"$"*/ NO_TOKEN, + /*"%"*/ NO_TOKEN, + /*"&"*/ NO_TOKEN, + /*"'"*/ NO_TOKEN, + /*"("*/ NO_TOKEN, + /*")"*/ NO_TOKEN, + /*"*"*/ NO_TOKEN, + /*"+"*/ NO_TOKEN, + /*","*/ LITERAL_TOKEN, + /*"-"*/ NO_TOKEN, + /*"."*/ NO_TOKEN, + /*"/"*/ NO_TOKEN, + /*"0"*/ NO_TOKEN, + /*"1"*/ NO_TOKEN, + /*"2"*/ NO_TOKEN, + /*"3"*/ NO_TOKEN, + /*"4"*/ NO_TOKEN, + /*"5"*/ NO_TOKEN, + /*"6"*/ NO_TOKEN, + /*"7"*/ NO_TOKEN, + /*"8"*/ NO_TOKEN, + /*"9"*/ NO_TOKEN, + /*":"*/ NO_TOKEN, + /*";"*/ NO_TOKEN, + /*"<"*/ NO_TOKEN, + /*"="*/ NO_TOKEN, + /*">"*/ NO_TOKEN, + /*"?"*/ NO_TOKEN, + /*"@"*/ NO_TOKEN, + /*"A"*/ NO_TOKEN, + /*"B"*/ NO_TOKEN, + /*"C"*/ NO_TOKEN, + /*"D"*/ NO_TOKEN, + /*"E"*/ NO_TOKEN, + /*"F"*/ NO_TOKEN, + /*"G"*/ NO_TOKEN, + /*"H"*/ NO_TOKEN, + /*"I"*/ NO_TOKEN, + /*"J"*/ NO_TOKEN, + /*"K"*/ NO_TOKEN, + /*"L"*/ NO_TOKEN, + /*"M"*/ NO_TOKEN, + /*"N"*/ NO_TOKEN, + /*"O"*/ NO_TOKEN, + /*"P"*/ NO_TOKEN, + /*"Q"*/ NO_TOKEN, + /*"R"*/ NO_TOKEN, + /*"S"*/ NO_TOKEN, + /*"T"*/ NO_TOKEN, + /*"U"*/ NO_TOKEN, + /*"V"*/ NO_TOKEN, + /*"W"*/ NO_TOKEN, + /*"X"*/ NO_TOKEN, + /*"Y"*/ NO_TOKEN, + /*"Z"*/ NO_TOKEN, + /*"["*/ NO_TOKEN, + /*"\"*/ NO_TOKEN, + /*"]"*/ LITERAL_TOKEN, + /*"^"*/ NO_TOKEN, + /*"_"*/ NO_TOKEN, + /*"`"*/ NO_TOKEN, + /*"a"*/ NO_TOKEN, + /*"b"*/ NO_TOKEN, + /*"c"*/ NO_TOKEN, + /*"d"*/ NO_TOKEN, + /*"e"*/ NO_TOKEN, + /*"f"*/ NO_TOKEN, + /*"g"*/ NO_TOKEN, + /*"h"*/ NO_TOKEN, + /*"i"*/ NO_TOKEN, + /*"j"*/ NO_TOKEN, + /*"k"*/ NO_TOKEN, + /*"l"*/ NO_TOKEN, + /*"m"*/ NO_TOKEN, + /*"n"*/ NO_TOKEN, + /*"o"*/ NO_TOKEN, + /*"p"*/ NO_TOKEN, + /*"q"*/ NO_TOKEN, + /*"r"*/ NO_TOKEN, + /*"s"*/ NO_TOKEN, + /*"t"*/ NO_TOKEN, + /*"u"*/ NO_TOKEN, + /*"v"*/ NO_TOKEN, + /*"w"*/ NO_TOKEN, + /*"x"*/ NO_TOKEN, + /*"y"*/ NO_TOKEN, + /*"z"*/ NO_TOKEN, + /*"{"*/ NO_TOKEN, + /*"|"*/ NO_TOKEN, + /*"}"*/ LITERAL_TOKEN, + /*"~"*/ NO_TOKEN, + /*DEL*/ NO_TOKEN, +]; global LITERAL_CAPTURE_PUSH_TRANSCRIPT: [bool; 128] = [ - /* NULL */ false, - /* SOH */ false, - /* TXT */ false, - /* ETX */ false, - /* EOT */ false, - /* ENQ */ false, - /* ACK */ false, - /* BEL */ false, - /* BS */ false, - /* TAB */ true, - /* NL */ true, - /* VT */ false, - /* FF */ false, - /* CR */ true, - /* SI */ false, - /* SO */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* SPACE */ true, - /*"!"*/ false, - /* " */ true, /* I THINK? */ - /*"#"*/ false, - /*"$"*/ false, - /*"%"*/ false, - /*"&"*/ false, - /*"'"*/ false, - /*"("*/ false, - /*")"*/ false, - /*"*"*/ false, - /*"+"*/ false, - /*","*/ true, - /*"-"*/ false, - /*"."*/ false, - /*"/"*/ false, - /*"0"*/ false, /* I THINK? */ - /*"1"*/ false, /* I THINK? */ - /*"2"*/ false, /* I THINK? */ - /*"3"*/ false, /* I THINK? */ - /*"4"*/ false, /* I THINK? */ - /*"5"*/ false, /* I THINK? */ - /*"6"*/ false, /* I THINK? */ - /*"7"*/ false, /* I THINK? */ - /*"8"*/ false, /* I THINK? */ - /*"9"*/ false, /* I THINK? */ - /*":"*/ false, - /*";"*/ false, - /*"<"*/ false, - /*"="*/ false, - /*">"*/ false, - /*"?"*/ false, - /*"@"*/ false, - /*"A"*/ false, - /*"B"*/ false, - /*"C"*/ false, - /*"D"*/ false, - /*"E"*/ false, - /*"F"*/ false, - /*"G"*/ false, - /*"H"*/ false, - /*"I"*/ false, - /*"J"*/ false, - /*"K"*/ false, - /*"L"*/ false, - /*"M"*/ false, - /*"N"*/ false, - /*"O"*/ false, - /*"P"*/ false, - /*"Q"*/ false, - /*"R"*/ false, - /*"S"*/ false, - /*"T"*/ false, - /*"U"*/ false, - /*"V"*/ false, - /*"W"*/ false, - /*"X"*/ false, - /*"Y"*/ false, - /*"Z"*/ false, - /*"["*/ false, - /*"\"*/ false, - /*"]"*/ true, - /*"^"*/ false, - /*"_"*/ false, - /*"`"*/ false, - /*"a"*/ false, - /*"b"*/ false, - /*"c"*/ false, - /*"d"*/ false, - /*"e"*/ false, - /*"f"*/ false, - /*"g"*/ false, - /*"h"*/ false, - /*"i"*/ false, - /*"j"*/ false, - /*"k"*/ false, - /*"l"*/ false, - /*"m"*/ false, - /*"n"*/ false, - /*"o"*/ false, - /*"p"*/ false, - /*"q"*/ false, - /*"r"*/ false, - /*"s"*/ false, - /*"t"*/ false, - /*"u"*/ false, - /*"v"*/ false, - /*"w"*/ false, - /*"x"*/ false, - /*"y"*/ false, - /*"z"*/ false, - /*"{"*/ false, - /*"|"*/ false, - /*"}"*/ true, - /*"~"*/ false, - /*DEL*/ false, - ]; + /* NULL */ false, + /* SOH */ false, + /* TXT */ false, + /* ETX */ false, + /* EOT */ false, + /* ENQ */ false, + /* ACK */ false, + /* BEL */ false, + /* BS */ false, + /* TAB */ true, + /* NL */ true, + /* VT */ false, + /* FF */ false, + /* CR */ true, + /* SI */ false, + /* SO */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* SPACE */ true, + /*"!"*/ false, + /* " */ true, + /* I THINK? */ + /*"#"*/ false, + /*"$"*/ false, + /*"%"*/ false, + /*"&"*/ false, + /*"'"*/ false, + /*"("*/ false, + /*")"*/ false, + /*"*"*/ false, + /*"+"*/ false, + /*","*/ true, + /*"-"*/ false, + /*"."*/ false, + /*"/"*/ false, + /*"0"*/ false, + /* I THINK? */ + /*"1"*/ false, + /* I THINK? */ + /*"2"*/ false, + /* I THINK? */ + /*"3"*/ false, + /* I THINK? */ + /*"4"*/ false, + /* I THINK? */ + /*"5"*/ false, + /* I THINK? */ + /*"6"*/ false, + /* I THINK? */ + /*"7"*/ false, + /* I THINK? */ + /*"8"*/ false, + /* I THINK? */ + /*"9"*/ false, + /* I THINK? */ + /*":"*/ false, + /*";"*/ false, + /*"<"*/ false, + /*"="*/ false, + /*">"*/ false, + /*"?"*/ false, + /*"@"*/ false, + /*"A"*/ false, + /*"B"*/ false, + /*"C"*/ false, + /*"D"*/ false, + /*"E"*/ false, + /*"F"*/ false, + /*"G"*/ false, + /*"H"*/ false, + /*"I"*/ false, + /*"J"*/ false, + /*"K"*/ false, + /*"L"*/ false, + /*"M"*/ false, + /*"N"*/ false, + /*"O"*/ false, + /*"P"*/ false, + /*"Q"*/ false, + /*"R"*/ false, + /*"S"*/ false, + /*"T"*/ false, + /*"U"*/ false, + /*"V"*/ false, + /*"W"*/ false, + /*"X"*/ false, + /*"Y"*/ false, + /*"Z"*/ false, + /*"["*/ false, + /*"\"*/ false, + /*"]"*/ true, + /*"^"*/ false, + /*"_"*/ false, + /*"`"*/ false, + /*"a"*/ false, + /*"b"*/ false, + /*"c"*/ false, + /*"d"*/ false, + /*"e"*/ false, + /*"f"*/ false, + /*"g"*/ false, + /*"h"*/ false, + /*"i"*/ false, + /*"j"*/ false, + /*"k"*/ false, + /*"l"*/ false, + /*"m"*/ false, + /*"n"*/ false, + /*"o"*/ false, + /*"p"*/ false, + /*"q"*/ false, + /*"r"*/ false, + /*"s"*/ false, + /*"t"*/ false, + /*"u"*/ false, + /*"v"*/ false, + /*"w"*/ false, + /*"x"*/ false, + /*"y"*/ false, + /*"z"*/ false, + /*"{"*/ false, + /*"|"*/ false, + /*"}"*/ true, + /*"~"*/ false, + /*DEL*/ false, +]; global LITERAL_CAPTURE_INCREASE_LENGTH: [bool; 128] = [ - /* NULL */ false, - /* SOH */ false, - /* TXT */ false, - /* ETX */ false, - /* EOT */ false, - /* ENQ */ false, - /* ACK */ false, - /* BEL */ false, - /* BS */ false, - /* TAB */ false, - /* NL */ false, - /* VT */ false, - /* FF */ false, - /* CR */ false, - /* SI */ false, - /* SO */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* SPACE */ false, - /*"!"*/ false, - /* " */ false, /* I THINK? */ - /*"#"*/ false, - /*"$"*/ false, - /*"%"*/ false, - /*"&"*/ false, - /*"'"*/ false, - /*"("*/ false, - /*")"*/ false, - /*"*"*/ false, - /*"+"*/ false, - /*","*/ false, - /*"-"*/ false, - /*"."*/ false, - /*"/"*/ false, - /*"0"*/ false, /* I THINK? */ - /*"1"*/ false, /* I THINK? */ - /*"2"*/ false, /* I THINK? */ - /*"3"*/ false, /* I THINK? */ - /*"4"*/ false, /* I THINK? */ - /*"5"*/ false, /* I THINK? */ - /*"6"*/ false, /* I THINK? */ - /*"7"*/ false, /* I THINK? */ - /*"8"*/ false, /* I THINK? */ - /*"9"*/ false, /* I THINK? */ - /*":"*/ false, - /*";"*/ false, - /*"<"*/ false, - /*"="*/ false, - /*">"*/ false, - /*"?"*/ false, - /*"@"*/ false, - /*"A"*/ false, - /*"B"*/ false, - /*"C"*/ false, - /*"D"*/ false, - /*"E"*/ false, - /*"F"*/ false, - /*"G"*/ false, - /*"H"*/ false, - /*"I"*/ false, - /*"J"*/ false, - /*"K"*/ false, - /*"L"*/ false, - /*"M"*/ false, - /*"N"*/ false, - /*"O"*/ false, - /*"P"*/ false, - /*"Q"*/ false, - /*"R"*/ false, - /*"S"*/ false, - /*"T"*/ false, - /*"U"*/ false, - /*"V"*/ false, - /*"W"*/ false, - /*"X"*/ false, - /*"Y"*/ false, - /*"Z"*/ false, - /*"["*/ false, - /*"\"*/ false, - /*"]"*/ false, - /*"^"*/ false, - /*"_"*/ false, - /*"`"*/ false, - /*"a"*/ true, - /*"b"*/ false, - /*"c"*/ false, - /*"d"*/ false, - /*"e"*/ true, - /*"f"*/ true, - /*"g"*/ false, - /*"h"*/ false, - /*"i"*/ false, - /*"j"*/ false, - /*"k"*/ false, - /*"l"*/ true, - /*"m"*/ false, - /*"n"*/ true, - /*"o"*/ false, - /*"p"*/ false, - /*"q"*/ false, - /*"r"*/ true, - /*"s"*/ true, - /*"t"*/ true, - /*"u"*/ true, - /*"v"*/ false, - /*"w"*/ false, - /*"x"*/ false, - /*"y"*/ false, - /*"z"*/ false, - /*"{"*/ false, - /*"|"*/ false, - /*"}"*/ false, - /*"~"*/ false, - /*DEL*/ false, - ]; + /* NULL */ false, + /* SOH */ false, + /* TXT */ false, + /* ETX */ false, + /* EOT */ false, + /* ENQ */ false, + /* ACK */ false, + /* BEL */ false, + /* BS */ false, + /* TAB */ false, + /* NL */ false, + /* VT */ false, + /* FF */ false, + /* CR */ false, + /* SI */ false, + /* SO */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* SPACE */ false, + /*"!"*/ false, + /* " */ false, + /* I THINK? */ + /*"#"*/ false, + /*"$"*/ false, + /*"%"*/ false, + /*"&"*/ false, + /*"'"*/ false, + /*"("*/ false, + /*")"*/ false, + /*"*"*/ false, + /*"+"*/ false, + /*","*/ false, + /*"-"*/ false, + /*"."*/ false, + /*"/"*/ false, + /*"0"*/ false, + /* I THINK? */ + /*"1"*/ false, + /* I THINK? */ + /*"2"*/ false, + /* I THINK? */ + /*"3"*/ false, + /* I THINK? */ + /*"4"*/ false, + /* I THINK? */ + /*"5"*/ false, + /* I THINK? */ + /*"6"*/ false, + /* I THINK? */ + /*"7"*/ false, + /* I THINK? */ + /*"8"*/ false, + /* I THINK? */ + /*"9"*/ false, + /* I THINK? */ + /*":"*/ false, + /*";"*/ false, + /*"<"*/ false, + /*"="*/ false, + /*">"*/ false, + /*"?"*/ false, + /*"@"*/ false, + /*"A"*/ false, + /*"B"*/ false, + /*"C"*/ false, + /*"D"*/ false, + /*"E"*/ false, + /*"F"*/ false, + /*"G"*/ false, + /*"H"*/ false, + /*"I"*/ false, + /*"J"*/ false, + /*"K"*/ false, + /*"L"*/ false, + /*"M"*/ false, + /*"N"*/ false, + /*"O"*/ false, + /*"P"*/ false, + /*"Q"*/ false, + /*"R"*/ false, + /*"S"*/ false, + /*"T"*/ false, + /*"U"*/ false, + /*"V"*/ false, + /*"W"*/ false, + /*"X"*/ false, + /*"Y"*/ false, + /*"Z"*/ false, + /*"["*/ false, + /*"\"*/ false, + /*"]"*/ false, + /*"^"*/ false, + /*"_"*/ false, + /*"`"*/ false, + /*"a"*/ true, + /*"b"*/ false, + /*"c"*/ false, + /*"d"*/ false, + /*"e"*/ true, + /*"f"*/ true, + /*"g"*/ false, + /*"h"*/ false, + /*"i"*/ false, + /*"j"*/ false, + /*"k"*/ false, + /*"l"*/ true, + /*"m"*/ false, + /*"n"*/ true, + /*"o"*/ false, + /*"p"*/ false, + /*"q"*/ false, + /*"r"*/ true, + /*"s"*/ true, + /*"t"*/ true, + /*"u"*/ true, + /*"v"*/ false, + /*"w"*/ false, + /*"x"*/ false, + /*"y"*/ false, + /*"z"*/ false, + /*"{"*/ false, + /*"|"*/ false, + /*"}"*/ false, + /*"~"*/ false, + /*DEL*/ false, +]; // #### global GRAMMAR_CAPTURE_ERROR_FLAG: [bool; 128] = [ - /* NULL */ true, - /* SOH */ true, - /* TXT */ true, - /* ETX */ true, - /* EOT */ true, - /* ENQ */ true, - /* ACK */ true, - /* BEL */ true, - /* BS */ true, - /* TAB */ false, - /* NL */ false, - /* VT */ true, - /* FF */ true, - /* CR */ false, - /* SI */ true, - /* SO */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* SPACE */ false, - /*"!"*/ true, - /* " */ false, - /*"#"*/ true, - /*"$"*/ true, - /*"%"*/ true, - /*"&"*/ true, - /*"'"*/ true, - /*"("*/ true, - /*")"*/ true, - /*"*"*/ true, - /*"+"*/ true, - /*","*/ false, - /*"-"*/ true, - /*"."*/ true, - /*"/"*/ true, - /*"0"*/ false, - /*"1"*/ false, - /*"2"*/ false, - /*"3"*/ false, - /*"4"*/ false, - /*"5"*/ false, - /*"6"*/ false, - /*"7"*/ false, - /*"8"*/ false, - /*"9"*/ false, - /*":"*/ false, - /*";"*/ true, - /*"<"*/ true, - /*"="*/ true, - /*">"*/ true, - /*"?"*/ true, - /*"@"*/ true, - /*"A"*/ true, - /*"B"*/ true, - /*"C"*/ true, - /*"D"*/ true, - /*"E"*/ true, - /*"F"*/ true, - /*"G"*/ true, - /*"H"*/ true, - /*"I"*/ true, - /*"J"*/ true, - /*"K"*/ true, - /*"L"*/ true, - /*"M"*/ true, - /*"N"*/ true, - /*"O"*/ true, - /*"P"*/ true, - /*"Q"*/ true, - /*"R"*/ true, - /*"S"*/ true, - /*"T"*/ true, - /*"U"*/ true, - /*"V"*/ true, - /*"W"*/ true, - /*"X"*/ true, - /*"Y"*/ true, - /*"Z"*/ true, - /*"["*/ false, - /*"\"*/ true, - /*"]"*/ false, - /*"^"*/ true, - /*"_"*/ true, - /*"`"*/ true, - /*"a"*/ true, - /*"b"*/ true, - /*"c"*/ true, - /*"d"*/ true, - /*"e"*/ true, - /*"f"*/ false, // false = literal - /*"g"*/ true, - /*"h"*/ true, - /*"i"*/ true, - /*"j"*/ true, - /*"k"*/ true, - /*"l"*/ true, - /*"m"*/ true, - /*"n"*/ false, // null = literal - /*"o"*/ true, - /*"p"*/ true, - /*"q"*/ true, - /*"r"*/ true, - /*"s"*/ true, - /*"t"*/ false, // true = literal - /*"u"*/ true, - /*"v"*/ true, - /*"w"*/ true, - /*"x"*/ true, - /*"y"*/ true, - /*"z"*/ true, - /*"{"*/ false, - /*"|"*/ true, - /*"}"*/ false, - /*"~"*/ true, - /*DEL*/ true, - ]; + /* NULL */ true, + /* SOH */ true, + /* TXT */ true, + /* ETX */ true, + /* EOT */ true, + /* ENQ */ true, + /* ACK */ true, + /* BEL */ true, + /* BS */ true, + /* TAB */ false, + /* NL */ false, + /* VT */ true, + /* FF */ true, + /* CR */ false, + /* SI */ true, + /* SO */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* SPACE */ false, + /*"!"*/ true, + /* " */ false, + /*"#"*/ true, + /*"$"*/ true, + /*"%"*/ true, + /*"&"*/ true, + /*"'"*/ true, + /*"("*/ true, + /*")"*/ true, + /*"*"*/ true, + /*"+"*/ true, + /*","*/ false, + /*"-"*/ true, + /*"."*/ true, + /*"/"*/ true, + /*"0"*/ false, + /*"1"*/ false, + /*"2"*/ false, + /*"3"*/ false, + /*"4"*/ false, + /*"5"*/ false, + /*"6"*/ false, + /*"7"*/ false, + /*"8"*/ false, + /*"9"*/ false, + /*":"*/ false, + /*";"*/ true, + /*"<"*/ true, + /*"="*/ true, + /*">"*/ true, + /*"?"*/ true, + /*"@"*/ true, + /*"A"*/ true, + /*"B"*/ true, + /*"C"*/ true, + /*"D"*/ true, + /*"E"*/ true, + /*"F"*/ true, + /*"G"*/ true, + /*"H"*/ true, + /*"I"*/ true, + /*"J"*/ true, + /*"K"*/ true, + /*"L"*/ true, + /*"M"*/ true, + /*"N"*/ true, + /*"O"*/ true, + /*"P"*/ true, + /*"Q"*/ true, + /*"R"*/ true, + /*"S"*/ true, + /*"T"*/ true, + /*"U"*/ true, + /*"V"*/ true, + /*"W"*/ true, + /*"X"*/ true, + /*"Y"*/ true, + /*"Z"*/ true, + /*"["*/ false, + /*"\"*/ true, + /*"]"*/ false, + /*"^"*/ true, + /*"_"*/ true, + /*"`"*/ true, + /*"a"*/ true, + /*"b"*/ true, + /*"c"*/ true, + /*"d"*/ true, + /*"e"*/ true, + /*"f"*/ false, // false = literal + /*"g"*/ + true, + /*"h"*/ true, + /*"i"*/ true, + /*"j"*/ true, + /*"k"*/ true, + /*"l"*/ true, + /*"m"*/ true, + /*"n"*/ false, // null = literal + /*"o"*/ + true, + /*"p"*/ true, + /*"q"*/ true, + /*"r"*/ true, + /*"s"*/ true, + /*"t"*/ false, // true = literal + /*"u"*/ + true, + /*"v"*/ true, + /*"w"*/ true, + /*"x"*/ true, + /*"y"*/ true, + /*"z"*/ true, + /*"{"*/ false, + /*"|"*/ true, + /*"}"*/ false, + /*"~"*/ true, + /*DEL*/ true, +]; global STRING_CAPTURE_ERROR_FLAG: [bool; 128] = [ - /* NULL */ true, - /* SOH */ true, - /* TXT */ true, - /* ETX */ true, - /* EOT */ true, - /* ENQ */ true, - /* ACK */ true, - /* BEL */ true, - /* BS */ true, - /* TAB */ false, - /* NL */ false, - /* VT */ true, - /* FF */ true, - /* CR */ false, - /* SI */ true, - /* SO */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* SPACE */ false, - /*"!"*/ false, - /* " */ false, - /*"#"*/ false, - /*"$"*/ false, - /*"%"*/ false, - /*"&"*/ false, - /*"'"*/ false, - /*"("*/ false, - /*")"*/ false, - /*"*"*/ false, - /*"+"*/ false, - /*","*/ false, - /*"-"*/ false, - /*"."*/ false, - /*"/"*/ false, - /*"0"*/ false, - /*"1"*/ false, - /*"2"*/ false, - /*"3"*/ false, - /*"4"*/ false, - /*"5"*/ false, - /*"6"*/ false, - /*"7"*/ false, - /*"8"*/ false, - /*"9"*/ false, - /*":"*/ false, - /*";"*/ false, - /*"<"*/ false, - /*"="*/ false, - /*">"*/ false, - /*"?"*/ false, - /*"@"*/ false, - /*"A"*/ false, - /*"B"*/ false, - /*"C"*/ false, - /*"D"*/ false, - /*"E"*/ false, - /*"F"*/ false, - /*"G"*/ false, - /*"H"*/ false, - /*"I"*/ false, - /*"J"*/ false, - /*"K"*/ false, - /*"L"*/ false, - /*"M"*/ false, - /*"N"*/ false, - /*"O"*/ false, - /*"P"*/ false, - /*"Q"*/ false, - /*"R"*/ false, - /*"S"*/ false, - /*"T"*/ false, - /*"U"*/ false, - /*"V"*/ false, - /*"W"*/ false, - /*"X"*/ false, - /*"Y"*/ false, - /*"Z"*/ false, - /*"["*/ false, - /*"\"*/ false, - /*"]"*/ false, - /*"^"*/ false, - /*"_"*/ false, - /*"`"*/ false, - /*"a"*/ false, - /*"b"*/ false, - /*"c"*/ false, - /*"d"*/ false, - /*"e"*/ false, - /*"f"*/ false, - /*"g"*/ false, - /*"h"*/ false, - /*"i"*/ false, - /*"j"*/ false, - /*"k"*/ false, - /*"l"*/ false, - /*"m"*/ false, - /*"n"*/ false, - /*"o"*/ false, - /*"p"*/ false, - /*"q"*/ false, - /*"r"*/ false, - /*"s"*/ false, - /*"t"*/ false, - /*"u"*/ false, - /*"v"*/ false, - /*"w"*/ false, - /*"x"*/ false, - /*"y"*/ false, - /*"z"*/ false, - /*"{"*/ false, - /*"|"*/ false, - /*"}"*/ false, - /*"~"*/ false, - /*DEL*/ true, - ]; + /* NULL */ true, + /* SOH */ true, + /* TXT */ true, + /* ETX */ true, + /* EOT */ true, + /* ENQ */ true, + /* ACK */ true, + /* BEL */ true, + /* BS */ true, + /* TAB */ false, + /* NL */ false, + /* VT */ true, + /* FF */ true, + /* CR */ false, + /* SI */ true, + /* SO */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* SPACE */ false, + /*"!"*/ false, + /* " */ false, + /*"#"*/ false, + /*"$"*/ false, + /*"%"*/ false, + /*"&"*/ false, + /*"'"*/ false, + /*"("*/ false, + /*")"*/ false, + /*"*"*/ false, + /*"+"*/ false, + /*","*/ false, + /*"-"*/ false, + /*"."*/ false, + /*"/"*/ false, + /*"0"*/ false, + /*"1"*/ false, + /*"2"*/ false, + /*"3"*/ false, + /*"4"*/ false, + /*"5"*/ false, + /*"6"*/ false, + /*"7"*/ false, + /*"8"*/ false, + /*"9"*/ false, + /*":"*/ false, + /*";"*/ false, + /*"<"*/ false, + /*"="*/ false, + /*">"*/ false, + /*"?"*/ false, + /*"@"*/ false, + /*"A"*/ false, + /*"B"*/ false, + /*"C"*/ false, + /*"D"*/ false, + /*"E"*/ false, + /*"F"*/ false, + /*"G"*/ false, + /*"H"*/ false, + /*"I"*/ false, + /*"J"*/ false, + /*"K"*/ false, + /*"L"*/ false, + /*"M"*/ false, + /*"N"*/ false, + /*"O"*/ false, + /*"P"*/ false, + /*"Q"*/ false, + /*"R"*/ false, + /*"S"*/ false, + /*"T"*/ false, + /*"U"*/ false, + /*"V"*/ false, + /*"W"*/ false, + /*"X"*/ false, + /*"Y"*/ false, + /*"Z"*/ false, + /*"["*/ false, + /*"\"*/ false, + /*"]"*/ false, + /*"^"*/ false, + /*"_"*/ false, + /*"`"*/ false, + /*"a"*/ false, + /*"b"*/ false, + /*"c"*/ false, + /*"d"*/ false, + /*"e"*/ false, + /*"f"*/ false, + /*"g"*/ false, + /*"h"*/ false, + /*"i"*/ false, + /*"j"*/ false, + /*"k"*/ false, + /*"l"*/ false, + /*"m"*/ false, + /*"n"*/ false, + /*"o"*/ false, + /*"p"*/ false, + /*"q"*/ false, + /*"r"*/ false, + /*"s"*/ false, + /*"t"*/ false, + /*"u"*/ false, + /*"v"*/ false, + /*"w"*/ false, + /*"x"*/ false, + /*"y"*/ false, + /*"z"*/ false, + /*"{"*/ false, + /*"|"*/ false, + /*"}"*/ false, + /*"~"*/ false, + /*DEL*/ true, +]; global NUMERIC_CAPTURE_ERROR_FLAG: [bool; 128] = [ - /* NULL */ true, - /* SOH */ true, - /* TXT */ true, - /* ETX */ true, - /* EOT */ true, - /* ENQ */ true, - /* ACK */ true, - /* BEL */ true, - /* BS */ true, - /* TAB */ false, - /* NL */ false, - /* VT */ true, - /* FF */ true, - /* CR */ false, - /* SI */ true, - /* SO */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* SPACE */ false, - /*"!"*/ true, - /* " */ true, - /*"#"*/ true, - /*"$"*/ true, - /*"%"*/ true, - /*"&"*/ true, - /*"'"*/ true, - /*"("*/ true, - /*")"*/ true, - /*"*"*/ true, - /*"+"*/ true, - /*","*/ false, - /*"-"*/ true, - /*"."*/ true, - /*"/"*/ true, - /*"0"*/ false, - /*"1"*/ false, - /*"2"*/ false, - /*"3"*/ false, - /*"4"*/ false, - /*"5"*/ false, - /*"6"*/ false, - /*"7"*/ false, - /*"8"*/ false, - /*"9"*/ false, - /*":"*/ true, - /*";"*/ true, - /*"<"*/ true, - /*"="*/ true, - /*">"*/ true, - /*"?"*/ true, - /*"@"*/ true, - /*"A"*/ true, - /*"B"*/ true, - /*"C"*/ true, - /*"D"*/ true, - /*"E"*/ true, - /*"F"*/ true, - /*"G"*/ true, - /*"H"*/ true, - /*"I"*/ true, - /*"J"*/ true, - /*"K"*/ true, - /*"L"*/ true, - /*"M"*/ true, - /*"N"*/ true, - /*"O"*/ true, - /*"P"*/ true, - /*"Q"*/ true, - /*"R"*/ true, - /*"S"*/ true, - /*"T"*/ true, - /*"U"*/ true, - /*"V"*/ true, - /*"W"*/ true, - /*"X"*/ true, - /*"Y"*/ true, - /*"Z"*/ true, - /*"["*/ true, - /*"\"*/ true, - /*"]"*/ false, - /*"^"*/ true, - /*"_"*/ true, - /*"`"*/ true, - /*"a"*/ true, - /*"b"*/ true, - /*"c"*/ true, - /*"d"*/ true, - /*"e"*/ true, - /*"f"*/ true, - /*"g"*/ true, - /*"h"*/ true, - /*"i"*/ true, - /*"j"*/ true, - /*"k"*/ true, - /*"l"*/ true, - /*"m"*/ true, - /*"n"*/ true, - /*"o"*/ true, - /*"p"*/ true, - /*"q"*/ true, - /*"r"*/ true, - /*"s"*/ true, - /*"t"*/ true, - /*"u"*/ true, - /*"v"*/ true, - /*"w"*/ true, - /*"x"*/ true, - /*"y"*/ true, - /*"z"*/ true, - /*"{"*/ true, - /*"|"*/ true, - /*"}"*/ false, - /*"~"*/ true, - /*DEL*/ true, - ]; + /* NULL */ true, + /* SOH */ true, + /* TXT */ true, + /* ETX */ true, + /* EOT */ true, + /* ENQ */ true, + /* ACK */ true, + /* BEL */ true, + /* BS */ true, + /* TAB */ false, + /* NL */ false, + /* VT */ true, + /* FF */ true, + /* CR */ false, + /* SI */ true, + /* SO */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* SPACE */ false, + /*"!"*/ true, + /* " */ true, + /*"#"*/ true, + /*"$"*/ true, + /*"%"*/ true, + /*"&"*/ true, + /*"'"*/ true, + /*"("*/ true, + /*")"*/ true, + /*"*"*/ true, + /*"+"*/ true, + /*","*/ false, + /*"-"*/ true, + /*"."*/ true, + /*"/"*/ true, + /*"0"*/ false, + /*"1"*/ false, + /*"2"*/ false, + /*"3"*/ false, + /*"4"*/ false, + /*"5"*/ false, + /*"6"*/ false, + /*"7"*/ false, + /*"8"*/ false, + /*"9"*/ false, + /*":"*/ true, + /*";"*/ true, + /*"<"*/ true, + /*"="*/ true, + /*">"*/ true, + /*"?"*/ true, + /*"@"*/ true, + /*"A"*/ true, + /*"B"*/ true, + /*"C"*/ true, + /*"D"*/ true, + /*"E"*/ true, + /*"F"*/ true, + /*"G"*/ true, + /*"H"*/ true, + /*"I"*/ true, + /*"J"*/ true, + /*"K"*/ true, + /*"L"*/ true, + /*"M"*/ true, + /*"N"*/ true, + /*"O"*/ true, + /*"P"*/ true, + /*"Q"*/ true, + /*"R"*/ true, + /*"S"*/ true, + /*"T"*/ true, + /*"U"*/ true, + /*"V"*/ true, + /*"W"*/ true, + /*"X"*/ true, + /*"Y"*/ true, + /*"Z"*/ true, + /*"["*/ true, + /*"\"*/ true, + /*"]"*/ false, + /*"^"*/ true, + /*"_"*/ true, + /*"`"*/ true, + /*"a"*/ true, + /*"b"*/ true, + /*"c"*/ true, + /*"d"*/ true, + /*"e"*/ true, + /*"f"*/ true, + /*"g"*/ true, + /*"h"*/ true, + /*"i"*/ true, + /*"j"*/ true, + /*"k"*/ true, + /*"l"*/ true, + /*"m"*/ true, + /*"n"*/ true, + /*"o"*/ true, + /*"p"*/ true, + /*"q"*/ true, + /*"r"*/ true, + /*"s"*/ true, + /*"t"*/ true, + /*"u"*/ true, + /*"v"*/ true, + /*"w"*/ true, + /*"x"*/ true, + /*"y"*/ true, + /*"z"*/ true, + /*"{"*/ true, + /*"|"*/ true, + /*"}"*/ false, + /*"~"*/ true, + /*DEL*/ true, +]; global LITERAL_CAPTURE_ERROR_FLAG: [bool; 128] = [ - /* NULL */ true, - /* SOH */ true, - /* TXT */ true, - /* ETX */ true, - /* EOT */ true, - /* ENQ */ true, - /* ACK */ true, - /* BEL */ true, - /* BS */ true, - /* TAB */ false, - /* NL */ false, - /* VT */ true, - /* FF */ true, - /* CR */ false, - /* SI */ true, - /* SO */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* */ true, - /* SPACE */ false, - /*"!"*/ true, - /* " */ true, - /*"#"*/ true, - /*"$"*/ true, - /*"%"*/ true, - /*"&"*/ true, - /*"'"*/ true, - /*"("*/ true, - /*")"*/ true, - /*"*"*/ true, - /*"+"*/ true, - /*","*/ false, - /*"-"*/ true, - /*"."*/ true, - /*"/"*/ true, - /*"0"*/ true, - /*"1"*/ true, - /*"2"*/ true, - /*"3"*/ true, - /*"4"*/ true, - /*"5"*/ true, - /*"6"*/ true, - /*"7"*/ true, - /*"8"*/ true, - /*"9"*/ true, - /*":"*/ true, - /*";"*/ true, - /*"<"*/ true, - /*"="*/ true, - /*">"*/ true, - /*"?"*/ true, - /*"@"*/ true, - /*"A"*/ true, - /*"B"*/ true, - /*"C"*/ true, - /*"D"*/ true, - /*"E"*/ true, - /*"F"*/ true, - /*"G"*/ true, - /*"H"*/ true, - /*"I"*/ true, - /*"J"*/ true, - /*"K"*/ true, - /*"L"*/ true, - /*"M"*/ true, - /*"N"*/ true, - /*"O"*/ true, - /*"P"*/ true, - /*"Q"*/ true, - /*"R"*/ true, - /*"S"*/ true, - /*"T"*/ true, - /*"U"*/ true, - /*"V"*/ true, - /*"W"*/ true, - /*"X"*/ true, - /*"Y"*/ true, - /*"Z"*/ true, - /*"["*/ true, - /*"\"*/ true, - /*"]"*/ false, - /*"^"*/ true, - /*"_"*/ true, - /*"`"*/ true, - /*"a"*/ false, - /*"b"*/ true, - /*"c"*/ true, - /*"d"*/ true, - /*"e"*/ false, - /*"f"*/ true, // "false" literal begins with "f", which will be scanned in grammar capture mode - /*"g"*/ true, - /*"h"*/ true, - /*"i"*/ true, - /*"j"*/ true, - /*"k"*/ true, - /*"l"*/ false, - /*"m"*/ true, - /*"n"*/ true, // "null" literal begins with "n", which will be scanned in grammar capture mode - /*"o"*/ true, - /*"p"*/ true, - /*"q"*/ true, - /*"r"*/ false, - /*"s"*/ false, - /*"t"*/ true, // "true" literal begins with "t", which will be scanned in grammar capture mode - /*"u"*/ false, - /*"v"*/ true, - /*"w"*/ true, - /*"x"*/ true, - /*"y"*/ true, - /*"z"*/ true, - /*"{"*/ true, - /*"|"*/ true, - /*"}"*/ false, - /*"~"*/ true, - /*DEL*/ true, - ]; + /* NULL */ true, + /* SOH */ true, + /* TXT */ true, + /* ETX */ true, + /* EOT */ true, + /* ENQ */ true, + /* ACK */ true, + /* BEL */ true, + /* BS */ true, + /* TAB */ false, + /* NL */ false, + /* VT */ true, + /* FF */ true, + /* CR */ false, + /* SI */ true, + /* SO */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* */ true, + /* SPACE */ false, + /*"!"*/ true, + /* " */ true, + /*"#"*/ true, + /*"$"*/ true, + /*"%"*/ true, + /*"&"*/ true, + /*"'"*/ true, + /*"("*/ true, + /*")"*/ true, + /*"*"*/ true, + /*"+"*/ true, + /*","*/ false, + /*"-"*/ true, + /*"."*/ true, + /*"/"*/ true, + /*"0"*/ true, + /*"1"*/ true, + /*"2"*/ true, + /*"3"*/ true, + /*"4"*/ true, + /*"5"*/ true, + /*"6"*/ true, + /*"7"*/ true, + /*"8"*/ true, + /*"9"*/ true, + /*":"*/ true, + /*";"*/ true, + /*"<"*/ true, + /*"="*/ true, + /*">"*/ true, + /*"?"*/ true, + /*"@"*/ true, + /*"A"*/ true, + /*"B"*/ true, + /*"C"*/ true, + /*"D"*/ true, + /*"E"*/ true, + /*"F"*/ true, + /*"G"*/ true, + /*"H"*/ true, + /*"I"*/ true, + /*"J"*/ true, + /*"K"*/ true, + /*"L"*/ true, + /*"M"*/ true, + /*"N"*/ true, + /*"O"*/ true, + /*"P"*/ true, + /*"Q"*/ true, + /*"R"*/ true, + /*"S"*/ true, + /*"T"*/ true, + /*"U"*/ true, + /*"V"*/ true, + /*"W"*/ true, + /*"X"*/ true, + /*"Y"*/ true, + /*"Z"*/ true, + /*"["*/ true, + /*"\"*/ true, + /*"]"*/ false, + /*"^"*/ true, + /*"_"*/ true, + /*"`"*/ true, + /*"a"*/ false, + /*"b"*/ true, + /*"c"*/ true, + /*"d"*/ true, + /*"e"*/ false, + /*"f"*/ true, // "false" literal begins with "f", which will be scanned in grammar capture mode + /*"g"*/ + true, + /*"h"*/ true, + /*"i"*/ true, + /*"j"*/ true, + /*"k"*/ true, + /*"l"*/ false, + /*"m"*/ true, + /*"n"*/ true, // "null" literal begins with "n", which will be scanned in grammar capture mode + /*"o"*/ + true, + /*"p"*/ true, + /*"q"*/ true, + /*"r"*/ false, + /*"s"*/ false, + /*"t"*/ true, // "true" literal begins with "t", which will be scanned in grammar capture mode + /*"u"*/ + false, + /*"v"*/ true, + /*"w"*/ true, + /*"x"*/ true, + /*"y"*/ true, + /*"z"*/ true, + /*"{"*/ true, + /*"|"*/ true, + /*"}"*/ false, + /*"~"*/ true, + /*DEL*/ true, +]; diff --git a/src/get_array.nr b/src/get_array.nr index 3b483c0..f16e4c3 100644 --- a/src/get_array.nr +++ b/src/get_array.nr @@ -1,9 +1,9 @@ -use crate::json_entry::JSONEntry; -use crate::json::JSON; use crate::_comparison_tools::lt::lt_field_16_bit; +use crate::enums::Layer::{ARRAY_LAYER, OBJECT_LAYER}; use crate::enums::Token::END_ARRAY_TOKEN; -use crate::enums::Layer::{OBJECT_LAYER, ARRAY_LAYER}; use crate::getters::JSONValue; +use crate::json::JSON; +use crate::json_entry::JSONEntry; /** * @brief getter methods for extracting array types out of a JSON struct diff --git a/src/get_literal.nr b/src/get_literal.nr index dd981bf..eec7cda 100644 --- a/src/get_literal.nr +++ b/src/get_literal.nr @@ -1,9 +1,9 @@ -use crate::json_entry::JSONEntry; -use crate::json::JSON; use crate::_comparison_tools::lt::lt_field_16_bit; -use crate::enums::Layer::{OBJECT_LAYER, ARRAY_LAYER}; +use crate::enums::Layer::{ARRAY_LAYER, OBJECT_LAYER}; use crate::enums::Token::LITERAL_TOKEN; use crate::getters::JSONValue; +use crate::json::JSON; +use crate::json_entry::JSONEntry; global MAX_LITERAL_LENGTH_AS_STRING = 5; global LITERAL_OFFSET_SHIFT: [Field; 6] = diff --git a/src/get_number.nr b/src/get_number.nr index acf91d4..ea10bd2 100644 --- a/src/get_number.nr +++ b/src/get_number.nr @@ -1,10 +1,10 @@ -use crate::json_entry::JSONEntry; -use crate::json::JSON; use crate::_comparison_tools::lt::lt_field_16_bit; -use crate::json_tables::ASCII_TO_NUMBER; +use crate::enums::Layer::{ARRAY_LAYER, OBJECT_LAYER}; use crate::enums::Token::NUMERIC_TOKEN; -use crate::enums::Layer::{OBJECT_LAYER, ARRAY_LAYER}; use crate::getters::JSONValue; +use crate::json::JSON; +use crate::json_entry::JSONEntry; +use crate::json_tables::ASCII_TO_NUMBER; global U64_LENGTH_AS_BASE10_STRING = 20; global NUMBER_OFFSET_SHIFT: [Field; 21] = [ diff --git a/src/get_object.nr b/src/get_object.nr index 1ed5356..d1ed134 100644 --- a/src/get_object.nr +++ b/src/get_object.nr @@ -1,14 +1,14 @@ -use crate::json_entry::JSONEntry; -use crate::json::JSON; use crate::_comparison_tools::lt::lt_field_16_bit; -use crate::enums::Layer::{OBJECT_LAYER, ARRAY_LAYER}; +use crate::enums::Layer::{ARRAY_LAYER, OBJECT_LAYER}; use crate::enums::Token::END_OBJECT_TOKEN; use crate::getters::JSONValue; +use crate::json::JSON; +use crate::json_entry::JSONEntry; /** * @brief getter methods for extracting object types out of a JSON struct **/ -impl JSON { +impl JSON { /** * @brief if the root JSON is an object, extract a child object given by `key` @@ -20,7 +20,8 @@ impl where, if the object exists, the JSON object will have the requested object as its root value **/ fn get_object_from_array(self, array_index: Field) -> Option { - assert(self.layer_type_of_root == ARRAY_LAYER, "can only acceess array elements from array"); + assert( + self.layer_type_of_root == ARRAY_LAYER, + "can only acceess array elements from array", + ); - let parent_entry : JSONEntry = self.json_entries_packed[self.root_index_in_transcript].into(); + let parent_entry: JSONEntry = + self.json_entries_packed[self.root_index_in_transcript].into(); let valid = lt_field_16_bit(array_index, parent_entry.num_children); let entry_index = (parent_entry.child_pointer + array_index) * valid as Field; - let entry : JSONEntry = self.json_entries_packed[entry_index].into(); + let entry: JSONEntry = self.json_entries_packed[entry_index].into(); assert( - (entry.entry_type - END_OBJECT_TOKEN) * valid as Field == 0, "get_object_from_array: entry exists but is not an object!" + (entry.entry_type - END_OBJECT_TOKEN) * valid as Field == 0, + "get_object_from_array: entry exists but is not an object!", ); let mut r = self; @@ -118,17 +131,22 @@ impl Self { - assert(self.layer_type_of_root == ARRAY_LAYER, "can only acceess array elements from array"); + assert( + self.layer_type_of_root == ARRAY_LAYER, + "can only acceess array elements from array", + ); - let parent_entry : JSONEntry = self.json_entries_packed[self.root_index_in_transcript].into(); + let parent_entry: JSONEntry = + self.json_entries_packed[self.root_index_in_transcript].into(); let valid = lt_field_16_bit(array_index, parent_entry.num_children); assert(valid, "array overflow"); let entry_index = (parent_entry.child_pointer + array_index); - let entry : JSONEntry = self.json_entries_packed[entry_index].into(); + let entry: JSONEntry = self.json_entries_packed[entry_index].into(); assert( - entry.entry_type == END_OBJECT_TOKEN, "get_object_from_array_unchecked: entry exists but is not an object!" + entry.entry_type == END_OBJECT_TOKEN, + "get_object_from_array_unchecked: entry exists but is not an object!", ); let mut r = self; @@ -162,13 +180,19 @@ fn test_object() { let not_real = B.get_object("bartholomew tony Harrison IV".as_bytes()); assert(not_real.is_some() == false); - let C = B.get_object_unchecked_var(BoundedVec { storage: "bartholomew tony Harrison III".as_bytes(), len: 29 }); + let C = B.get_object_unchecked_var( + BoundedVec { storage: "bartholomew tony Harrison III".as_bytes(), len: 29 }, + ); assert(JSONEntry::from(C.json_entries_packed[C.root_index_in_transcript]).num_children == 1); - let C = B.get_object_var(BoundedVec { storage: "bartholomew tony Harrison III".as_bytes(), len: 28 }); + let C = B.get_object_var( + BoundedVec { storage: "bartholomew tony Harrison III".as_bytes(), len: 28 }, + ); assert(C.is_some() == false); - let C = B.get_object_var(BoundedVec { storage: "bartholomew tony Harrison IIIekurfgaeoiurh".as_bytes(), len: 29 }); + let C = B.get_object_var( + BoundedVec { storage: "bartholomew tony Harrison IIIekurfgaeoiurh".as_bytes(), len: 29 }, + ); assert(C.is_some() == true); let second = first.get_object_from_array_unchecked(4); diff --git a/src/get_string.nr b/src/get_string.nr index c3a64f9..81cca28 100644 --- a/src/get_string.nr +++ b/src/get_string.nr @@ -1,12 +1,12 @@ -use crate::json_entry::JSONEntry; -use crate::json::JSON; -use crate::getters::JSONValue; use crate::_comparison_tools::lt::lt_field_16_bit; +use crate::enums::Layer::{ARRAY_LAYER, OBJECT_LAYER}; +use crate::enums::Token::STRING_TOKEN; +use crate::getters::JSONValue; +use crate::json::JSON; +use crate::json_entry::JSONEntry; use crate::json_tables::{ - ESCAPE_SEQUENCE_START_CHARS, ESCAPE_SEQUENCE_END_CHARS, ESCAPE_SEQUENCE_REPLACEMENT, + ESCAPE_SEQUENCE_END_CHARS, ESCAPE_SEQUENCE_REPLACEMENT, ESCAPE_SEQUENCE_START_CHARS, }; -use crate::enums::Token::STRING_TOKEN; -use crate::enums::Layer::{OBJECT_LAYER, ARRAY_LAYER}; unconstrained fn to_u8(f: Field) -> u8 { f as u8 diff --git a/src/getters.nr b/src/getters.nr index 93e1b48..a7144bd 100644 --- a/src/getters.nr +++ b/src/getters.nr @@ -1,14 +1,14 @@ -use crate::transcript_entry::TranscriptEntry; -use crate::json_entry::JSONEntry; +use crate::_comparison_tools::lt::{assert_gt_240_bit, assert_lt_240_bit, lt_field_16_bit}; +use crate::_string_tools::slice_packed_field::slice_fields; +use crate::_string_tools::string_chopper::StringChopper; +use crate::enums::Layer::{ARRAY_LAYER, OBJECT_LAYER}; +use crate::enums::Token::{LITERAL_TOKEN, NUMERIC_TOKEN, STRING_TOKEN}; use crate::json::JSON; -use crate::_comparison_tools::lt::{lt_field_16_bit, assert_lt_240_bit, assert_gt_240_bit}; -use crate::enums::Token::{NUMERIC_TOKEN, LITERAL_TOKEN, STRING_TOKEN}; -use crate::enums::Layer::{OBJECT_LAYER, ARRAY_LAYER}; +use crate::json::JSONValue; +use crate::json_entry::JSONEntry; use crate::keyhash::ByteHasher; use crate::keymap::KeyIndexData; -use crate::_string_tools::string_chopper::StringChopper; -use crate::_string_tools::slice_packed_field::slice_fields; -use crate::json::JSONValue; +use crate::transcript_entry::TranscriptEntry; /** * @brief records data used to reason about whether a key exists in a json blob **/ diff --git a/src/json.nr b/src/json.nr index b2f7b3a..b07c96b 100644 --- a/src/json.nr +++ b/src/json.nr @@ -1,20 +1,20 @@ use crate::_comparison_tools::bounds_checker; use crate::_comparison_tools::bounds_checker::get_validity_flags; -use crate::enums::Layer::{OBJECT_LAYER, ARRAY_LAYER, SINGLE_VALUE_LAYER}; +use crate::enums::Layer::{ARRAY_LAYER, OBJECT_LAYER, SINGLE_VALUE_LAYER}; +use crate::enums::ScanMode::{GRAMMAR_SCAN, LITERAL_SCAN, NUMERIC_SCAN, STRING_SCAN}; use crate::enums::Token::{ - BEGIN_OBJECT_TOKEN, END_OBJECT_TOKEN, BEGIN_ARRAY_TOKEN, END_ARRAY_TOKEN, KEY_SEPARATOR_TOKEN, - VALUE_SEPARATOR_TOKEN, STRING_TOKEN, NUMERIC_TOKEN, LITERAL_TOKEN, KEY_TOKEN, NUM_TOKENS, + BEGIN_ARRAY_TOKEN, BEGIN_OBJECT_TOKEN, END_ARRAY_TOKEN, END_OBJECT_TOKEN, KEY_SEPARATOR_TOKEN, + KEY_TOKEN, LITERAL_TOKEN, NUM_TOKENS, NUMERIC_TOKEN, STRING_TOKEN, VALUE_SEPARATOR_TOKEN, }; -use crate::enums::ScanMode::{GRAMMAR_SCAN, STRING_SCAN, NUMERIC_SCAN, LITERAL_SCAN}; use crate::get_literal::JSONLiteral; use crate::json_entry::{JSONContextStackEntry, JSONEntry, JSONEntryPacked}; use crate::json_tables::{ - TOKEN_VALIDATION_TABLE, PROCESS_RAW_TRANSCRIPT_TABLE, JSON_CAPTURE_TABLE, TOKEN_FLAGS_TABLE, - TOKEN_IS_ARRAY_OBJECT_OR_VALUE, + JSON_CAPTURE_TABLE, PROCESS_RAW_TRANSCRIPT_TABLE, TOKEN_FLAGS_TABLE, + TOKEN_IS_ARRAY_OBJECT_OR_VALUE, TOKEN_VALIDATION_TABLE, }; use crate::token_flags::TokenFlags; use crate::transcript_entry::{ - ValidationFlags, TranscriptEntry, RawTranscriptEntry, ScanData, PostProcessScanData, + PostProcessScanData, RawTranscriptEntry, ScanData, TranscriptEntry, ValidationFlags, }; /** diff --git a/src/json_tables.nr b/src/json_tables.nr index 09de61a..83c053c 100644 --- a/src/json_tables.nr +++ b/src/json_tables.nr @@ -1,501 +1,2706 @@ use crate::enums::Token::NUM_TOKENS_MUL_2; -global TOKEN_ENDS_OBJECT_OR_ARRAY : [Field; 11] = [0,0,1,0,1,0,0,0,0,0,0]; -global TOKEN_IS_ARRAY_OBJECT_OR_VALUE: [Field; 11] = [0,1,0,1,0,0,0,1,1,1,0]; -global TOKEN_FLAGS_TABLE: [Field; NUM_TOKENS_MUL_2] = [0x01, 0x0100000000, 0x01010000000000, 0x0101000000, 0x01010000000000, 0x01, 0x01, 0x01000000000101, 0x01000000000101, 0x01000000000101, 0x010001, 0x01000001, 0x0100000000, 0x01010000000000, 0x0101000000, 0x01010000000000, 0x01000001, 0x01000001, 0x01000001000101, 0x01000001000101, 0x01000001000101, 0x01010001]; -global PROCESS_RAW_TRANSCRIPT_TABLE: [Field; 1024] = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x060006, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x050005, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x030003, 0x00, 0x040004, 0x00, 0x00, 0x00, 0x090009, 0x00, 0x00, 0x00, 0x090009, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x090009, 0x00, 0x090009, 0x00, 0x00, 0x00, 0x090009, 0x090009, 0x090009, 0x090009, 0x00, 0x00, 0x00, 0x00, 0x00, 0x010001, 0x00, 0x020002, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x060000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x050000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x030000, 0x00, 0x040000, 0x00, 0x00, 0x00, 0x090000, 0x00, 0x00, 0x00, 0x090000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x090000, 0x00, 0x090000, 0x00, 0x00, 0x00, 0x090000, 0x090000, 0x090000, 0x090000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x010000, 0x00, 0x020000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x060108, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x050000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x030000, 0x00, 0x040108, 0x00, 0x00, 0x00, 0x090000, 0x00, 0x00, 0x00, 0x090000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x090000, 0x00, 0x090000, 0x00, 0x00, 0x00, 0x090000, 0x090000, 0x090000, 0x090000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x010000, 0x00, 0x020108, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x060109, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x050000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x030000, 0x00, 0x040109, 0x00, 0x00, 0x00, 0x090000, 0x00, 0x00, 0x00, 0x090000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x090000, 0x00, 0x090000, 0x00, 0x00, 0x00, 0x090000, 0x090000, 0x090000, 0x090000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x010000, 0x00, 0x020109, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]; -global ASCII_TO_TOKEN_TABLE: [Field; 1024] = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x09, 0x09, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]; -global JSON_CAPTURE_TABLE: [Field; 2048] = [0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x00, 0x00, 0x0100000004, 0x0100000004, 0x00, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x00, 0x0100000004, 0x01, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x0100000004, 0x0100000004, 0x010002, 0x010002, 0x010002, 0x010002, 0x010002, 0x010002, 0x010002, 0x010002, 0x010002, 0x010002, 0x0100, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x0100, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100010004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100010004, 0x010003, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100010004, 0x0100000004, 0x010003, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100010004, 0x010003, 0x0100010004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x0100, 0x0100000004, 0x0100000004, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x01, 0x01, 0x0100000004, 0x0100000004, 0x01, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x010001, 0x010001, 0x0100, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x01010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x0100000004, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x0100000104, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x0100000004, 0x0100000004, 0x010002, 0x010002, 0x010002, 0x010002, 0x010002, 0x010002, 0x010002, 0x010002, 0x010002, 0x010002, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x0100000004, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x0100000104, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x0100000004, 0x0100000004, 0x010003, 0x0100000004, 0x0100000004, 0x0100000004, 0x010003, 0x0100010003, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x010003, 0x0100000004, 0x0100010003, 0x0100000004, 0x0100000004, 0x0100000004, 0x010003, 0x010003, 0x0100010004, 0x010003, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x0100000004, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x00, 0x00, 0x0100000004, 0x0100000004, 0x00, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x00, 0x0100000004, 0x010001, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x0100000004, 0x0100000004, 0x010002, 0x010002, 0x010002, 0x010002, 0x010002, 0x010002, 0x010002, 0x010002, 0x010002, 0x010002, 0x0100, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x0100, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100010004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100010004, 0x010003, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100010004, 0x0100000004, 0x010003, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100010004, 0x010003, 0x0100010004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x0100, 0x0100000004, 0x0100000004, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x01, 0x01, 0x0100000004, 0x0100000004, 0x01, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x01010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x010001, 0x0100000004, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x010001, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x0100000004, 0x0100000004, 0x010002, 0x010002, 0x010002, 0x010002, 0x010002, 0x010002, 0x010002, 0x010002, 0x010002, 0x010002, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x0100000004, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x010001, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x0100000004, 0x0100000004, 0x010003, 0x0100000004, 0x0100000004, 0x0100000004, 0x010003, 0x0100010003, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x010003, 0x0100000004, 0x0100010003, 0x0100000004, 0x0100000004, 0x0100000004, 0x010003, 0x010003, 0x0100010004, 0x010003, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100000004, 0x0100, 0x0100000004, 0x0100000004, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000, 0x0100000000]; -global TOKEN_VALIDATION_TABLE: [Field; 363] = [0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x010000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x00, 0x00, 0x01000000, 0x010000, 0x01000000, 0x01000000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x010000, 0x01000000, 0x01000000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01, 0x01000000, 0x0101, 0x01000000, 0x01000000, 0x01000000, 0x00, 0x00, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x010000, 0x01000000, 0x01000000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x010000, 0x01000000, 0x01000000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x010000, 0x01000000, 0x01000000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x010000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01, 0x01000000, 0x0101, 0x010000, 0x01000000, 0x01000000, 0x00, 0x00, 0x00, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x010000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01, 0x01000000, 0x0101, 0x01000000, 0x01000000, 0x01000000, 0x00, 0x00, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x010000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x010000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x010000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01, 0x01000000, 0x0101, 0x01000000, 0x01000000, 0x01000000, 0x00, 0x00, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000]; +global TOKEN_ENDS_OBJECT_OR_ARRAY: [Field; 11] = [0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0]; +global TOKEN_IS_ARRAY_OBJECT_OR_VALUE: [Field; 11] = [0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0]; +global TOKEN_FLAGS_TABLE: [Field; NUM_TOKENS_MUL_2] = [ + 0x01, + 0x0100000000, + 0x01010000000000, + 0x0101000000, + 0x01010000000000, + 0x01, + 0x01, + 0x01000000000101, + 0x01000000000101, + 0x01000000000101, + 0x010001, + 0x01000001, + 0x0100000000, + 0x01010000000000, + 0x0101000000, + 0x01010000000000, + 0x01000001, + 0x01000001, + 0x01000001000101, + 0x01000001000101, + 0x01000001000101, + 0x01010001, +]; +global PROCESS_RAW_TRANSCRIPT_TABLE: [Field; 1024] = [ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x060006, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x050005, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x030003, 0x00, + 0x040004, 0x00, 0x00, 0x00, 0x090009, 0x00, 0x00, 0x00, 0x090009, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x090009, 0x00, 0x090009, 0x00, 0x00, 0x00, 0x090009, 0x090009, 0x090009, 0x090009, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x010001, 0x00, 0x020002, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x060000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x050000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x030000, 0x00, 0x040000, 0x00, 0x00, 0x00, + 0x090000, 0x00, 0x00, 0x00, 0x090000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x090000, 0x00, + 0x090000, 0x00, 0x00, 0x00, 0x090000, 0x090000, 0x090000, 0x090000, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x010000, 0x00, 0x020000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x060108, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x050000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x030000, 0x00, 0x040108, 0x00, 0x00, 0x00, 0x090000, 0x00, 0x00, + 0x00, 0x090000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x090000, 0x00, 0x090000, 0x00, 0x00, 0x00, + 0x090000, 0x090000, 0x090000, 0x090000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x010000, 0x00, 0x020108, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x09, 0x00, 0x00, 0x09, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x060109, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x050000, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x030000, 0x00, 0x040109, 0x00, 0x00, 0x00, 0x090000, 0x00, 0x00, 0x00, 0x090000, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x090000, 0x00, 0x090000, 0x00, 0x00, 0x00, 0x090000, 0x090000, + 0x090000, 0x090000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x010000, 0x00, 0x020109, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +]; +global ASCII_TO_TOKEN_TABLE: [Field; 1024] = [ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x04, 0x00, 0x00, + 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x09, 0x00, + 0x00, 0x00, 0x09, 0x09, 0x09, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +]; +global JSON_CAPTURE_TABLE: [Field; 2048] = [ + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x00, + 0x00, + 0x0100000004, + 0x0100000004, + 0x00, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x00, + 0x0100000004, + 0x01, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100010004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100010004, + 0x010003, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100010004, + 0x0100000004, + 0x010003, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100010004, + 0x010003, + 0x0100010004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x01, + 0x01, + 0x0100000004, + 0x0100000004, + 0x01, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x010001, + 0x010001, + 0x0100, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x01010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x0100000004, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100000104, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100000104, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x010003, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x010003, + 0x0100010003, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x010003, + 0x0100000004, + 0x0100010003, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x010003, + 0x010003, + 0x0100010004, + 0x010003, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x00, + 0x00, + 0x0100000004, + 0x0100000004, + 0x00, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x00, + 0x0100000004, + 0x010001, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100010004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100010004, + 0x010003, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100010004, + 0x0100000004, + 0x010003, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100010004, + 0x010003, + 0x0100010004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x01, + 0x01, + 0x0100000004, + 0x0100000004, + 0x01, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x01010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x010001, + 0x0100000004, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x010001, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x010002, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x010001, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x010003, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x010003, + 0x0100010003, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x010003, + 0x0100000004, + 0x0100010003, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x010003, + 0x010003, + 0x0100010004, + 0x010003, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100000004, + 0x0100, + 0x0100000004, + 0x0100000004, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, + 0x0100000000, +]; +global TOKEN_VALIDATION_TABLE: [Field; 363] = [ + 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, + 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x010000, 0x01000000, 0x01000000, + 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x00, 0x00, 0x01000000, 0x010000, + 0x01000000, 0x01000000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, + 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, + 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x010000, 0x01000000, 0x01000000, + 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01, 0x01000000, + 0x0101, 0x01000000, 0x01000000, 0x01000000, 0x00, 0x00, 0x00, 0x01000000, 0x01000000, + 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, + 0x01000000, 0x00, 0x01000000, 0x01000000, 0x010000, 0x01000000, 0x01000000, 0x01000000, 0x00, + 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x010000, 0x01000000, + 0x01000000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, + 0x01000000, 0x010000, 0x01000000, 0x01000000, 0x01000000, 0x00, 0x01000000, 0x01000000, + 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x00, + 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x00, 0x01000000, 0x01000000, + 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, + 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, + 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x010000, + 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01, 0x01000000, + 0x0101, 0x010000, 0x01000000, 0x01000000, 0x00, 0x00, 0x00, 0x01000000, 0x00, 0x01000000, + 0x01000000, 0x01000000, 0x010000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, + 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, + 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01, 0x01000000, 0x0101, + 0x01000000, 0x01000000, 0x01000000, 0x00, 0x00, 0x00, 0x01000000, 0x01000000, 0x01000000, + 0x01000000, 0x01000000, 0x010000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, + 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x010000, 0x01000000, 0x00, + 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, + 0x010000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, + 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, + 0x01000000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, + 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, + 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, + 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, + 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, + 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x00, 0x01000000, + 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, + 0x01000000, 0x01000000, 0x01, 0x01000000, 0x0101, 0x01000000, 0x01000000, 0x01000000, 0x00, + 0x00, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, + 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x00, 0x01000000, 0x01000000, + 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, + 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, + 0x01000000, 0x01000000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, + 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, + 0x01000000, 0x01000000, 0x01000000, 0x00, 0x01000000, 0x01000000, 0x01000000, 0x01000000, + 0x01000000, +]; global ASCII_TO_NUMBER: [u8; 128] = [ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - /* */ 0, - /*"!"*/ 0, - /* " */ 0, - /*"#"*/ 0, - /*"$"*/ 0, - /*"%"*/ 0, - /*"&"*/ 0, - /*"'"*/ 0, - /*"("*/ 0, - /*")"*/ 0, - /*"*"*/ 0, - /*"+"*/ 0, - /*","*/ 0, - /*"-"*/ 0, - /*"."*/ 0, - /*"/"*/ 0, - /*"0"*/ 0, // numeric value - /*"1"*/ 1, // numeric value - /*"2"*/ 2, // numeric value - /*"3"*/ 3, // numeric value - /*"4"*/ 4, // numeric value - /*"5"*/ 5, // numeric value - /*"6"*/ 6, // numeric value - /*"7"*/ 7, // numeric value - /*"8"*/ 8, // numeric value - /*"9"*/ 9, // numeric value - /*":"*/ 0, - /*";"*/ 0, - /*"<"*/ 0, - /*"="*/ 0, - /*">"*/ 0, - /*"?"*/ 0, - /*"@"*/ 0, - /*"A"*/ 0, - /*"B"*/ 0, - /*"C"*/ 0, - /*"D"*/ 0, - /*"E"*/ 0, - /*"F"*/ 0, - /*"G"*/ 0, - /*"H"*/ 0, - /*"I"*/ 0, - /*"J"*/ 0, - /*"K"*/ 0, - /*"L"*/ 0, - /*"M"*/ 0, - /*"N"*/ 0, - /*"O"*/ 0, - /*"P"*/ 0, - /*"Q"*/ 0, - /*"R"*/ 0, - /*"S"*/ 0, - /*"T"*/ 0, - /*"U"*/ 0, - /*"V"*/ 0, - /*"W"*/ 0, - /*"X"*/ 0, - /*"Y"*/ 0, - /*"Z"*/ 0, - /*"["*/ 0, // an array - /*"\"*/ 0, - /*"]"*/ 0, - /*"^"*/ 0, - /*"_"*/ 0, - /*"`"*/ 0, - /*"a"*/ 0, - /*"b"*/ 0, - /*"c"*/ 0, - /*"d"*/ 0, - /*"e"*/ 0, - /*"f"*/ 0, // "0" - /*"g"*/ 0, - /*"h"*/ 0, - /*"i"*/ 0, - /*"j"*/ 0, - /*"k"*/ 0, - /*"l"*/ 0, - /*"m"*/ 0, - /*"n"*/ 0, - /*"o"*/ 0, - /*"p"*/ 0, - /*"q"*/ 0, - /*"r"*/ 0, - /*"s"*/ 0, - /*"t"*/ 0, // "0" - /*"u"*/ 0, - /*"v"*/ 0, - /*"w"*/ 0, - /*"x"*/ 0, - /*"y"*/ 0, - /*"z"*/ 0, - /*"{"*/ 0, // an object - /*"|"*/ 0, - /*"}"*/ 0, - /*"~"*/ 0, - /*DEL*/ 0, - ]; + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + /* */ 0, /*"!"*/ 0, /* " */ 0, /*"#"*/ 0, /*"$"*/ 0, /*"%"*/ 0, /*"&"*/ 0, /*"'"*/ 0, /*"("*/ 0, + /*")"*/ 0, /*"*"*/ 0, /*"+"*/ 0, /*","*/ 0, /*"-"*/ 0, /*"."*/ 0, /*"/"*/ 0, /*"0"*/ 0, // numeric value + /*"1"*/ + 1, // numeric value + /*"2"*/ + 2, // numeric value + /*"3"*/ + 3, // numeric value + /*"4"*/ + 4, // numeric value + /*"5"*/ + 5, // numeric value + /*"6"*/ + 6, // numeric value + /*"7"*/ + 7, // numeric value + /*"8"*/ + 8, // numeric value + /*"9"*/ + 9, // numeric value + /*":"*/ + 0, /*";"*/ 0, /*"<"*/ 0, /*"="*/ 0, /*">"*/ 0, /*"?"*/ 0, /*"@"*/ 0, /*"A"*/ 0, /*"B"*/ 0, + /*"C"*/ 0, /*"D"*/ 0, /*"E"*/ 0, /*"F"*/ 0, /*"G"*/ 0, /*"H"*/ 0, /*"I"*/ 0, /*"J"*/ 0, /*"K"*/ 0, + /*"L"*/ 0, /*"M"*/ 0, /*"N"*/ 0, /*"O"*/ 0, /*"P"*/ 0, /*"Q"*/ 0, /*"R"*/ 0, /*"S"*/ 0, /*"T"*/ 0, + /*"U"*/ 0, /*"V"*/ 0, /*"W"*/ 0, /*"X"*/ 0, /*"Y"*/ 0, /*"Z"*/ 0, /*"["*/ 0, // an array + /*"\"*/ + 0, /*"]"*/ 0, /*"^"*/ 0, /*"_"*/ 0, /*"`"*/ 0, /*"a"*/ 0, /*"b"*/ 0, /*"c"*/ 0, /*"d"*/ 0, + /*"e"*/ 0, /*"f"*/ 0, // "0" + /*"g"*/ + 0, /*"h"*/ 0, /*"i"*/ 0, /*"j"*/ 0, /*"k"*/ 0, /*"l"*/ 0, /*"m"*/ 0, /*"n"*/ 0, /*"o"*/ 0, + /*"p"*/ 0, /*"q"*/ 0, /*"r"*/ 0, /*"s"*/ 0, /*"t"*/ 0, // "0" + /*"u"*/ + 0, /*"v"*/ 0, /*"w"*/ 0, /*"x"*/ 0, /*"y"*/ 0, /*"z"*/ 0, /*"{"*/ 0, // an object + /*"|"*/ + 0, /*"}"*/ 0, /*"~"*/ 0, /*DEL*/ 0, +]; global ESCAPE_SEQUENCE_END_CHARS: [bool; 128] = [ - /* NULL */ false, - /* SOH */ false, - /* TXT */ false, - /* ETX */ false, - /* EOT */ false, - /* ENQ */ false, - /* ACK */ false, - /* BEL */ false, - /* BS */ false, - /* TAB */ false, - /* NL */ false, - /* VT */ false, - /* FF */ false, - /* CR */ false, - /* SI */ false, - /* SO */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* SPACE */ false, - /*"!"*/ false, - /* " */ true, // replace \" with double quote - /*"#"*/ false, - /*"$"*/ false, - /*"%"*/ false, - /*"&"*/ false, - /*"'"*/ false, - /*"("*/ false, - /*")"*/ false, - /*"*"*/ false, - /*"+"*/ false, - /*","*/ false, - /*"-"*/ false, - /*"."*/ false, - /*"/"*/ false, - /*"0"*/ false, - /*"1"*/ false, - /*"2"*/ false, - /*"3"*/ false, - /*"4"*/ false, - /*"5"*/ false, - /*"6"*/ false, - /*"7"*/ false, - /*"8"*/ false, - /*"9"*/ false, - /*":"*/ false, - /*";"*/ false, - /*"<"*/ false, - /*"="*/ false, - /*">"*/ false, - /*"?"*/ false, - /*"@"*/ false, - /*"A"*/ false, - /*"B"*/ false, - /*"C"*/ false, - /*"D"*/ false, - /*"E"*/ false, - /*"F"*/ false, - /*"G"*/ false, - /*"H"*/ false, - /*"I"*/ false, - /*"J"*/ false, - /*"K"*/ false, - /*"L"*/ false, - /*"M"*/ false, - /*"N"*/ false, - /*"O"*/ false, - /*"P"*/ false, - /*"Q"*/ false, - /*"R"*/ false, - /*"S"*/ false, - /*"T"*/ false, - /*"U"*/ false, - /*"V"*/ false, - /*"W"*/ false, - /*"X"*/ false, - /*"Y"*/ false, - /*"Z"*/ false, - /*"["*/ false, - /*"\"*/ true, // replace \\ with \ - /*"]"*/ false, - /*"^"*/ false, - /*"_"*/ false, - /*"`"*/ false, - /*"a"*/ false, - /*"b"*/ true, // replace \b with backspace - /*"c"*/ false, - /*"d"*/ false, - /*"e"*/ false, - /*"f"*/ true, // replace \f with form feed - /*"g"*/ false, - /*"h"*/ false, - /*"i"*/ false, - /*"j"*/ false, - /*"k"*/ false, - /*"l"*/ false, - /*"m"*/ false, - /*"n"*/ true, // replace \n with line feed - /*"o"*/ false, - /*"p"*/ false, - /*"q"*/ false, - /*"r"*/ true, // replace \r with carriage return - /*"s"*/ false, - /*"t"*/ true, // replace \t with tab - /*"u"*/ false, - /*"v"*/ false, - /*"w"*/ false, - /*"x"*/ false, - /*"y"*/ false, - /*"z"*/ false, - /*"{"*/ false, - /*"|"*/ false, - /*"}"*/ false, - /*"~"*/ false, - /*DEL*/ false, - ]; + /* NULL */ false, + /* SOH */ false, + /* TXT */ false, + /* ETX */ false, + /* EOT */ false, + /* ENQ */ false, + /* ACK */ false, + /* BEL */ false, + /* BS */ false, + /* TAB */ false, + /* NL */ false, + /* VT */ false, + /* FF */ false, + /* CR */ false, + /* SI */ false, + /* SO */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* SPACE */ false, + /*"!"*/ false, + /* " */ true, // replace \" with double quote + /*"#"*/ + false, + /*"$"*/ false, + /*"%"*/ false, + /*"&"*/ false, + /*"'"*/ false, + /*"("*/ false, + /*")"*/ false, + /*"*"*/ false, + /*"+"*/ false, + /*","*/ false, + /*"-"*/ false, + /*"."*/ false, + /*"/"*/ false, + /*"0"*/ false, + /*"1"*/ false, + /*"2"*/ false, + /*"3"*/ false, + /*"4"*/ false, + /*"5"*/ false, + /*"6"*/ false, + /*"7"*/ false, + /*"8"*/ false, + /*"9"*/ false, + /*":"*/ false, + /*";"*/ false, + /*"<"*/ false, + /*"="*/ false, + /*">"*/ false, + /*"?"*/ false, + /*"@"*/ false, + /*"A"*/ false, + /*"B"*/ false, + /*"C"*/ false, + /*"D"*/ false, + /*"E"*/ false, + /*"F"*/ false, + /*"G"*/ false, + /*"H"*/ false, + /*"I"*/ false, + /*"J"*/ false, + /*"K"*/ false, + /*"L"*/ false, + /*"M"*/ false, + /*"N"*/ false, + /*"O"*/ false, + /*"P"*/ false, + /*"Q"*/ false, + /*"R"*/ false, + /*"S"*/ false, + /*"T"*/ false, + /*"U"*/ false, + /*"V"*/ false, + /*"W"*/ false, + /*"X"*/ false, + /*"Y"*/ false, + /*"Z"*/ false, + /*"["*/ false, + /*"\"*/ true, // replace \\ with \ + /*"]"*/ + false, + /*"^"*/ false, + /*"_"*/ false, + /*"`"*/ false, + /*"a"*/ false, + /*"b"*/ true, // replace \b with backspace + /*"c"*/ + false, + /*"d"*/ false, + /*"e"*/ false, + /*"f"*/ true, // replace \f with form feed + /*"g"*/ + false, + /*"h"*/ false, + /*"i"*/ false, + /*"j"*/ false, + /*"k"*/ false, + /*"l"*/ false, + /*"m"*/ false, + /*"n"*/ true, // replace \n with line feed + /*"o"*/ + false, + /*"p"*/ false, + /*"q"*/ false, + /*"r"*/ true, // replace \r with carriage return + /*"s"*/ + false, + /*"t"*/ true, // replace \t with tab + /*"u"*/ + false, + /*"v"*/ false, + /*"w"*/ false, + /*"x"*/ false, + /*"y"*/ false, + /*"z"*/ false, + /*"{"*/ false, + /*"|"*/ false, + /*"}"*/ false, + /*"~"*/ false, + /*DEL*/ false, +]; global ESCAPE_SEQUENCE_START_CHARS: [bool; 128] = [ - /* NULL */ false, - /* SOH */ false, - /* TXT */ false, - /* ETX */ false, - /* EOT */ false, - /* ENQ */ false, - /* ACK */ false, - /* BEL */ false, - /* BS */ false, - /* TAB */ false, - /* NL */ false, - /* VT */ false, - /* FF */ false, - /* CR */ false, - /* SI */ false, - /* SO */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* */ false, - /* SPACE */ false, - /*"!"*/ false, - /* " */ false, - /*"#"*/ false, - /*"$"*/ false, - /*"%"*/ false, - /*"&"*/ false, - /*"'"*/ false, - /*"("*/ false, - /*")"*/ false, - /*"*"*/ false, - /*"+"*/ false, - /*","*/ false, - /*"-"*/ false, - /*"."*/ false, - /*"/"*/ false, - /*"0"*/ false, - /*"1"*/ false, - /*"2"*/ false, - /*"3"*/ false, - /*"4"*/ false, - /*"5"*/ false, - /*"6"*/ false, - /*"7"*/ false, - /*"8"*/ false, - /*"9"*/ false, - /*":"*/ false, - /*";"*/ false, - /*"<"*/ false, - /*"="*/ false, - /*">"*/ false, - /*"?"*/ false, - /*"@"*/ false, - /*"A"*/ false, - /*"B"*/ false, - /*"C"*/ false, - /*"D"*/ false, - /*"E"*/ false, - /*"F"*/ false, - /*"G"*/ false, - /*"H"*/ false, - /*"I"*/ false, - /*"J"*/ false, - /*"K"*/ false, - /*"L"*/ false, - /*"M"*/ false, - /*"N"*/ false, - /*"O"*/ false, - /*"P"*/ false, - /*"Q"*/ false, - /*"R"*/ false, - /*"S"*/ false, - /*"T"*/ false, - /*"U"*/ false, - /*"V"*/ false, - /*"W"*/ false, - /*"X"*/ false, - /*"Y"*/ false, - /*"Z"*/ false, - /*"["*/ false, - /*"\"*/ true, // replace \\ with \ - /*"]"*/ false, - /*"^"*/ false, - /*"_"*/ false, - /*"`"*/ false, - /*"a"*/ false, - /*"b"*/ false, - /*"c"*/ false, - /*"d"*/ false, - /*"e"*/ false, - /*"f"*/ false, - /*"g"*/ false, - /*"h"*/ false, - /*"i"*/ false, - /*"j"*/ false, - /*"k"*/ false, - /*"l"*/ false, - /*"m"*/ false, - /*"n"*/ false, - /*"o"*/ false, - /*"p"*/ false, - /*"q"*/ false, - /*"r"*/ false, - /*"s"*/ false, - /*"t"*/ false, - /*"u"*/ false, - /*"v"*/ false, - /*"w"*/ false, - /*"x"*/ false, - /*"y"*/ false, - /*"z"*/ false, - /*"{"*/ false, - /*"|"*/ false, - /*"}"*/ false, - /*"~"*/ false, - /*DEL*/ false, - ]; + /* NULL */ false, + /* SOH */ false, + /* TXT */ false, + /* ETX */ false, + /* EOT */ false, + /* ENQ */ false, + /* ACK */ false, + /* BEL */ false, + /* BS */ false, + /* TAB */ false, + /* NL */ false, + /* VT */ false, + /* FF */ false, + /* CR */ false, + /* SI */ false, + /* SO */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* */ false, + /* SPACE */ false, + /*"!"*/ false, + /* " */ false, + /*"#"*/ false, + /*"$"*/ false, + /*"%"*/ false, + /*"&"*/ false, + /*"'"*/ false, + /*"("*/ false, + /*")"*/ false, + /*"*"*/ false, + /*"+"*/ false, + /*","*/ false, + /*"-"*/ false, + /*"."*/ false, + /*"/"*/ false, + /*"0"*/ false, + /*"1"*/ false, + /*"2"*/ false, + /*"3"*/ false, + /*"4"*/ false, + /*"5"*/ false, + /*"6"*/ false, + /*"7"*/ false, + /*"8"*/ false, + /*"9"*/ false, + /*":"*/ false, + /*";"*/ false, + /*"<"*/ false, + /*"="*/ false, + /*">"*/ false, + /*"?"*/ false, + /*"@"*/ false, + /*"A"*/ false, + /*"B"*/ false, + /*"C"*/ false, + /*"D"*/ false, + /*"E"*/ false, + /*"F"*/ false, + /*"G"*/ false, + /*"H"*/ false, + /*"I"*/ false, + /*"J"*/ false, + /*"K"*/ false, + /*"L"*/ false, + /*"M"*/ false, + /*"N"*/ false, + /*"O"*/ false, + /*"P"*/ false, + /*"Q"*/ false, + /*"R"*/ false, + /*"S"*/ false, + /*"T"*/ false, + /*"U"*/ false, + /*"V"*/ false, + /*"W"*/ false, + /*"X"*/ false, + /*"Y"*/ false, + /*"Z"*/ false, + /*"["*/ false, + /*"\"*/ true, // replace \\ with \ + /*"]"*/ + false, + /*"^"*/ false, + /*"_"*/ false, + /*"`"*/ false, + /*"a"*/ false, + /*"b"*/ false, + /*"c"*/ false, + /*"d"*/ false, + /*"e"*/ false, + /*"f"*/ false, + /*"g"*/ false, + /*"h"*/ false, + /*"i"*/ false, + /*"j"*/ false, + /*"k"*/ false, + /*"l"*/ false, + /*"m"*/ false, + /*"n"*/ false, + /*"o"*/ false, + /*"p"*/ false, + /*"q"*/ false, + /*"r"*/ false, + /*"s"*/ false, + /*"t"*/ false, + /*"u"*/ false, + /*"v"*/ false, + /*"w"*/ false, + /*"x"*/ false, + /*"y"*/ false, + /*"z"*/ false, + /*"{"*/ false, + /*"|"*/ false, + /*"}"*/ false, + /*"~"*/ false, + /*DEL*/ false, +]; global ESCAPE_SEQUENCE_REPLACEMENT: [u8; 128] = [ - /* NULL */ 0, - /* SOH */ 0, - /* TXT */ 0, - /* ETX */ 0, - /* EOT */ 0, - /* ENQ */ 0, - /* ACK */ 0, - /* BEL */ 0, - /* BS */ 0, - /* TAB */ 0, - /* NL */ 0, - /* VT */ 0, - /* FF */ 0, - /* CR */ 0, - /* SI */ 0, - /* SO */ 0, - /* */ 0, - /* */ 0, - /* */ 0, - /* */ 0, - /* */ 0, - /* */ 0, - /* */ 0, - /* */ 0, - /* */ 0, - /* */ 0, - /* */ 0, - /* */ 0, - /* */ 0, - /* */ 0, - /* */ 0, - /* */ 0, - /* SPACE */ 0, - /*"!"*/ 0, - /* " */ 34, // replace \" with double quote - /*"#"*/ 0, - /*"$"*/ 0, - /*"%"*/ 0, - /*"&"*/ 0, - /*"'"*/ 0, - /*"("*/ 0, - /*")"*/ 0, - /*"*"*/ 0, - /*"+"*/ 0, - /*","*/ 0, - /*"-"*/ 0, - /*"."*/ 0, - /*"/"*/ 0, - /*"0"*/ 0, - /*"1"*/ 0, - /*"2"*/ 0, - /*"3"*/ 0, - /*"4"*/ 0, - /*"5"*/ 0, - /*"6"*/ 0, - /*"7"*/ 0, - /*"8"*/ 0, - /*"9"*/ 0, - /*":"*/ 0, - /*";"*/ 0, - /*"<"*/ 0, - /*"="*/ 0, - /*">"*/ 0, - /*"?"*/ 0, - /*"@"*/ 0, - /*"A"*/ 0, - /*"B"*/ 0, - /*"C"*/ 0, - /*"D"*/ 0, - /*"E"*/ 0, - /*"F"*/ 0, - /*"G"*/ 0, - /*"H"*/ 0, - /*"I"*/ 0, - /*"J"*/ 0, - /*"K"*/ 0, - /*"L"*/ 0, - /*"M"*/ 0, - /*"N"*/ 0, - /*"O"*/ 0, - /*"P"*/ 0, - /*"Q"*/ 0, - /*"R"*/ 0, - /*"S"*/ 0, - /*"T"*/ 0, - /*"U"*/ 0, - /*"V"*/ 0, - /*"W"*/ 0, - /*"X"*/ 0, - /*"Y"*/ 0, - /*"Z"*/ 0, - /*"["*/ 0, - /*"\"*/ 92, // replace \\ with \ - /*"]"*/ 0, - /*"^"*/ 0, - /*"_"*/ 0, - /*"`"*/ 0, - /*"a"*/ 0, - /*"b"*/ 8, // replace \b with backspace - /*"c"*/ 0, - /*"d"*/ 0, - /*"e"*/ 0, - /*"f"*/ 12, // replace \f with form feed - /*"g"*/ 0, - /*"h"*/ 0, - /*"i"*/ 0, - /*"j"*/ 0, - /*"k"*/ 0, - /*"l"*/ 0, - /*"m"*/ 0, - /*"n"*/ 10, // replace \n with line feed - /*"o"*/ 0, - /*"p"*/ 0, - /*"q"*/ 0, - /*"r"*/ 13, // replace \r with carriage return - /*"s"*/ 0, - /*"t"*/ 9, // replace \t with tab - /*"u"*/ 0, - /*"v"*/ 0, - /*"w"*/ 0, - /*"x"*/ 0, - /*"y"*/ 0, - /*"z"*/ 0, - /*"{"*/ 0, - /*"|"*/ 0, - /*"}"*/ 0, - /*"~"*/ 0, - /*DEL*/ 0, - ]; + /* NULL */ 0, + /* SOH */ 0, + /* TXT */ 0, + /* ETX */ 0, + /* EOT */ 0, + /* ENQ */ 0, + /* ACK */ 0, + /* BEL */ 0, + /* BS */ 0, + /* TAB */ 0, + /* NL */ 0, + /* VT */ 0, + /* FF */ 0, + /* CR */ 0, + /* SI */ 0, + /* SO */ 0, + /* */ 0, + /* */ 0, + /* */ 0, + /* */ 0, + /* */ 0, + /* */ 0, + /* */ 0, + /* */ 0, + /* */ 0, + /* */ 0, + /* */ 0, + /* */ 0, + /* */ 0, + /* */ 0, + /* */ 0, + /* */ 0, + /* SPACE */ 0, + /*"!"*/ 0, + /* " */ 34, // replace \" with double quote + /*"#"*/ + 0, + /*"$"*/ 0, + /*"%"*/ 0, + /*"&"*/ 0, + /*"'"*/ 0, + /*"("*/ 0, + /*")"*/ 0, + /*"*"*/ 0, + /*"+"*/ 0, + /*","*/ 0, + /*"-"*/ 0, + /*"."*/ 0, + /*"/"*/ 0, + /*"0"*/ 0, + /*"1"*/ 0, + /*"2"*/ 0, + /*"3"*/ 0, + /*"4"*/ 0, + /*"5"*/ 0, + /*"6"*/ 0, + /*"7"*/ 0, + /*"8"*/ 0, + /*"9"*/ 0, + /*":"*/ 0, + /*";"*/ 0, + /*"<"*/ 0, + /*"="*/ 0, + /*">"*/ 0, + /*"?"*/ 0, + /*"@"*/ 0, + /*"A"*/ 0, + /*"B"*/ 0, + /*"C"*/ 0, + /*"D"*/ 0, + /*"E"*/ 0, + /*"F"*/ 0, + /*"G"*/ 0, + /*"H"*/ 0, + /*"I"*/ 0, + /*"J"*/ 0, + /*"K"*/ 0, + /*"L"*/ 0, + /*"M"*/ 0, + /*"N"*/ 0, + /*"O"*/ 0, + /*"P"*/ 0, + /*"Q"*/ 0, + /*"R"*/ 0, + /*"S"*/ 0, + /*"T"*/ 0, + /*"U"*/ 0, + /*"V"*/ 0, + /*"W"*/ 0, + /*"X"*/ 0, + /*"Y"*/ 0, + /*"Z"*/ 0, + /*"["*/ 0, + /*"\"*/ 92, // replace \\ with \ + /*"]"*/ + 0, + /*"^"*/ 0, + /*"_"*/ 0, + /*"`"*/ 0, + /*"a"*/ 0, + /*"b"*/ 8, // replace \b with backspace + /*"c"*/ + 0, + /*"d"*/ 0, + /*"e"*/ 0, + /*"f"*/ 12, // replace \f with form feed + /*"g"*/ + 0, + /*"h"*/ 0, + /*"i"*/ 0, + /*"j"*/ 0, + /*"k"*/ 0, + /*"l"*/ 0, + /*"m"*/ 0, + /*"n"*/ 10, // replace \n with line feed + /*"o"*/ + 0, + /*"p"*/ 0, + /*"q"*/ 0, + /*"r"*/ 13, // replace \r with carriage return + /*"s"*/ + 0, + /*"t"*/ 9, // replace \t with tab + /*"u"*/ + 0, + /*"v"*/ 0, + /*"w"*/ 0, + /*"x"*/ 0, + /*"y"*/ 0, + /*"z"*/ 0, + /*"{"*/ 0, + /*"|"*/ 0, + /*"}"*/ 0, + /*"~"*/ 0, + /*DEL*/ 0, +]; diff --git a/src/keyhash.nr b/src/keyhash.nr index b4fa6c9..542ea40 100644 --- a/src/keyhash.nr +++ b/src/keyhash.nr @@ -1,5 +1,5 @@ -use crate::_string_tools::slice_packed_field::slice_fields; use crate::_string_tools::slice_field::slice_200_bits_from_field; +use crate::_string_tools::slice_packed_field::slice_fields; /** * @brief utility struct that computes a 200-bit Poseidon hash of some bytes, diff --git a/src/keymap.nr b/src/keymap.nr index d445ccf..b6aac8e 100644 --- a/src/keymap.nr +++ b/src/keymap.nr @@ -1,10 +1,10 @@ -use crate::json::JSON; -use crate::json_entry::{JSONEntryPacked, JSONEntry}; +use crate::_comparison_tools::lt::assert_lte_240_bit; use crate::_comparison_tools::lt::lt_field_16_bit; use crate::_comparison_tools::lt::lte_field_240_bit; -use crate::_comparison_tools::lt::assert_lte_240_bit; -use crate::json_tables::TOKEN_ENDS_OBJECT_OR_ARRAY; use crate::_string_tools::slice_packed_field::slice_fields; +use crate::json::JSON; +use crate::json_entry::{JSONEntry, JSONEntryPacked}; +use crate::json_tables::TOKEN_ENDS_OBJECT_OR_ARRAY; use crate::keyhash::FieldHasher; use dep::noir_sort; diff --git a/src/lib.nr b/src/lib.nr index 7c17181..41c629a 100644 --- a/src/lib.nr +++ b/src/lib.nr @@ -16,12 +16,12 @@ mod get_literal; mod get_object; mod get_array; +use crate::_string_tools::slice_packed_field::slice_fields; +use crate::get_literal::JSONLiteral; use crate::json::JSON; use crate::json::JSONValue; -use crate::json_entry::JSONEntryPacked; use crate::json_entry::JSONEntry; -use crate::_string_tools::slice_packed_field::slice_fields; -use crate::get_literal::JSONLiteral; +use crate::json_entry::JSONEntryPacked; trait JSONParserTrait { fn parse_json_from_string(s: str) -> Self; From bdd79f92179ee3a03ea2f0230212b7e664889d60 Mon Sep 17 00:00:00 2001 From: Khashayar Barooti Date: Wed, 6 Nov 2024 10:06:11 +0100 Subject: [PATCH 5/7] fixed for 0.37.0 --- .github/workflows/test.yml | 4 ++-- Nargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 815bbe6..0d2030e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - toolchain: [nightly, 0.36.0] + toolchain: [nightly, 0.37.0] steps: - name: Checkout sources uses: actions/checkout@v4 @@ -38,7 +38,7 @@ jobs: - name: Install Nargo uses: noir-lang/noirup@v0.1.3 with: - toolchain: 0.36.0 + toolchain: 0.37.0 - name: Run formatter run: nargo fmt --check diff --git a/Nargo.toml b/Nargo.toml index d9fa6a1..628b216 100644 --- a/Nargo.toml +++ b/Nargo.toml @@ -2,7 +2,7 @@ name = "json_parser" type = "lib" authors = [""] -compiler_version = ">=0.36.0" +compiler_version = ">=0.37.0" [dependencies] noir_sort = {tag = "v0.2.0", git = "https://github.com/noir-lang/noir_sort"} \ No newline at end of file From 8d3551b3ff553e5644e56508092d27040647f78a Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Wed, 6 Nov 2024 10:13:25 +0000 Subject: [PATCH 6/7] Delete .vscode/launch.json --- .vscode/launch.json | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index ff05fe5..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "noir", - "request": "launch", - "name": "Noir binary package", - "projectFolder": "${workspaceFolder}", - "proverName": "Prover" - } - ] -} \ No newline at end of file From 16431d8240aa568d4a592e7b7b2a0c63a4d83ee4 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Wed, 6 Nov 2024 10:13:36 +0000 Subject: [PATCH 7/7] Delete .vscode/settings.json --- .vscode/settings.json | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 9dae2d8..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "noir.nargoPath": "/Users/khashayarbarooti/.nargo/bin/nargo" -} \ No newline at end of file