diff --git a/SECURITY.md b/SECURITY.md index 5a6d459c2d..c0bed3f07c 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -14,4 +14,4 @@ To report a security issue, please email [security@ladybugdb.com](mailto:securit ## Threat Model -Ladybug's current threat model is documented in [security/threat-model.md](security/threat-model.md). +Ladybug's current threat model is documented in [security/threat_model.md](security/threat_model.md). diff --git a/docs/partitioning.md b/docs/partitioning.md index 6f2eb9d027..ece958f5ad 100644 --- a/docs/partitioning.md +++ b/docs/partitioning.md @@ -9,8 +9,10 @@ protocol such as ADBC). > Status: **v1 (foundational).** DDL, catalog, storage, persistence, drop-cascade and query > (read over all partitions) are implemented. Write-routing (COPY / CREATE / MERGE into the -> parent) is implemented for HASH partitioning; RANGE reuses the same deterministic hash routing -> until declarative range bounds land. Predicate-based partition pruning is still future work. +> parent) is implemented for HASH partitioning. **`PARTITION BY RANGE` is refused at DDL time**: +> real range partitioning must derive partition bounds from the actual value distribution, which +> is not implemented yet — refusing beats silently falling back to hash routing. Predicate-based +> partition pruning is still future work. > > Invariant-protection implemented in response to design review: partitions cannot be dropped or > altered individually, `DROP GRAPH` refuses node-table subgraphs, dropping a partitioned table is @@ -130,15 +132,11 @@ CREATE NODE TABLE Orders ( region STRING, amount INT64 ) PARTITION BY HASH (region) PARTITIONS 4; - --- Range partitioning (bounds are derived; see design below). -CREATE NODE TABLE Events ( - id INT64 PRIMARY KEY, - ts TIMESTAMP, - value DOUBLE -) PARTITION BY RANGE (ts) PARTITIONS 5; ``` +The grammar still accepts `PARTITION BY RANGE () PARTITIONS n`, but the binder refuses it: +RANGE partitioning is not implemented yet (see the status note above). + The grammar extension lives in `src/antlr4/Cypher.g4`: ``` @@ -233,10 +231,8 @@ Because each partition is a real node table, you can also address a specific par * **Write-routing.** `COPY INTO `, `CREATE (n:)` and `MERGE` against a partitioned parent are routed into the partition matching each row's partition-key value. HASH - partitions use the same value hashing as the built-in `HASH()` function; RANGE partitions - currently reuse that hash (there are no declarative bounds yet), which keeps writes - deterministic and findable because parent reads union over all partitions. Primary-key - uniqueness is enforced per partition, not across the parent. + partitions use the same value hashing as the built-in `HASH()` function. Primary-key uniqueness + is enforced per partition, not across the parent. * **No partition pruning on predicates.** A `WHERE` on the partition key is not yet used to skip partitions; all partitions are scanned and unioned. * **`ALTER` is limited to `RENAME`.** Renaming the parent renames its `_p` partitions @@ -246,8 +242,9 @@ Because each partition is a real node table, you can also address a specific par partitions; delete and re-insert instead. * **Rels attach per partition.** `FROM ` expands to one pair per partition; rel pattern writes against the parent are refused (use a specific partition) until runtime rel routing lands. -* **Range bounds are not declarative.** `PARTITIONS n` builds the range split; per-partition bound - lists (`PARTITION p0 VALUES < (...), p1 VALUES FROM ... `) are future work. +* **RANGE is refused at DDL time.** Meaningful range partitioning needs bounds derived from the + actual value distribution (declarative bounds or data-driven splitting); a static stand-in would + misplace rows silently. See the roadmap. * **No remote partitions yet.** Only local (in-process) partition subgraphs exist today. ## Roadmap @@ -258,17 +255,23 @@ The canonical path is `COPY INTO Orders FROM file`. Implemented: * `BoundCopyFromInfo`/`NodeBatchInsertInfo` carry the partition method, partition-key column id, and the child table list (`common::NodePartitionWriteInfo`). -* `NodeBatchInsert` evaluates each row's partition-key value, computes `hash(value) % n` (for both - HASH and, for now, RANGE), and routes consecutive same-partition runs into the correct child - `NodeTable`'s node group. Each child is an ordinary `NodeTable`, so its own WAL/MVCC machinery - (`appendToLastNodeGroup` + commit/undo records) applies the routed write. +* `NodeBatchInsert` evaluates each row's partition-key value, computes `hash(value) % n`, and + routes consecutive same-partition runs into the correct child `NodeTable`'s node group. Each + child is an ordinary `NodeTable`, so its own WAL/MVCC machinery (`appendToLastNodeGroup` + + commit/undo records) applies the routed write. * Primary-key duplicate detection is per partition (each child has its own PK index), matching how a direct `COPY` into a partition subgraph behaves. * Single-row `CREATE`/`MERGE` routes at runtime in `NodeInsertExecutor`: the partition key is evaluated, the matching child table is selected, and the row is inserted there. -Remaining for RANGE: replace the hash stand-in with real bound comparison once declarative range -bounds (`PARTITION p0 VALUES < (...) ...`) are implemented. +### 1b. RANGE partitioning (not implemented; DDL refuses it) + +Real RANGE needs bounds that reflect the data: either user-declared bounds +(`PARTITION p0 VALUES < (...)`) or dynamic, distribution-aware splitting of the input (min/max or +equi-depth histograms computed during COPY, persisted with the parent). Equal splits of the *type +domain* were considered and rejected: every realistic timestamp lands in one middle bucket. +Until one of those exists, the binder refuses `PARTITION BY RANGE` instead of silently routing by +hash. ### 2. Rel writes against the parent @@ -284,18 +287,36 @@ Push a predicate on the partition column into the scan: for HASH only equality filter-push-down / scan selection (`scan->setNumPartitionsToScan`, etc.) once the partition bounds are materialized. -### 4. Declarative range bounds - -Extend the grammar to accept per-partition bounds: - -```cypher -CREATE NODE TABLE Events (...) PARTITION BY RANGE (ts) ( - PARTITION p2023 VALUES < DATE '2024-01-01', - PARTITION p2024 VALUES >= DATE '2024-01-01' AND < DATE '2025-01-01' -); -``` - -### 5. Row movement, ALTER propagation, and DETACH PARTITION +### 4. RANGE partitioning: dynamic, distribution-aware splits + +Unblocks `PARTITION BY RANGE` (currently refused at DDL). Two shapes, in increasing ambition: + +* **Declarative bounds** — extend the grammar to accept per-partition bounds: + ```cypher + CREATE NODE TABLE Events (...) PARTITION BY RANGE (ts) ( + PARTITION p2023 VALUES < DATE '2024-01-01', + PARTITION p2024 VALUES >= DATE '2024-01-01' AND < DATE '2025-01-01' + ); + ``` +* **Dynamic splitting** — derive bounds from the actual value distribution (min/max or equi-depth + histograms computed over the COPY input, persisted with the parent; late rows outside the + learned range go to an overflow partition or trigger resplitting). This is what makes + `RANGE(ts)` place rows monotonically without asking the user for bounds. + +### 5. LIST partitioning (per-distinct-value partitions) — IMPLEMENTED + +`PARTITION BY LIST (col)` creates one partition per distinct key value on demand: 100 distinct +cluster IDs → ~100 partitions. The first partition is created at DDL time (unkeyed, stays empty); +every other partition is created at first sight of a new value, inside the writing transaction, +via the same machinery as CREATE NODE TABLE (catalog entry + serial sequence + subgraph + +storage + WAL create record), so rollback, WAL replay, and checkpointing behave like ordinary DDL. +The encoded-key → child-table-ID map persists on the parent entry (storage version 47). Writes +route through `ListPartitionRouter` (single-row inserts and COPY alike; COPY grows its target +arrays under the router lock as workers discover values). Rel patterns bound against a LIST +parent attach to the partitions that exist when they are bound; partitions created later need new +rel tables (see roadmap item 2). + +### 6. Row movement, ALTER propagation, and DETACH PARTITION Lift the v1 restrictions in dependency order: @@ -308,7 +329,53 @@ Lift the v1 restrictions in dependency order: table and back, the PostgreSQL-style escape hatch that today is approximated by "drop the parent"; also revisit cascade-dropping dependent rels at that point. -### 6. Remote partitions over a columnar protocol (ADBC / Arrow Flight) +### 6b. Per-partition storage files (`test._p.db`) — DESIGNED, NOT IMPLEMENTED + +Partition children currently share the parent's StorageManager, so their bytes live inside +`test.db`. Goal: each partition gets its own file, like graphs created via CREATE GRAPH +(`DatabaseManager::createGraph` builds a per-graph Catalog + StorageManager at path +`StorageUtils::getGraphPath(dbPath, name)`). + +Phase B1 (shared catalog, separate files): +* Registry: `table_id_t -> std::unique_ptr` owned by DatabaseManager. +* Creation: DDL seed partitions and ListPartitionRouter creations build a dedicated + StorageManager for the child (path = getGraphPath(dbPath, childName)) instead of calling + main-SM createTable; register it. +* Resolution: all `StorageManager::Get(...)->getTable(id)` sites that can see a partition child + go through one helper that checks the registry, then lazily opens the child's SM from catalog + metadata on first touch after reopen. Known sites: plan_mapper.cpp:270 (scans), map_insert.cpp, + node_batch_insert.cpp (init + growth), insert_executor.cpp resolveTableForNodeID, + partition_routing.cpp pre-check. +* Lifecycle: checkpoint iterates registered SMs; DROP-parent cascade closes+deletes files; + rolled-back dynamic partitions delete their file; WAL replay recreates via the same creation + helper. + +Compatibility with PR #829 (`common::PartitionRoutingHooks`, remote partition subgraphs): + +* The hooks and B split the same seams along orthogonal axes: 829 handles *claimed* (remote) + partitions, B gives *unclaimed* (local) partitions their own file. Decision order at every + shared seam is: consult `locate` first; claimed -> wrapper owns it, no local state (existing + 829 behavior); unclaimed -> B's dedicated StorageManager. +* Creation (`storage_manager.cpp:271`) becomes one decision tree: claimed -> onPartitionCreate + only; unclaimed -> build + register the per-partition SM. Because claimed partitions never + reach B's registry, checkpoint/rollback iterate exactly the unclaimed set with no extra + filtering -- the two mechanisms cannot double-handle a partition. +* Reads: 829 swaps claimed partitions for scan-function-backed substitutes at bind time + (`expandPartitionedNodeTables`), so plan-time resolution (B's helper) never sees a remote + child; no ordering hazard. +* Drops: onPartitionDrop fires for claimed partitions; B closes+deletes files and registry + entries for unclaimed ones. Disjoint by construction. +* File naming follows the child's catalog name (getGraphPath scheme); parent-rename cascades + must rename child files alongside entry renames. PartitionRef stays ID-based as in 829; + names are only consulted when opening/reopening a file. +* Phase A remains compatible: promoting an unclaimed partition to a standalone graph-database + changes what its registry entry holds (Catalog+SM instead of bare SM), not the seams. + +Phase A (later): promote each partition to a full standalone graph-database (own Catalog like +CREATE GRAPH), making cross-partition queries identical to cross-graph ones; requires +catalog-aware table-ID resolution everywhere. + +### 7. Remote partitions over a columnar protocol (ADBC / Arrow Flight) Each partition subgraph already *is* a `NodeTableCatalogEntry`. A remote partition would be a flavor whose storage lives on a server: diff --git a/extension b/extension index 8bca18b9fb..68ecf785c7 160000 --- a/extension +++ b/extension @@ -1 +1 @@ -Subproject commit 8bca18b9fbaae96a0897da45dc21d628b068f04e +Subproject commit 68ecf785c7a05d0e45ba38abf6c45f5d3d9ad579 diff --git a/scripts/antlr4/Cypher.g4 b/scripts/antlr4/Cypher.g4 index fb87f29c42..f2eb6816cc 100644 --- a/scripts/antlr4/Cypher.g4 +++ b/scripts/antlr4/Cypher.g4 @@ -140,6 +140,8 @@ KEY : ( 'K' | 'k' ) ( 'E' | 'e' ) ( 'Y' | 'y' ) ; LIMIT : ( 'L' | 'l' ) ( 'I' | 'i' ) ( 'M' | 'm' ) ( 'I' | 'i' ) ( 'T' | 't' ) ; +LIST : ( 'L' | 'l' ) ( 'I' | 'i' ) ( 'S' | 's' ) ( 'T' | 't' ) ; + LOAD : ( 'L' | 'l' ) ( 'O' | 'o' ) ( 'A' | 'a' ) ( 'D' | 'd' ) ; LOGICAL : ( 'L' | 'l' ) ( 'O' | 'o' ) ( 'G' | 'g' ) ( 'I' | 'i' ) ( 'C' | 'c' ) ( 'A' | 'a' ) ( 'L' | 'l' ) ; @@ -386,7 +388,7 @@ iC_CreateNodeTable // PostgreSQL-style partitioning. A node table can be declared as a partitioned parent, // where each partition is backed by its own subgraph (a hidden node table). iC_PartitionBy - : PARTITION SP BY SP ( iC_PartitionRange | iC_PartitionHash ) ; + : PARTITION SP BY SP ( iC_PartitionRange | iC_PartitionHash | iC_PartitionList ) ; iC_PartitionHash : HASH SP? '(' SP? oC_PropertyKeyName SP? ')' SP PARTITIONS SP oC_IntegerLiteral ; @@ -394,6 +396,10 @@ iC_PartitionHash iC_PartitionRange : RANGE SP? '(' SP? oC_PropertyKeyName SP? ')' SP PARTITIONS SP oC_IntegerLiteral ; +// List partitioning: one partition per distinct partition-key value, created on demand. +iC_PartitionList + : LIST SP? '(' SP? oC_PropertyKeyName SP? ')' ; + iC_CreateRelTable : CREATE SP REL SP TABLE ( SP GROUP )? ( SP iC_IfNotExists )? SP oC_SchemaName SP? '(' SP? @@ -1105,6 +1111,7 @@ iC_NonReservedKeywords | STRUCT | L_SKIP | LIMIT + | LIST | TRANSACTION | TYPE | USE diff --git a/scripts/antlr4/hash.md5 b/scripts/antlr4/hash.md5 index 569d2b8452..e98534e7d8 100644 --- a/scripts/antlr4/hash.md5 +++ b/scripts/antlr4/hash.md5 @@ -1 +1 @@ -27eca67648a4fc8b77d5182a315a9eb4 +c6ef6ea298ca84a5c080bae09a29c9db diff --git a/src/antlr4/Cypher.g4 b/src/antlr4/Cypher.g4 index 55375932ff..1a695f2f0d 100644 --- a/src/antlr4/Cypher.g4 +++ b/src/antlr4/Cypher.g4 @@ -119,7 +119,7 @@ iC_CreateNodeTable // PostgreSQL-style partitioning. A node table can be declared as a partitioned parent, // where each partition is backed by its own subgraph (a hidden node table). iC_PartitionBy - : PARTITION SP BY SP ( iC_PartitionRange | iC_PartitionHash ) ; + : PARTITION SP BY SP ( iC_PartitionRange | iC_PartitionHash | iC_PartitionList ) ; iC_PartitionHash : HASH SP? '(' SP? oC_PropertyKeyName SP? ')' SP PARTITIONS SP oC_IntegerLiteral ; @@ -127,6 +127,10 @@ iC_PartitionHash iC_PartitionRange : RANGE SP? '(' SP? oC_PropertyKeyName SP? ')' SP PARTITIONS SP oC_IntegerLiteral ; +// List partitioning: one partition per distinct partition-key value, created on demand. +iC_PartitionList + : LIST SP? '(' SP? oC_PropertyKeyName SP? ')' ; + iC_CreateRelTable : CREATE SP REL SP TABLE ( SP GROUP )? ( SP iC_IfNotExists )? SP oC_SchemaName SP? '(' SP? @@ -838,6 +842,7 @@ iC_NonReservedKeywords | STRUCT | L_SKIP | LIMIT + | LIST | TRANSACTION | TYPE | USE diff --git a/src/antlr4/keywords.txt b/src/antlr4/keywords.txt index 7757b85afd..97da23b705 100644 --- a/src/antlr4/keywords.txt +++ b/src/antlr4/keywords.txt @@ -61,6 +61,7 @@ IS JOIN KEY LIMIT +LIST LOAD LOGICAL MACRO diff --git a/src/binder/bind/bind_ddl.cpp b/src/binder/bind/bind_ddl.cpp index 546005eede..82bde96fe0 100644 --- a/src/binder/bind/bind_ddl.cpp +++ b/src/binder/bind/bind_ddl.cpp @@ -261,13 +261,36 @@ BoundCreateTableInfo Binder::bindCreateNodeTableInfo(const CreateTableInfo* info std::optional partitionInfo; if (extraInfo.partitionInfo.has_value()) { const auto& parsed = *extraInfo.partitionInfo; - auto method = parsed.method == ParsedPartitionMethod::HASH ? BoundPartitionMethod::HASH : - BoundPartitionMethod::RANGE; - if (parsed.numPartitions == 0) { - throw BinderException("Number of partitions must be greater than 0."); + BoundPartitionMethod method; + switch (parsed.method) { + case ParsedPartitionMethod::HASH: + method = BoundPartitionMethod::HASH; + break; + case ParsedPartitionMethod::LIST: + // LIST partitions dynamically: one partition per distinct key value, created on + // demand. It takes no PARTITIONS clause. + method = BoundPartitionMethod::LIST; + validatePartitionColumn(propertyDefinitions, parsed.columnName); + partitionInfo = BoundPartitionInfo(method, parsed.columnName, 0 /* numPartitions */); + break; + // Real range partitioning must split on the actual distribution of values (equal + // domain splits would dump all real-world data into one bucket). Until that dynamic + // splitting exists, refuse the DDL rather than silently falling back to hash routing. + case ParsedPartitionMethod::RANGE: + throw BinderException( + "RANGE partitioning is not implemented yet. RANGE requires partition bounds " + "derived from the actual value distribution, which is future work. Use PARTITION " + "BY HASH instead."); + default: + UNREACHABLE_CODE; + } + if (method == BoundPartitionMethod::HASH) { + if (parsed.numPartitions == 0) { + throw BinderException("Number of partitions must be greater than 0."); + } + validatePartitionColumn(propertyDefinitions, parsed.columnName); + partitionInfo = BoundPartitionInfo(method, parsed.columnName, parsed.numPartitions); } - validatePartitionColumn(propertyDefinitions, parsed.columnName); - partitionInfo = BoundPartitionInfo(method, parsed.columnName, parsed.numPartitions); } auto boundExtraInfo = std::make_unique(extraInfo.pKName, std::move(propertyDefinitions), std::move(storage), std::move(storageFormat), diff --git a/src/catalog/catalog.cpp b/src/catalog/catalog.cpp index 0a50a2bd96..d27b03c336 100644 --- a/src/catalog/catalog.cpp +++ b/src/catalog/catalog.cpp @@ -635,6 +635,11 @@ CatalogEntry* Catalog::createNodeTableEntry(Transaction* transaction, for (auto& definition : extraInfo->propertyDefinitions) { entry->addProperty(definition); } + if (extraInfo->partitionParentTableID != common::INVALID_TABLE_ID) { + // Dynamically created LIST partition child: register the parent link so reads expand + // to it and writes can resolve it. + entry->setParentInfo(extraInfo->partitionParentTableID, extraInfo->partitionChildIndex); + } entry->setHasParent(info.hasParent); createSerialSequence(transaction, entry.get(), info.isInternal); auto catalogSet = info.isInternal ? internalTables.get() : tables.get(); @@ -654,7 +659,15 @@ CatalogEntry* Catalog::createNodeTableEntry(Transaction* transaction, auto partitionColumnID = parent->getPropertyID(partitionInfo.columnName); parent->setPartitionInfo(partitionInfo.method, partitionInfo.columnName, partitionColumnID, partitionInfo.numPartitions); - for (auto i = 0u; i < partitionInfo.numPartitions; i++) { + // LIST starts with one partition and grows on demand; HASH creates its full set here. + // LIST's initial partition keeps the >=1-partition invariant that reads and writes rely + // on (partition expansion never yields an empty child set). It stays unkeyed and empty: + // rows always route to the partition created for their own key value. + const auto numInitialPartitions = + partitionInfo.method == binder::BoundPartitionMethod::LIST ? + 1 : + partitionInfo.numPartitions; + for (auto i = 0u; i < numInitialPartitions; i++) { auto childName = std::format("{}_p{}", info.tableName, i); auto child = std::make_unique(childName, extraInfo->primaryKeyName, extraInfo->storage, extraInfo->storageFormat); diff --git a/src/catalog/catalog_entry/node_table_catalog_entry.cpp b/src/catalog/catalog_entry/node_table_catalog_entry.cpp index 09833f9839..c18ba6f791 100644 --- a/src/catalog/catalog_entry/node_table_catalog_entry.cpp +++ b/src/catalog/catalog_entry/node_table_catalog_entry.cpp @@ -42,6 +42,21 @@ void NodeTableCatalogEntry::setPartitionInfo(binder::BoundPartitionMethod method this->numPartitions = numPartitions; } +std::optional NodeTableCatalogEntry::findListPartition( + const std::string& encodedKey) const { + for (const auto& [key, tableID] : listPartitionKeys) { + if (key == encodedKey) { + return tableID; + } + } + return std::nullopt; +} + +void NodeTableCatalogEntry::addListPartition(std::string encodedKey, common::table_id_t tableID) { + DASSERT(!findListPartition(encodedKey).has_value()); + listPartitionKeys.emplace_back(std::move(encodedKey), tableID); +} + void NodeTableCatalogEntry::renameProperty(const std::string& propertyName, const std::string& newName) { TableCatalogEntry::renameProperty(propertyName, newName); @@ -77,6 +92,13 @@ void NodeTableCatalogEntry::serialize(common::Serializer& serializer) const { serializer.write(partitionColumnID); serializer.write(numPartitions); serializer.serializeVector(childTableIDs); + // LIST-only: encoded key -> child table id, in creation order. Readers gate on the + // storage version; writers always emit the current format. + serializer.write(listPartitionKeys.size()); + for (const auto& [encodedKey, tableID] : listPartitionKeys) { + serializer.write(encodedKey); + serializer.write(tableID); + } } serializer.writeDebuggingInfo("partitionChild"); serializer.write(isPartitionChild()); @@ -146,6 +168,19 @@ std::unique_ptr NodeTableCatalogEntry::deserialize( nodeTableEntry->partitionColumnID = columnID; nodeTableEntry->numPartitions = numPartitions; nodeTableEntry->childTableIDs = std::move(childTableIDs); + if (deserializer.getStorageVersion() >= + ::lbug::storage::StorageVersionInfo::STORAGE_VERSION_47) { + auto numListKeys = uint64_t{0}; + deserializer.deserializeValue(numListKeys); + nodeTableEntry->listPartitionKeys.reserve(numListKeys); + for (auto i = 0u; i < numListKeys; i++) { + std::string encodedKey; + common::table_id_t tableID; + deserializer.deserializeValue(encodedKey); + deserializer.deserializeValue(tableID); + nodeTableEntry->listPartitionKeys.emplace_back(std::move(encodedKey), tableID); + } + } } deserializer.validateDebuggingInfo(debuggingInfo, "partitionChild"); bool isPartitionChild = false; @@ -218,8 +253,12 @@ std::unique_ptr NodeTableCatalogEntry::getBoun partitionInfo = binder::BoundPartitionInfo(*partitionMethod, partitionColumnName, numPartitions); } - return std::make_unique(primaryKeyName, + auto boundExtraInfo = std::make_unique(primaryKeyName, copyVector(getProperties()), storage, storageFormat, std::move(partitionInfo)); + if (isPartitionChild()) { + boundExtraInfo->setPartitionParent(parentTableID, partitionIndex); + } + return boundExtraInfo; } } // namespace catalog diff --git a/src/include/binder/ddl/bound_create_table_info.h b/src/include/binder/ddl/bound_create_table_info.h index 47b1ff13a1..1198b2efba 100644 --- a/src/include/binder/ddl/bound_create_table_info.h +++ b/src/include/binder/ddl/bound_create_table_info.h @@ -74,8 +74,9 @@ struct LBUG_API BoundExtraCreateTableInfo : BoundExtraCreateCatalogEntryInfo { } }; -// PostgreSQL-style partitioning method applied to a node table. -enum class BoundPartitionMethod : uint8_t { HASH = 0, RANGE = 1 }; +// PostgreSQL-style partitioning method applied to a node table. LIST partitions dynamically: one +// partition per distinct partition-key value, created on demand (numPartitions is unused). +enum class BoundPartitionMethod : uint8_t { HASH = 0, RANGE = 1, LIST = 2 }; struct BoundPartitionInfo { BoundPartitionMethod method; @@ -91,6 +92,16 @@ struct BoundExtraCreateNodeTableInfo final : BoundExtraCreateTableInfo { std::string storage; common::StorageFormat storageFormat = common::StorageFormat::NONE; std::optional partitionInfo; + // Set when this entry is a dynamically created LIST partition: links the child to its + // parent and ordinal so catalog creation (including WAL replay) registers it as a + // partition subgraph. + common::table_id_t partitionParentTableID = common::INVALID_TABLE_ID; + uint64_t partitionChildIndex = 0; + + void setPartitionParent(common::table_id_t parentID, uint64_t index) { + partitionParentTableID = parentID; + partitionChildIndex = index; + } BoundExtraCreateNodeTableInfo(std::string primaryKeyName, std::vector definitions, std::string storage = "", @@ -102,7 +113,9 @@ struct BoundExtraCreateNodeTableInfo final : BoundExtraCreateTableInfo { BoundExtraCreateNodeTableInfo(const BoundExtraCreateNodeTableInfo& other) : BoundExtraCreateTableInfo{copyVector(other.propertyDefinitions)}, primaryKeyName{other.primaryKeyName}, storage{other.storage}, - storageFormat{other.storageFormat}, partitionInfo{other.partitionInfo} {} + storageFormat{other.storageFormat}, partitionInfo{other.partitionInfo}, + partitionParentTableID{other.partitionParentTableID}, + partitionChildIndex{other.partitionChildIndex} {} std::unique_ptr copy() const override { return std::make_unique(*this); diff --git a/src/include/catalog/catalog_entry/node_table_catalog_entry.h b/src/include/catalog/catalog_entry/node_table_catalog_entry.h index 61107dede7..b1c0fb4a13 100644 --- a/src/include/catalog/catalog_entry/node_table_catalog_entry.h +++ b/src/include/catalog/catalog_entry/node_table_catalog_entry.h @@ -121,6 +121,17 @@ class LBUG_API NodeTableCatalogEntry final : public TableCatalogEntry { common::table_id_t getParentTableID() const { return parentTableID; } uint64_t getPartitionIndex() const { return partitionIndex; } + // ---- LIST partitioning ---- + // A LIST parent keeps one partition per distinct partition-key value. The value -> partition + // mapping is persisted as an opaque encoded key (see processor-side encodeListPartitionKey) + // so the catalog does not need typed Value serialization. + std::optional findListPartition( + const std::string& encodedKey) const; // linear scan; callers cache hot lookups + void addListPartition(std::string encodedKey, common::table_id_t tableID); + const std::vector>& getListPartitionKeys() const { + return listPartitionKeys; + } + std::unique_ptr getBoundScanInfo(main::ClientContext* context, const std::string& nodeUniqueName = "") override; @@ -155,6 +166,8 @@ class LBUG_API NodeTableCatalogEntry final : public TableCatalogEntry { common::property_id_t partitionColumnID = common::INVALID_PROPERTY_ID; uint64_t numPartitions = 0; std::vector childTableIDs; + // LIST-only, parent side: encoded partition-key value -> child table id, in creation order. + std::vector> listPartitionKeys; common::table_id_t parentTableID = common::INVALID_TABLE_ID; uint64_t partitionIndex = 0; }; diff --git a/src/include/common/partition_routing.h b/src/include/common/partition_routing.h index 5df5c73995..a81860d077 100644 --- a/src/include/common/partition_routing.h +++ b/src/include/common/partition_routing.h @@ -8,8 +8,9 @@ namespace lbug { namespace common { -// PostgreSQL-style partitioning method. Mirrors binder::BoundPartitionMethod (HASH=0, RANGE=1). -enum class PartitionMethod : uint8_t { HASH = 0, RANGE = 1 }; +// PostgreSQL-style partitioning method. Mirrors binder::BoundPartitionMethod (HASH=0, RANGE=1, +// LIST=2). +enum class PartitionMethod : uint8_t { HASH = 0, RANGE = 1, LIST = 2 }; // Write-routing metadata for a partitioned node table. The logical parent owns no physical // storage; every write to the parent must be routed into one of its partition subgraphs. diff --git a/src/include/parser/ddl/create_table_info.h b/src/include/parser/ddl/create_table_info.h index 8d4fb303c7..34bac1f9d9 100644 --- a/src/include/parser/ddl/create_table_info.h +++ b/src/include/parser/ddl/create_table_info.h @@ -22,8 +22,9 @@ struct ExtraCreateTableInfo { } }; -// PostgreSQL-style partitioning method applied to a node table. -enum class ParsedPartitionMethod : uint8_t { HASH = 0, RANGE = 1 }; +// PostgreSQL-style partitioning method applied to a node table. LIST partitions dynamically: one +// partition per distinct partition-key value, created on demand (numPartitions is unused). +enum class ParsedPartitionMethod : uint8_t { HASH = 0, RANGE = 1, LIST = 2 }; struct ParsedPartitionInfo { ParsedPartitionMethod method; diff --git a/src/include/processor/operator/persistent/insert_executor.h b/src/include/processor/operator/persistent/insert_executor.h index bfc8c2c8b7..1c88494cf9 100644 --- a/src/include/processor/operator/persistent/insert_executor.h +++ b/src/include/processor/operator/persistent/insert_executor.h @@ -1,8 +1,10 @@ #pragma once #include "common/enums/conflict_action.h" +#include "common/partition_routing.h" #include "expression_evaluator/expression_evaluator.h" #include "processor/execution_context.h" +#include "processor/partition_routing.h" #include "storage/table/node_table.h" #include "storage/table/rel_table.h" @@ -48,8 +50,15 @@ struct NodeTableInsertInfo { // derive the PK vector position) and `partitionTables` holds every partition subgraph in // partition order. `partitionKeyColumnID` indexes the partition-key column among // columnDataVectors. Empty `partitionTables` means a plain single-table write. + // + // LIST parents route through `listRouter` instead: their partition set grows dynamically, so + // targets cannot be fixed at plan time. `parentTableID` lets the executor build the router + // lazily (clones of the insert info start with a null router). std::vector partitionTables; common::column_id_t partitionKeyColumnID = common::INVALID_COLUMN_ID; + common::PartitionMethod partitionMethod = common::PartitionMethod::HASH; + common::table_id_t parentTableID = common::INVALID_TABLE_ID; + std::unique_ptr listRouter; NodeTableInsertInfo(storage::NodeTable* table, evaluator::evaluator_vector_t columnDataEvaluators) @@ -62,7 +71,8 @@ struct NodeTableInsertInfo { NodeTableInsertInfo(const NodeTableInsertInfo& other) : table{other.table}, columnDataEvaluators{copyVector(other.columnDataEvaluators)}, pkVector{nullptr}, partitionTables{other.partitionTables}, - partitionKeyColumnID{other.partitionKeyColumnID} {} + partitionKeyColumnID{other.partitionKeyColumnID}, partitionMethod{other.partitionMethod}, + parentTableID{other.parentTableID} {} }; class NodeInsertExecutor { @@ -88,8 +98,11 @@ class NodeInsertExecutor { bool checkConflict(const transaction::Transaction* transaction, storage::NodeTable* table) const; // Resolves the partition subgraph for the current (already evaluated) partition-key value. - storage::NodeTable* resolveTargetTable() const; - storage::NodeTable* resolveTableForNodeID(common::nodeID_t nodeID) const; + // LIST parents resolve (and, on first sight of a value, create) their partition through the + // router, so this can grow the parent's partition set. + storage::NodeTable* resolveTargetTable(main::ClientContext* context); + storage::NodeTable* resolveTableForNodeID(common::nodeID_t nodeID, + main::ClientContext* context) const; private: NodeInsertInfo info; diff --git a/src/include/processor/operator/persistent/node_batch_insert.h b/src/include/processor/operator/persistent/node_batch_insert.h index f182801a88..99f62eadba 100644 --- a/src/include/processor/operator/persistent/node_batch_insert.h +++ b/src/include/processor/operator/persistent/node_batch_insert.h @@ -6,6 +6,7 @@ #include "expression_evaluator/expression_evaluator.h" #include "processor/operator/persistent/batch_insert.h" #include "processor/operator/persistent/index_builder.h" +#include "processor/partition_routing.h" #include "storage/stats/table_stats.h" #include "storage/table/chunked_node_group.h" @@ -96,10 +97,15 @@ struct NodeBatchInsertSharedState final : BatchInsertSharedState { std::vector mainDataColumns; // One write target per partition subgraph (or exactly one for a non-partitioned table). + // LIST parents append to this vector as new partitions are discovered mid-COPY (under the + // router lock); workers mirror the growth in their own `NodeBatchInsertLocalState`. std::vector targets; // Index of the partition-key column among the evaluated column vectors; INVALID when the // write is not into a partitioned parent. common::column_id_t partitionKeyColumnIdx = common::INVALID_COLUMN_ID; + // Set only for LIST-partitioned parents: creates partitions on first sight of a new key + // value and serializes discovery across COPY workers. + std::unique_ptr listRouter; std::shared_ptr duplicatePKSkipResult; @@ -127,6 +133,11 @@ struct NodeBatchInsertLocalState final : BatchInsertLocalState { // Scratch buffer reused to hold the partition index of every row in the current chunk. std::vector partitionIdxes; + // Producer tokens for each target's local index builder. LIST COPYs grow this alongside + // `targets` when a new partition is created mid-copy, so its builder joins the producer + // count like any pre-existing partition's. + std::vector> indexProducerTokens; + // Per-operator table stats for the non-partitioned (single target) path only. Partitioned // COPYs skip per-partition stats collection for now (stats are advisory, not required for // correctness). @@ -175,7 +186,15 @@ class NodeBatchInsert final : public BatchInsert { std::unique_ptr& nodeGroup, common::offset_t startIndexInGroup) const; - void copyToNodeGroup(transaction::Transaction* transaction, storage::MemoryManager* mm) const; + void copyToNodeGroup(transaction::Transaction* transaction, storage::MemoryManager* mm, + ExecutionContext* context) const; + + // LIST-only: appends shared + local targets for partitions created mid-copy. `freshTables` + // maps the ordinal of every newly discovered partition to its table. Called under the router + // lock. + void growListTargets(ExecutionContext* context, NodeBatchInsertSharedState* nodeSharedState, + NodeBatchInsertLocalState* nodeLocalState, + const std::unordered_map& freshTables) const; NodeBatchInsertErrorHandler createErrorHandler(ExecutionContext* context, storage::NodeTable* nodeTable, DuplicatePKSkipResult* duplicatePKSkipResult) const; diff --git a/src/include/processor/partition_routing.h b/src/include/processor/partition_routing.h index 6d9dd44e9e..6adbcdfd67 100644 --- a/src/include/processor/partition_routing.h +++ b/src/include/processor/partition_routing.h @@ -1,22 +1,88 @@ #pragma once #include +#include +#include +#include #include #include "common/vector/value_vector.h" namespace lbug { +namespace common { +class ValueVector; +} +namespace catalog { +class NodeTableCatalogEntry; +} +namespace main { +class ClientContext; +} +namespace storage { +class NodeTable; +} +namespace transaction { +class Transaction; +} + namespace processor { // Computes a partition index in [0, numPartitions) for every selected row of `keyVector`. // // HASH partitions use the same value hashing as the built-in HASH() function, so a given -// partition-key value always lands in the same partition. RANGE partitions currently reuse the -// same deterministic hash until declarative range bounds are implemented (see -// docs/partitioning.md); reads on the parent union over all partitions, so data remains -// findable regardless of the routing function. +// partition-key value always lands in the same partition. RANGE is refused at DDL time (see +// docs/partitioning.md). LIST partitions do not use this function: their partition set grows +// dynamically, so they route through ListPartitionRouter below. void computePartitionIndexes(const common::ValueVector& keyVector, uint64_t numPartitions, std::vector& outIndexes); +// Encodes the selected value of `keyVector` into a stable opaque byte string used as the +// LIST-partition lookup key. The encoding must be injective per physical type: fixed-width values +// encode as their little-endian representation, strings/blobs as length-prefixed bytes. +std::string encodeListPartitionKey(const common::ValueVector& keyVector, uint32_t pos); + +// Creates list partitions on first sight of a new partition-key value. +// +// A LIST parent starts with zero partitions; every distinct encoded key gets its own node-table +// subgraph, created inside the caller's transaction with the same machinery as CREATE NODE TABLE +// (catalog entry + serial sequence + subgraph + storage + WAL create record), so rollback, +// replay, and checkpointing behave exactly like ordinary DDL. +// +// The router is not thread-safe by itself; COPY workers share one instance and its internal mutex +// serializes creation. Concurrent transactions racing to create the same value surface a +// write-write conflict at commit time (both modify the parent's catalog entry). +class ListPartitionRouter { +public: + ListPartitionRouter(main::ClientContext* context, catalog::NodeTableCatalogEntry* parent); + + struct Route { + storage::NodeTable* table; + // Ordinal of the partition == index into the parent's childTableIDs order. Stable: + // partitions are append-only. + uint64_t ordinal; + }; + + // Encode + resolve-or-create in one step. + Route route(const common::ValueVector& keyVector, uint32_t pos); + // Resolve-or-create for an already-encoded key. Locks the router. + Route getOrCreatePartition(const std::string& encodedKey); + // Same, for a caller already holding the lock (see withLock). + Route getOrCreatePartitionLocked(const std::string& encodedKey); + + // Runs `fn` under the router's mutex. COPY workers use this to atomically resolve routes AND + // grow their target arrays (shared + per-worker), so two workers discovering new partitions + // cannot interleave array growth. `fn` must not route again through getOrCreatePartition. + template + auto withLock(F&& fn) -> decltype(fn()) { + std::lock_guard lck{mtx}; + return fn(); + } + + std::mutex mtx; + main::ClientContext* context; + catalog::NodeTableCatalogEntry* parent; + std::unordered_map routesByKey; +}; + } // namespace processor -} // namespace lbug \ No newline at end of file +} // namespace lbug diff --git a/src/include/storage/storage_version_info.h b/src/include/storage/storage_version_info.h index 4459ddf1f4..98f99b1f53 100644 --- a/src/include/storage/storage_version_info.h +++ b/src/include/storage/storage_version_info.h @@ -30,6 +30,9 @@ struct StorageVersionInfo { // Storage version 46 adds PostgreSQL-style table partitioning metadata (RANGE/HASH partition // key + per-partition subgraph node-table back-references) to node table catalog entries. static constexpr storage_version_t STORAGE_VERSION_46 = 46; + // Storage version 47 adds LIST partitioning: the parent node-table entry persists the + // encoded-key -> child table id map for its dynamically created list partitions. + static constexpr storage_version_t STORAGE_VERSION_47 = 47; static std::unordered_map getStorageVersionInfo() { return {{"0.12.0", STORAGE_VERSION_40}, {"0.12.2", STORAGE_VERSION_40}, @@ -41,7 +44,7 @@ struct StorageVersionInfo { {"0.16.1", STORAGE_VERSION_40}, {"0.17.0", STORAGE_VERSION_41}, {"0.17.1", STORAGE_VERSION_41}, {"0.18.0", STORAGE_VERSION_42}, {"0.18.1", STORAGE_VERSION_42}, {"0.19.0", STORAGE_VERSION_43}, - {"0.19.1", STORAGE_VERSION_43}, {"0.20.0", STORAGE_VERSION_46}}; + {"0.19.1", STORAGE_VERSION_43}, {"0.20.0", STORAGE_VERSION_47}}; } static LBUG_API storage_version_t getStorageVersion(); diff --git a/src/parser/transform/transform_ddl.cpp b/src/parser/transform/transform_ddl.cpp index 63b9ce3c71..f9b9454245 100644 --- a/src/parser/transform/transform_ddl.cpp +++ b/src/parser/transform/transform_ddl.cpp @@ -99,6 +99,15 @@ std::optional Transformer::transformPartitionInfo( numPartitions = getPartitionCount(*rangeCtx.oC_IntegerLiteral()); return ParsedPartitionInfo(method, std::move(columnName), numPartitions); } + if (ctx->iC_PartitionList() != nullptr) { + // LIST partitions dynamically: one partition per distinct value. There is no PARTITIONS + // clause; numPartitions is left at 0 and grows with the data. + method = ParsedPartitionMethod::LIST; + auto& listCtx = *ctx->iC_PartitionList(); + columnName = transformPropertyKeyName(*listCtx.oC_PropertyKeyName()); + numPartitions = 0; + return ParsedPartitionInfo(method, std::move(columnName), numPartitions); + } throw ParserException("Invalid partition clause."); } diff --git a/src/processor/map/map_insert.cpp b/src/processor/map/map_insert.cpp index 47ec4d0708..ddbbd8889f 100644 --- a/src/processor/map/map_insert.cpp +++ b/src/processor/map/map_insert.cpp @@ -47,9 +47,13 @@ NodeInsertExecutor PlanMapper::getNodeInsertExecutor(const LogicalInsertInfo* bo } auto tableInfo = NodeTableInsertInfo(table, std::move(evaluators)); // A partitioned parent is resolved into its partition subgraphs during binding. Route the - // row into the partition matching its partition-key value at insert time. - if (node.getNumEntries() > 1) { - const auto* firstEntry = node.getEntry(0)->ptrCast(); + // row into the partition matching its partition-key value at insert time. HASH routes by + // modulo over the fixed partition set; LIST grows the set on demand via its router. + // + // A LIST parent starts with exactly one (unkeyed) partition, so it is detected through its + // parent link rather than the expanded-entry count. + const auto* firstEntry = node.getEntry(0)->ptrCast(); + if (node.getNumEntries() > 1 || firstEntry->isPartitionChild()) { const auto parentID = firstEntry->getParentTableID(); DASSERT(parentID != INVALID_TABLE_ID); auto transaction = transaction::Transaction::Get(*clientContext); @@ -57,10 +61,15 @@ NodeInsertExecutor PlanMapper::getNodeInsertExecutor(const LogicalInsertInfo* bo ->getTableCatalogEntry(transaction, parentID) ->ptrCast(); tableInfo.partitionKeyColumnID = parent->getPartitionColumnID(); - tableInfo.partitionTables.reserve(node.getNumEntries()); - for (auto i = 0u; i < node.getNumEntries(); ++i) { - tableInfo.partitionTables.push_back( - storageManager->getTable(node.getEntry(i)->getTableID())->ptrCast()); + tableInfo.partitionMethod = + static_cast(*parent->getPartitionMethod()); + tableInfo.parentTableID = parentID; + if (tableInfo.partitionMethod != common::PartitionMethod::LIST) { + tableInfo.partitionTables.reserve(node.getNumEntries()); + for (auto i = 0u; i < node.getNumEntries(); ++i) { + tableInfo.partitionTables.push_back( + storageManager->getTable(node.getEntry(i)->getTableID())->ptrCast()); + } } } return NodeInsertExecutor(std::move(info), std::move(tableInfo)); diff --git a/src/processor/operator/persistent/insert_executor.cpp b/src/processor/operator/persistent/insert_executor.cpp index ed1fdeb693..683ca5ff60 100644 --- a/src/processor/operator/persistent/insert_executor.cpp +++ b/src/processor/operator/persistent/insert_executor.cpp @@ -1,5 +1,8 @@ #include "processor/operator/persistent/insert_executor.h" +#include "catalog/catalog.h" +#include "catalog/catalog_entry/node_table_catalog_entry.h" +#include "common/exception/runtime.h" #include "processor/partition_routing.h" #include "transaction/transaction.h" @@ -92,7 +95,26 @@ void NodeInsertExecutor::setNodeIDVectorToNonNull() const { info.nodeIDVector->setNull(info.nodeIDVector->state->getSelVector()[0], false); } -storage::NodeTable* NodeInsertExecutor::resolveTargetTable() const { +storage::NodeTable* NodeInsertExecutor::resolveTargetTable(main::ClientContext* context) { + if (tableInfo.partitionMethod == common::PartitionMethod::LIST && + tableInfo.parentTableID != common::INVALID_TABLE_ID) { + // LIST parents grow their partition set on first sight of a new key value. + auto* keyVector = tableInfo.columnDataVectors[tableInfo.partitionKeyColumnID]; + DASSERT(keyVector->state->getSelVector().getSelSize() == 1); + if (tableInfo.listRouter == nullptr) { + auto* transaction = Transaction::Get(*context); + auto* parent = catalog::Catalog::Get(*context) + ->getTableCatalogEntry(transaction, tableInfo.parentTableID) + ->ptrCast(); + tableInfo.listRouter = std::make_unique(context, parent); + } + const auto pos = keyVector->state->getSelVector()[0]; + if (keyVector->isNull(pos)) { + throw RuntimeException("Cannot insert into a LIST-partitioned table with a NULL " + "partition-key value."); + } + return tableInfo.listRouter->route(*keyVector, pos).table; + } if (tableInfo.partitionTables.empty()) { return tableInfo.table; } @@ -103,8 +125,17 @@ storage::NodeTable* NodeInsertExecutor::resolveTargetTable() const { return tableInfo.partitionTables[partitionIndexes[0]]; } -storage::NodeTable* NodeInsertExecutor::resolveTableForNodeID(common::nodeID_t nodeID) const { +storage::NodeTable* NodeInsertExecutor::resolveTableForNodeID(common::nodeID_t nodeID, + main::ClientContext* context) const { if (tableInfo.partitionTables.empty()) { + if (tableInfo.partitionMethod == common::PartitionMethod::LIST && + tableInfo.parentTableID != common::INVALID_TABLE_ID) { + // LIST: the node may live in a partition created after this executor was cloned; + // resolve by the table ID recorded in the node ID itself. + return storage::StorageManager::Get(*context) + ->getTable(nodeID.tableID) + ->ptrCast(); + } return tableInfo.table; } for (auto* table : tableInfo.partitionTables) { @@ -120,7 +151,7 @@ nodeID_t NodeInsertExecutor::insert(main::ClientContext* context) { evaluator->evaluate(); } auto transaction = Transaction::Get(*context); - auto* targetTable = resolveTargetTable(); + auto* targetTable = resolveTargetTable(context); if (checkConflict(transaction, targetTable)) { return info.getNodeID(); } @@ -155,7 +186,7 @@ void NodeInsertExecutor::skipInsert(nodeID_t nodeID, main::ClientContext* contex return; } auto transaction = Transaction::Get(*context); - auto* table = resolveTableForNodeID(nodeID); + auto* table = resolveTableForNodeID(nodeID, context); storage::NodeTableScanState scanState{info.nodeIDVector, std::move(outputVectors), info.nodeIDVector->state}; scanState.setToTable(transaction, table, std::move(columnIDs), {}); diff --git a/src/processor/operator/persistent/node_batch_insert.cpp b/src/processor/operator/persistent/node_batch_insert.cpp index a982fbef4c..5e0c1a4f7b 100644 --- a/src/processor/operator/persistent/node_batch_insert.cpp +++ b/src/processor/operator/persistent/node_batch_insert.cpp @@ -513,6 +513,18 @@ void NodeBatchInsert::initGlobalStateInternal(ExecutionContext* context) { std::find(info->insertColumnIDs.begin(), info->insertColumnIDs.end(), keyColumnID); DASSERT(it != info->insertColumnIDs.end()); nodeSharedState->partitionKeyColumnIdx = std::distance(info->insertColumnIDs.begin(), it); + if (partitionInfo.method == common::PartitionMethod::LIST) { + // The parent entry is reachable through any partition child. Its partition set grows + // as workers encounter new key values; the router serializes discovery. + const auto* firstChild = + catalog->getTableCatalogEntry(transaction, partitionInfo.partitionTableIDs[0]) + ->ptrCast(); + auto* parent = + catalog->getTableCatalogEntry(transaction, firstChild->getParentTableID()) + ->ptrCast(); + nodeSharedState->listRouter = + std::make_unique(clientContext, parent); + } } else { NodeBatchInsertTarget target; target.table = storageManager->getTable(nodeTableEntry->getTableID())->ptrCast(); @@ -563,10 +575,13 @@ void NodeBatchInsert::executeInternal(ExecutionContext* context) { auto nodeLocalState = localState->ptrCast(); const auto nodeSharedState = dynamic_cast_checked(sharedState.get()); - std::vector> tokens(nodeSharedState->targets.size()); + // LIST-partitioned COPYs grow `targets` (and these tokens) mid-copy; pre-existing + // partitions register their producers here. + nodeLocalState->indexProducerTokens.resize(nodeLocalState->targets.size()); for (auto i = 0u; i < nodeLocalState->targets.size(); ++i) { if (nodeLocalState->targets[i].localIndexBuilder) { - tokens[i] = nodeLocalState->targets[i].localIndexBuilder->getProducerToken(); + nodeLocalState->indexProducerTokens[i] = + nodeLocalState->targets[i].localIndexBuilder->getProducerToken(); } } auto transaction = Transaction::Get(*clientContext); @@ -575,7 +590,7 @@ void NodeBatchInsert::executeInternal(ExecutionContext* context) { // Evaluate expressions if needed. const auto numTuples = nodeLocalState->columnState->getSelVector().getSelSize(); evaluateExpressions(numTuples); - copyToNodeGroup(transaction, MemoryManager::Get(*clientContext)); + copyToNodeGroup(transaction, MemoryManager::Get(*clientContext), context); nodeLocalState->columnState->setSelVector(originalSelVector); } for (auto i = 0u; i < nodeLocalState->targets.size(); ++i) { @@ -585,8 +600,9 @@ void NodeBatchInsert::executeInternal(ExecutionContext* context) { localTarget.localIndexBuilder, MemoryManager::Get(*context->clientContext)); } if (localTarget.localIndexBuilder) { - DASSERT(tokens[i]); - tokens[i]->quit(); + DASSERT(i < nodeLocalState->indexProducerTokens.size() && + nodeLocalState->indexProducerTokens[i].has_value()); + nodeLocalState->indexProducerTokens[i]->quit(); DASSERT(localTarget.errorHandler.has_value()); localTarget.localIndexBuilder->finishedProducing(localTarget.errorHandler.value()); @@ -627,14 +643,14 @@ void NodeBatchInsert::evaluateExpressions(uint64_t numTuples) const { } void NodeBatchInsert::copyToNodeGroup(transaction::Transaction* transaction, - MemoryManager* mm) const { + storage::MemoryManager* mm, ExecutionContext* context) const { const auto nodeLocalState = dynamic_cast_checked(localState.get()); const auto nodeSharedState = dynamic_cast_checked(sharedState.get()); const auto nodeInfo = info->ptrCast(); const auto numTuples = nodeLocalState->columnState->getSelVector().getSelSize(); - if (nodeSharedState->targets.size() <= 1) { + if (nodeSharedState->targets.size() <= 1 && nodeSharedState->listRouter == nullptr) { // Non-partitioned fast path: append the contiguous selection vector directly. auto numAppendedTuples = 0ul; auto& target = nodeLocalState->targets[0]; @@ -671,9 +687,32 @@ void NodeBatchInsert::copyToNodeGroup(transaction::Transaction* transaction, // reference/cast/default evaluators all follow the same row order. Each partition subgraph is // an ordinary NodeTable, so its own WAL/MVCC machinery (appendToLastNodeGroup + commit/undo // records) applies the routed write. - const auto numPartitions = nodeSharedState->targets.size(); const auto& keyVector = *nodeLocalState->columnVectors[nodeSharedState->partitionKeyColumnIdx]; - computePartitionIndexes(keyVector, numPartitions, nodeLocalState->partitionIdxes); + if (nodeSharedState->listRouter != nullptr) { + // LIST: resolve every row's key to its (possibly newly created) partition under the + // router lock -- growing the shared and per-worker target arrays atomically with + // discovery -- then fall through to the generic run-append loop. + nodeLocalState->partitionIdxes.resize(numTuples); + const auto& selVector = keyVector.state->getSelVector(); + nodeSharedState->listRouter->withLock([&]() { + std::unordered_map freshTables; + for (auto i = 0u; i < numTuples; ++i) { + const auto pos = selVector[i]; + if (keyVector.isNull(pos)) { + throw RuntimeException("Cannot COPY a NULL partition-key value into a " + "LIST-partitioned table."); + } + const auto route = nodeSharedState->listRouter->getOrCreatePartitionLocked( + encodeListPartitionKey(keyVector, pos)); + nodeLocalState->partitionIdxes[i] = route.ordinal; + freshTables.emplace(route.ordinal, route.table); + } + growListTargets(context, nodeSharedState, nodeLocalState, freshTables); + }); + } else { + computePartitionIndexes(keyVector, nodeSharedState->targets.size(), + nodeLocalState->partitionIdxes); + } for (auto i = 0u; i < numTuples;) { const auto partitionIdx = nodeLocalState->partitionIdxes[i]; @@ -706,6 +745,40 @@ void NodeBatchInsert::copyToNodeGroup(transaction::Transaction* transaction, sharedState->incrementNumRows(numTuples); } +void NodeBatchInsert::growListTargets(ExecutionContext* context, + NodeBatchInsertSharedState* nodeSharedState, NodeBatchInsertLocalState* nodeLocalState, + const std::unordered_map& freshTables) const { + // Caller holds the router lock: discovery and array growth are atomic across workers. + auto maxOrdinal = uint64_t{0}; + for (const auto& [ordinal, table] : freshTables) { + maxOrdinal = std::max(maxOrdinal, ordinal); + } + const auto prevSize = nodeLocalState->targets.size(); + if (maxOrdinal + 1 <= prevSize) { + return; + } + for (auto k = nodeSharedState->targets.size(); k <= maxOrdinal; ++k) { + NodeBatchInsertTarget target; + target.table = freshTables.at(k); + nodeSharedState->initTargetPKIndex(context, target); + nodeSharedState->targets.push_back(std::move(target)); + } + for (auto k = prevSize; k <= maxOrdinal; ++k) { + auto& sharedTarget = nodeSharedState->targets[k]; + NodeBatchInsertLocalTarget localTarget; + if (localTarget.localIndexBuilder) { + localTarget.localIndexBuilder = sharedTarget.globalIndexBuilder->clone(); + nodeLocalState->indexProducerTokens.push_back( + localTarget.localIndexBuilder->getProducerToken()); + } else { + nodeLocalState->indexProducerTokens.push_back(std::nullopt); + } + localTarget.errorHandler = + createErrorHandler(context, sharedTarget.table, &nodeLocalState->duplicatePKSkipResult); + nodeLocalState->targets.push_back(std::move(localTarget)); + } +} + NodeBatchInsertErrorHandler NodeBatchInsert::createErrorHandler(ExecutionContext* context, storage::NodeTable* nodeTable, DuplicatePKSkipResult* duplicatePKSkipResult) const { const auto nodeSharedState = diff --git a/src/processor/partition_routing.cpp b/src/processor/partition_routing.cpp index fb71bf6331..0bb84bb511 100644 --- a/src/processor/partition_routing.cpp +++ b/src/processor/partition_routing.cpp @@ -1,7 +1,21 @@ #include "processor/partition_routing.h" +#include "binder/ddl/bound_create_table_info.h" +#include "catalog/catalog.h" +#include "catalog/catalog_entry/node_table_catalog_entry.h" +#include "common/types/date_t.h" +#include "common/types/int128_t.h" +#include "common/types/timestamp_t.h" #include "common/types/types.h" #include "function/hash/vector_hash_functions.h" +#include "main/client_context.h" +#include "storage/storage_manager.h" +#include "storage/table/node_table.h" +#include "transaction/transaction.h" +#include + +using namespace lbug::common; +using namespace lbug::catalog; namespace lbug { namespace processor { @@ -22,5 +36,161 @@ void computePartitionIndexes(const common::ValueVector& keyVector, uint64_t numP } } +// ---- LIST partition key encoding ---- +// +// The encoding is the value's stable physical representation: fixed-width types encode as their +// little-endian bytes, strings/blobs as a length prefix followed by the raw bytes. Two values are +// routed to the same partition iff they encode identically. + +static void appendLE(std::string& out, const void* data, size_t len) { + out.append(static_cast(data), len); +} + +static std::string encodeFixed(const void* data, size_t len) { + std::string out; + out.reserve(len); + appendLE(out, data, len); + return out; +} + +std::string encodeListPartitionKey(const common::ValueVector& keyVector, uint32_t pos) { + DASSERT(!keyVector.isNull(pos)); + std::string out; + switch (keyVector.dataType.getLogicalTypeID()) { + case LogicalTypeID::INT8: { + return encodeFixed(&keyVector.getValue(pos), sizeof(int8_t)); + } + case LogicalTypeID::INT16: { + return encodeFixed(&keyVector.getValue(pos), sizeof(int16_t)); + } + case LogicalTypeID::INT32: + case LogicalTypeID::DATE: { + // DATE's physical representation is a 32-bit day count. + return encodeFixed(&keyVector.getValue(pos), sizeof(int32_t)); + } + case LogicalTypeID::SERIAL: + case LogicalTypeID::INT64: + case LogicalTypeID::TIMESTAMP_SEC: + case LogicalTypeID::TIMESTAMP_MS: + case LogicalTypeID::TIMESTAMP: + case LogicalTypeID::TIMESTAMP_TZ: + case LogicalTypeID::TIMESTAMP_NS: { + // All timestamp flavors store an int64 tick count; the flavor is constant per column, so + // the raw ticks are a stable key. + return encodeFixed(&keyVector.getValue(pos), sizeof(int64_t)); + } + case LogicalTypeID::FLOAT: { + auto value = keyVector.getValue(pos); + if (value == 0.0f) { + value = 0.0f; // normalize -0.0 + } + return encodeFixed(&value, sizeof(float)); + } + case LogicalTypeID::DOUBLE: { + auto value = keyVector.getValue(pos); + if (value == 0.0) { + value = 0.0; // normalize -0.0 + } + return encodeFixed(&value, sizeof(double)); + } + case LogicalTypeID::INT128: { + return encodeFixed(&keyVector.getValue(pos), sizeof(int128_t)); + } + case LogicalTypeID::UINT8: { + return encodeFixed(&keyVector.getValue(pos), sizeof(uint8_t)); + } + case LogicalTypeID::UINT16: { + return encodeFixed(&keyVector.getValue(pos), sizeof(uint16_t)); + } + case LogicalTypeID::UINT32: { + return encodeFixed(&keyVector.getValue(pos), sizeof(uint32_t)); + } + case LogicalTypeID::UINT64: { + return encodeFixed(&keyVector.getValue(pos), sizeof(uint64_t)); + } + case LogicalTypeID::UINT128: { + return encodeFixed(&keyVector.getValue(pos), sizeof(uint128_t)); + } + case LogicalTypeID::STRING: + case LogicalTypeID::BLOB: { + const auto& s = keyVector.getValue(pos); + const auto len = static_cast(s.len); + out.append(reinterpret_cast(&len), sizeof(len)); + out.append(reinterpret_cast(s.getData()), s.len); + return out; + } + default: { + // The binder only admits the types above for LIST partitioning. + UNREACHABLE_CODE; + } + } +} + +// ---- ListPartitionRouter ---- + +ListPartitionRouter::ListPartitionRouter(main::ClientContext* context_, + catalog::NodeTableCatalogEntry* parent_) + : context{context_}, parent{parent_} {} + +ListPartitionRouter::Route ListPartitionRouter::route(const common::ValueVector& keyVector, + uint32_t pos) { + return getOrCreatePartition(encodeListPartitionKey(keyVector, pos)); +} + +ListPartitionRouter::Route ListPartitionRouter::getOrCreatePartition( + const std::string& encodedKey) { + std::lock_guard lck{mtx}; + return getOrCreatePartitionLocked(encodedKey); +} + +ListPartitionRouter::Route ListPartitionRouter::getOrCreatePartitionLocked( + const std::string& encodedKey) { + if (auto it = routesByKey.find(encodedKey); it != routesByKey.end()) { + return it->second; + } + // A partition for this key may already exist (created before this router was constructed, or + // by a previous query after reopen). + const auto& existingKeys = parent->getListPartitionKeys(); + for (auto i = 0u; i < existingKeys.size(); i++) { + if (existingKeys[i].first == encodedKey) { + auto* table = storage::StorageManager::Get(*context) + ->getTable(existingKeys[i].second) + ->ptrCast(); + Route route{table, i}; + routesByKey.emplace(encodedKey, route); + return route; + } + } + // Create the partition: an ordinary node table with the parent's schema, via the same + // catalog + storage machinery as CREATE NODE TABLE. + auto* catalog = Catalog::Get(*context); + auto* transaction = transaction::Transaction::Get(*context); + auto* storageManager = storage::StorageManager::Get(*context); + const auto ordinal = parent->getChildTableIDs().size(); + auto childName = std::format("{}_p{}", parent->getName(), ordinal); + std::vector propertyDefinitions; + propertyDefinitions.reserve(parent->getProperties().size()); + for (const auto& definition : parent->getProperties()) { + propertyDefinitions.push_back(definition.copy()); + } + auto extraInfo = + std::make_unique(parent->getPrimaryKeyName(), + std::move(propertyDefinitions), parent->getStorage(), parent->getStorageFormat()); + // Register the parent link so the child is a proper partition subgraph, including across + // WAL replay (the create record rebuilds via this extra info). + extraInfo->setPartitionParent(parent->getTableID(), ordinal); + auto childInfo = binder::BoundCreateTableInfo(CatalogEntryType::NODE_TABLE_ENTRY, childName, + ConflictAction::ON_CONFLICT_THROW, std::move(extraInfo), false /* isInternal */); + auto* childEntry = + catalog->createTableEntry(transaction, childInfo)->ptrCast(); + storageManager->createTable(childEntry, context); + const auto tableID = childEntry->getTableID(); + parent->addChildTableID(tableID); + parent->addListPartition(encodedKey, tableID); + Route route{storageManager->getTable(tableID)->ptrCast(), ordinal}; + routesByKey.emplace(encodedKey, route); + return route; +} + } // namespace processor -} // namespace lbug \ No newline at end of file +} // namespace lbug diff --git a/test/test_files/ddl/partitioned.test b/test/test_files/ddl/partitioned.test index 9b25b57fce..153041d7c4 100644 --- a/test/test_files/ddl/partitioned.test +++ b/test/test_files/ddl/partitioned.test @@ -38,20 +38,11 @@ Orders_p3 2 -CASE PartitionedCreateRange +# RANGE partitioning is blocked until dynamic, distribution-aware splitting exists: refuse the +# DDL instead of silently falling back to hash routing. -STATEMENT CREATE NODE TABLE Events (id INT64 PRIMARY KEY, ts TIMESTAMP, value DOUBLE) PARTITION BY RANGE (ts) PARTITIONS 5; ----- 1 -Table Events has been created. --STATEMENT CREATE (:Events_p2 {id: 1, ts: timestamp('2024-03-01 10:00:00'), value: 1.5}); ----- ok --STATEMENT CREATE (:Events_p4 {id: 2, ts: timestamp('2024-07-15 08:30:00'), value: 2.5}); ----- ok --STATEMENT MATCH (e:Events) RETURN e.id ORDER BY e.id; ----- 2 -1 -2 --STATEMENT MATCH (e:Events) WHERE e.value > 2 RETURN e.id; ----- 1 -2 +---- error +Binder exception: RANGE partitioning is not implemented yet. RANGE requires partition bounds derived from the actual value distribution, which is future work. Use PARTITION BY HASH instead. -CASE PartitionedWriteRouting -STATEMENT CREATE NODE TABLE T (id INT64 PRIMARY KEY, k STRING) PARTITION BY HASH (k) PARTITIONS 3; @@ -95,7 +86,7 @@ Binder exception: Partition column nope does not exist. A partition column must Binder exception: Number of partitions must be greater than 0. -CASE PartitionedDropCascades --STATEMENT CREATE NODE TABLE P (id INT64 PRIMARY KEY, k STRING) PARTITION BY RANGE (id) PARTITIONS 2; +-STATEMENT CREATE NODE TABLE P (id INT64 PRIMARY KEY, k STRING) PARTITION BY HASH (id) PARTITIONS 2; ---- 1 Table P has been created. -STATEMENT CREATE (:P_p0 {id: 1, k: 'a'}); @@ -277,3 +268,54 @@ Table R has been created. -STATEMENT MATCH (a:Orders)-[r:R]->(b:Orders) RETURN a.id, b.id, r.w ORDER BY r.w; ---- 1 2|3|20 +-CASE PartitionedListDynamic +-STATEMENT CREATE NODE TABLE L (id INT64, cluster INT64, PRIMARY KEY(id)) PARTITION BY LIST (cluster); +---- ok +-STATEMENT CREATE (:L {id: 1, cluster: 100}); +---- ok +-STATEMENT CREATE (:L {id: 2, cluster: 200}); +---- ok +-STATEMENT CREATE (:L {id: 3, cluster: 100}); +---- ok +-STATEMENT CREATE (:L {id: 4, cluster: 300}); +---- ok +-STATEMENT CALL show_tables() RETURN name ORDER BY name; +---- 5 +L +L_p0 +L_p1 +L_p2 +L_p3 +# Every distinct value got its own partition; rows are findable through the parent. +-STATEMENT MATCH (n:L) RETURN n.id ORDER BY n.id; +---- 4 +1 +2 +3 +4 +# Same value reuses its partition. +-STATEMENT MATCH (n:L_p1) RETURN n.id ORDER BY n.id; +---- 2 +1 +3 +# Routing survives reopen (catalog persistence + WAL replay). +-RELOADDB +-STATEMENT CALL show_tables() RETURN name ORDER BY name; +---- 5 +L +L_p0 +L_p1 +L_p2 +L_p3 +-STATEMENT CREATE (:L {id: 5, cluster: 200}); +---- ok +-STATEMENT MATCH (n:L_p2) RETURN n.id; +---- 2 +2 +5 +# Drop the parent explicitly: cascades remove every partition (the FSM leak +# checker otherwise iterates tables in reopened-catalog order and would try to +# drop a partition child directly). +-STATEMENT DROP TABLE L; +---- 1 +Table L has been dropped. diff --git a/test/test_files/storage_version.test b/test/test_files/storage_version.test index dc6722a328..22cdaa2c97 100644 --- a/test/test_files/storage_version.test +++ b/test/test_files/storage_version.test @@ -5,8 +5,8 @@ -CASE StorageVersionFunctionAndUpgrade -STATEMENT CALL storage_version() RETURN *; ---- 1 -46 --CHECK_STORAGE_VERSION 46 +47 +-CHECK_STORAGE_VERSION 47 -SET_STORAGE_VERSION 40 -STATEMENT CALL storage_version() RETURN *; ---- 1 @@ -17,11 +17,11 @@ ---- ok -STATEMENT CHECKPOINT; ---- ok --CHECK_STORAGE_VERSION 46 +-CHECK_STORAGE_VERSION 47 -RELOADDB -STATEMENT CALL storage_version() RETURN *; ---- 1 -46 +47 -STATEMENT MATCH (u:users) RETURN u.id, u.name; ---- 1 1|Alice diff --git a/third_party/antlr4_cypher/cypher_lexer.cpp b/third_party/antlr4_cypher/cypher_lexer.cpp index 3df498536c..df988ad672 100644 --- a/third_party/antlr4_cypher/cypher_lexer.cpp +++ b/third_party/antlr4_cypher/cypher_lexer.cpp @@ -70,9 +70,9 @@ void cypherlexerLexerInitialize() { "DETACH", "DISTINCT", "DROP", "ELSE", "END", "ENDS", "EXISTS", "EXPLAIN", "EXPORT", "EXTENSION", "FALSE", "FROM", "FORCE", "FOR", "GLOB", "GRAPH", "GROUP", "HASH", "HEADERS", "HINT", "IMPORT", "INDEX", "IF", "IN", - "INCREMENT", "INSTALL", "IS", "JOIN", "KEY", "LIMIT", "LOAD", "LOGICAL", - "MACRO", "MATCH", "MAXVALUE", "MERGE", "MINVALUE", "MULTI_JOIN", "NO", - "NODE", "NOT", "NONE", "NULL", "ON", "ONLY", "OPTIONS", "OPTIONAL", + "INCREMENT", "INSTALL", "IS", "JOIN", "KEY", "LIMIT", "LIST", "LOAD", + "LOGICAL", "MACRO", "MATCH", "MAXVALUE", "MERGE", "MINVALUE", "MULTI_JOIN", + "NO", "NODE", "NOT", "NONE", "NULL", "ON", "ONLY", "OPTIONS", "OPTIONAL", "OR", "ORDER", "PRIMARY", "PROFILE", "PROJECT", "RANGE", "READ", "REL", "RENAME", "RETURN", "ROLLBACK", "ROLLBACK_SKIP_CHECKPOINT", "SEQUENCE", "SET", "SORTED", "SHORTEST", "START", "STARTS", "STRUCT", "TABLE", @@ -109,8 +109,8 @@ void cypherlexerLexerInitialize() { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", - "", "", "", "", "", "", "'*'", "", "'!='", "':'", "'..'", "'-'", "'!'", - "", "", "", "", "", "", "", "", "'0'" + "", "", "", "", "", "", "", "'*'", "", "'!='", "':'", "'..'", "'-'", + "'!'", "", "", "", "", "", "", "", "", "'0'" }, std::vector{ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", @@ -124,9 +124,9 @@ void cypherlexerLexerInitialize() { "EXISTS", "EXPLAIN", "EXPORT", "EXTENSION", "FALSE", "FROM", "FORCE", "FOR", "GLOB", "GRAPH", "GROUP", "HASH", "HEADERS", "HINT", "IMPORT", "INDEX", "IF", "IN", "INCREMENT", "INSTALL", "IS", "JOIN", "KEY", - "LIMIT", "LOAD", "LOGICAL", "MACRO", "MATCH", "MAXVALUE", "MERGE", - "MINVALUE", "MULTI_JOIN", "NO", "NODE", "NOT", "NONE", "NULL", "ON", - "ONLY", "OPTIONS", "OPTIONAL", "OR", "ORDER", "PRIMARY", "PROFILE", + "LIMIT", "LIST", "LOAD", "LOGICAL", "MACRO", "MATCH", "MAXVALUE", + "MERGE", "MINVALUE", "MULTI_JOIN", "NO", "NODE", "NOT", "NONE", "NULL", + "ON", "ONLY", "OPTIONS", "OPTIONAL", "OR", "ORDER", "PRIMARY", "PROFILE", "PROJECT", "RANGE", "READ", "REL", "RENAME", "RETURN", "ROLLBACK", "ROLLBACK_SKIP_CHECKPOINT", "SEQUENCE", "SET", "SORTED", "SHORTEST", "START", "STARTS", "STRUCT", "TABLE", "THEN", "TO", "TRAIL", "TRANSACTION", @@ -142,7 +142,7 @@ void cypherlexerLexerInitialize() { } ); static const int32_t serializedATNSegment[] = { - 4,0,196,1616,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6, + 4,0,197,1623,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6, 7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2, 14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2, 21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2, @@ -175,767 +175,769 @@ void cypherlexerLexerInitialize() { 7,194,2,195,7,195,2,196,7,196,2,197,7,197,2,198,7,198,2,199,7,199,2,200, 7,200,2,201,7,201,2,202,7,202,2,203,7,203,2,204,7,204,2,205,7,205,2,206, 7,206,2,207,7,207,2,208,7,208,2,209,7,209,2,210,7,210,2,211,7,211,2,212, - 7,212,2,213,7,213,2,214,7,214,2,215,7,215,1,0,1,0,1,1,1,1,1,2,1,2,1,3, - 1,3,1,4,1,4,1,5,1,5,1,6,1,6,1,7,1,7,1,8,1,8,1,9,1,9,1,10,1,10,1,11,1, - 11,1,11,1,12,1,12,1,13,1,13,1,13,1,14,1,14,1,15,1,15,1,15,1,16,1,16,1, - 17,1,17,1,17,1,18,1,18,1,18,1,19,1,19,1,20,1,20,1,21,1,21,1,22,1,22,1, - 23,1,23,1,23,1,24,1,24,1,25,1,25,1,26,1,26,1,27,1,27,1,28,1,28,1,29,1, - 29,1,30,1,30,1,31,1,31,1,32,1,32,1,33,1,33,1,34,1,34,1,35,1,35,1,36,1, - 36,1,37,1,37,1,38,1,38,1,39,1,39,1,40,1,40,1,41,1,41,1,42,1,42,1,43,1, - 43,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,45,1,45,1,45,1,45,1,46,1, - 46,1,46,1,46,1,47,1,47,1,47,1,47,1,48,1,48,1,48,1,48,1,48,1,48,1,49,1, - 49,1,49,1,49,1,49,1,49,1,49,1,49,1,50,1,50,1,50,1,50,1,51,1,51,1,51,1, - 52,1,52,1,52,1,52,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1, - 54,1,54,1,54,1,54,1,54,1,54,1,54,1,55,1,55,1,55,1,55,1,55,1,55,1,56,1, - 56,1,56,1,57,1,57,1,57,1,57,1,57,1,58,1,58,1,58,1,58,1,58,1,59,1,59,1, - 59,1,59,1,59,1,60,1,60,1,60,1,60,1,60,1,60,1,60,1,60,1,60,1,60,1,60,1, - 61,1,61,1,61,1,61,1,61,1,61,1,61,1,62,1,62,1,62,1,62,1,62,1,62,1,62,1, - 62,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,64,1,64,1,64,1,64,1,64,1,64,1, - 64,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1, - 64,1,64,1,64,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,66,1,66,1, - 66,1,66,1,66,1,67,1,67,1,67,1,67,1,67,1,67,1,68,1,68,1,68,1,68,1,68,1, - 68,1,68,1,69,1,69,1,69,1,69,1,70,1,70,1,70,1,70,1,70,1,70,1,71,1,71,1, - 71,1,71,1,71,1,71,1,71,1,71,1,71,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1, - 73,1,73,1,73,1,73,1,73,1,73,1,73,1,73,1,74,1,74,1,74,1,74,1,74,1,74,1, - 74,1,75,1,75,1,75,1,75,1,75,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1, - 76,1,76,1,76,1,77,1,77,1,77,1,77,1,77,1,77,1,77,1,78,1,78,1,78,1,78,1, - 78,1,78,1,78,1,78,1,78,1,79,1,79,1,79,1,79,1,79,1,80,1,80,1,80,1,80,1, - 80,1,81,1,81,1,81,1,81,1,82,1,82,1,82,1,82,1,82,1,83,1,83,1,83,1,83,1, - 83,1,83,1,83,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,85,1,85,1,85,1, - 85,1,85,1,85,1,85,1,86,1,86,1,86,1,86,1,86,1,86,1,86,1,86,1,86,1,86,1, - 87,1,87,1,87,1,87,1,87,1,87,1,88,1,88,1,88,1,88,1,88,1,89,1,89,1,89,1, - 89,1,89,1,89,1,90,1,90,1,90,1,90,1,91,1,91,1,91,1,91,1,91,1,92,1,92,1, - 92,1,92,1,92,1,92,1,93,1,93,1,93,1,93,1,93,1,93,1,94,1,94,1,94,1,94,1, - 94,1,95,1,95,1,95,1,95,1,95,1,95,1,95,1,95,1,96,1,96,1,96,1,96,1,96,1, - 97,1,97,1,97,1,97,1,97,1,97,1,97,1,98,1,98,1,98,1,98,1,98,1,98,1,99,1, - 99,1,99,1,100,1,100,1,100,1,101,1,101,1,101,1,101,1,101,1,101,1,101,1, - 101,1,101,1,101,1,102,1,102,1,102,1,102,1,102,1,102,1,102,1,102,1,103, - 1,103,1,103,1,104,1,104,1,104,1,104,1,104,1,105,1,105,1,105,1,105,1,106, - 1,106,1,106,1,106,1,106,1,106,1,107,1,107,1,107,1,107,1,107,1,108,1,108, - 1,108,1,108,1,108,1,108,1,108,1,108,1,109,1,109,1,109,1,109,1,109,1,109, - 1,110,1,110,1,110,1,110,1,110,1,110,1,111,1,111,1,111,1,111,1,111,1,111, - 1,111,1,111,1,111,1,112,1,112,1,112,1,112,1,112,1,112,1,113,1,113,1,113, - 1,113,1,113,1,113,1,113,1,113,1,113,1,114,1,114,1,114,1,114,1,114,1,114, - 1,114,1,114,1,114,1,114,1,114,1,115,1,115,1,115,1,116,1,116,1,116,1,116, - 1,116,1,117,1,117,1,117,1,117,1,118,1,118,1,118,1,118,1,118,1,119,1,119, - 1,119,1,119,1,119,1,120,1,120,1,120,1,121,1,121,1,121,1,121,1,121,1,122, - 1,122,1,122,1,122,1,122,1,122,1,122,1,122,1,123,1,123,1,123,1,123,1,123, - 1,123,1,123,1,123,1,123,1,124,1,124,1,124,1,125,1,125,1,125,1,125,1,125, - 1,125,1,126,1,126,1,126,1,126,1,126,1,126,1,126,1,126,1,127,1,127,1,127, - 1,127,1,127,1,127,1,127,1,127,1,128,1,128,1,128,1,128,1,128,1,128,1,128, - 1,128,1,129,1,129,1,129,1,129,1,129,1,129,1,130,1,130,1,130,1,130,1,130, - 1,131,1,131,1,131,1,131,1,132,1,132,1,132,1,132,1,132,1,132,1,132,1,133, + 7,212,2,213,7,213,2,214,7,214,2,215,7,215,2,216,7,216,1,0,1,0,1,1,1,1, + 1,2,1,2,1,3,1,3,1,4,1,4,1,5,1,5,1,6,1,6,1,7,1,7,1,8,1,8,1,9,1,9,1,10, + 1,10,1,11,1,11,1,11,1,12,1,12,1,13,1,13,1,13,1,14,1,14,1,15,1,15,1,15, + 1,16,1,16,1,17,1,17,1,17,1,18,1,18,1,18,1,19,1,19,1,20,1,20,1,21,1,21, + 1,22,1,22,1,23,1,23,1,23,1,24,1,24,1,25,1,25,1,26,1,26,1,27,1,27,1,28, + 1,28,1,29,1,29,1,30,1,30,1,31,1,31,1,32,1,32,1,33,1,33,1,34,1,34,1,35, + 1,35,1,36,1,36,1,37,1,37,1,38,1,38,1,39,1,39,1,40,1,40,1,41,1,41,1,42, + 1,42,1,43,1,43,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,45,1,45,1,45, + 1,45,1,46,1,46,1,46,1,46,1,47,1,47,1,47,1,47,1,48,1,48,1,48,1,48,1,48, + 1,48,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,50,1,50,1,50,1,50,1,51, + 1,51,1,51,1,52,1,52,1,52,1,52,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53, + 1,53,1,53,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,55,1,55,1,55,1,55,1,55, + 1,55,1,56,1,56,1,56,1,57,1,57,1,57,1,57,1,57,1,58,1,58,1,58,1,58,1,58, + 1,59,1,59,1,59,1,59,1,59,1,60,1,60,1,60,1,60,1,60,1,60,1,60,1,60,1,60, + 1,60,1,60,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,62,1,62,1,62,1,62,1,62, + 1,62,1,62,1,62,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,64,1,64,1,64,1,64, + 1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,64, + 1,64,1,64,1,64,1,64,1,64,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65, + 1,66,1,66,1,66,1,66,1,66,1,67,1,67,1,67,1,67,1,67,1,67,1,68,1,68,1,68, + 1,68,1,68,1,68,1,68,1,69,1,69,1,69,1,69,1,70,1,70,1,70,1,70,1,70,1,70, + 1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,72,1,72,1,72,1,72,1,72, + 1,72,1,72,1,73,1,73,1,73,1,73,1,73,1,73,1,73,1,73,1,74,1,74,1,74,1,74, + 1,74,1,74,1,74,1,75,1,75,1,75,1,75,1,75,1,76,1,76,1,76,1,76,1,76,1,76, + 1,76,1,76,1,76,1,76,1,76,1,77,1,77,1,77,1,77,1,77,1,77,1,77,1,78,1,78, + 1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,79,1,79,1,79,1,79,1,79,1,80,1,80, + 1,80,1,80,1,80,1,81,1,81,1,81,1,81,1,82,1,82,1,82,1,82,1,82,1,83,1,83, + 1,83,1,83,1,83,1,83,1,83,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,85, + 1,85,1,85,1,85,1,85,1,85,1,85,1,86,1,86,1,86,1,86,1,86,1,86,1,86,1,86, + 1,86,1,86,1,87,1,87,1,87,1,87,1,87,1,87,1,88,1,88,1,88,1,88,1,88,1,89, + 1,89,1,89,1,89,1,89,1,89,1,90,1,90,1,90,1,90,1,91,1,91,1,91,1,91,1,91, + 1,92,1,92,1,92,1,92,1,92,1,92,1,93,1,93,1,93,1,93,1,93,1,93,1,94,1,94, + 1,94,1,94,1,94,1,95,1,95,1,95,1,95,1,95,1,95,1,95,1,95,1,96,1,96,1,96, + 1,96,1,96,1,97,1,97,1,97,1,97,1,97,1,97,1,97,1,98,1,98,1,98,1,98,1,98, + 1,98,1,99,1,99,1,99,1,100,1,100,1,100,1,101,1,101,1,101,1,101,1,101,1, + 101,1,101,1,101,1,101,1,101,1,102,1,102,1,102,1,102,1,102,1,102,1,102, + 1,102,1,103,1,103,1,103,1,104,1,104,1,104,1,104,1,104,1,105,1,105,1,105, + 1,105,1,106,1,106,1,106,1,106,1,106,1,106,1,107,1,107,1,107,1,107,1,107, + 1,108,1,108,1,108,1,108,1,108,1,109,1,109,1,109,1,109,1,109,1,109,1,109, + 1,109,1,110,1,110,1,110,1,110,1,110,1,110,1,111,1,111,1,111,1,111,1,111, + 1,111,1,112,1,112,1,112,1,112,1,112,1,112,1,112,1,112,1,112,1,113,1,113, + 1,113,1,113,1,113,1,113,1,114,1,114,1,114,1,114,1,114,1,114,1,114,1,114, + 1,114,1,115,1,115,1,115,1,115,1,115,1,115,1,115,1,115,1,115,1,115,1,115, + 1,116,1,116,1,116,1,117,1,117,1,117,1,117,1,117,1,118,1,118,1,118,1,118, + 1,119,1,119,1,119,1,119,1,119,1,120,1,120,1,120,1,120,1,120,1,121,1,121, + 1,121,1,122,1,122,1,122,1,122,1,122,1,123,1,123,1,123,1,123,1,123,1,123, + 1,123,1,123,1,124,1,124,1,124,1,124,1,124,1,124,1,124,1,124,1,124,1,125, + 1,125,1,125,1,126,1,126,1,126,1,126,1,126,1,126,1,127,1,127,1,127,1,127, + 1,127,1,127,1,127,1,127,1,128,1,128,1,128,1,128,1,128,1,128,1,128,1,128, + 1,129,1,129,1,129,1,129,1,129,1,129,1,129,1,129,1,130,1,130,1,130,1,130, + 1,130,1,130,1,131,1,131,1,131,1,131,1,131,1,132,1,132,1,132,1,132,1,133, 1,133,1,133,1,133,1,133,1,133,1,133,1,134,1,134,1,134,1,134,1,134,1,134, - 1,134,1,134,1,134,1,135,1,135,1,135,1,135,1,135,1,135,1,135,1,135,1,135, - 1,135,1,135,1,135,1,135,1,135,1,135,1,135,1,135,1,135,1,135,1,135,1,135, - 1,135,1,135,1,135,1,135,1,136,1,136,1,136,1,136,1,136,1,136,1,136,1,136, - 1,136,1,137,1,137,1,137,1,137,1,138,1,138,1,138,1,138,1,138,1,138,1,138, - 1,139,1,139,1,139,1,139,1,139,1,139,1,139,1,139,1,139,1,140,1,140,1,140, - 1,140,1,140,1,140,1,141,1,141,1,141,1,141,1,141,1,141,1,141,1,142,1,142, - 1,142,1,142,1,142,1,142,1,142,1,143,1,143,1,143,1,143,1,143,1,143,1,144, - 1,144,1,144,1,144,1,144,1,145,1,145,1,145,1,146,1,146,1,146,1,146,1,146, - 1,146,1,147,1,147,1,147,1,147,1,147,1,147,1,147,1,147,1,147,1,147,1,147, - 1,147,1,148,1,148,1,148,1,148,1,148,1,149,1,149,1,149,1,149,1,149,1,150, - 1,150,1,150,1,150,1,150,1,150,1,151,1,151,1,151,1,151,1,151,1,151,1,151, - 1,152,1,152,1,152,1,152,1,152,1,152,1,152,1,152,1,152,1,152,1,153,1,153, - 1,153,1,153,1,153,1,153,1,153,1,154,1,154,1,154,1,154,1,155,1,155,1,155, - 1,155,1,155,1,156,1,156,1,156,1,156,1,156,1,156,1,157,1,157,1,157,1,157, - 1,157,1,158,1,158,1,158,1,158,1,158,1,158,1,159,1,159,1,159,1,159,1,159, - 1,159,1,159,1,159,1,159,1,159,1,160,1,160,1,160,1,160,1,161,1,161,1,161, - 1,161,1,161,1,161,1,161,1,162,1,162,1,162,1,162,1,162,1,162,1,163,1,163, - 1,163,1,163,1,163,1,164,1,164,1,164,1,164,1,164,1,164,1,164,1,164,1,164, - 1,164,1,165,1,165,1,165,1,165,1,165,1,165,1,165,1,165,1,165,1,165,1,165, - 1,166,1,166,1,166,1,166,1,166,1,166,1,166,1,166,1,166,1,167,1,167,1,167, - 1,167,1,167,1,168,1,168,1,168,1,168,1,169,1,169,1,169,1,169,1,169,1,169, - 1,169,1,169,1,170,1,170,1,171,1,171,1,171,1,171,1,171,1,172,1,172,1,172, - 1,173,1,173,1,174,1,174,1,174,1,175,1,175,1,176,1,176,1,177,1,177,1,177, - 5,177,1383,8,177,10,177,12,177,1386,9,177,1,177,1,177,1,177,1,177,5,177, - 1392,8,177,10,177,12,177,1395,9,177,1,177,3,177,1398,8,177,1,178,1,178, - 1,178,1,178,1,178,1,178,1,178,1,178,1,178,1,178,1,178,1,178,1,178,1,178, - 1,178,1,178,1,178,1,178,1,178,1,178,1,178,1,178,3,178,1422,8,178,1,179, - 1,179,1,179,5,179,1427,8,179,10,179,12,179,1430,9,179,3,179,1432,8,179, - 1,180,3,180,1435,8,180,1,181,1,181,3,181,1439,8,181,1,182,1,182,3,182, - 1443,8,182,1,183,1,183,3,183,1447,8,183,1,184,1,184,1,185,1,185,1,186, - 4,186,1454,8,186,11,186,12,186,1455,1,186,4,186,1459,8,186,11,186,12, - 186,1460,1,186,1,186,4,186,1465,8,186,11,186,12,186,1466,1,186,1,186, - 4,186,1471,8,186,11,186,12,186,1472,3,186,1475,8,186,1,186,1,186,3,186, - 1479,8,186,1,186,4,186,1482,8,186,11,186,12,186,1483,1,187,5,187,1487, - 8,187,10,187,12,187,1490,9,187,1,187,1,187,4,187,1494,8,187,11,187,12, - 187,1495,1,188,1,188,5,188,1500,8,188,10,188,12,188,1503,9,188,1,189, - 1,189,3,189,1507,8,189,1,190,1,190,3,190,1511,8,190,1,191,1,191,5,191, - 1515,8,191,10,191,12,191,1518,9,191,1,191,4,191,1521,8,191,11,191,12, - 191,1522,1,192,4,192,1526,8,192,11,192,12,192,1527,1,193,1,193,1,193, - 1,193,1,193,1,193,1,193,1,193,1,193,1,193,1,193,1,193,3,193,1542,8,193, - 1,194,1,194,1,194,1,194,1,194,1,194,5,194,1550,8,194,10,194,12,194,1553, - 9,194,1,194,1,194,1,194,1,194,1,194,1,194,5,194,1561,8,194,10,194,12, - 194,1564,9,194,1,194,3,194,1567,8,194,1,194,1,194,3,194,1571,8,194,3, - 194,1573,8,194,1,195,1,195,1,196,1,196,1,197,1,197,1,198,1,198,1,199, - 1,199,1,200,1,200,1,201,1,201,1,202,1,202,1,203,1,203,1,204,1,204,1,205, - 1,205,1,206,1,206,1,207,1,207,1,208,1,208,1,209,1,209,1,210,1,210,1,211, - 1,211,1,212,1,212,1,213,1,213,1,214,1,214,1,215,1,215,0,0,216,1,1,3,2, - 5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31, - 16,33,17,35,18,37,19,39,20,41,21,43,22,45,23,47,24,49,25,51,26,53,27, - 55,28,57,29,59,30,61,31,63,32,65,33,67,34,69,35,71,36,73,37,75,38,77, - 39,79,40,81,41,83,42,85,43,87,44,89,45,91,46,93,47,95,48,97,49,99,50, - 101,51,103,52,105,53,107,54,109,55,111,56,113,57,115,58,117,59,119,60, - 121,61,123,62,125,63,127,64,129,65,131,66,133,67,135,68,137,69,139,70, - 141,71,143,72,145,73,147,74,149,75,151,76,153,77,155,78,157,79,159,80, - 161,81,163,82,165,83,167,84,169,85,171,86,173,87,175,88,177,89,179,90, - 181,91,183,92,185,93,187,94,189,95,191,96,193,97,195,98,197,99,199,100, - 201,101,203,102,205,103,207,104,209,105,211,106,213,107,215,108,217,109, - 219,110,221,111,223,112,225,113,227,114,229,115,231,116,233,117,235,118, - 237,119,239,120,241,121,243,122,245,123,247,124,249,125,251,126,253,127, - 255,128,257,129,259,130,261,131,263,132,265,133,267,134,269,135,271,136, - 273,137,275,138,277,139,279,140,281,141,283,142,285,143,287,144,289,145, - 291,146,293,147,295,148,297,149,299,150,301,151,303,152,305,153,307,154, - 309,155,311,156,313,157,315,158,317,159,319,160,321,161,323,162,325,163, - 327,164,329,165,331,166,333,167,335,168,337,169,339,170,341,171,343,172, - 345,173,347,174,349,175,351,176,353,177,355,178,357,179,359,180,361,181, - 363,182,365,183,367,184,369,185,371,186,373,187,375,188,377,189,379,190, - 381,191,383,192,385,193,387,194,389,195,391,0,393,0,395,0,397,0,399,0, - 401,0,403,0,405,0,407,0,409,0,411,0,413,0,415,0,417,0,419,0,421,0,423, - 0,425,0,427,0,429,0,431,196,1,0,49,2,0,65,65,97,97,2,0,67,67,99,99,2, - 0,89,89,121,121,2,0,76,76,108,108,2,0,73,73,105,105,2,0,78,78,110,110, - 2,0,68,68,100,100,2,0,84,84,116,116,2,0,69,69,101,101,2,0,82,82,114,114, - 2,0,90,90,122,122,2,0,83,83,115,115,2,0,71,71,103,103,2,0,72,72,104,104, - 2,0,66,66,98,98,2,0,75,75,107,107,2,0,80,80,112,112,2,0,79,79,111,111, - 2,0,85,85,117,117,2,0,77,77,109,109,2,0,70,70,102,102,2,0,88,88,120,120, - 2,0,74,74,106,106,2,0,86,86,118,118,2,0,81,81,113,113,2,0,87,87,119,119, - 13,0,34,34,39,39,66,66,70,70,78,78,82,82,84,84,92,92,98,98,102,102,110, - 110,114,114,116,116,2,0,65,70,97,102,8,0,160,160,5760,5760,6158,6158, - 8192,8202,8232,8233,8239,8239,8287,8287,12288,12288,1,0,12,12,1,0,96, - 96,1,0,30,30,768,0,48,57,65,90,95,95,97,122,170,170,181,181,183,183,186, - 186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,768,884,886, - 887,890,893,895,895,902,906,908,908,910,929,931,1013,1015,1153,1155,1159, - 1162,1327,1329,1366,1369,1369,1376,1416,1425,1469,1471,1471,1473,1474, - 1476,1477,1479,1479,1488,1514,1519,1522,1552,1562,1568,1641,1646,1747, - 1749,1756,1759,1768,1770,1788,1791,1791,1808,1866,1869,1969,1984,2037, - 2042,2042,2045,2045,2048,2093,2112,2139,2144,2154,2160,2183,2185,2190, - 2200,2273,2275,2403,2406,2415,2417,2435,2437,2444,2447,2448,2451,2472, - 2474,2480,2482,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519, - 2524,2525,2527,2531,2534,2545,2556,2556,2558,2558,2561,2563,2565,2570, - 2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620, - 2622,2626,2631,2632,2635,2637,2641,2641,2649,2652,2654,2654,2662,2677, - 2689,2691,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745, - 2748,2757,2759,2761,2763,2765,2768,2768,2784,2787,2790,2799,2809,2815, - 2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873, - 2876,2884,2887,2888,2891,2893,2901,2903,2908,2909,2911,2915,2918,2927, - 2929,2929,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972, - 2974,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3016,3018,3021, - 3024,3024,3031,3031,3046,3055,3072,3084,3086,3088,3090,3112,3114,3129, - 3132,3140,3142,3144,3146,3149,3157,3158,3160,3162,3165,3165,3168,3171, - 3174,3183,3200,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257, - 3260,3268,3270,3272,3274,3277,3285,3286,3293,3294,3296,3299,3302,3311, - 3313,3315,3328,3340,3342,3344,3346,3396,3398,3400,3402,3406,3412,3415, - 3423,3427,3430,3439,3450,3455,3457,3459,3461,3478,3482,3505,3507,3515, - 3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3558,3567, - 3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3718,3722, - 3724,3747,3749,3749,3751,3773,3776,3780,3782,3782,3784,3790,3792,3801, - 3804,3807,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897, - 3902,3911,3913,3948,3953,3972,3974,3991,3993,4028,4038,4038,4096,4169, - 4176,4253,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685, - 4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789, - 4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954, - 4957,4959,4969,4977,4992,5007,5024,5109,5112,5117,5121,5740,5743,5759, - 5761,5786,5792,5866,5870,5880,5888,5909,5919,5940,5952,5971,5984,5996, - 5998,6000,6002,6003,6016,6099,6103,6103,6108,6109,6112,6121,6155,6157, - 6159,6169,6176,6264,6272,6314,6320,6389,6400,6430,6432,6443,6448,6459, - 6470,6509,6512,6516,6528,6571,6576,6601,6608,6618,6656,6683,6688,6750, - 6752,6780,6783,6793,6800,6809,6823,6823,6832,6845,6847,6862,6912,6988, - 6992,7001,7019,7027,7040,7155,7168,7223,7232,7241,7245,7293,7296,7304, - 7312,7354,7357,7359,7376,7378,7380,7418,7424,7957,7960,7965,7968,8005, - 8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116, - 8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172, - 8178,8180,8182,8188,8255,8256,8276,8276,8305,8305,8319,8319,8336,8348, - 8400,8412,8417,8417,8421,8432,8450,8450,8455,8455,8458,8467,8469,8469, - 8472,8477,8484,8484,8486,8486,8488,8488,8490,8505,8508,8511,8517,8521, - 8526,8526,8544,8584,11264,11492,11499,11507,11520,11557,11559,11559,11565, - 11565,11568,11623,11631,11631,11647,11670,11680,11686,11688,11694,11696, - 11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11744, - 11775,12293,12295,12321,12335,12337,12341,12344,12348,12353,12438,12441, - 12447,12449,12538,12540,12543,12549,12591,12593,12686,12704,12735,12784, - 12799,13312,19903,19968,42124,42192,42237,42240,42508,42512,42539,42560, - 42607,42612,42621,42623,42737,42775,42783,42786,42888,42891,42954,42960, - 42961,42963,42963,42965,42969,42994,43047,43052,43052,43072,43123,43136, - 43205,43216,43225,43232,43255,43259,43259,43261,43309,43312,43347,43360, - 43388,43392,43456,43471,43481,43488,43518,43520,43574,43584,43597,43600, - 43609,43616,43638,43642,43714,43739,43741,43744,43759,43762,43766,43777, - 43782,43785,43790,43793,43798,43808,43814,43816,43822,43824,43866,43868, - 43881,43888,44010,44012,44013,44016,44025,44032,55203,55216,55238,55243, - 55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64296,64298, - 64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467, - 64829,64848,64911,64914,64967,65008,65019,65024,65039,65056,65071,65075, - 65076,65101,65103,65136,65140,65142,65276,65296,65305,65313,65338,65343, - 65343,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498, - 65500,65536,65547,65549,65574,65576,65594,65596,65597,65599,65613,65616, - 65629,65664,65786,65856,65908,66045,66045,66176,66204,66208,66256,66272, - 66272,66304,66335,66349,66378,66384,66426,66432,66461,66464,66499,66504, - 66511,66513,66517,66560,66717,66720,66729,66736,66771,66776,66811,66816, - 66855,66864,66915,66928,66938,66940,66954,66956,66962,66964,66965,66967, - 66977,66979,66993,66995,67001,67003,67004,67072,67382,67392,67413,67424, - 67431,67456,67461,67463,67504,67506,67514,67584,67589,67592,67592,67594, - 67637,67639,67640,67644,67644,67647,67669,67680,67702,67712,67742,67808, - 67826,67828,67829,67840,67861,67872,67897,67968,68023,68030,68031,68096, - 68099,68101,68102,68108,68115,68117,68119,68121,68149,68152,68154,68159, - 68159,68192,68220,68224,68252,68288,68295,68297,68326,68352,68405,68416, - 68437,68448,68466,68480,68497,68608,68680,68736,68786,68800,68850,68864, - 68903,68912,68921,69248,69289,69291,69292,69296,69297,69373,69404,69415, - 69415,69424,69456,69488,69509,69552,69572,69600,69622,69632,69702,69734, - 69749,69759,69818,69826,69826,69840,69864,69872,69881,69888,69940,69942, - 69951,69956,69959,69968,70003,70006,70006,70016,70084,70089,70092,70094, - 70106,70108,70108,70144,70161,70163,70199,70206,70209,70272,70278,70280, - 70280,70282,70285,70287,70301,70303,70312,70320,70378,70384,70393,70400, - 70403,70405,70412,70415,70416,70419,70440,70442,70448,70450,70451,70453, - 70457,70459,70468,70471,70472,70475,70477,70480,70480,70487,70487,70493, - 70499,70502,70508,70512,70516,70656,70730,70736,70745,70750,70753,70784, - 70853,70855,70855,70864,70873,71040,71093,71096,71104,71128,71133,71168, - 71232,71236,71236,71248,71257,71296,71352,71360,71369,71424,71450,71453, - 71467,71472,71481,71488,71494,71680,71738,71840,71913,71935,71942,71945, - 71945,71948,71955,71957,71958,71960,71989,71991,71992,71995,72003,72016, - 72025,72096,72103,72106,72151,72154,72161,72163,72164,72192,72254,72263, - 72263,72272,72345,72349,72349,72368,72440,72704,72712,72714,72758,72760, - 72768,72784,72793,72818,72847,72850,72871,72873,72886,72960,72966,72968, - 72969,72971,73014,73018,73018,73020,73021,73023,73031,73040,73049,73056, - 73061,73063,73064,73066,73102,73104,73105,73107,73112,73120,73129,73440, - 73462,73472,73488,73490,73530,73534,73538,73552,73561,73648,73648,73728, - 74649,74752,74862,74880,75075,77712,77808,77824,78895,78912,78933,82944, - 83526,92160,92728,92736,92766,92768,92777,92784,92862,92864,92873,92880, - 92909,92912,92916,92928,92982,92992,92995,93008,93017,93027,93047,93053, - 93071,93760,93823,93952,94026,94031,94087,94095,94111,94176,94177,94179, - 94180,94192,94193,94208,100343,100352,101589,101632,101640,110576,110579, - 110581,110587,110589,110590,110592,110882,110898,110898,110928,110930, - 110933,110933,110948,110951,110960,111355,113664,113770,113776,113788, - 113792,113800,113808,113817,113821,113822,118528,118573,118576,118598, - 119141,119145,119149,119154,119163,119170,119173,119179,119210,119213, - 119362,119364,119808,119892,119894,119964,119966,119967,119970,119970, - 119973,119974,119977,119980,119982,119993,119995,119995,119997,120003, - 120005,120069,120071,120074,120077,120084,120086,120092,120094,120121, - 120123,120126,120128,120132,120134,120134,120138,120144,120146,120485, - 120488,120512,120514,120538,120540,120570,120572,120596,120598,120628, - 120630,120654,120656,120686,120688,120712,120714,120744,120746,120770, - 120772,120779,120782,120831,121344,121398,121403,121452,121461,121461, - 121476,121476,121499,121503,121505,121519,122624,122654,122661,122666, - 122880,122886,122888,122904,122907,122913,122915,122916,122918,122922, - 122928,122989,123023,123023,123136,123180,123184,123197,123200,123209, - 123214,123214,123536,123566,123584,123641,124112,124153,124896,124902, - 124904,124907,124909,124910,124912,124926,124928,125124,125136,125142, - 125184,125259,125264,125273,126464,126467,126469,126495,126497,126498, - 126500,126500,126503,126503,126505,126514,126516,126519,126521,126521, - 126523,126523,126530,126530,126535,126535,126537,126537,126539,126539, - 126541,126543,126545,126546,126548,126548,126551,126551,126553,126553, - 126555,126555,126557,126557,126559,126559,126561,126562,126564,126564, - 126567,126570,126572,126578,126580,126583,126585,126588,126590,126590, - 126592,126601,126603,126619,126625,126627,126629,126633,126635,126651, - 130032,130041,131072,173791,173824,177977,177984,178205,178208,183969, - 183984,191456,194560,195101,196608,201546,201552,205743,917760,917999, - 1,0,42,42,2,0,39,39,92,92,2,0,10,10,13,13,1,0,47,47,1,0,29,29,1,0,28, - 28,1,0,13,13,21,0,36,36,162,165,1423,1423,1547,1547,2046,2047,2546,2547, - 2555,2555,2801,2801,3065,3065,3647,3647,6107,6107,8352,8384,43064,43064, - 65020,65020,65129,65129,65284,65284,65504,65505,65509,65510,73693,73696, - 123647,123647,126128,126128,1,0,32,32,6,0,95,95,8255,8256,8276,8276,65075, - 65076,65101,65103,65343,65343,1,0,9,9,2,0,34,34,92,92,1,0,10,10,1,0,11, - 11,1,0,31,31,659,0,65,90,97,122,170,170,181,181,186,186,192,214,216,246, - 248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,895,895, - 902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1327,1329,1366, - 1369,1369,1376,1416,1488,1514,1519,1522,1568,1610,1646,1647,1649,1747, - 1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839, - 1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074, - 2084,2084,2088,2088,2112,2136,2144,2154,2160,2183,2185,2190,2208,2249, - 2308,2361,2365,2365,2384,2384,2392,2401,2417,2432,2437,2444,2447,2448, - 2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525, - 2527,2529,2544,2545,2556,2556,2565,2570,2575,2576,2579,2600,2602,2608, - 2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701, - 2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768, - 2784,2785,2809,2809,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867, - 2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954, - 2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986, - 2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3129,3133,3133, - 3160,3162,3165,3165,3168,3169,3200,3200,3205,3212,3214,3216,3218,3240, - 3242,3251,3253,3257,3261,3261,3293,3294,3296,3297,3313,3314,3332,3340, - 3342,3344,3346,3386,3389,3389,3406,3406,3412,3414,3423,3425,3450,3455, - 3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635, - 3648,3654,3713,3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3760, - 3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911, - 3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193, - 4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301, - 4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744, - 4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822, - 4824,4880,4882,4885,4888,4954,4992,5007,5024,5109,5112,5117,5121,5740, - 5743,5759,5761,5786,5792,5866,5870,5880,5888,5905,5919,5937,5952,5969, - 5984,5996,5998,6000,6016,6067,6103,6103,6108,6108,6176,6264,6272,6312, - 6314,6314,6320,6389,6400,6430,6480,6509,6512,6516,6528,6571,6576,6601, - 6656,6678,6688,6740,6823,6823,6917,6963,6981,6988,7043,7072,7086,7087, - 7098,7141,7168,7203,7245,7247,7258,7293,7296,7304,7312,7354,7357,7359, - 7401,7404,7406,7411,7413,7414,7418,7418,7424,7615,7680,7957,7960,7965, - 7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061, - 8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155, - 8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450, - 8455,8455,8458,8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488, - 8490,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11492,11499,11502, - 11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631, - 11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718, - 11720,11726,11728,11734,11736,11742,12293,12295,12321,12329,12337,12341, - 12344,12348,12353,12438,12443,12447,12449,12538,12540,12543,12549,12591, - 12593,12686,12704,12735,12784,12799,13312,19903,19968,42124,42192,42237, - 42240,42508,42512,42527,42538,42539,42560,42606,42623,42653,42656,42735, - 42775,42783,42786,42888,42891,42954,42960,42961,42963,42963,42965,42969, - 42994,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187, - 43250,43255,43259,43259,43261,43262,43274,43301,43312,43334,43360,43388, - 43396,43442,43471,43471,43488,43492,43494,43503,43514,43518,43520,43560, - 43584,43586,43588,43595,43616,43638,43642,43642,43646,43695,43697,43697, - 43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754, - 43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822, - 43824,43866,43868,43881,43888,44002,44032,55203,55216,55238,55243,55291, - 63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296, - 64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433, - 64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276, - 65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495, - 65498,65500,65536,65547,65549,65574,65576,65594,65596,65597,65599,65613, - 65616,65629,65664,65786,65856,65908,66176,66204,66208,66256,66304,66335, - 66349,66378,66384,66421,66432,66461,66464,66499,66504,66511,66513,66517, - 66560,66717,66736,66771,66776,66811,66816,66855,66864,66915,66928,66938, - 66940,66954,66956,66962,66964,66965,66967,66977,66979,66993,66995,67001, - 67003,67004,67072,67382,67392,67413,67424,67431,67456,67461,67463,67504, - 67506,67514,67584,67589,67592,67592,67594,67637,67639,67640,67644,67644, - 67647,67669,67680,67702,67712,67742,67808,67826,67828,67829,67840,67861, - 67872,67897,67968,68023,68030,68031,68096,68096,68112,68115,68117,68119, - 68121,68149,68192,68220,68224,68252,68288,68295,68297,68324,68352,68405, - 68416,68437,68448,68466,68480,68497,68608,68680,68736,68786,68800,68850, - 68864,68899,69248,69289,69296,69297,69376,69404,69415,69415,69424,69445, - 69488,69505,69552,69572,69600,69622,69635,69687,69745,69746,69749,69749, - 69763,69807,69840,69864,69891,69926,69956,69956,69959,69959,69968,70002, - 70006,70006,70019,70066,70081,70084,70106,70106,70108,70108,70144,70161, - 70163,70187,70207,70208,70272,70278,70280,70280,70282,70285,70287,70301, - 70303,70312,70320,70366,70405,70412,70415,70416,70419,70440,70442,70448, - 70450,70451,70453,70457,70461,70461,70480,70480,70493,70497,70656,70708, - 70727,70730,70751,70753,70784,70831,70852,70853,70855,70855,71040,71086, - 71128,71131,71168,71215,71236,71236,71296,71338,71352,71352,71424,71450, - 71488,71494,71680,71723,71840,71903,71935,71942,71945,71945,71948,71955, - 71957,71958,71960,71983,71999,71999,72001,72001,72096,72103,72106,72144, - 72161,72161,72163,72163,72192,72192,72203,72242,72250,72250,72272,72272, - 72284,72329,72349,72349,72368,72440,72704,72712,72714,72750,72768,72768, - 72818,72847,72960,72966,72968,72969,72971,73008,73030,73030,73056,73061, - 73063,73064,73066,73097,73112,73112,73440,73458,73474,73474,73476,73488, - 73490,73523,73648,73648,73728,74649,74752,74862,74880,75075,77712,77808, - 77824,78895,78913,78918,82944,83526,92160,92728,92736,92766,92784,92862, - 92880,92909,92928,92975,92992,92995,93027,93047,93053,93071,93760,93823, - 93952,94026,94032,94032,94099,94111,94176,94177,94179,94179,94208,100343, - 100352,101589,101632,101640,110576,110579,110581,110587,110589,110590, - 110592,110882,110898,110898,110928,110930,110933,110933,110948,110951, - 110960,111355,113664,113770,113776,113788,113792,113800,113808,113817, - 119808,119892,119894,119964,119966,119967,119970,119970,119973,119974, - 119977,119980,119982,119993,119995,119995,119997,120003,120005,120069, - 120071,120074,120077,120084,120086,120092,120094,120121,120123,120126, - 120128,120132,120134,120134,120138,120144,120146,120485,120488,120512, - 120514,120538,120540,120570,120572,120596,120598,120628,120630,120654, - 120656,120686,120688,120712,120714,120744,120746,120770,120772,120779, - 122624,122654,122661,122666,122928,122989,123136,123180,123191,123197, - 123214,123214,123536,123565,123584,123627,124112,124139,124896,124902, - 124904,124907,124909,124910,124912,124926,124928,125124,125184,125251, - 125259,125259,126464,126467,126469,126495,126497,126498,126500,126500, - 126503,126503,126505,126514,126516,126519,126521,126521,126523,126523, - 126530,126530,126535,126535,126537,126537,126539,126539,126541,126543, - 126545,126546,126548,126548,126551,126551,126553,126553,126555,126555, - 126557,126557,126559,126559,126561,126562,126564,126564,126567,126570, - 126572,126578,126580,126583,126585,126588,126590,126590,126592,126601, - 126603,126619,126625,126627,126629,126633,126635,126651,131072,173791, - 173824,177977,177984,178205,178208,183969,183984,191456,194560,195101, - 196608,201546,201552,205743,1641,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0, - 0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1, - 0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0, - 0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0, - 39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1, - 0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0, - 0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1,0,0,0,0, - 71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,0,0,81,1, - 0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,0,91,1,0,0, - 0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,0,101,1,0,0,0,0, - 103,1,0,0,0,0,105,1,0,0,0,0,107,1,0,0,0,0,109,1,0,0,0,0,111,1,0,0,0,0, - 113,1,0,0,0,0,115,1,0,0,0,0,117,1,0,0,0,0,119,1,0,0,0,0,121,1,0,0,0,0, - 123,1,0,0,0,0,125,1,0,0,0,0,127,1,0,0,0,0,129,1,0,0,0,0,131,1,0,0,0,0, - 133,1,0,0,0,0,135,1,0,0,0,0,137,1,0,0,0,0,139,1,0,0,0,0,141,1,0,0,0,0, - 143,1,0,0,0,0,145,1,0,0,0,0,147,1,0,0,0,0,149,1,0,0,0,0,151,1,0,0,0,0, - 153,1,0,0,0,0,155,1,0,0,0,0,157,1,0,0,0,0,159,1,0,0,0,0,161,1,0,0,0,0, - 163,1,0,0,0,0,165,1,0,0,0,0,167,1,0,0,0,0,169,1,0,0,0,0,171,1,0,0,0,0, - 173,1,0,0,0,0,175,1,0,0,0,0,177,1,0,0,0,0,179,1,0,0,0,0,181,1,0,0,0,0, - 183,1,0,0,0,0,185,1,0,0,0,0,187,1,0,0,0,0,189,1,0,0,0,0,191,1,0,0,0,0, - 193,1,0,0,0,0,195,1,0,0,0,0,197,1,0,0,0,0,199,1,0,0,0,0,201,1,0,0,0,0, - 203,1,0,0,0,0,205,1,0,0,0,0,207,1,0,0,0,0,209,1,0,0,0,0,211,1,0,0,0,0, - 213,1,0,0,0,0,215,1,0,0,0,0,217,1,0,0,0,0,219,1,0,0,0,0,221,1,0,0,0,0, - 223,1,0,0,0,0,225,1,0,0,0,0,227,1,0,0,0,0,229,1,0,0,0,0,231,1,0,0,0,0, - 233,1,0,0,0,0,235,1,0,0,0,0,237,1,0,0,0,0,239,1,0,0,0,0,241,1,0,0,0,0, - 243,1,0,0,0,0,245,1,0,0,0,0,247,1,0,0,0,0,249,1,0,0,0,0,251,1,0,0,0,0, - 253,1,0,0,0,0,255,1,0,0,0,0,257,1,0,0,0,0,259,1,0,0,0,0,261,1,0,0,0,0, - 263,1,0,0,0,0,265,1,0,0,0,0,267,1,0,0,0,0,269,1,0,0,0,0,271,1,0,0,0,0, - 273,1,0,0,0,0,275,1,0,0,0,0,277,1,0,0,0,0,279,1,0,0,0,0,281,1,0,0,0,0, - 283,1,0,0,0,0,285,1,0,0,0,0,287,1,0,0,0,0,289,1,0,0,0,0,291,1,0,0,0,0, - 293,1,0,0,0,0,295,1,0,0,0,0,297,1,0,0,0,0,299,1,0,0,0,0,301,1,0,0,0,0, - 303,1,0,0,0,0,305,1,0,0,0,0,307,1,0,0,0,0,309,1,0,0,0,0,311,1,0,0,0,0, - 313,1,0,0,0,0,315,1,0,0,0,0,317,1,0,0,0,0,319,1,0,0,0,0,321,1,0,0,0,0, - 323,1,0,0,0,0,325,1,0,0,0,0,327,1,0,0,0,0,329,1,0,0,0,0,331,1,0,0,0,0, - 333,1,0,0,0,0,335,1,0,0,0,0,337,1,0,0,0,0,339,1,0,0,0,0,341,1,0,0,0,0, - 343,1,0,0,0,0,345,1,0,0,0,0,347,1,0,0,0,0,349,1,0,0,0,0,351,1,0,0,0,0, - 353,1,0,0,0,0,355,1,0,0,0,0,357,1,0,0,0,0,359,1,0,0,0,0,361,1,0,0,0,0, - 363,1,0,0,0,0,365,1,0,0,0,0,367,1,0,0,0,0,369,1,0,0,0,0,371,1,0,0,0,0, - 373,1,0,0,0,0,375,1,0,0,0,0,377,1,0,0,0,0,379,1,0,0,0,0,381,1,0,0,0,0, - 383,1,0,0,0,0,385,1,0,0,0,0,387,1,0,0,0,0,389,1,0,0,0,0,431,1,0,0,0,1, - 433,1,0,0,0,3,435,1,0,0,0,5,437,1,0,0,0,7,439,1,0,0,0,9,441,1,0,0,0,11, - 443,1,0,0,0,13,445,1,0,0,0,15,447,1,0,0,0,17,449,1,0,0,0,19,451,1,0,0, - 0,21,453,1,0,0,0,23,455,1,0,0,0,25,458,1,0,0,0,27,460,1,0,0,0,29,463, - 1,0,0,0,31,465,1,0,0,0,33,468,1,0,0,0,35,470,1,0,0,0,37,473,1,0,0,0,39, - 476,1,0,0,0,41,478,1,0,0,0,43,480,1,0,0,0,45,482,1,0,0,0,47,484,1,0,0, - 0,49,487,1,0,0,0,51,489,1,0,0,0,53,491,1,0,0,0,55,493,1,0,0,0,57,495, - 1,0,0,0,59,497,1,0,0,0,61,499,1,0,0,0,63,501,1,0,0,0,65,503,1,0,0,0,67, - 505,1,0,0,0,69,507,1,0,0,0,71,509,1,0,0,0,73,511,1,0,0,0,75,513,1,0,0, - 0,77,515,1,0,0,0,79,517,1,0,0,0,81,519,1,0,0,0,83,521,1,0,0,0,85,523, - 1,0,0,0,87,525,1,0,0,0,89,527,1,0,0,0,91,535,1,0,0,0,93,539,1,0,0,0,95, - 543,1,0,0,0,97,547,1,0,0,0,99,553,1,0,0,0,101,561,1,0,0,0,103,565,1,0, - 0,0,105,568,1,0,0,0,107,572,1,0,0,0,109,582,1,0,0,0,111,589,1,0,0,0,113, - 595,1,0,0,0,115,598,1,0,0,0,117,603,1,0,0,0,119,608,1,0,0,0,121,613,1, - 0,0,0,123,624,1,0,0,0,125,631,1,0,0,0,127,639,1,0,0,0,129,646,1,0,0,0, - 131,669,1,0,0,0,133,678,1,0,0,0,135,683,1,0,0,0,137,689,1,0,0,0,139,696, - 1,0,0,0,141,700,1,0,0,0,143,706,1,0,0,0,145,715,1,0,0,0,147,722,1,0,0, - 0,149,730,1,0,0,0,151,737,1,0,0,0,153,742,1,0,0,0,155,753,1,0,0,0,157, - 760,1,0,0,0,159,769,1,0,0,0,161,774,1,0,0,0,163,779,1,0,0,0,165,783,1, - 0,0,0,167,788,1,0,0,0,169,795,1,0,0,0,171,803,1,0,0,0,173,810,1,0,0,0, - 175,820,1,0,0,0,177,826,1,0,0,0,179,831,1,0,0,0,181,837,1,0,0,0,183,841, - 1,0,0,0,185,846,1,0,0,0,187,852,1,0,0,0,189,858,1,0,0,0,191,863,1,0,0, - 0,193,871,1,0,0,0,195,876,1,0,0,0,197,883,1,0,0,0,199,889,1,0,0,0,201, - 892,1,0,0,0,203,895,1,0,0,0,205,905,1,0,0,0,207,913,1,0,0,0,209,916,1, - 0,0,0,211,921,1,0,0,0,213,925,1,0,0,0,215,931,1,0,0,0,217,936,1,0,0,0, - 219,944,1,0,0,0,221,950,1,0,0,0,223,956,1,0,0,0,225,965,1,0,0,0,227,971, - 1,0,0,0,229,980,1,0,0,0,231,991,1,0,0,0,233,994,1,0,0,0,235,999,1,0,0, - 0,237,1003,1,0,0,0,239,1008,1,0,0,0,241,1013,1,0,0,0,243,1016,1,0,0,0, - 245,1021,1,0,0,0,247,1029,1,0,0,0,249,1038,1,0,0,0,251,1041,1,0,0,0,253, - 1047,1,0,0,0,255,1055,1,0,0,0,257,1063,1,0,0,0,259,1071,1,0,0,0,261,1077, - 1,0,0,0,263,1082,1,0,0,0,265,1086,1,0,0,0,267,1093,1,0,0,0,269,1100,1, - 0,0,0,271,1109,1,0,0,0,273,1134,1,0,0,0,275,1143,1,0,0,0,277,1147,1,0, - 0,0,279,1154,1,0,0,0,281,1163,1,0,0,0,283,1169,1,0,0,0,285,1176,1,0,0, - 0,287,1183,1,0,0,0,289,1189,1,0,0,0,291,1194,1,0,0,0,293,1197,1,0,0,0, - 295,1203,1,0,0,0,297,1215,1,0,0,0,299,1220,1,0,0,0,301,1225,1,0,0,0,303, - 1231,1,0,0,0,305,1238,1,0,0,0,307,1248,1,0,0,0,309,1255,1,0,0,0,311,1259, - 1,0,0,0,313,1264,1,0,0,0,315,1270,1,0,0,0,317,1275,1,0,0,0,319,1281,1, - 0,0,0,321,1291,1,0,0,0,323,1295,1,0,0,0,325,1302,1,0,0,0,327,1308,1,0, - 0,0,329,1313,1,0,0,0,331,1323,1,0,0,0,333,1334,1,0,0,0,335,1343,1,0,0, - 0,337,1348,1,0,0,0,339,1352,1,0,0,0,341,1360,1,0,0,0,343,1362,1,0,0,0, - 345,1367,1,0,0,0,347,1370,1,0,0,0,349,1372,1,0,0,0,351,1375,1,0,0,0,353, - 1377,1,0,0,0,355,1397,1,0,0,0,357,1399,1,0,0,0,359,1431,1,0,0,0,361,1434, - 1,0,0,0,363,1438,1,0,0,0,365,1442,1,0,0,0,367,1446,1,0,0,0,369,1448,1, - 0,0,0,371,1450,1,0,0,0,373,1474,1,0,0,0,375,1488,1,0,0,0,377,1497,1,0, - 0,0,379,1506,1,0,0,0,381,1510,1,0,0,0,383,1520,1,0,0,0,385,1525,1,0,0, - 0,387,1541,1,0,0,0,389,1572,1,0,0,0,391,1574,1,0,0,0,393,1576,1,0,0,0, - 395,1578,1,0,0,0,397,1580,1,0,0,0,399,1582,1,0,0,0,401,1584,1,0,0,0,403, - 1586,1,0,0,0,405,1588,1,0,0,0,407,1590,1,0,0,0,409,1592,1,0,0,0,411,1594, - 1,0,0,0,413,1596,1,0,0,0,415,1598,1,0,0,0,417,1600,1,0,0,0,419,1602,1, - 0,0,0,421,1604,1,0,0,0,423,1606,1,0,0,0,425,1608,1,0,0,0,427,1610,1,0, - 0,0,429,1612,1,0,0,0,431,1614,1,0,0,0,433,434,5,59,0,0,434,2,1,0,0,0, - 435,436,5,40,0,0,436,4,1,0,0,0,437,438,5,41,0,0,438,6,1,0,0,0,439,440, - 5,44,0,0,440,8,1,0,0,0,441,442,5,46,0,0,442,10,1,0,0,0,443,444,5,61,0, - 0,444,12,1,0,0,0,445,446,5,91,0,0,446,14,1,0,0,0,447,448,5,93,0,0,448, - 16,1,0,0,0,449,450,5,123,0,0,450,18,1,0,0,0,451,452,5,125,0,0,452,20, - 1,0,0,0,453,454,5,124,0,0,454,22,1,0,0,0,455,456,5,60,0,0,456,457,5,62, - 0,0,457,24,1,0,0,0,458,459,5,60,0,0,459,26,1,0,0,0,460,461,5,60,0,0,461, - 462,5,61,0,0,462,28,1,0,0,0,463,464,5,62,0,0,464,30,1,0,0,0,465,466,5, - 62,0,0,466,467,5,61,0,0,467,32,1,0,0,0,468,469,5,38,0,0,469,34,1,0,0, - 0,470,471,5,62,0,0,471,472,5,62,0,0,472,36,1,0,0,0,473,474,5,60,0,0,474, - 475,5,60,0,0,475,38,1,0,0,0,476,477,5,43,0,0,477,40,1,0,0,0,478,479,5, - 47,0,0,479,42,1,0,0,0,480,481,5,37,0,0,481,44,1,0,0,0,482,483,5,94,0, - 0,483,46,1,0,0,0,484,485,5,61,0,0,485,486,5,126,0,0,486,48,1,0,0,0,487, - 488,5,36,0,0,488,50,1,0,0,0,489,490,5,10216,0,0,490,52,1,0,0,0,491,492, - 5,12296,0,0,492,54,1,0,0,0,493,494,5,65124,0,0,494,56,1,0,0,0,495,496, - 5,65308,0,0,496,58,1,0,0,0,497,498,5,10217,0,0,498,60,1,0,0,0,499,500, - 5,12297,0,0,500,62,1,0,0,0,501,502,5,65125,0,0,502,64,1,0,0,0,503,504, - 5,65310,0,0,504,66,1,0,0,0,505,506,5,173,0,0,506,68,1,0,0,0,507,508,5, - 8208,0,0,508,70,1,0,0,0,509,510,5,8209,0,0,510,72,1,0,0,0,511,512,5,8210, - 0,0,512,74,1,0,0,0,513,514,5,8211,0,0,514,76,1,0,0,0,515,516,5,8212,0, - 0,516,78,1,0,0,0,517,518,5,8213,0,0,518,80,1,0,0,0,519,520,5,8722,0,0, - 520,82,1,0,0,0,521,522,5,65112,0,0,522,84,1,0,0,0,523,524,5,65123,0,0, - 524,86,1,0,0,0,525,526,5,65293,0,0,526,88,1,0,0,0,527,528,7,0,0,0,528, - 529,7,1,0,0,529,530,7,2,0,0,530,531,7,1,0,0,531,532,7,3,0,0,532,533,7, - 4,0,0,533,534,7,1,0,0,534,90,1,0,0,0,535,536,7,0,0,0,536,537,7,5,0,0, - 537,538,7,2,0,0,538,92,1,0,0,0,539,540,7,0,0,0,540,541,7,6,0,0,541,542, - 7,6,0,0,542,94,1,0,0,0,543,544,7,0,0,0,544,545,7,3,0,0,545,546,7,3,0, - 0,546,96,1,0,0,0,547,548,7,0,0,0,548,549,7,3,0,0,549,550,7,7,0,0,550, - 551,7,8,0,0,551,552,7,9,0,0,552,98,1,0,0,0,553,554,7,0,0,0,554,555,7, - 5,0,0,555,556,7,0,0,0,556,557,7,3,0,0,557,558,7,2,0,0,558,559,7,10,0, - 0,559,560,7,8,0,0,560,100,1,0,0,0,561,562,7,0,0,0,562,563,7,5,0,0,563, - 564,7,6,0,0,564,102,1,0,0,0,565,566,7,0,0,0,566,567,7,11,0,0,567,104, - 1,0,0,0,568,569,7,0,0,0,569,570,7,11,0,0,570,571,7,1,0,0,571,106,1,0, - 0,0,572,573,7,0,0,0,573,574,7,11,0,0,574,575,7,1,0,0,575,576,7,8,0,0, - 576,577,7,5,0,0,577,578,7,6,0,0,578,579,7,4,0,0,579,580,7,5,0,0,580,581, - 7,12,0,0,581,108,1,0,0,0,582,583,7,0,0,0,583,584,7,7,0,0,584,585,7,7, - 0,0,585,586,7,0,0,0,586,587,7,1,0,0,587,588,7,13,0,0,588,110,1,0,0,0, - 589,590,7,14,0,0,590,591,7,8,0,0,591,592,7,12,0,0,592,593,7,4,0,0,593, - 594,7,5,0,0,594,112,1,0,0,0,595,596,7,14,0,0,596,597,7,2,0,0,597,114, - 1,0,0,0,598,599,7,1,0,0,599,600,7,0,0,0,600,601,7,3,0,0,601,602,7,3,0, - 0,602,116,1,0,0,0,603,604,7,1,0,0,604,605,7,0,0,0,605,606,7,11,0,0,606, - 607,7,8,0,0,607,118,1,0,0,0,608,609,7,1,0,0,609,610,7,0,0,0,610,611,7, - 11,0,0,611,612,7,7,0,0,612,120,1,0,0,0,613,614,7,1,0,0,614,615,7,13,0, - 0,615,616,7,8,0,0,616,617,7,1,0,0,617,618,7,15,0,0,618,619,7,16,0,0,619, - 620,7,17,0,0,620,621,7,4,0,0,621,622,7,5,0,0,622,623,7,7,0,0,623,122, - 1,0,0,0,624,625,7,1,0,0,625,626,7,17,0,0,626,627,7,3,0,0,627,628,7,18, - 0,0,628,629,7,19,0,0,629,630,7,5,0,0,630,124,1,0,0,0,631,632,7,1,0,0, - 632,633,7,17,0,0,633,634,7,19,0,0,634,635,7,19,0,0,635,636,7,8,0,0,636, - 637,7,5,0,0,637,638,7,7,0,0,638,126,1,0,0,0,639,640,7,1,0,0,640,641,7, - 17,0,0,641,642,7,19,0,0,642,643,7,19,0,0,643,644,7,4,0,0,644,645,7,7, - 0,0,645,128,1,0,0,0,646,647,7,1,0,0,647,648,7,17,0,0,648,649,7,19,0,0, - 649,650,7,19,0,0,650,651,7,4,0,0,651,652,7,7,0,0,652,653,5,95,0,0,653, - 654,7,11,0,0,654,655,7,15,0,0,655,656,7,4,0,0,656,657,7,16,0,0,657,658, - 5,95,0,0,658,659,7,1,0,0,659,660,7,13,0,0,660,661,7,8,0,0,661,662,7,1, - 0,0,662,663,7,15,0,0,663,664,7,16,0,0,664,665,7,17,0,0,665,666,7,4,0, - 0,666,667,7,5,0,0,667,668,7,7,0,0,668,130,1,0,0,0,669,670,7,1,0,0,670, - 671,7,17,0,0,671,672,7,5,0,0,672,673,7,7,0,0,673,674,7,0,0,0,674,675, - 7,4,0,0,675,676,7,5,0,0,676,677,7,11,0,0,677,132,1,0,0,0,678,679,7,1, - 0,0,679,680,7,17,0,0,680,681,7,16,0,0,681,682,7,2,0,0,682,134,1,0,0,0, - 683,684,7,1,0,0,684,685,7,17,0,0,685,686,7,18,0,0,686,687,7,5,0,0,687, - 688,7,7,0,0,688,136,1,0,0,0,689,690,7,1,0,0,690,691,7,9,0,0,691,692,7, - 8,0,0,692,693,7,0,0,0,693,694,7,7,0,0,694,695,7,8,0,0,695,138,1,0,0,0, - 696,697,7,1,0,0,697,698,7,11,0,0,698,699,7,9,0,0,699,140,1,0,0,0,700, - 701,7,1,0,0,701,702,7,2,0,0,702,703,7,1,0,0,703,704,7,3,0,0,704,705,7, - 8,0,0,705,142,1,0,0,0,706,707,7,6,0,0,707,708,7,0,0,0,708,709,7,7,0,0, - 709,710,7,0,0,0,710,711,7,14,0,0,711,712,7,0,0,0,712,713,7,11,0,0,713, - 714,7,8,0,0,714,144,1,0,0,0,715,716,7,6,0,0,716,717,7,14,0,0,717,718, - 7,7,0,0,718,719,7,2,0,0,719,720,7,16,0,0,720,721,7,8,0,0,721,146,1,0, - 0,0,722,723,7,6,0,0,723,724,7,8,0,0,724,725,7,20,0,0,725,726,7,0,0,0, - 726,727,7,18,0,0,727,728,7,3,0,0,728,729,7,7,0,0,729,148,1,0,0,0,730, - 731,7,6,0,0,731,732,7,8,0,0,732,733,7,3,0,0,733,734,7,8,0,0,734,735,7, - 7,0,0,735,736,7,8,0,0,736,150,1,0,0,0,737,738,7,6,0,0,738,739,7,8,0,0, - 739,740,7,11,0,0,740,741,7,1,0,0,741,152,1,0,0,0,742,743,7,6,0,0,743, - 744,7,8,0,0,744,745,7,11,0,0,745,746,7,1,0,0,746,747,7,8,0,0,747,748, - 7,5,0,0,748,749,7,6,0,0,749,750,7,4,0,0,750,751,7,5,0,0,751,752,7,12, - 0,0,752,154,1,0,0,0,753,754,7,6,0,0,754,755,7,8,0,0,755,756,7,7,0,0,756, - 757,7,0,0,0,757,758,7,1,0,0,758,759,7,13,0,0,759,156,1,0,0,0,760,761, - 7,6,0,0,761,762,7,4,0,0,762,763,7,11,0,0,763,764,7,7,0,0,764,765,7,4, - 0,0,765,766,7,5,0,0,766,767,7,1,0,0,767,768,7,7,0,0,768,158,1,0,0,0,769, - 770,7,6,0,0,770,771,7,9,0,0,771,772,7,17,0,0,772,773,7,16,0,0,773,160, - 1,0,0,0,774,775,7,8,0,0,775,776,7,3,0,0,776,777,7,11,0,0,777,778,7,8, - 0,0,778,162,1,0,0,0,779,780,7,8,0,0,780,781,7,5,0,0,781,782,7,6,0,0,782, - 164,1,0,0,0,783,784,7,8,0,0,784,785,7,5,0,0,785,786,7,6,0,0,786,787,7, - 11,0,0,787,166,1,0,0,0,788,789,7,8,0,0,789,790,7,21,0,0,790,791,7,4,0, - 0,791,792,7,11,0,0,792,793,7,7,0,0,793,794,7,11,0,0,794,168,1,0,0,0,795, - 796,7,8,0,0,796,797,7,21,0,0,797,798,7,16,0,0,798,799,7,3,0,0,799,800, - 7,0,0,0,800,801,7,4,0,0,801,802,7,5,0,0,802,170,1,0,0,0,803,804,7,8,0, - 0,804,805,7,21,0,0,805,806,7,16,0,0,806,807,7,17,0,0,807,808,7,9,0,0, - 808,809,7,7,0,0,809,172,1,0,0,0,810,811,7,8,0,0,811,812,7,21,0,0,812, - 813,7,7,0,0,813,814,7,8,0,0,814,815,7,5,0,0,815,816,7,11,0,0,816,817, - 7,4,0,0,817,818,7,17,0,0,818,819,7,5,0,0,819,174,1,0,0,0,820,821,7,20, - 0,0,821,822,7,0,0,0,822,823,7,3,0,0,823,824,7,11,0,0,824,825,7,8,0,0, - 825,176,1,0,0,0,826,827,7,20,0,0,827,828,7,9,0,0,828,829,7,17,0,0,829, - 830,7,19,0,0,830,178,1,0,0,0,831,832,7,20,0,0,832,833,7,17,0,0,833,834, - 7,9,0,0,834,835,7,1,0,0,835,836,7,8,0,0,836,180,1,0,0,0,837,838,7,20, - 0,0,838,839,7,17,0,0,839,840,7,9,0,0,840,182,1,0,0,0,841,842,7,12,0,0, - 842,843,7,3,0,0,843,844,7,17,0,0,844,845,7,14,0,0,845,184,1,0,0,0,846, - 847,7,12,0,0,847,848,7,9,0,0,848,849,7,0,0,0,849,850,7,16,0,0,850,851, - 7,13,0,0,851,186,1,0,0,0,852,853,7,12,0,0,853,854,7,9,0,0,854,855,7,17, - 0,0,855,856,7,18,0,0,856,857,7,16,0,0,857,188,1,0,0,0,858,859,7,13,0, - 0,859,860,7,0,0,0,860,861,7,11,0,0,861,862,7,13,0,0,862,190,1,0,0,0,863, - 864,7,13,0,0,864,865,7,8,0,0,865,866,7,0,0,0,866,867,7,6,0,0,867,868, - 7,8,0,0,868,869,7,9,0,0,869,870,7,11,0,0,870,192,1,0,0,0,871,872,7,13, - 0,0,872,873,7,4,0,0,873,874,7,5,0,0,874,875,7,7,0,0,875,194,1,0,0,0,876, - 877,7,4,0,0,877,878,7,19,0,0,878,879,7,16,0,0,879,880,7,17,0,0,880,881, - 7,9,0,0,881,882,7,7,0,0,882,196,1,0,0,0,883,884,7,4,0,0,884,885,7,5,0, - 0,885,886,7,6,0,0,886,887,7,8,0,0,887,888,7,21,0,0,888,198,1,0,0,0,889, - 890,7,4,0,0,890,891,7,20,0,0,891,200,1,0,0,0,892,893,7,4,0,0,893,894, - 7,5,0,0,894,202,1,0,0,0,895,896,7,4,0,0,896,897,7,5,0,0,897,898,7,1,0, - 0,898,899,7,9,0,0,899,900,7,8,0,0,900,901,7,19,0,0,901,902,7,8,0,0,902, - 903,7,5,0,0,903,904,7,7,0,0,904,204,1,0,0,0,905,906,7,4,0,0,906,907,7, - 5,0,0,907,908,7,11,0,0,908,909,7,7,0,0,909,910,7,0,0,0,910,911,7,3,0, - 0,911,912,7,3,0,0,912,206,1,0,0,0,913,914,7,4,0,0,914,915,7,11,0,0,915, - 208,1,0,0,0,916,917,7,22,0,0,917,918,7,17,0,0,918,919,7,4,0,0,919,920, - 7,5,0,0,920,210,1,0,0,0,921,922,7,15,0,0,922,923,7,8,0,0,923,924,7,2, - 0,0,924,212,1,0,0,0,925,926,7,3,0,0,926,927,7,4,0,0,927,928,7,19,0,0, - 928,929,7,4,0,0,929,930,7,7,0,0,930,214,1,0,0,0,931,932,7,3,0,0,932,933, - 7,17,0,0,933,934,7,0,0,0,934,935,7,6,0,0,935,216,1,0,0,0,936,937,7,3, - 0,0,937,938,7,17,0,0,938,939,7,12,0,0,939,940,7,4,0,0,940,941,7,1,0,0, - 941,942,7,0,0,0,942,943,7,3,0,0,943,218,1,0,0,0,944,945,7,19,0,0,945, - 946,7,0,0,0,946,947,7,1,0,0,947,948,7,9,0,0,948,949,7,17,0,0,949,220, - 1,0,0,0,950,951,7,19,0,0,951,952,7,0,0,0,952,953,7,7,0,0,953,954,7,1, - 0,0,954,955,7,13,0,0,955,222,1,0,0,0,956,957,7,19,0,0,957,958,7,0,0,0, - 958,959,7,21,0,0,959,960,7,23,0,0,960,961,7,0,0,0,961,962,7,3,0,0,962, - 963,7,18,0,0,963,964,7,8,0,0,964,224,1,0,0,0,965,966,7,19,0,0,966,967, - 7,8,0,0,967,968,7,9,0,0,968,969,7,12,0,0,969,970,7,8,0,0,970,226,1,0, - 0,0,971,972,7,19,0,0,972,973,7,4,0,0,973,974,7,5,0,0,974,975,7,23,0,0, - 975,976,7,0,0,0,976,977,7,3,0,0,977,978,7,18,0,0,978,979,7,8,0,0,979, - 228,1,0,0,0,980,981,7,19,0,0,981,982,7,18,0,0,982,983,7,3,0,0,983,984, - 7,7,0,0,984,985,7,4,0,0,985,986,5,95,0,0,986,987,7,22,0,0,987,988,7,17, - 0,0,988,989,7,4,0,0,989,990,7,5,0,0,990,230,1,0,0,0,991,992,7,5,0,0,992, - 993,7,17,0,0,993,232,1,0,0,0,994,995,7,5,0,0,995,996,7,17,0,0,996,997, - 7,6,0,0,997,998,7,8,0,0,998,234,1,0,0,0,999,1000,7,5,0,0,1000,1001,7, - 17,0,0,1001,1002,7,7,0,0,1002,236,1,0,0,0,1003,1004,7,5,0,0,1004,1005, - 7,17,0,0,1005,1006,7,5,0,0,1006,1007,7,8,0,0,1007,238,1,0,0,0,1008,1009, - 7,5,0,0,1009,1010,7,18,0,0,1010,1011,7,3,0,0,1011,1012,7,3,0,0,1012,240, - 1,0,0,0,1013,1014,7,17,0,0,1014,1015,7,5,0,0,1015,242,1,0,0,0,1016,1017, - 7,17,0,0,1017,1018,7,5,0,0,1018,1019,7,3,0,0,1019,1020,7,2,0,0,1020,244, - 1,0,0,0,1021,1022,7,17,0,0,1022,1023,7,16,0,0,1023,1024,7,7,0,0,1024, - 1025,7,4,0,0,1025,1026,7,17,0,0,1026,1027,7,5,0,0,1027,1028,7,11,0,0, - 1028,246,1,0,0,0,1029,1030,7,17,0,0,1030,1031,7,16,0,0,1031,1032,7,7, - 0,0,1032,1033,7,4,0,0,1033,1034,7,17,0,0,1034,1035,7,5,0,0,1035,1036, - 7,0,0,0,1036,1037,7,3,0,0,1037,248,1,0,0,0,1038,1039,7,17,0,0,1039,1040, - 7,9,0,0,1040,250,1,0,0,0,1041,1042,7,17,0,0,1042,1043,7,9,0,0,1043,1044, - 7,6,0,0,1044,1045,7,8,0,0,1045,1046,7,9,0,0,1046,252,1,0,0,0,1047,1048, - 7,16,0,0,1048,1049,7,9,0,0,1049,1050,7,4,0,0,1050,1051,7,19,0,0,1051, - 1052,7,0,0,0,1052,1053,7,9,0,0,1053,1054,7,2,0,0,1054,254,1,0,0,0,1055, - 1056,7,16,0,0,1056,1057,7,9,0,0,1057,1058,7,17,0,0,1058,1059,7,20,0,0, - 1059,1060,7,4,0,0,1060,1061,7,3,0,0,1061,1062,7,8,0,0,1062,256,1,0,0, - 0,1063,1064,7,16,0,0,1064,1065,7,9,0,0,1065,1066,7,17,0,0,1066,1067,7, - 22,0,0,1067,1068,7,8,0,0,1068,1069,7,1,0,0,1069,1070,7,7,0,0,1070,258, - 1,0,0,0,1071,1072,7,9,0,0,1072,1073,7,0,0,0,1073,1074,7,5,0,0,1074,1075, - 7,12,0,0,1075,1076,7,8,0,0,1076,260,1,0,0,0,1077,1078,7,9,0,0,1078,1079, - 7,8,0,0,1079,1080,7,0,0,0,1080,1081,7,6,0,0,1081,262,1,0,0,0,1082,1083, - 7,9,0,0,1083,1084,7,8,0,0,1084,1085,7,3,0,0,1085,264,1,0,0,0,1086,1087, - 7,9,0,0,1087,1088,7,8,0,0,1088,1089,7,5,0,0,1089,1090,7,0,0,0,1090,1091, - 7,19,0,0,1091,1092,7,8,0,0,1092,266,1,0,0,0,1093,1094,7,9,0,0,1094,1095, - 7,8,0,0,1095,1096,7,7,0,0,1096,1097,7,18,0,0,1097,1098,7,9,0,0,1098,1099, - 7,5,0,0,1099,268,1,0,0,0,1100,1101,7,9,0,0,1101,1102,7,17,0,0,1102,1103, - 7,3,0,0,1103,1104,7,3,0,0,1104,1105,7,14,0,0,1105,1106,7,0,0,0,1106,1107, - 7,1,0,0,1107,1108,7,15,0,0,1108,270,1,0,0,0,1109,1110,7,9,0,0,1110,1111, - 7,17,0,0,1111,1112,7,3,0,0,1112,1113,7,3,0,0,1113,1114,7,14,0,0,1114, - 1115,7,0,0,0,1115,1116,7,1,0,0,1116,1117,7,15,0,0,1117,1118,5,95,0,0, - 1118,1119,7,11,0,0,1119,1120,7,15,0,0,1120,1121,7,4,0,0,1121,1122,7,16, - 0,0,1122,1123,5,95,0,0,1123,1124,7,1,0,0,1124,1125,7,13,0,0,1125,1126, - 7,8,0,0,1126,1127,7,1,0,0,1127,1128,7,15,0,0,1128,1129,7,16,0,0,1129, - 1130,7,17,0,0,1130,1131,7,4,0,0,1131,1132,7,5,0,0,1132,1133,7,7,0,0,1133, - 272,1,0,0,0,1134,1135,7,11,0,0,1135,1136,7,8,0,0,1136,1137,7,24,0,0,1137, - 1138,7,18,0,0,1138,1139,7,8,0,0,1139,1140,7,5,0,0,1140,1141,7,1,0,0,1141, - 1142,7,8,0,0,1142,274,1,0,0,0,1143,1144,7,11,0,0,1144,1145,7,8,0,0,1145, - 1146,7,7,0,0,1146,276,1,0,0,0,1147,1148,7,11,0,0,1148,1149,7,17,0,0,1149, - 1150,7,9,0,0,1150,1151,7,7,0,0,1151,1152,7,8,0,0,1152,1153,7,6,0,0,1153, - 278,1,0,0,0,1154,1155,7,11,0,0,1155,1156,7,13,0,0,1156,1157,7,17,0,0, - 1157,1158,7,9,0,0,1158,1159,7,7,0,0,1159,1160,7,8,0,0,1160,1161,7,11, - 0,0,1161,1162,7,7,0,0,1162,280,1,0,0,0,1163,1164,7,11,0,0,1164,1165,7, - 7,0,0,1165,1166,7,0,0,0,1166,1167,7,9,0,0,1167,1168,7,7,0,0,1168,282, - 1,0,0,0,1169,1170,7,11,0,0,1170,1171,7,7,0,0,1171,1172,7,0,0,0,1172,1173, - 7,9,0,0,1173,1174,7,7,0,0,1174,1175,7,11,0,0,1175,284,1,0,0,0,1176,1177, - 7,11,0,0,1177,1178,7,7,0,0,1178,1179,7,9,0,0,1179,1180,7,18,0,0,1180, - 1181,7,1,0,0,1181,1182,7,7,0,0,1182,286,1,0,0,0,1183,1184,7,7,0,0,1184, - 1185,7,0,0,0,1185,1186,7,14,0,0,1186,1187,7,3,0,0,1187,1188,7,8,0,0,1188, - 288,1,0,0,0,1189,1190,7,7,0,0,1190,1191,7,13,0,0,1191,1192,7,8,0,0,1192, - 1193,7,5,0,0,1193,290,1,0,0,0,1194,1195,7,7,0,0,1195,1196,7,17,0,0,1196, - 292,1,0,0,0,1197,1198,7,7,0,0,1198,1199,7,9,0,0,1199,1200,7,0,0,0,1200, - 1201,7,4,0,0,1201,1202,7,3,0,0,1202,294,1,0,0,0,1203,1204,7,7,0,0,1204, - 1205,7,9,0,0,1205,1206,7,0,0,0,1206,1207,7,5,0,0,1207,1208,7,11,0,0,1208, - 1209,7,0,0,0,1209,1210,7,1,0,0,1210,1211,7,7,0,0,1211,1212,7,4,0,0,1212, - 1213,7,17,0,0,1213,1214,7,5,0,0,1214,296,1,0,0,0,1215,1216,7,7,0,0,1216, - 1217,7,9,0,0,1217,1218,7,18,0,0,1218,1219,7,8,0,0,1219,298,1,0,0,0,1220, - 1221,7,7,0,0,1221,1222,7,2,0,0,1222,1223,7,16,0,0,1223,1224,7,8,0,0,1224, - 300,1,0,0,0,1225,1226,7,18,0,0,1226,1227,7,5,0,0,1227,1228,7,4,0,0,1228, - 1229,7,17,0,0,1229,1230,7,5,0,0,1230,302,1,0,0,0,1231,1232,7,18,0,0,1232, - 1233,7,5,0,0,1233,1234,7,25,0,0,1234,1235,7,4,0,0,1235,1236,7,5,0,0,1236, - 1237,7,6,0,0,1237,304,1,0,0,0,1238,1239,7,18,0,0,1239,1240,7,5,0,0,1240, - 1241,7,4,0,0,1241,1242,7,5,0,0,1242,1243,7,11,0,0,1243,1244,7,7,0,0,1244, - 1245,7,0,0,0,1245,1246,7,3,0,0,1246,1247,7,3,0,0,1247,306,1,0,0,0,1248, - 1249,7,18,0,0,1249,1250,7,16,0,0,1250,1251,7,6,0,0,1251,1252,7,0,0,0, - 1252,1253,7,7,0,0,1253,1254,7,8,0,0,1254,308,1,0,0,0,1255,1256,7,18,0, - 0,1256,1257,7,11,0,0,1257,1258,7,8,0,0,1258,310,1,0,0,0,1259,1260,7,25, - 0,0,1260,1261,7,13,0,0,1261,1262,7,8,0,0,1262,1263,7,5,0,0,1263,312,1, - 0,0,0,1264,1265,7,25,0,0,1265,1266,7,13,0,0,1266,1267,7,8,0,0,1267,1268, - 7,9,0,0,1268,1269,7,8,0,0,1269,314,1,0,0,0,1270,1271,7,25,0,0,1271,1272, - 7,4,0,0,1272,1273,7,7,0,0,1273,1274,7,13,0,0,1274,316,1,0,0,0,1275,1276, - 7,25,0,0,1276,1277,7,9,0,0,1277,1278,7,4,0,0,1278,1279,7,7,0,0,1279,1280, - 7,8,0,0,1280,318,1,0,0,0,1281,1282,7,25,0,0,1282,1283,7,11,0,0,1283,1284, - 7,13,0,0,1284,1285,7,17,0,0,1285,1286,7,9,0,0,1286,1287,7,7,0,0,1287, - 1288,7,8,0,0,1288,1289,7,11,0,0,1289,1290,7,7,0,0,1290,320,1,0,0,0,1291, - 1292,7,21,0,0,1292,1293,7,17,0,0,1293,1294,7,9,0,0,1294,322,1,0,0,0,1295, - 1296,7,11,0,0,1296,1297,7,4,0,0,1297,1298,7,5,0,0,1298,1299,7,12,0,0, - 1299,1300,7,3,0,0,1300,1301,7,8,0,0,1301,324,1,0,0,0,1302,1303,7,2,0, - 0,1303,1304,7,4,0,0,1304,1305,7,8,0,0,1305,1306,7,3,0,0,1306,1307,7,6, - 0,0,1307,326,1,0,0,0,1308,1309,7,18,0,0,1309,1310,7,11,0,0,1310,1311, - 7,8,0,0,1311,1312,7,9,0,0,1312,328,1,0,0,0,1313,1314,7,16,0,0,1314,1315, - 7,0,0,0,1315,1316,7,9,0,0,1316,1317,7,7,0,0,1317,1318,7,4,0,0,1318,1319, - 7,7,0,0,1319,1320,7,4,0,0,1320,1321,7,17,0,0,1321,1322,7,5,0,0,1322,330, - 1,0,0,0,1323,1324,7,16,0,0,1324,1325,7,0,0,0,1325,1326,7,9,0,0,1326,1327, - 7,7,0,0,1327,1328,7,4,0,0,1328,1329,7,7,0,0,1329,1330,7,4,0,0,1330,1331, - 7,17,0,0,1331,1332,7,5,0,0,1332,1333,7,11,0,0,1333,332,1,0,0,0,1334,1335, - 7,16,0,0,1335,1336,7,0,0,0,1336,1337,7,11,0,0,1337,1338,7,11,0,0,1338, - 1339,7,25,0,0,1339,1340,7,17,0,0,1340,1341,7,9,0,0,1341,1342,7,6,0,0, - 1342,334,1,0,0,0,1343,1344,7,9,0,0,1344,1345,7,17,0,0,1345,1346,7,3,0, - 0,1346,1347,7,8,0,0,1347,336,1,0,0,0,1348,1349,7,19,0,0,1349,1350,7,0, - 0,0,1350,1351,7,16,0,0,1351,338,1,0,0,0,1352,1353,7,6,0,0,1353,1354,7, - 8,0,0,1354,1355,7,1,0,0,1355,1356,7,4,0,0,1356,1357,7,19,0,0,1357,1358, - 7,0,0,0,1358,1359,7,3,0,0,1359,340,1,0,0,0,1360,1361,5,42,0,0,1361,342, - 1,0,0,0,1362,1363,7,11,0,0,1363,1364,7,15,0,0,1364,1365,7,4,0,0,1365, - 1366,7,16,0,0,1366,344,1,0,0,0,1367,1368,5,33,0,0,1368,1369,5,61,0,0, - 1369,346,1,0,0,0,1370,1371,5,58,0,0,1371,348,1,0,0,0,1372,1373,5,46,0, - 0,1373,1374,5,46,0,0,1374,350,1,0,0,0,1375,1376,5,45,0,0,1376,352,1,0, - 0,0,1377,1378,5,33,0,0,1378,354,1,0,0,0,1379,1384,5,34,0,0,1380,1383, - 3,421,210,0,1381,1383,3,357,178,0,1382,1380,1,0,0,0,1382,1381,1,0,0,0, - 1383,1386,1,0,0,0,1384,1382,1,0,0,0,1384,1385,1,0,0,0,1385,1387,1,0,0, - 0,1386,1384,1,0,0,0,1387,1398,5,34,0,0,1388,1393,5,39,0,0,1389,1392,3, - 401,200,0,1390,1392,3,357,178,0,1391,1389,1,0,0,0,1391,1390,1,0,0,0,1392, - 1395,1,0,0,0,1393,1391,1,0,0,0,1393,1394,1,0,0,0,1394,1396,1,0,0,0,1395, - 1393,1,0,0,0,1396,1398,5,39,0,0,1397,1379,1,0,0,0,1397,1388,1,0,0,0,1398, - 356,1,0,0,0,1399,1421,5,92,0,0,1400,1422,7,26,0,0,1401,1402,7,21,0,0, - 1402,1403,3,363,181,0,1403,1404,3,363,181,0,1404,1422,1,0,0,0,1405,1406, - 7,18,0,0,1406,1407,3,363,181,0,1407,1408,3,363,181,0,1408,1409,3,363, - 181,0,1409,1410,3,363,181,0,1410,1422,1,0,0,0,1411,1412,7,18,0,0,1412, - 1413,3,363,181,0,1413,1414,3,363,181,0,1414,1415,3,363,181,0,1415,1416, - 3,363,181,0,1416,1417,3,363,181,0,1417,1418,3,363,181,0,1418,1419,3,363, - 181,0,1419,1420,3,363,181,0,1420,1422,1,0,0,0,1421,1400,1,0,0,0,1421, - 1401,1,0,0,0,1421,1405,1,0,0,0,1421,1411,1,0,0,0,1422,358,1,0,0,0,1423, - 1432,3,371,185,0,1424,1428,3,367,183,0,1425,1427,3,365,182,0,1426,1425, - 1,0,0,0,1427,1430,1,0,0,0,1428,1426,1,0,0,0,1428,1429,1,0,0,0,1429,1432, - 1,0,0,0,1430,1428,1,0,0,0,1431,1423,1,0,0,0,1431,1424,1,0,0,0,1432,360, - 1,0,0,0,1433,1435,7,27,0,0,1434,1433,1,0,0,0,1435,362,1,0,0,0,1436,1439, - 3,365,182,0,1437,1439,3,361,180,0,1438,1436,1,0,0,0,1438,1437,1,0,0,0, - 1439,364,1,0,0,0,1440,1443,3,371,185,0,1441,1443,3,367,183,0,1442,1440, - 1,0,0,0,1442,1441,1,0,0,0,1443,366,1,0,0,0,1444,1447,3,369,184,0,1445, - 1447,2,56,57,0,1446,1444,1,0,0,0,1446,1445,1,0,0,0,1447,368,1,0,0,0,1448, - 1449,2,49,55,0,1449,370,1,0,0,0,1450,1451,5,48,0,0,1451,372,1,0,0,0,1452, - 1454,3,365,182,0,1453,1452,1,0,0,0,1454,1455,1,0,0,0,1455,1453,1,0,0, - 0,1455,1456,1,0,0,0,1456,1475,1,0,0,0,1457,1459,3,365,182,0,1458,1457, - 1,0,0,0,1459,1460,1,0,0,0,1460,1458,1,0,0,0,1460,1461,1,0,0,0,1461,1462, - 1,0,0,0,1462,1464,5,46,0,0,1463,1465,3,365,182,0,1464,1463,1,0,0,0,1465, - 1466,1,0,0,0,1466,1464,1,0,0,0,1466,1467,1,0,0,0,1467,1475,1,0,0,0,1468, - 1470,5,46,0,0,1469,1471,3,365,182,0,1470,1469,1,0,0,0,1471,1472,1,0,0, - 0,1472,1470,1,0,0,0,1472,1473,1,0,0,0,1473,1475,1,0,0,0,1474,1453,1,0, - 0,0,1474,1458,1,0,0,0,1474,1468,1,0,0,0,1475,1476,1,0,0,0,1476,1478,7, - 8,0,0,1477,1479,5,45,0,0,1478,1477,1,0,0,0,1478,1479,1,0,0,0,1479,1481, - 1,0,0,0,1480,1482,3,365,182,0,1481,1480,1,0,0,0,1482,1483,1,0,0,0,1483, - 1481,1,0,0,0,1483,1484,1,0,0,0,1484,374,1,0,0,0,1485,1487,3,365,182,0, - 1486,1485,1,0,0,0,1487,1490,1,0,0,0,1488,1486,1,0,0,0,1488,1489,1,0,0, - 0,1489,1491,1,0,0,0,1490,1488,1,0,0,0,1491,1493,5,46,0,0,1492,1494,3, - 365,182,0,1493,1492,1,0,0,0,1494,1495,1,0,0,0,1495,1493,1,0,0,0,1495, - 1496,1,0,0,0,1496,376,1,0,0,0,1497,1501,3,379,189,0,1498,1500,3,381,190, - 0,1499,1498,1,0,0,0,1500,1503,1,0,0,0,1501,1499,1,0,0,0,1501,1502,1,0, - 0,0,1502,378,1,0,0,0,1503,1501,1,0,0,0,1504,1507,3,429,214,0,1505,1507, - 3,417,208,0,1506,1504,1,0,0,0,1506,1505,1,0,0,0,1507,380,1,0,0,0,1508, - 1511,3,397,198,0,1509,1511,3,413,206,0,1510,1508,1,0,0,0,1510,1509,1, - 0,0,0,1511,382,1,0,0,0,1512,1516,5,96,0,0,1513,1515,3,393,196,0,1514, - 1513,1,0,0,0,1515,1518,1,0,0,0,1516,1514,1,0,0,0,1516,1517,1,0,0,0,1517, - 1519,1,0,0,0,1518,1516,1,0,0,0,1519,1521,5,96,0,0,1520,1512,1,0,0,0,1521, - 1522,1,0,0,0,1522,1520,1,0,0,0,1522,1523,1,0,0,0,1523,384,1,0,0,0,1524, - 1526,3,387,193,0,1525,1524,1,0,0,0,1526,1527,1,0,0,0,1527,1525,1,0,0, - 0,1527,1528,1,0,0,0,1528,386,1,0,0,0,1529,1542,3,415,207,0,1530,1542, - 3,419,209,0,1531,1542,3,423,211,0,1532,1542,3,425,212,0,1533,1542,3,391, - 195,0,1534,1542,3,411,205,0,1535,1542,3,409,204,0,1536,1542,3,407,203, - 0,1537,1542,3,395,197,0,1538,1542,3,427,213,0,1539,1542,7,28,0,0,1540, - 1542,3,389,194,0,1541,1529,1,0,0,0,1541,1530,1,0,0,0,1541,1531,1,0,0, - 0,1541,1532,1,0,0,0,1541,1533,1,0,0,0,1541,1534,1,0,0,0,1541,1535,1,0, - 0,0,1541,1536,1,0,0,0,1541,1537,1,0,0,0,1541,1538,1,0,0,0,1541,1539,1, - 0,0,0,1541,1540,1,0,0,0,1542,388,1,0,0,0,1543,1544,5,47,0,0,1544,1545, - 5,42,0,0,1545,1551,1,0,0,0,1546,1550,3,399,199,0,1547,1548,5,42,0,0,1548, - 1550,3,405,202,0,1549,1546,1,0,0,0,1549,1547,1,0,0,0,1550,1553,1,0,0, - 0,1551,1549,1,0,0,0,1551,1552,1,0,0,0,1552,1554,1,0,0,0,1553,1551,1,0, - 0,0,1554,1555,5,42,0,0,1555,1573,5,47,0,0,1556,1557,5,47,0,0,1557,1558, - 5,47,0,0,1558,1562,1,0,0,0,1559,1561,3,403,201,0,1560,1559,1,0,0,0,1561, - 1564,1,0,0,0,1562,1560,1,0,0,0,1562,1563,1,0,0,0,1563,1566,1,0,0,0,1564, - 1562,1,0,0,0,1565,1567,3,411,205,0,1566,1565,1,0,0,0,1566,1567,1,0,0, - 0,1567,1570,1,0,0,0,1568,1571,3,423,211,0,1569,1571,5,0,0,1,1570,1568, - 1,0,0,0,1570,1569,1,0,0,0,1571,1573,1,0,0,0,1572,1543,1,0,0,0,1572,1556, - 1,0,0,0,1573,390,1,0,0,0,1574,1575,7,29,0,0,1575,392,1,0,0,0,1576,1577, - 8,30,0,0,1577,394,1,0,0,0,1578,1579,7,31,0,0,1579,396,1,0,0,0,1580,1581, - 7,32,0,0,1581,398,1,0,0,0,1582,1583,8,33,0,0,1583,400,1,0,0,0,1584,1585, - 8,34,0,0,1585,402,1,0,0,0,1586,1587,8,35,0,0,1587,404,1,0,0,0,1588,1589, - 8,36,0,0,1589,406,1,0,0,0,1590,1591,7,37,0,0,1591,408,1,0,0,0,1592,1593, - 7,38,0,0,1593,410,1,0,0,0,1594,1595,7,39,0,0,1595,412,1,0,0,0,1596,1597, - 7,40,0,0,1597,414,1,0,0,0,1598,1599,7,41,0,0,1599,416,1,0,0,0,1600,1601, - 7,42,0,0,1601,418,1,0,0,0,1602,1603,7,43,0,0,1603,420,1,0,0,0,1604,1605, - 8,44,0,0,1605,422,1,0,0,0,1606,1607,7,45,0,0,1607,424,1,0,0,0,1608,1609, - 7,46,0,0,1609,426,1,0,0,0,1610,1611,7,47,0,0,1611,428,1,0,0,0,1612,1613, - 7,48,0,0,1613,430,1,0,0,0,1614,1615,9,0,0,0,1615,432,1,0,0,0,35,0,1382, - 1384,1391,1393,1397,1421,1428,1431,1434,1438,1442,1446,1455,1460,1466, - 1472,1474,1478,1483,1488,1495,1501,1506,1510,1516,1522,1527,1541,1549, - 1551,1562,1566,1570,1572,0 + 1,134,1,135,1,135,1,135,1,135,1,135,1,135,1,135,1,135,1,135,1,136,1,136, + 1,136,1,136,1,136,1,136,1,136,1,136,1,136,1,136,1,136,1,136,1,136,1,136, + 1,136,1,136,1,136,1,136,1,136,1,136,1,136,1,136,1,136,1,136,1,136,1,137, + 1,137,1,137,1,137,1,137,1,137,1,137,1,137,1,137,1,138,1,138,1,138,1,138, + 1,139,1,139,1,139,1,139,1,139,1,139,1,139,1,140,1,140,1,140,1,140,1,140, + 1,140,1,140,1,140,1,140,1,141,1,141,1,141,1,141,1,141,1,141,1,142,1,142, + 1,142,1,142,1,142,1,142,1,142,1,143,1,143,1,143,1,143,1,143,1,143,1,143, + 1,144,1,144,1,144,1,144,1,144,1,144,1,145,1,145,1,145,1,145,1,145,1,146, + 1,146,1,146,1,147,1,147,1,147,1,147,1,147,1,147,1,148,1,148,1,148,1,148, + 1,148,1,148,1,148,1,148,1,148,1,148,1,148,1,148,1,149,1,149,1,149,1,149, + 1,149,1,150,1,150,1,150,1,150,1,150,1,151,1,151,1,151,1,151,1,151,1,151, + 1,152,1,152,1,152,1,152,1,152,1,152,1,152,1,153,1,153,1,153,1,153,1,153, + 1,153,1,153,1,153,1,153,1,153,1,154,1,154,1,154,1,154,1,154,1,154,1,154, + 1,155,1,155,1,155,1,155,1,156,1,156,1,156,1,156,1,156,1,157,1,157,1,157, + 1,157,1,157,1,157,1,158,1,158,1,158,1,158,1,158,1,159,1,159,1,159,1,159, + 1,159,1,159,1,160,1,160,1,160,1,160,1,160,1,160,1,160,1,160,1,160,1,160, + 1,161,1,161,1,161,1,161,1,162,1,162,1,162,1,162,1,162,1,162,1,162,1,163, + 1,163,1,163,1,163,1,163,1,163,1,164,1,164,1,164,1,164,1,164,1,165,1,165, + 1,165,1,165,1,165,1,165,1,165,1,165,1,165,1,165,1,166,1,166,1,166,1,166, + 1,166,1,166,1,166,1,166,1,166,1,166,1,166,1,167,1,167,1,167,1,167,1,167, + 1,167,1,167,1,167,1,167,1,168,1,168,1,168,1,168,1,168,1,169,1,169,1,169, + 1,169,1,170,1,170,1,170,1,170,1,170,1,170,1,170,1,170,1,171,1,171,1,172, + 1,172,1,172,1,172,1,172,1,173,1,173,1,173,1,174,1,174,1,175,1,175,1,175, + 1,176,1,176,1,177,1,177,1,178,1,178,1,178,5,178,1390,8,178,10,178,12, + 178,1393,9,178,1,178,1,178,1,178,1,178,5,178,1399,8,178,10,178,12,178, + 1402,9,178,1,178,3,178,1405,8,178,1,179,1,179,1,179,1,179,1,179,1,179, + 1,179,1,179,1,179,1,179,1,179,1,179,1,179,1,179,1,179,1,179,1,179,1,179, + 1,179,1,179,1,179,1,179,3,179,1429,8,179,1,180,1,180,1,180,5,180,1434, + 8,180,10,180,12,180,1437,9,180,3,180,1439,8,180,1,181,3,181,1442,8,181, + 1,182,1,182,3,182,1446,8,182,1,183,1,183,3,183,1450,8,183,1,184,1,184, + 3,184,1454,8,184,1,185,1,185,1,186,1,186,1,187,4,187,1461,8,187,11,187, + 12,187,1462,1,187,4,187,1466,8,187,11,187,12,187,1467,1,187,1,187,4,187, + 1472,8,187,11,187,12,187,1473,1,187,1,187,4,187,1478,8,187,11,187,12, + 187,1479,3,187,1482,8,187,1,187,1,187,3,187,1486,8,187,1,187,4,187,1489, + 8,187,11,187,12,187,1490,1,188,5,188,1494,8,188,10,188,12,188,1497,9, + 188,1,188,1,188,4,188,1501,8,188,11,188,12,188,1502,1,189,1,189,5,189, + 1507,8,189,10,189,12,189,1510,9,189,1,190,1,190,3,190,1514,8,190,1,191, + 1,191,3,191,1518,8,191,1,192,1,192,5,192,1522,8,192,10,192,12,192,1525, + 9,192,1,192,4,192,1528,8,192,11,192,12,192,1529,1,193,4,193,1533,8,193, + 11,193,12,193,1534,1,194,1,194,1,194,1,194,1,194,1,194,1,194,1,194,1, + 194,1,194,1,194,1,194,3,194,1549,8,194,1,195,1,195,1,195,1,195,1,195, + 1,195,5,195,1557,8,195,10,195,12,195,1560,9,195,1,195,1,195,1,195,1,195, + 1,195,1,195,5,195,1568,8,195,10,195,12,195,1571,9,195,1,195,3,195,1574, + 8,195,1,195,1,195,3,195,1578,8,195,3,195,1580,8,195,1,196,1,196,1,197, + 1,197,1,198,1,198,1,199,1,199,1,200,1,200,1,201,1,201,1,202,1,202,1,203, + 1,203,1,204,1,204,1,205,1,205,1,206,1,206,1,207,1,207,1,208,1,208,1,209, + 1,209,1,210,1,210,1,211,1,211,1,212,1,212,1,213,1,213,1,214,1,214,1,215, + 1,215,1,216,1,216,0,0,217,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19, + 10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21, + 43,22,45,23,47,24,49,25,51,26,53,27,55,28,57,29,59,30,61,31,63,32,65, + 33,67,34,69,35,71,36,73,37,75,38,77,39,79,40,81,41,83,42,85,43,87,44, + 89,45,91,46,93,47,95,48,97,49,99,50,101,51,103,52,105,53,107,54,109,55, + 111,56,113,57,115,58,117,59,119,60,121,61,123,62,125,63,127,64,129,65, + 131,66,133,67,135,68,137,69,139,70,141,71,143,72,145,73,147,74,149,75, + 151,76,153,77,155,78,157,79,159,80,161,81,163,82,165,83,167,84,169,85, + 171,86,173,87,175,88,177,89,179,90,181,91,183,92,185,93,187,94,189,95, + 191,96,193,97,195,98,197,99,199,100,201,101,203,102,205,103,207,104,209, + 105,211,106,213,107,215,108,217,109,219,110,221,111,223,112,225,113,227, + 114,229,115,231,116,233,117,235,118,237,119,239,120,241,121,243,122,245, + 123,247,124,249,125,251,126,253,127,255,128,257,129,259,130,261,131,263, + 132,265,133,267,134,269,135,271,136,273,137,275,138,277,139,279,140,281, + 141,283,142,285,143,287,144,289,145,291,146,293,147,295,148,297,149,299, + 150,301,151,303,152,305,153,307,154,309,155,311,156,313,157,315,158,317, + 159,319,160,321,161,323,162,325,163,327,164,329,165,331,166,333,167,335, + 168,337,169,339,170,341,171,343,172,345,173,347,174,349,175,351,176,353, + 177,355,178,357,179,359,180,361,181,363,182,365,183,367,184,369,185,371, + 186,373,187,375,188,377,189,379,190,381,191,383,192,385,193,387,194,389, + 195,391,196,393,0,395,0,397,0,399,0,401,0,403,0,405,0,407,0,409,0,411, + 0,413,0,415,0,417,0,419,0,421,0,423,0,425,0,427,0,429,0,431,0,433,197, + 1,0,49,2,0,65,65,97,97,2,0,67,67,99,99,2,0,89,89,121,121,2,0,76,76,108, + 108,2,0,73,73,105,105,2,0,78,78,110,110,2,0,68,68,100,100,2,0,84,84,116, + 116,2,0,69,69,101,101,2,0,82,82,114,114,2,0,90,90,122,122,2,0,83,83,115, + 115,2,0,71,71,103,103,2,0,72,72,104,104,2,0,66,66,98,98,2,0,75,75,107, + 107,2,0,80,80,112,112,2,0,79,79,111,111,2,0,85,85,117,117,2,0,77,77,109, + 109,2,0,70,70,102,102,2,0,88,88,120,120,2,0,74,74,106,106,2,0,86,86,118, + 118,2,0,81,81,113,113,2,0,87,87,119,119,13,0,34,34,39,39,66,66,70,70, + 78,78,82,82,84,84,92,92,98,98,102,102,110,110,114,114,116,116,2,0,65, + 70,97,102,8,0,160,160,5760,5760,6158,6158,8192,8202,8232,8233,8239,8239, + 8287,8287,12288,12288,1,0,12,12,1,0,96,96,1,0,30,30,768,0,48,57,65,90, + 95,95,97,122,170,170,181,181,183,183,186,186,192,214,216,246,248,705, + 710,721,736,740,748,748,750,750,768,884,886,887,890,893,895,895,902,906, + 908,908,910,929,931,1013,1015,1153,1155,1159,1162,1327,1329,1366,1369, + 1369,1376,1416,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1488, + 1514,1519,1522,1552,1562,1568,1641,1646,1747,1749,1756,1759,1768,1770, + 1788,1791,1791,1808,1866,1869,1969,1984,2037,2042,2042,2045,2045,2048, + 2093,2112,2139,2144,2154,2160,2183,2185,2190,2200,2273,2275,2403,2406, + 2415,2417,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486, + 2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2525,2527,2531,2534, + 2545,2556,2556,2558,2558,2561,2563,2565,2570,2575,2576,2579,2600,2602, + 2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635, + 2637,2641,2641,2649,2652,2654,2654,2662,2677,2689,2691,2693,2701,2703, + 2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763, + 2765,2768,2768,2784,2787,2790,2799,2809,2815,2817,2819,2821,2828,2831, + 2832,2835,2856,2858,2864,2866,2867,2869,2873,2876,2884,2887,2888,2891, + 2893,2901,2903,2908,2909,2911,2915,2918,2927,2929,2929,2946,2947,2949, + 2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984, + 2986,2990,3001,3006,3010,3014,3016,3018,3021,3024,3024,3031,3031,3046, + 3055,3072,3084,3086,3088,3090,3112,3114,3129,3132,3140,3142,3144,3146, + 3149,3157,3158,3160,3162,3165,3165,3168,3171,3174,3183,3200,3203,3205, + 3212,3214,3216,3218,3240,3242,3251,3253,3257,3260,3268,3270,3272,3274, + 3277,3285,3286,3293,3294,3296,3299,3302,3311,3313,3315,3328,3340,3342, + 3344,3346,3396,3398,3400,3402,3406,3412,3415,3423,3427,3430,3439,3450, + 3455,3457,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530, + 3530,3535,3540,3542,3542,3544,3551,3558,3567,3570,3571,3585,3642,3648, + 3662,3664,3673,3713,3714,3716,3716,3718,3722,3724,3747,3749,3749,3751, + 3773,3776,3780,3782,3782,3784,3790,3792,3801,3804,3807,3840,3840,3864, + 3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3948,3953, + 3972,3974,3991,3993,4028,4038,4038,4096,4169,4176,4253,4256,4293,4295, + 4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698, + 4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802, + 4805,4808,4822,4824,4880,4882,4885,4888,4954,4957,4959,4969,4977,4992, + 5007,5024,5109,5112,5117,5121,5740,5743,5759,5761,5786,5792,5866,5870, + 5880,5888,5909,5919,5940,5952,5971,5984,5996,5998,6000,6002,6003,6016, + 6099,6103,6103,6108,6109,6112,6121,6155,6157,6159,6169,6176,6264,6272, + 6314,6320,6389,6400,6430,6432,6443,6448,6459,6470,6509,6512,6516,6528, + 6571,6576,6601,6608,6618,6656,6683,6688,6750,6752,6780,6783,6793,6800, + 6809,6823,6823,6832,6845,6847,6862,6912,6988,6992,7001,7019,7027,7040, + 7155,7168,7223,7232,7241,7245,7293,7296,7304,7312,7354,7357,7359,7376, + 7378,7380,7418,7424,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025, + 8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130, + 8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8255, + 8256,8276,8276,8305,8305,8319,8319,8336,8348,8400,8412,8417,8417,8421, + 8432,8450,8450,8455,8455,8458,8467,8469,8469,8472,8477,8484,8484,8486, + 8486,8488,8488,8490,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264, + 11492,11499,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631, + 11631,11647,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712, + 11718,11720,11726,11728,11734,11736,11742,11744,11775,12293,12295,12321, + 12335,12337,12341,12344,12348,12353,12438,12441,12447,12449,12538,12540, + 12543,12549,12591,12593,12686,12704,12735,12784,12799,13312,19903,19968, + 42124,42192,42237,42240,42508,42512,42539,42560,42607,42612,42621,42623, + 42737,42775,42783,42786,42888,42891,42954,42960,42961,42963,42963,42965, + 42969,42994,43047,43052,43052,43072,43123,43136,43205,43216,43225,43232, + 43255,43259,43259,43261,43309,43312,43347,43360,43388,43392,43456,43471, + 43481,43488,43518,43520,43574,43584,43597,43600,43609,43616,43638,43642, + 43714,43739,43741,43744,43759,43762,43766,43777,43782,43785,43790,43793, + 43798,43808,43814,43816,43822,43824,43866,43868,43881,43888,44010,44012, + 44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112, + 64217,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318, + 64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914, + 64967,65008,65019,65024,65039,65056,65071,65075,65076,65101,65103,65136, + 65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65382, + 65470,65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549, + 65574,65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,65856, + 65908,66045,66045,66176,66204,66208,66256,66272,66272,66304,66335,66349, + 66378,66384,66426,66432,66461,66464,66499,66504,66511,66513,66517,66560, + 66717,66720,66729,66736,66771,66776,66811,66816,66855,66864,66915,66928, + 66938,66940,66954,66956,66962,66964,66965,66967,66977,66979,66993,66995, + 67001,67003,67004,67072,67382,67392,67413,67424,67431,67456,67461,67463, + 67504,67506,67514,67584,67589,67592,67592,67594,67637,67639,67640,67644, + 67644,67647,67669,67680,67702,67712,67742,67808,67826,67828,67829,67840, + 67861,67872,67897,67968,68023,68030,68031,68096,68099,68101,68102,68108, + 68115,68117,68119,68121,68149,68152,68154,68159,68159,68192,68220,68224, + 68252,68288,68295,68297,68326,68352,68405,68416,68437,68448,68466,68480, + 68497,68608,68680,68736,68786,68800,68850,68864,68903,68912,68921,69248, + 69289,69291,69292,69296,69297,69373,69404,69415,69415,69424,69456,69488, + 69509,69552,69572,69600,69622,69632,69702,69734,69749,69759,69818,69826, + 69826,69840,69864,69872,69881,69888,69940,69942,69951,69956,69959,69968, + 70003,70006,70006,70016,70084,70089,70092,70094,70106,70108,70108,70144, + 70161,70163,70199,70206,70209,70272,70278,70280,70280,70282,70285,70287, + 70301,70303,70312,70320,70378,70384,70393,70400,70403,70405,70412,70415, + 70416,70419,70440,70442,70448,70450,70451,70453,70457,70459,70468,70471, + 70472,70475,70477,70480,70480,70487,70487,70493,70499,70502,70508,70512, + 70516,70656,70730,70736,70745,70750,70753,70784,70853,70855,70855,70864, + 70873,71040,71093,71096,71104,71128,71133,71168,71232,71236,71236,71248, + 71257,71296,71352,71360,71369,71424,71450,71453,71467,71472,71481,71488, + 71494,71680,71738,71840,71913,71935,71942,71945,71945,71948,71955,71957, + 71958,71960,71989,71991,71992,71995,72003,72016,72025,72096,72103,72106, + 72151,72154,72161,72163,72164,72192,72254,72263,72263,72272,72345,72349, + 72349,72368,72440,72704,72712,72714,72758,72760,72768,72784,72793,72818, + 72847,72850,72871,72873,72886,72960,72966,72968,72969,72971,73014,73018, + 73018,73020,73021,73023,73031,73040,73049,73056,73061,73063,73064,73066, + 73102,73104,73105,73107,73112,73120,73129,73440,73462,73472,73488,73490, + 73530,73534,73538,73552,73561,73648,73648,73728,74649,74752,74862,74880, + 75075,77712,77808,77824,78895,78912,78933,82944,83526,92160,92728,92736, + 92766,92768,92777,92784,92862,92864,92873,92880,92909,92912,92916,92928, + 92982,92992,92995,93008,93017,93027,93047,93053,93071,93760,93823,93952, + 94026,94031,94087,94095,94111,94176,94177,94179,94180,94192,94193,94208, + 100343,100352,101589,101632,101640,110576,110579,110581,110587,110589, + 110590,110592,110882,110898,110898,110928,110930,110933,110933,110948, + 110951,110960,111355,113664,113770,113776,113788,113792,113800,113808, + 113817,113821,113822,118528,118573,118576,118598,119141,119145,119149, + 119154,119163,119170,119173,119179,119210,119213,119362,119364,119808, + 119892,119894,119964,119966,119967,119970,119970,119973,119974,119977, + 119980,119982,119993,119995,119995,119997,120003,120005,120069,120071, + 120074,120077,120084,120086,120092,120094,120121,120123,120126,120128, + 120132,120134,120134,120138,120144,120146,120485,120488,120512,120514, + 120538,120540,120570,120572,120596,120598,120628,120630,120654,120656, + 120686,120688,120712,120714,120744,120746,120770,120772,120779,120782, + 120831,121344,121398,121403,121452,121461,121461,121476,121476,121499, + 121503,121505,121519,122624,122654,122661,122666,122880,122886,122888, + 122904,122907,122913,122915,122916,122918,122922,122928,122989,123023, + 123023,123136,123180,123184,123197,123200,123209,123214,123214,123536, + 123566,123584,123641,124112,124153,124896,124902,124904,124907,124909, + 124910,124912,124926,124928,125124,125136,125142,125184,125259,125264, + 125273,126464,126467,126469,126495,126497,126498,126500,126500,126503, + 126503,126505,126514,126516,126519,126521,126521,126523,126523,126530, + 126530,126535,126535,126537,126537,126539,126539,126541,126543,126545, + 126546,126548,126548,126551,126551,126553,126553,126555,126555,126557, + 126557,126559,126559,126561,126562,126564,126564,126567,126570,126572, + 126578,126580,126583,126585,126588,126590,126590,126592,126601,126603, + 126619,126625,126627,126629,126633,126635,126651,130032,130041,131072, + 173791,173824,177977,177984,178205,178208,183969,183984,191456,194560, + 195101,196608,201546,201552,205743,917760,917999,1,0,42,42,2,0,39,39, + 92,92,2,0,10,10,13,13,1,0,47,47,1,0,29,29,1,0,28,28,1,0,13,13,21,0,36, + 36,162,165,1423,1423,1547,1547,2046,2047,2546,2547,2555,2555,2801,2801, + 3065,3065,3647,3647,6107,6107,8352,8384,43064,43064,65020,65020,65129, + 65129,65284,65284,65504,65505,65509,65510,73693,73696,123647,123647,126128, + 126128,1,0,32,32,6,0,95,95,8255,8256,8276,8276,65075,65076,65101,65103, + 65343,65343,1,0,9,9,2,0,34,34,92,92,1,0,10,10,1,0,11,11,1,0,31,31,659, + 0,65,90,97,122,170,170,181,181,186,186,192,214,216,246,248,705,710,721, + 736,740,748,748,750,750,880,884,886,887,890,893,895,895,902,902,904,906, + 908,908,910,929,931,1013,1015,1153,1162,1327,1329,1366,1369,1369,1376, + 1416,1488,1514,1519,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765, + 1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969, + 1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088, + 2088,2112,2136,2144,2154,2160,2183,2185,2190,2208,2249,2308,2361,2365, + 2365,2384,2384,2392,2401,2417,2432,2437,2444,2447,2448,2451,2472,2474, + 2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544, + 2545,2556,2556,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613, + 2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707, + 2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2809, + 2809,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877, + 2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962, + 2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024, + 3024,3077,3084,3086,3088,3090,3112,3114,3129,3133,3133,3160,3162,3165, + 3165,3168,3169,3200,3200,3205,3212,3214,3216,3218,3240,3242,3251,3253, + 3257,3261,3261,3293,3294,3296,3297,3313,3314,3332,3340,3342,3344,3346, + 3386,3389,3389,3406,3406,3412,3414,3423,3425,3450,3455,3461,3478,3482, + 3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713, + 3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3760,3762,3763,3773, + 3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976, + 3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206, + 4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348, + 4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752, + 4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882, + 4885,4888,4954,4992,5007,5024,5109,5112,5117,5121,5740,5743,5759,5761, + 5786,5792,5866,5870,5880,5888,5905,5919,5937,5952,5969,5984,5996,5998, + 6000,6016,6067,6103,6103,6108,6108,6176,6264,6272,6312,6314,6314,6320, + 6389,6400,6430,6480,6509,6512,6516,6528,6571,6576,6601,6656,6678,6688, + 6740,6823,6823,6917,6963,6981,6988,7043,7072,7086,7087,7098,7141,7168, + 7203,7245,7247,7258,7293,7296,7304,7312,7354,7357,7359,7401,7404,7406, + 7411,7413,7414,7418,7418,7424,7615,7680,7957,7960,7965,7968,8005,8008, + 8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118, + 8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178, + 8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458, + 8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488,8490,8505,8508, + 8511,8517,8521,8526,8526,8544,8584,11264,11492,11499,11502,11506,11507, + 11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670, + 11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726, + 11728,11734,11736,11742,12293,12295,12321,12329,12337,12341,12344,12348, + 12353,12438,12443,12447,12449,12538,12540,12543,12549,12591,12593,12686, + 12704,12735,12784,12799,13312,19903,19968,42124,42192,42237,42240,42508, + 42512,42527,42538,42539,42560,42606,42623,42653,42656,42735,42775,42783, + 42786,42888,42891,42954,42960,42961,42963,42963,42965,42969,42994,43009, + 43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255, + 43259,43259,43261,43262,43274,43301,43312,43334,43360,43388,43396,43442, + 43471,43471,43488,43492,43494,43503,43514,43518,43520,43560,43584,43586, + 43588,43595,43616,43638,43642,43642,43646,43695,43697,43697,43701,43702, + 43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764, + 43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43824,43866, + 43868,43881,43888,44002,44032,55203,55216,55238,55243,55291,63744,64109, + 64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310, + 64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829, + 64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338, + 65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500, + 65536,65547,65549,65574,65576,65594,65596,65597,65599,65613,65616,65629, + 65664,65786,65856,65908,66176,66204,66208,66256,66304,66335,66349,66378, + 66384,66421,66432,66461,66464,66499,66504,66511,66513,66517,66560,66717, + 66736,66771,66776,66811,66816,66855,66864,66915,66928,66938,66940,66954, + 66956,66962,66964,66965,66967,66977,66979,66993,66995,67001,67003,67004, + 67072,67382,67392,67413,67424,67431,67456,67461,67463,67504,67506,67514, + 67584,67589,67592,67592,67594,67637,67639,67640,67644,67644,67647,67669, + 67680,67702,67712,67742,67808,67826,67828,67829,67840,67861,67872,67897, + 67968,68023,68030,68031,68096,68096,68112,68115,68117,68119,68121,68149, + 68192,68220,68224,68252,68288,68295,68297,68324,68352,68405,68416,68437, + 68448,68466,68480,68497,68608,68680,68736,68786,68800,68850,68864,68899, + 69248,69289,69296,69297,69376,69404,69415,69415,69424,69445,69488,69505, + 69552,69572,69600,69622,69635,69687,69745,69746,69749,69749,69763,69807, + 69840,69864,69891,69926,69956,69956,69959,69959,69968,70002,70006,70006, + 70019,70066,70081,70084,70106,70106,70108,70108,70144,70161,70163,70187, + 70207,70208,70272,70278,70280,70280,70282,70285,70287,70301,70303,70312, + 70320,70366,70405,70412,70415,70416,70419,70440,70442,70448,70450,70451, + 70453,70457,70461,70461,70480,70480,70493,70497,70656,70708,70727,70730, + 70751,70753,70784,70831,70852,70853,70855,70855,71040,71086,71128,71131, + 71168,71215,71236,71236,71296,71338,71352,71352,71424,71450,71488,71494, + 71680,71723,71840,71903,71935,71942,71945,71945,71948,71955,71957,71958, + 71960,71983,71999,71999,72001,72001,72096,72103,72106,72144,72161,72161, + 72163,72163,72192,72192,72203,72242,72250,72250,72272,72272,72284,72329, + 72349,72349,72368,72440,72704,72712,72714,72750,72768,72768,72818,72847, + 72960,72966,72968,72969,72971,73008,73030,73030,73056,73061,73063,73064, + 73066,73097,73112,73112,73440,73458,73474,73474,73476,73488,73490,73523, + 73648,73648,73728,74649,74752,74862,74880,75075,77712,77808,77824,78895, + 78913,78918,82944,83526,92160,92728,92736,92766,92784,92862,92880,92909, + 92928,92975,92992,92995,93027,93047,93053,93071,93760,93823,93952,94026, + 94032,94032,94099,94111,94176,94177,94179,94179,94208,100343,100352,101589, + 101632,101640,110576,110579,110581,110587,110589,110590,110592,110882, + 110898,110898,110928,110930,110933,110933,110948,110951,110960,111355, + 113664,113770,113776,113788,113792,113800,113808,113817,119808,119892, + 119894,119964,119966,119967,119970,119970,119973,119974,119977,119980, + 119982,119993,119995,119995,119997,120003,120005,120069,120071,120074, + 120077,120084,120086,120092,120094,120121,120123,120126,120128,120132, + 120134,120134,120138,120144,120146,120485,120488,120512,120514,120538, + 120540,120570,120572,120596,120598,120628,120630,120654,120656,120686, + 120688,120712,120714,120744,120746,120770,120772,120779,122624,122654, + 122661,122666,122928,122989,123136,123180,123191,123197,123214,123214, + 123536,123565,123584,123627,124112,124139,124896,124902,124904,124907, + 124909,124910,124912,124926,124928,125124,125184,125251,125259,125259, + 126464,126467,126469,126495,126497,126498,126500,126500,126503,126503, + 126505,126514,126516,126519,126521,126521,126523,126523,126530,126530, + 126535,126535,126537,126537,126539,126539,126541,126543,126545,126546, + 126548,126548,126551,126551,126553,126553,126555,126555,126557,126557, + 126559,126559,126561,126562,126564,126564,126567,126570,126572,126578, + 126580,126583,126585,126588,126590,126590,126592,126601,126603,126619, + 126625,126627,126629,126633,126635,126651,131072,173791,173824,177977, + 177984,178205,178208,183969,183984,191456,194560,195101,196608,201546, + 201552,205743,1648,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0, + 9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1, + 0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0, + 0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0, + 41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1, + 0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0,0,0,61,1,0,0, + 0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0, + 73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1, + 0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0, + 0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,0,101,1,0,0,0,0,103,1,0,0,0, + 0,105,1,0,0,0,0,107,1,0,0,0,0,109,1,0,0,0,0,111,1,0,0,0,0,113,1,0,0,0, + 0,115,1,0,0,0,0,117,1,0,0,0,0,119,1,0,0,0,0,121,1,0,0,0,0,123,1,0,0,0, + 0,125,1,0,0,0,0,127,1,0,0,0,0,129,1,0,0,0,0,131,1,0,0,0,0,133,1,0,0,0, + 0,135,1,0,0,0,0,137,1,0,0,0,0,139,1,0,0,0,0,141,1,0,0,0,0,143,1,0,0,0, + 0,145,1,0,0,0,0,147,1,0,0,0,0,149,1,0,0,0,0,151,1,0,0,0,0,153,1,0,0,0, + 0,155,1,0,0,0,0,157,1,0,0,0,0,159,1,0,0,0,0,161,1,0,0,0,0,163,1,0,0,0, + 0,165,1,0,0,0,0,167,1,0,0,0,0,169,1,0,0,0,0,171,1,0,0,0,0,173,1,0,0,0, + 0,175,1,0,0,0,0,177,1,0,0,0,0,179,1,0,0,0,0,181,1,0,0,0,0,183,1,0,0,0, + 0,185,1,0,0,0,0,187,1,0,0,0,0,189,1,0,0,0,0,191,1,0,0,0,0,193,1,0,0,0, + 0,195,1,0,0,0,0,197,1,0,0,0,0,199,1,0,0,0,0,201,1,0,0,0,0,203,1,0,0,0, + 0,205,1,0,0,0,0,207,1,0,0,0,0,209,1,0,0,0,0,211,1,0,0,0,0,213,1,0,0,0, + 0,215,1,0,0,0,0,217,1,0,0,0,0,219,1,0,0,0,0,221,1,0,0,0,0,223,1,0,0,0, + 0,225,1,0,0,0,0,227,1,0,0,0,0,229,1,0,0,0,0,231,1,0,0,0,0,233,1,0,0,0, + 0,235,1,0,0,0,0,237,1,0,0,0,0,239,1,0,0,0,0,241,1,0,0,0,0,243,1,0,0,0, + 0,245,1,0,0,0,0,247,1,0,0,0,0,249,1,0,0,0,0,251,1,0,0,0,0,253,1,0,0,0, + 0,255,1,0,0,0,0,257,1,0,0,0,0,259,1,0,0,0,0,261,1,0,0,0,0,263,1,0,0,0, + 0,265,1,0,0,0,0,267,1,0,0,0,0,269,1,0,0,0,0,271,1,0,0,0,0,273,1,0,0,0, + 0,275,1,0,0,0,0,277,1,0,0,0,0,279,1,0,0,0,0,281,1,0,0,0,0,283,1,0,0,0, + 0,285,1,0,0,0,0,287,1,0,0,0,0,289,1,0,0,0,0,291,1,0,0,0,0,293,1,0,0,0, + 0,295,1,0,0,0,0,297,1,0,0,0,0,299,1,0,0,0,0,301,1,0,0,0,0,303,1,0,0,0, + 0,305,1,0,0,0,0,307,1,0,0,0,0,309,1,0,0,0,0,311,1,0,0,0,0,313,1,0,0,0, + 0,315,1,0,0,0,0,317,1,0,0,0,0,319,1,0,0,0,0,321,1,0,0,0,0,323,1,0,0,0, + 0,325,1,0,0,0,0,327,1,0,0,0,0,329,1,0,0,0,0,331,1,0,0,0,0,333,1,0,0,0, + 0,335,1,0,0,0,0,337,1,0,0,0,0,339,1,0,0,0,0,341,1,0,0,0,0,343,1,0,0,0, + 0,345,1,0,0,0,0,347,1,0,0,0,0,349,1,0,0,0,0,351,1,0,0,0,0,353,1,0,0,0, + 0,355,1,0,0,0,0,357,1,0,0,0,0,359,1,0,0,0,0,361,1,0,0,0,0,363,1,0,0,0, + 0,365,1,0,0,0,0,367,1,0,0,0,0,369,1,0,0,0,0,371,1,0,0,0,0,373,1,0,0,0, + 0,375,1,0,0,0,0,377,1,0,0,0,0,379,1,0,0,0,0,381,1,0,0,0,0,383,1,0,0,0, + 0,385,1,0,0,0,0,387,1,0,0,0,0,389,1,0,0,0,0,391,1,0,0,0,0,433,1,0,0,0, + 1,435,1,0,0,0,3,437,1,0,0,0,5,439,1,0,0,0,7,441,1,0,0,0,9,443,1,0,0,0, + 11,445,1,0,0,0,13,447,1,0,0,0,15,449,1,0,0,0,17,451,1,0,0,0,19,453,1, + 0,0,0,21,455,1,0,0,0,23,457,1,0,0,0,25,460,1,0,0,0,27,462,1,0,0,0,29, + 465,1,0,0,0,31,467,1,0,0,0,33,470,1,0,0,0,35,472,1,0,0,0,37,475,1,0,0, + 0,39,478,1,0,0,0,41,480,1,0,0,0,43,482,1,0,0,0,45,484,1,0,0,0,47,486, + 1,0,0,0,49,489,1,0,0,0,51,491,1,0,0,0,53,493,1,0,0,0,55,495,1,0,0,0,57, + 497,1,0,0,0,59,499,1,0,0,0,61,501,1,0,0,0,63,503,1,0,0,0,65,505,1,0,0, + 0,67,507,1,0,0,0,69,509,1,0,0,0,71,511,1,0,0,0,73,513,1,0,0,0,75,515, + 1,0,0,0,77,517,1,0,0,0,79,519,1,0,0,0,81,521,1,0,0,0,83,523,1,0,0,0,85, + 525,1,0,0,0,87,527,1,0,0,0,89,529,1,0,0,0,91,537,1,0,0,0,93,541,1,0,0, + 0,95,545,1,0,0,0,97,549,1,0,0,0,99,555,1,0,0,0,101,563,1,0,0,0,103,567, + 1,0,0,0,105,570,1,0,0,0,107,574,1,0,0,0,109,584,1,0,0,0,111,591,1,0,0, + 0,113,597,1,0,0,0,115,600,1,0,0,0,117,605,1,0,0,0,119,610,1,0,0,0,121, + 615,1,0,0,0,123,626,1,0,0,0,125,633,1,0,0,0,127,641,1,0,0,0,129,648,1, + 0,0,0,131,671,1,0,0,0,133,680,1,0,0,0,135,685,1,0,0,0,137,691,1,0,0,0, + 139,698,1,0,0,0,141,702,1,0,0,0,143,708,1,0,0,0,145,717,1,0,0,0,147,724, + 1,0,0,0,149,732,1,0,0,0,151,739,1,0,0,0,153,744,1,0,0,0,155,755,1,0,0, + 0,157,762,1,0,0,0,159,771,1,0,0,0,161,776,1,0,0,0,163,781,1,0,0,0,165, + 785,1,0,0,0,167,790,1,0,0,0,169,797,1,0,0,0,171,805,1,0,0,0,173,812,1, + 0,0,0,175,822,1,0,0,0,177,828,1,0,0,0,179,833,1,0,0,0,181,839,1,0,0,0, + 183,843,1,0,0,0,185,848,1,0,0,0,187,854,1,0,0,0,189,860,1,0,0,0,191,865, + 1,0,0,0,193,873,1,0,0,0,195,878,1,0,0,0,197,885,1,0,0,0,199,891,1,0,0, + 0,201,894,1,0,0,0,203,897,1,0,0,0,205,907,1,0,0,0,207,915,1,0,0,0,209, + 918,1,0,0,0,211,923,1,0,0,0,213,927,1,0,0,0,215,933,1,0,0,0,217,938,1, + 0,0,0,219,943,1,0,0,0,221,951,1,0,0,0,223,957,1,0,0,0,225,963,1,0,0,0, + 227,972,1,0,0,0,229,978,1,0,0,0,231,987,1,0,0,0,233,998,1,0,0,0,235,1001, + 1,0,0,0,237,1006,1,0,0,0,239,1010,1,0,0,0,241,1015,1,0,0,0,243,1020,1, + 0,0,0,245,1023,1,0,0,0,247,1028,1,0,0,0,249,1036,1,0,0,0,251,1045,1,0, + 0,0,253,1048,1,0,0,0,255,1054,1,0,0,0,257,1062,1,0,0,0,259,1070,1,0,0, + 0,261,1078,1,0,0,0,263,1084,1,0,0,0,265,1089,1,0,0,0,267,1093,1,0,0,0, + 269,1100,1,0,0,0,271,1107,1,0,0,0,273,1116,1,0,0,0,275,1141,1,0,0,0,277, + 1150,1,0,0,0,279,1154,1,0,0,0,281,1161,1,0,0,0,283,1170,1,0,0,0,285,1176, + 1,0,0,0,287,1183,1,0,0,0,289,1190,1,0,0,0,291,1196,1,0,0,0,293,1201,1, + 0,0,0,295,1204,1,0,0,0,297,1210,1,0,0,0,299,1222,1,0,0,0,301,1227,1,0, + 0,0,303,1232,1,0,0,0,305,1238,1,0,0,0,307,1245,1,0,0,0,309,1255,1,0,0, + 0,311,1262,1,0,0,0,313,1266,1,0,0,0,315,1271,1,0,0,0,317,1277,1,0,0,0, + 319,1282,1,0,0,0,321,1288,1,0,0,0,323,1298,1,0,0,0,325,1302,1,0,0,0,327, + 1309,1,0,0,0,329,1315,1,0,0,0,331,1320,1,0,0,0,333,1330,1,0,0,0,335,1341, + 1,0,0,0,337,1350,1,0,0,0,339,1355,1,0,0,0,341,1359,1,0,0,0,343,1367,1, + 0,0,0,345,1369,1,0,0,0,347,1374,1,0,0,0,349,1377,1,0,0,0,351,1379,1,0, + 0,0,353,1382,1,0,0,0,355,1384,1,0,0,0,357,1404,1,0,0,0,359,1406,1,0,0, + 0,361,1438,1,0,0,0,363,1441,1,0,0,0,365,1445,1,0,0,0,367,1449,1,0,0,0, + 369,1453,1,0,0,0,371,1455,1,0,0,0,373,1457,1,0,0,0,375,1481,1,0,0,0,377, + 1495,1,0,0,0,379,1504,1,0,0,0,381,1513,1,0,0,0,383,1517,1,0,0,0,385,1527, + 1,0,0,0,387,1532,1,0,0,0,389,1548,1,0,0,0,391,1579,1,0,0,0,393,1581,1, + 0,0,0,395,1583,1,0,0,0,397,1585,1,0,0,0,399,1587,1,0,0,0,401,1589,1,0, + 0,0,403,1591,1,0,0,0,405,1593,1,0,0,0,407,1595,1,0,0,0,409,1597,1,0,0, + 0,411,1599,1,0,0,0,413,1601,1,0,0,0,415,1603,1,0,0,0,417,1605,1,0,0,0, + 419,1607,1,0,0,0,421,1609,1,0,0,0,423,1611,1,0,0,0,425,1613,1,0,0,0,427, + 1615,1,0,0,0,429,1617,1,0,0,0,431,1619,1,0,0,0,433,1621,1,0,0,0,435,436, + 5,59,0,0,436,2,1,0,0,0,437,438,5,40,0,0,438,4,1,0,0,0,439,440,5,41,0, + 0,440,6,1,0,0,0,441,442,5,44,0,0,442,8,1,0,0,0,443,444,5,46,0,0,444,10, + 1,0,0,0,445,446,5,61,0,0,446,12,1,0,0,0,447,448,5,91,0,0,448,14,1,0,0, + 0,449,450,5,93,0,0,450,16,1,0,0,0,451,452,5,123,0,0,452,18,1,0,0,0,453, + 454,5,125,0,0,454,20,1,0,0,0,455,456,5,124,0,0,456,22,1,0,0,0,457,458, + 5,60,0,0,458,459,5,62,0,0,459,24,1,0,0,0,460,461,5,60,0,0,461,26,1,0, + 0,0,462,463,5,60,0,0,463,464,5,61,0,0,464,28,1,0,0,0,465,466,5,62,0,0, + 466,30,1,0,0,0,467,468,5,62,0,0,468,469,5,61,0,0,469,32,1,0,0,0,470,471, + 5,38,0,0,471,34,1,0,0,0,472,473,5,62,0,0,473,474,5,62,0,0,474,36,1,0, + 0,0,475,476,5,60,0,0,476,477,5,60,0,0,477,38,1,0,0,0,478,479,5,43,0,0, + 479,40,1,0,0,0,480,481,5,47,0,0,481,42,1,0,0,0,482,483,5,37,0,0,483,44, + 1,0,0,0,484,485,5,94,0,0,485,46,1,0,0,0,486,487,5,61,0,0,487,488,5,126, + 0,0,488,48,1,0,0,0,489,490,5,36,0,0,490,50,1,0,0,0,491,492,5,10216,0, + 0,492,52,1,0,0,0,493,494,5,12296,0,0,494,54,1,0,0,0,495,496,5,65124,0, + 0,496,56,1,0,0,0,497,498,5,65308,0,0,498,58,1,0,0,0,499,500,5,10217,0, + 0,500,60,1,0,0,0,501,502,5,12297,0,0,502,62,1,0,0,0,503,504,5,65125,0, + 0,504,64,1,0,0,0,505,506,5,65310,0,0,506,66,1,0,0,0,507,508,5,173,0,0, + 508,68,1,0,0,0,509,510,5,8208,0,0,510,70,1,0,0,0,511,512,5,8209,0,0,512, + 72,1,0,0,0,513,514,5,8210,0,0,514,74,1,0,0,0,515,516,5,8211,0,0,516,76, + 1,0,0,0,517,518,5,8212,0,0,518,78,1,0,0,0,519,520,5,8213,0,0,520,80,1, + 0,0,0,521,522,5,8722,0,0,522,82,1,0,0,0,523,524,5,65112,0,0,524,84,1, + 0,0,0,525,526,5,65123,0,0,526,86,1,0,0,0,527,528,5,65293,0,0,528,88,1, + 0,0,0,529,530,7,0,0,0,530,531,7,1,0,0,531,532,7,2,0,0,532,533,7,1,0,0, + 533,534,7,3,0,0,534,535,7,4,0,0,535,536,7,1,0,0,536,90,1,0,0,0,537,538, + 7,0,0,0,538,539,7,5,0,0,539,540,7,2,0,0,540,92,1,0,0,0,541,542,7,0,0, + 0,542,543,7,6,0,0,543,544,7,6,0,0,544,94,1,0,0,0,545,546,7,0,0,0,546, + 547,7,3,0,0,547,548,7,3,0,0,548,96,1,0,0,0,549,550,7,0,0,0,550,551,7, + 3,0,0,551,552,7,7,0,0,552,553,7,8,0,0,553,554,7,9,0,0,554,98,1,0,0,0, + 555,556,7,0,0,0,556,557,7,5,0,0,557,558,7,0,0,0,558,559,7,3,0,0,559,560, + 7,2,0,0,560,561,7,10,0,0,561,562,7,8,0,0,562,100,1,0,0,0,563,564,7,0, + 0,0,564,565,7,5,0,0,565,566,7,6,0,0,566,102,1,0,0,0,567,568,7,0,0,0,568, + 569,7,11,0,0,569,104,1,0,0,0,570,571,7,0,0,0,571,572,7,11,0,0,572,573, + 7,1,0,0,573,106,1,0,0,0,574,575,7,0,0,0,575,576,7,11,0,0,576,577,7,1, + 0,0,577,578,7,8,0,0,578,579,7,5,0,0,579,580,7,6,0,0,580,581,7,4,0,0,581, + 582,7,5,0,0,582,583,7,12,0,0,583,108,1,0,0,0,584,585,7,0,0,0,585,586, + 7,7,0,0,586,587,7,7,0,0,587,588,7,0,0,0,588,589,7,1,0,0,589,590,7,13, + 0,0,590,110,1,0,0,0,591,592,7,14,0,0,592,593,7,8,0,0,593,594,7,12,0,0, + 594,595,7,4,0,0,595,596,7,5,0,0,596,112,1,0,0,0,597,598,7,14,0,0,598, + 599,7,2,0,0,599,114,1,0,0,0,600,601,7,1,0,0,601,602,7,0,0,0,602,603,7, + 3,0,0,603,604,7,3,0,0,604,116,1,0,0,0,605,606,7,1,0,0,606,607,7,0,0,0, + 607,608,7,11,0,0,608,609,7,8,0,0,609,118,1,0,0,0,610,611,7,1,0,0,611, + 612,7,0,0,0,612,613,7,11,0,0,613,614,7,7,0,0,614,120,1,0,0,0,615,616, + 7,1,0,0,616,617,7,13,0,0,617,618,7,8,0,0,618,619,7,1,0,0,619,620,7,15, + 0,0,620,621,7,16,0,0,621,622,7,17,0,0,622,623,7,4,0,0,623,624,7,5,0,0, + 624,625,7,7,0,0,625,122,1,0,0,0,626,627,7,1,0,0,627,628,7,17,0,0,628, + 629,7,3,0,0,629,630,7,18,0,0,630,631,7,19,0,0,631,632,7,5,0,0,632,124, + 1,0,0,0,633,634,7,1,0,0,634,635,7,17,0,0,635,636,7,19,0,0,636,637,7,19, + 0,0,637,638,7,8,0,0,638,639,7,5,0,0,639,640,7,7,0,0,640,126,1,0,0,0,641, + 642,7,1,0,0,642,643,7,17,0,0,643,644,7,19,0,0,644,645,7,19,0,0,645,646, + 7,4,0,0,646,647,7,7,0,0,647,128,1,0,0,0,648,649,7,1,0,0,649,650,7,17, + 0,0,650,651,7,19,0,0,651,652,7,19,0,0,652,653,7,4,0,0,653,654,7,7,0,0, + 654,655,5,95,0,0,655,656,7,11,0,0,656,657,7,15,0,0,657,658,7,4,0,0,658, + 659,7,16,0,0,659,660,5,95,0,0,660,661,7,1,0,0,661,662,7,13,0,0,662,663, + 7,8,0,0,663,664,7,1,0,0,664,665,7,15,0,0,665,666,7,16,0,0,666,667,7,17, + 0,0,667,668,7,4,0,0,668,669,7,5,0,0,669,670,7,7,0,0,670,130,1,0,0,0,671, + 672,7,1,0,0,672,673,7,17,0,0,673,674,7,5,0,0,674,675,7,7,0,0,675,676, + 7,0,0,0,676,677,7,4,0,0,677,678,7,5,0,0,678,679,7,11,0,0,679,132,1,0, + 0,0,680,681,7,1,0,0,681,682,7,17,0,0,682,683,7,16,0,0,683,684,7,2,0,0, + 684,134,1,0,0,0,685,686,7,1,0,0,686,687,7,17,0,0,687,688,7,18,0,0,688, + 689,7,5,0,0,689,690,7,7,0,0,690,136,1,0,0,0,691,692,7,1,0,0,692,693,7, + 9,0,0,693,694,7,8,0,0,694,695,7,0,0,0,695,696,7,7,0,0,696,697,7,8,0,0, + 697,138,1,0,0,0,698,699,7,1,0,0,699,700,7,11,0,0,700,701,7,9,0,0,701, + 140,1,0,0,0,702,703,7,1,0,0,703,704,7,2,0,0,704,705,7,1,0,0,705,706,7, + 3,0,0,706,707,7,8,0,0,707,142,1,0,0,0,708,709,7,6,0,0,709,710,7,0,0,0, + 710,711,7,7,0,0,711,712,7,0,0,0,712,713,7,14,0,0,713,714,7,0,0,0,714, + 715,7,11,0,0,715,716,7,8,0,0,716,144,1,0,0,0,717,718,7,6,0,0,718,719, + 7,14,0,0,719,720,7,7,0,0,720,721,7,2,0,0,721,722,7,16,0,0,722,723,7,8, + 0,0,723,146,1,0,0,0,724,725,7,6,0,0,725,726,7,8,0,0,726,727,7,20,0,0, + 727,728,7,0,0,0,728,729,7,18,0,0,729,730,7,3,0,0,730,731,7,7,0,0,731, + 148,1,0,0,0,732,733,7,6,0,0,733,734,7,8,0,0,734,735,7,3,0,0,735,736,7, + 8,0,0,736,737,7,7,0,0,737,738,7,8,0,0,738,150,1,0,0,0,739,740,7,6,0,0, + 740,741,7,8,0,0,741,742,7,11,0,0,742,743,7,1,0,0,743,152,1,0,0,0,744, + 745,7,6,0,0,745,746,7,8,0,0,746,747,7,11,0,0,747,748,7,1,0,0,748,749, + 7,8,0,0,749,750,7,5,0,0,750,751,7,6,0,0,751,752,7,4,0,0,752,753,7,5,0, + 0,753,754,7,12,0,0,754,154,1,0,0,0,755,756,7,6,0,0,756,757,7,8,0,0,757, + 758,7,7,0,0,758,759,7,0,0,0,759,760,7,1,0,0,760,761,7,13,0,0,761,156, + 1,0,0,0,762,763,7,6,0,0,763,764,7,4,0,0,764,765,7,11,0,0,765,766,7,7, + 0,0,766,767,7,4,0,0,767,768,7,5,0,0,768,769,7,1,0,0,769,770,7,7,0,0,770, + 158,1,0,0,0,771,772,7,6,0,0,772,773,7,9,0,0,773,774,7,17,0,0,774,775, + 7,16,0,0,775,160,1,0,0,0,776,777,7,8,0,0,777,778,7,3,0,0,778,779,7,11, + 0,0,779,780,7,8,0,0,780,162,1,0,0,0,781,782,7,8,0,0,782,783,7,5,0,0,783, + 784,7,6,0,0,784,164,1,0,0,0,785,786,7,8,0,0,786,787,7,5,0,0,787,788,7, + 6,0,0,788,789,7,11,0,0,789,166,1,0,0,0,790,791,7,8,0,0,791,792,7,21,0, + 0,792,793,7,4,0,0,793,794,7,11,0,0,794,795,7,7,0,0,795,796,7,11,0,0,796, + 168,1,0,0,0,797,798,7,8,0,0,798,799,7,21,0,0,799,800,7,16,0,0,800,801, + 7,3,0,0,801,802,7,0,0,0,802,803,7,4,0,0,803,804,7,5,0,0,804,170,1,0,0, + 0,805,806,7,8,0,0,806,807,7,21,0,0,807,808,7,16,0,0,808,809,7,17,0,0, + 809,810,7,9,0,0,810,811,7,7,0,0,811,172,1,0,0,0,812,813,7,8,0,0,813,814, + 7,21,0,0,814,815,7,7,0,0,815,816,7,8,0,0,816,817,7,5,0,0,817,818,7,11, + 0,0,818,819,7,4,0,0,819,820,7,17,0,0,820,821,7,5,0,0,821,174,1,0,0,0, + 822,823,7,20,0,0,823,824,7,0,0,0,824,825,7,3,0,0,825,826,7,11,0,0,826, + 827,7,8,0,0,827,176,1,0,0,0,828,829,7,20,0,0,829,830,7,9,0,0,830,831, + 7,17,0,0,831,832,7,19,0,0,832,178,1,0,0,0,833,834,7,20,0,0,834,835,7, + 17,0,0,835,836,7,9,0,0,836,837,7,1,0,0,837,838,7,8,0,0,838,180,1,0,0, + 0,839,840,7,20,0,0,840,841,7,17,0,0,841,842,7,9,0,0,842,182,1,0,0,0,843, + 844,7,12,0,0,844,845,7,3,0,0,845,846,7,17,0,0,846,847,7,14,0,0,847,184, + 1,0,0,0,848,849,7,12,0,0,849,850,7,9,0,0,850,851,7,0,0,0,851,852,7,16, + 0,0,852,853,7,13,0,0,853,186,1,0,0,0,854,855,7,12,0,0,855,856,7,9,0,0, + 856,857,7,17,0,0,857,858,7,18,0,0,858,859,7,16,0,0,859,188,1,0,0,0,860, + 861,7,13,0,0,861,862,7,0,0,0,862,863,7,11,0,0,863,864,7,13,0,0,864,190, + 1,0,0,0,865,866,7,13,0,0,866,867,7,8,0,0,867,868,7,0,0,0,868,869,7,6, + 0,0,869,870,7,8,0,0,870,871,7,9,0,0,871,872,7,11,0,0,872,192,1,0,0,0, + 873,874,7,13,0,0,874,875,7,4,0,0,875,876,7,5,0,0,876,877,7,7,0,0,877, + 194,1,0,0,0,878,879,7,4,0,0,879,880,7,19,0,0,880,881,7,16,0,0,881,882, + 7,17,0,0,882,883,7,9,0,0,883,884,7,7,0,0,884,196,1,0,0,0,885,886,7,4, + 0,0,886,887,7,5,0,0,887,888,7,6,0,0,888,889,7,8,0,0,889,890,7,21,0,0, + 890,198,1,0,0,0,891,892,7,4,0,0,892,893,7,20,0,0,893,200,1,0,0,0,894, + 895,7,4,0,0,895,896,7,5,0,0,896,202,1,0,0,0,897,898,7,4,0,0,898,899,7, + 5,0,0,899,900,7,1,0,0,900,901,7,9,0,0,901,902,7,8,0,0,902,903,7,19,0, + 0,903,904,7,8,0,0,904,905,7,5,0,0,905,906,7,7,0,0,906,204,1,0,0,0,907, + 908,7,4,0,0,908,909,7,5,0,0,909,910,7,11,0,0,910,911,7,7,0,0,911,912, + 7,0,0,0,912,913,7,3,0,0,913,914,7,3,0,0,914,206,1,0,0,0,915,916,7,4,0, + 0,916,917,7,11,0,0,917,208,1,0,0,0,918,919,7,22,0,0,919,920,7,17,0,0, + 920,921,7,4,0,0,921,922,7,5,0,0,922,210,1,0,0,0,923,924,7,15,0,0,924, + 925,7,8,0,0,925,926,7,2,0,0,926,212,1,0,0,0,927,928,7,3,0,0,928,929,7, + 4,0,0,929,930,7,19,0,0,930,931,7,4,0,0,931,932,7,7,0,0,932,214,1,0,0, + 0,933,934,7,3,0,0,934,935,7,4,0,0,935,936,7,11,0,0,936,937,7,7,0,0,937, + 216,1,0,0,0,938,939,7,3,0,0,939,940,7,17,0,0,940,941,7,0,0,0,941,942, + 7,6,0,0,942,218,1,0,0,0,943,944,7,3,0,0,944,945,7,17,0,0,945,946,7,12, + 0,0,946,947,7,4,0,0,947,948,7,1,0,0,948,949,7,0,0,0,949,950,7,3,0,0,950, + 220,1,0,0,0,951,952,7,19,0,0,952,953,7,0,0,0,953,954,7,1,0,0,954,955, + 7,9,0,0,955,956,7,17,0,0,956,222,1,0,0,0,957,958,7,19,0,0,958,959,7,0, + 0,0,959,960,7,7,0,0,960,961,7,1,0,0,961,962,7,13,0,0,962,224,1,0,0,0, + 963,964,7,19,0,0,964,965,7,0,0,0,965,966,7,21,0,0,966,967,7,23,0,0,967, + 968,7,0,0,0,968,969,7,3,0,0,969,970,7,18,0,0,970,971,7,8,0,0,971,226, + 1,0,0,0,972,973,7,19,0,0,973,974,7,8,0,0,974,975,7,9,0,0,975,976,7,12, + 0,0,976,977,7,8,0,0,977,228,1,0,0,0,978,979,7,19,0,0,979,980,7,4,0,0, + 980,981,7,5,0,0,981,982,7,23,0,0,982,983,7,0,0,0,983,984,7,3,0,0,984, + 985,7,18,0,0,985,986,7,8,0,0,986,230,1,0,0,0,987,988,7,19,0,0,988,989, + 7,18,0,0,989,990,7,3,0,0,990,991,7,7,0,0,991,992,7,4,0,0,992,993,5,95, + 0,0,993,994,7,22,0,0,994,995,7,17,0,0,995,996,7,4,0,0,996,997,7,5,0,0, + 997,232,1,0,0,0,998,999,7,5,0,0,999,1000,7,17,0,0,1000,234,1,0,0,0,1001, + 1002,7,5,0,0,1002,1003,7,17,0,0,1003,1004,7,6,0,0,1004,1005,7,8,0,0,1005, + 236,1,0,0,0,1006,1007,7,5,0,0,1007,1008,7,17,0,0,1008,1009,7,7,0,0,1009, + 238,1,0,0,0,1010,1011,7,5,0,0,1011,1012,7,17,0,0,1012,1013,7,5,0,0,1013, + 1014,7,8,0,0,1014,240,1,0,0,0,1015,1016,7,5,0,0,1016,1017,7,18,0,0,1017, + 1018,7,3,0,0,1018,1019,7,3,0,0,1019,242,1,0,0,0,1020,1021,7,17,0,0,1021, + 1022,7,5,0,0,1022,244,1,0,0,0,1023,1024,7,17,0,0,1024,1025,7,5,0,0,1025, + 1026,7,3,0,0,1026,1027,7,2,0,0,1027,246,1,0,0,0,1028,1029,7,17,0,0,1029, + 1030,7,16,0,0,1030,1031,7,7,0,0,1031,1032,7,4,0,0,1032,1033,7,17,0,0, + 1033,1034,7,5,0,0,1034,1035,7,11,0,0,1035,248,1,0,0,0,1036,1037,7,17, + 0,0,1037,1038,7,16,0,0,1038,1039,7,7,0,0,1039,1040,7,4,0,0,1040,1041, + 7,17,0,0,1041,1042,7,5,0,0,1042,1043,7,0,0,0,1043,1044,7,3,0,0,1044,250, + 1,0,0,0,1045,1046,7,17,0,0,1046,1047,7,9,0,0,1047,252,1,0,0,0,1048,1049, + 7,17,0,0,1049,1050,7,9,0,0,1050,1051,7,6,0,0,1051,1052,7,8,0,0,1052,1053, + 7,9,0,0,1053,254,1,0,0,0,1054,1055,7,16,0,0,1055,1056,7,9,0,0,1056,1057, + 7,4,0,0,1057,1058,7,19,0,0,1058,1059,7,0,0,0,1059,1060,7,9,0,0,1060,1061, + 7,2,0,0,1061,256,1,0,0,0,1062,1063,7,16,0,0,1063,1064,7,9,0,0,1064,1065, + 7,17,0,0,1065,1066,7,20,0,0,1066,1067,7,4,0,0,1067,1068,7,3,0,0,1068, + 1069,7,8,0,0,1069,258,1,0,0,0,1070,1071,7,16,0,0,1071,1072,7,9,0,0,1072, + 1073,7,17,0,0,1073,1074,7,22,0,0,1074,1075,7,8,0,0,1075,1076,7,1,0,0, + 1076,1077,7,7,0,0,1077,260,1,0,0,0,1078,1079,7,9,0,0,1079,1080,7,0,0, + 0,1080,1081,7,5,0,0,1081,1082,7,12,0,0,1082,1083,7,8,0,0,1083,262,1,0, + 0,0,1084,1085,7,9,0,0,1085,1086,7,8,0,0,1086,1087,7,0,0,0,1087,1088,7, + 6,0,0,1088,264,1,0,0,0,1089,1090,7,9,0,0,1090,1091,7,8,0,0,1091,1092, + 7,3,0,0,1092,266,1,0,0,0,1093,1094,7,9,0,0,1094,1095,7,8,0,0,1095,1096, + 7,5,0,0,1096,1097,7,0,0,0,1097,1098,7,19,0,0,1098,1099,7,8,0,0,1099,268, + 1,0,0,0,1100,1101,7,9,0,0,1101,1102,7,8,0,0,1102,1103,7,7,0,0,1103,1104, + 7,18,0,0,1104,1105,7,9,0,0,1105,1106,7,5,0,0,1106,270,1,0,0,0,1107,1108, + 7,9,0,0,1108,1109,7,17,0,0,1109,1110,7,3,0,0,1110,1111,7,3,0,0,1111,1112, + 7,14,0,0,1112,1113,7,0,0,0,1113,1114,7,1,0,0,1114,1115,7,15,0,0,1115, + 272,1,0,0,0,1116,1117,7,9,0,0,1117,1118,7,17,0,0,1118,1119,7,3,0,0,1119, + 1120,7,3,0,0,1120,1121,7,14,0,0,1121,1122,7,0,0,0,1122,1123,7,1,0,0,1123, + 1124,7,15,0,0,1124,1125,5,95,0,0,1125,1126,7,11,0,0,1126,1127,7,15,0, + 0,1127,1128,7,4,0,0,1128,1129,7,16,0,0,1129,1130,5,95,0,0,1130,1131,7, + 1,0,0,1131,1132,7,13,0,0,1132,1133,7,8,0,0,1133,1134,7,1,0,0,1134,1135, + 7,15,0,0,1135,1136,7,16,0,0,1136,1137,7,17,0,0,1137,1138,7,4,0,0,1138, + 1139,7,5,0,0,1139,1140,7,7,0,0,1140,274,1,0,0,0,1141,1142,7,11,0,0,1142, + 1143,7,8,0,0,1143,1144,7,24,0,0,1144,1145,7,18,0,0,1145,1146,7,8,0,0, + 1146,1147,7,5,0,0,1147,1148,7,1,0,0,1148,1149,7,8,0,0,1149,276,1,0,0, + 0,1150,1151,7,11,0,0,1151,1152,7,8,0,0,1152,1153,7,7,0,0,1153,278,1,0, + 0,0,1154,1155,7,11,0,0,1155,1156,7,17,0,0,1156,1157,7,9,0,0,1157,1158, + 7,7,0,0,1158,1159,7,8,0,0,1159,1160,7,6,0,0,1160,280,1,0,0,0,1161,1162, + 7,11,0,0,1162,1163,7,13,0,0,1163,1164,7,17,0,0,1164,1165,7,9,0,0,1165, + 1166,7,7,0,0,1166,1167,7,8,0,0,1167,1168,7,11,0,0,1168,1169,7,7,0,0,1169, + 282,1,0,0,0,1170,1171,7,11,0,0,1171,1172,7,7,0,0,1172,1173,7,0,0,0,1173, + 1174,7,9,0,0,1174,1175,7,7,0,0,1175,284,1,0,0,0,1176,1177,7,11,0,0,1177, + 1178,7,7,0,0,1178,1179,7,0,0,0,1179,1180,7,9,0,0,1180,1181,7,7,0,0,1181, + 1182,7,11,0,0,1182,286,1,0,0,0,1183,1184,7,11,0,0,1184,1185,7,7,0,0,1185, + 1186,7,9,0,0,1186,1187,7,18,0,0,1187,1188,7,1,0,0,1188,1189,7,7,0,0,1189, + 288,1,0,0,0,1190,1191,7,7,0,0,1191,1192,7,0,0,0,1192,1193,7,14,0,0,1193, + 1194,7,3,0,0,1194,1195,7,8,0,0,1195,290,1,0,0,0,1196,1197,7,7,0,0,1197, + 1198,7,13,0,0,1198,1199,7,8,0,0,1199,1200,7,5,0,0,1200,292,1,0,0,0,1201, + 1202,7,7,0,0,1202,1203,7,17,0,0,1203,294,1,0,0,0,1204,1205,7,7,0,0,1205, + 1206,7,9,0,0,1206,1207,7,0,0,0,1207,1208,7,4,0,0,1208,1209,7,3,0,0,1209, + 296,1,0,0,0,1210,1211,7,7,0,0,1211,1212,7,9,0,0,1212,1213,7,0,0,0,1213, + 1214,7,5,0,0,1214,1215,7,11,0,0,1215,1216,7,0,0,0,1216,1217,7,1,0,0,1217, + 1218,7,7,0,0,1218,1219,7,4,0,0,1219,1220,7,17,0,0,1220,1221,7,5,0,0,1221, + 298,1,0,0,0,1222,1223,7,7,0,0,1223,1224,7,9,0,0,1224,1225,7,18,0,0,1225, + 1226,7,8,0,0,1226,300,1,0,0,0,1227,1228,7,7,0,0,1228,1229,7,2,0,0,1229, + 1230,7,16,0,0,1230,1231,7,8,0,0,1231,302,1,0,0,0,1232,1233,7,18,0,0,1233, + 1234,7,5,0,0,1234,1235,7,4,0,0,1235,1236,7,17,0,0,1236,1237,7,5,0,0,1237, + 304,1,0,0,0,1238,1239,7,18,0,0,1239,1240,7,5,0,0,1240,1241,7,25,0,0,1241, + 1242,7,4,0,0,1242,1243,7,5,0,0,1243,1244,7,6,0,0,1244,306,1,0,0,0,1245, + 1246,7,18,0,0,1246,1247,7,5,0,0,1247,1248,7,4,0,0,1248,1249,7,5,0,0,1249, + 1250,7,11,0,0,1250,1251,7,7,0,0,1251,1252,7,0,0,0,1252,1253,7,3,0,0,1253, + 1254,7,3,0,0,1254,308,1,0,0,0,1255,1256,7,18,0,0,1256,1257,7,16,0,0,1257, + 1258,7,6,0,0,1258,1259,7,0,0,0,1259,1260,7,7,0,0,1260,1261,7,8,0,0,1261, + 310,1,0,0,0,1262,1263,7,18,0,0,1263,1264,7,11,0,0,1264,1265,7,8,0,0,1265, + 312,1,0,0,0,1266,1267,7,25,0,0,1267,1268,7,13,0,0,1268,1269,7,8,0,0,1269, + 1270,7,5,0,0,1270,314,1,0,0,0,1271,1272,7,25,0,0,1272,1273,7,13,0,0,1273, + 1274,7,8,0,0,1274,1275,7,9,0,0,1275,1276,7,8,0,0,1276,316,1,0,0,0,1277, + 1278,7,25,0,0,1278,1279,7,4,0,0,1279,1280,7,7,0,0,1280,1281,7,13,0,0, + 1281,318,1,0,0,0,1282,1283,7,25,0,0,1283,1284,7,9,0,0,1284,1285,7,4,0, + 0,1285,1286,7,7,0,0,1286,1287,7,8,0,0,1287,320,1,0,0,0,1288,1289,7,25, + 0,0,1289,1290,7,11,0,0,1290,1291,7,13,0,0,1291,1292,7,17,0,0,1292,1293, + 7,9,0,0,1293,1294,7,7,0,0,1294,1295,7,8,0,0,1295,1296,7,11,0,0,1296,1297, + 7,7,0,0,1297,322,1,0,0,0,1298,1299,7,21,0,0,1299,1300,7,17,0,0,1300,1301, + 7,9,0,0,1301,324,1,0,0,0,1302,1303,7,11,0,0,1303,1304,7,4,0,0,1304,1305, + 7,5,0,0,1305,1306,7,12,0,0,1306,1307,7,3,0,0,1307,1308,7,8,0,0,1308,326, + 1,0,0,0,1309,1310,7,2,0,0,1310,1311,7,4,0,0,1311,1312,7,8,0,0,1312,1313, + 7,3,0,0,1313,1314,7,6,0,0,1314,328,1,0,0,0,1315,1316,7,18,0,0,1316,1317, + 7,11,0,0,1317,1318,7,8,0,0,1318,1319,7,9,0,0,1319,330,1,0,0,0,1320,1321, + 7,16,0,0,1321,1322,7,0,0,0,1322,1323,7,9,0,0,1323,1324,7,7,0,0,1324,1325, + 7,4,0,0,1325,1326,7,7,0,0,1326,1327,7,4,0,0,1327,1328,7,17,0,0,1328,1329, + 7,5,0,0,1329,332,1,0,0,0,1330,1331,7,16,0,0,1331,1332,7,0,0,0,1332,1333, + 7,9,0,0,1333,1334,7,7,0,0,1334,1335,7,4,0,0,1335,1336,7,7,0,0,1336,1337, + 7,4,0,0,1337,1338,7,17,0,0,1338,1339,7,5,0,0,1339,1340,7,11,0,0,1340, + 334,1,0,0,0,1341,1342,7,16,0,0,1342,1343,7,0,0,0,1343,1344,7,11,0,0,1344, + 1345,7,11,0,0,1345,1346,7,25,0,0,1346,1347,7,17,0,0,1347,1348,7,9,0,0, + 1348,1349,7,6,0,0,1349,336,1,0,0,0,1350,1351,7,9,0,0,1351,1352,7,17,0, + 0,1352,1353,7,3,0,0,1353,1354,7,8,0,0,1354,338,1,0,0,0,1355,1356,7,19, + 0,0,1356,1357,7,0,0,0,1357,1358,7,16,0,0,1358,340,1,0,0,0,1359,1360,7, + 6,0,0,1360,1361,7,8,0,0,1361,1362,7,1,0,0,1362,1363,7,4,0,0,1363,1364, + 7,19,0,0,1364,1365,7,0,0,0,1365,1366,7,3,0,0,1366,342,1,0,0,0,1367,1368, + 5,42,0,0,1368,344,1,0,0,0,1369,1370,7,11,0,0,1370,1371,7,15,0,0,1371, + 1372,7,4,0,0,1372,1373,7,16,0,0,1373,346,1,0,0,0,1374,1375,5,33,0,0,1375, + 1376,5,61,0,0,1376,348,1,0,0,0,1377,1378,5,58,0,0,1378,350,1,0,0,0,1379, + 1380,5,46,0,0,1380,1381,5,46,0,0,1381,352,1,0,0,0,1382,1383,5,45,0,0, + 1383,354,1,0,0,0,1384,1385,5,33,0,0,1385,356,1,0,0,0,1386,1391,5,34,0, + 0,1387,1390,3,423,211,0,1388,1390,3,359,179,0,1389,1387,1,0,0,0,1389, + 1388,1,0,0,0,1390,1393,1,0,0,0,1391,1389,1,0,0,0,1391,1392,1,0,0,0,1392, + 1394,1,0,0,0,1393,1391,1,0,0,0,1394,1405,5,34,0,0,1395,1400,5,39,0,0, + 1396,1399,3,403,201,0,1397,1399,3,359,179,0,1398,1396,1,0,0,0,1398,1397, + 1,0,0,0,1399,1402,1,0,0,0,1400,1398,1,0,0,0,1400,1401,1,0,0,0,1401,1403, + 1,0,0,0,1402,1400,1,0,0,0,1403,1405,5,39,0,0,1404,1386,1,0,0,0,1404,1395, + 1,0,0,0,1405,358,1,0,0,0,1406,1428,5,92,0,0,1407,1429,7,26,0,0,1408,1409, + 7,21,0,0,1409,1410,3,365,182,0,1410,1411,3,365,182,0,1411,1429,1,0,0, + 0,1412,1413,7,18,0,0,1413,1414,3,365,182,0,1414,1415,3,365,182,0,1415, + 1416,3,365,182,0,1416,1417,3,365,182,0,1417,1429,1,0,0,0,1418,1419,7, + 18,0,0,1419,1420,3,365,182,0,1420,1421,3,365,182,0,1421,1422,3,365,182, + 0,1422,1423,3,365,182,0,1423,1424,3,365,182,0,1424,1425,3,365,182,0,1425, + 1426,3,365,182,0,1426,1427,3,365,182,0,1427,1429,1,0,0,0,1428,1407,1, + 0,0,0,1428,1408,1,0,0,0,1428,1412,1,0,0,0,1428,1418,1,0,0,0,1429,360, + 1,0,0,0,1430,1439,3,373,186,0,1431,1435,3,369,184,0,1432,1434,3,367,183, + 0,1433,1432,1,0,0,0,1434,1437,1,0,0,0,1435,1433,1,0,0,0,1435,1436,1,0, + 0,0,1436,1439,1,0,0,0,1437,1435,1,0,0,0,1438,1430,1,0,0,0,1438,1431,1, + 0,0,0,1439,362,1,0,0,0,1440,1442,7,27,0,0,1441,1440,1,0,0,0,1442,364, + 1,0,0,0,1443,1446,3,367,183,0,1444,1446,3,363,181,0,1445,1443,1,0,0,0, + 1445,1444,1,0,0,0,1446,366,1,0,0,0,1447,1450,3,373,186,0,1448,1450,3, + 369,184,0,1449,1447,1,0,0,0,1449,1448,1,0,0,0,1450,368,1,0,0,0,1451,1454, + 3,371,185,0,1452,1454,2,56,57,0,1453,1451,1,0,0,0,1453,1452,1,0,0,0,1454, + 370,1,0,0,0,1455,1456,2,49,55,0,1456,372,1,0,0,0,1457,1458,5,48,0,0,1458, + 374,1,0,0,0,1459,1461,3,367,183,0,1460,1459,1,0,0,0,1461,1462,1,0,0,0, + 1462,1460,1,0,0,0,1462,1463,1,0,0,0,1463,1482,1,0,0,0,1464,1466,3,367, + 183,0,1465,1464,1,0,0,0,1466,1467,1,0,0,0,1467,1465,1,0,0,0,1467,1468, + 1,0,0,0,1468,1469,1,0,0,0,1469,1471,5,46,0,0,1470,1472,3,367,183,0,1471, + 1470,1,0,0,0,1472,1473,1,0,0,0,1473,1471,1,0,0,0,1473,1474,1,0,0,0,1474, + 1482,1,0,0,0,1475,1477,5,46,0,0,1476,1478,3,367,183,0,1477,1476,1,0,0, + 0,1478,1479,1,0,0,0,1479,1477,1,0,0,0,1479,1480,1,0,0,0,1480,1482,1,0, + 0,0,1481,1460,1,0,0,0,1481,1465,1,0,0,0,1481,1475,1,0,0,0,1482,1483,1, + 0,0,0,1483,1485,7,8,0,0,1484,1486,5,45,0,0,1485,1484,1,0,0,0,1485,1486, + 1,0,0,0,1486,1488,1,0,0,0,1487,1489,3,367,183,0,1488,1487,1,0,0,0,1489, + 1490,1,0,0,0,1490,1488,1,0,0,0,1490,1491,1,0,0,0,1491,376,1,0,0,0,1492, + 1494,3,367,183,0,1493,1492,1,0,0,0,1494,1497,1,0,0,0,1495,1493,1,0,0, + 0,1495,1496,1,0,0,0,1496,1498,1,0,0,0,1497,1495,1,0,0,0,1498,1500,5,46, + 0,0,1499,1501,3,367,183,0,1500,1499,1,0,0,0,1501,1502,1,0,0,0,1502,1500, + 1,0,0,0,1502,1503,1,0,0,0,1503,378,1,0,0,0,1504,1508,3,381,190,0,1505, + 1507,3,383,191,0,1506,1505,1,0,0,0,1507,1510,1,0,0,0,1508,1506,1,0,0, + 0,1508,1509,1,0,0,0,1509,380,1,0,0,0,1510,1508,1,0,0,0,1511,1514,3,431, + 215,0,1512,1514,3,419,209,0,1513,1511,1,0,0,0,1513,1512,1,0,0,0,1514, + 382,1,0,0,0,1515,1518,3,399,199,0,1516,1518,3,415,207,0,1517,1515,1,0, + 0,0,1517,1516,1,0,0,0,1518,384,1,0,0,0,1519,1523,5,96,0,0,1520,1522,3, + 395,197,0,1521,1520,1,0,0,0,1522,1525,1,0,0,0,1523,1521,1,0,0,0,1523, + 1524,1,0,0,0,1524,1526,1,0,0,0,1525,1523,1,0,0,0,1526,1528,5,96,0,0,1527, + 1519,1,0,0,0,1528,1529,1,0,0,0,1529,1527,1,0,0,0,1529,1530,1,0,0,0,1530, + 386,1,0,0,0,1531,1533,3,389,194,0,1532,1531,1,0,0,0,1533,1534,1,0,0,0, + 1534,1532,1,0,0,0,1534,1535,1,0,0,0,1535,388,1,0,0,0,1536,1549,3,417, + 208,0,1537,1549,3,421,210,0,1538,1549,3,425,212,0,1539,1549,3,427,213, + 0,1540,1549,3,393,196,0,1541,1549,3,413,206,0,1542,1549,3,411,205,0,1543, + 1549,3,409,204,0,1544,1549,3,397,198,0,1545,1549,3,429,214,0,1546,1549, + 7,28,0,0,1547,1549,3,391,195,0,1548,1536,1,0,0,0,1548,1537,1,0,0,0,1548, + 1538,1,0,0,0,1548,1539,1,0,0,0,1548,1540,1,0,0,0,1548,1541,1,0,0,0,1548, + 1542,1,0,0,0,1548,1543,1,0,0,0,1548,1544,1,0,0,0,1548,1545,1,0,0,0,1548, + 1546,1,0,0,0,1548,1547,1,0,0,0,1549,390,1,0,0,0,1550,1551,5,47,0,0,1551, + 1552,5,42,0,0,1552,1558,1,0,0,0,1553,1557,3,401,200,0,1554,1555,5,42, + 0,0,1555,1557,3,407,203,0,1556,1553,1,0,0,0,1556,1554,1,0,0,0,1557,1560, + 1,0,0,0,1558,1556,1,0,0,0,1558,1559,1,0,0,0,1559,1561,1,0,0,0,1560,1558, + 1,0,0,0,1561,1562,5,42,0,0,1562,1580,5,47,0,0,1563,1564,5,47,0,0,1564, + 1565,5,47,0,0,1565,1569,1,0,0,0,1566,1568,3,405,202,0,1567,1566,1,0,0, + 0,1568,1571,1,0,0,0,1569,1567,1,0,0,0,1569,1570,1,0,0,0,1570,1573,1,0, + 0,0,1571,1569,1,0,0,0,1572,1574,3,413,206,0,1573,1572,1,0,0,0,1573,1574, + 1,0,0,0,1574,1577,1,0,0,0,1575,1578,3,425,212,0,1576,1578,5,0,0,1,1577, + 1575,1,0,0,0,1577,1576,1,0,0,0,1578,1580,1,0,0,0,1579,1550,1,0,0,0,1579, + 1563,1,0,0,0,1580,392,1,0,0,0,1581,1582,7,29,0,0,1582,394,1,0,0,0,1583, + 1584,8,30,0,0,1584,396,1,0,0,0,1585,1586,7,31,0,0,1586,398,1,0,0,0,1587, + 1588,7,32,0,0,1588,400,1,0,0,0,1589,1590,8,33,0,0,1590,402,1,0,0,0,1591, + 1592,8,34,0,0,1592,404,1,0,0,0,1593,1594,8,35,0,0,1594,406,1,0,0,0,1595, + 1596,8,36,0,0,1596,408,1,0,0,0,1597,1598,7,37,0,0,1598,410,1,0,0,0,1599, + 1600,7,38,0,0,1600,412,1,0,0,0,1601,1602,7,39,0,0,1602,414,1,0,0,0,1603, + 1604,7,40,0,0,1604,416,1,0,0,0,1605,1606,7,41,0,0,1606,418,1,0,0,0,1607, + 1608,7,42,0,0,1608,420,1,0,0,0,1609,1610,7,43,0,0,1610,422,1,0,0,0,1611, + 1612,8,44,0,0,1612,424,1,0,0,0,1613,1614,7,45,0,0,1614,426,1,0,0,0,1615, + 1616,7,46,0,0,1616,428,1,0,0,0,1617,1618,7,47,0,0,1618,430,1,0,0,0,1619, + 1620,7,48,0,0,1620,432,1,0,0,0,1621,1622,9,0,0,0,1622,434,1,0,0,0,35, + 0,1389,1391,1398,1400,1404,1428,1435,1438,1441,1445,1449,1453,1462,1467, + 1473,1479,1481,1485,1490,1495,1502,1508,1513,1517,1523,1529,1534,1548, + 1556,1558,1569,1573,1577,1579,0 }; staticData->serializedATN = antlr4::atn::SerializedATNView(serializedATNSegment, sizeof(serializedATNSegment) / sizeof(serializedATNSegment[0])); diff --git a/third_party/antlr4_cypher/cypher_parser.cpp b/third_party/antlr4_cypher/cypher_parser.cpp index 2a92871c87..e44ec9eec2 100644 --- a/third_party/antlr4_cypher/cypher_parser.cpp +++ b/third_party/antlr4_cypher/cypher_parser.cpp @@ -58,15 +58,15 @@ void cypherParserInitialize() { "iC_UseGraph", "iC_Analyze", "iC_StandaloneCall", "iC_CommentOn", "iC_CreateMacro", "iC_PositionalArgs", "iC_DefaultArg", "iC_FilePaths", "iC_IfNotExists", "iC_CreateNodeTable", "iC_PartitionBy", "iC_PartitionHash", - "iC_PartitionRange", "iC_CreateRelTable", "iC_CreateIndex", "iC_IndexPattern", - "iC_IndexNodePattern", "iC_IndexRelationshipPattern", "iC_IndexPropertyPattern", - "iC_CreateFromToConnections", "iC_CreateFromToConnection", "iC_FromToConnections", - "iC_FromToConnection", "iC_CreateSequence", "iC_CreateType", "iC_SequenceOptions", - "iC_WithPasswd", "iC_CreateUser", "iC_CreateRole", "iC_IncrementBy", - "iC_MinValue", "iC_MaxValue", "iC_StartWith", "iC_Cycle", "iC_IfExists", - "iC_Drop", "iC_DropIndexName", "iC_AlterTable", "iC_AlterOptions", - "iC_AddProperty", "iC_Default", "iC_DropProperty", "iC_RenameTable", - "iC_RenameProperty", "iC_AddFromToConnection", "iC_DropFromToConnection", + "iC_PartitionRange", "iC_PartitionList", "iC_CreateRelTable", "iC_CreateIndex", + "iC_IndexPattern", "iC_IndexNodePattern", "iC_IndexRelationshipPattern", + "iC_IndexPropertyPattern", "iC_CreateFromToConnections", "iC_CreateFromToConnection", + "iC_FromToConnections", "iC_FromToConnection", "iC_CreateSequence", + "iC_CreateType", "iC_SequenceOptions", "iC_WithPasswd", "iC_CreateUser", + "iC_CreateRole", "iC_IncrementBy", "iC_MinValue", "iC_MaxValue", "iC_StartWith", + "iC_Cycle", "iC_IfExists", "iC_Drop", "iC_DropIndexName", "iC_AlterTable", + "iC_AlterOptions", "iC_AddProperty", "iC_Default", "iC_DropProperty", + "iC_RenameTable", "iC_RenameProperty", "iC_AddFromToConnection", "iC_DropFromToConnection", "iC_SetSortedBy", "iC_SortedByItem", "iC_ColumnDefinitions", "iC_ColumnDefinition", "iC_PropertyDefinitions", "iC_PropertyDefinition", "iC_CreateNodeConstraint", "iC_UnionType", "iC_StructType", "iC_MapType", "iC_DecimalType", "iC_DataType", @@ -119,8 +119,8 @@ void cypherParserInitialize() { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", - "", "", "", "", "", "", "'*'", "", "'!='", "':'", "'..'", "'-'", "'!'", - "", "", "", "", "", "", "", "", "'0'" + "", "", "", "", "", "", "", "'*'", "", "'!='", "':'", "'..'", "'-'", + "'!'", "", "", "", "", "", "", "", "", "'0'" }, std::vector{ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", @@ -134,9 +134,9 @@ void cypherParserInitialize() { "EXISTS", "EXPLAIN", "EXPORT", "EXTENSION", "FALSE", "FROM", "FORCE", "FOR", "GLOB", "GRAPH", "GROUP", "HASH", "HEADERS", "HINT", "IMPORT", "INDEX", "IF", "IN", "INCREMENT", "INSTALL", "IS", "JOIN", "KEY", - "LIMIT", "LOAD", "LOGICAL", "MACRO", "MATCH", "MAXVALUE", "MERGE", - "MINVALUE", "MULTI_JOIN", "NO", "NODE", "NOT", "NONE", "NULL", "ON", - "ONLY", "OPTIONS", "OPTIONAL", "OR", "ORDER", "PRIMARY", "PROFILE", + "LIMIT", "LIST", "LOAD", "LOGICAL", "MACRO", "MATCH", "MAXVALUE", + "MERGE", "MINVALUE", "MULTI_JOIN", "NO", "NODE", "NOT", "NONE", "NULL", + "ON", "ONLY", "OPTIONS", "OPTIONAL", "OR", "ORDER", "PRIMARY", "PROFILE", "PROJECT", "RANGE", "READ", "REL", "RENAME", "RETURN", "ROLLBACK", "ROLLBACK_SKIP_CHECKPOINT", "SEQUENCE", "SET", "SORTED", "SHORTEST", "START", "STARTS", "STRUCT", "TABLE", "THEN", "TO", "TRAIL", "TRANSACTION", @@ -152,7 +152,7 @@ void cypherParserInitialize() { } ); static const int32_t serializedATNSegment[] = { - 4,1,196,3241,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6, + 4,1,197,3258,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6, 2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14, 7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21, 7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28, @@ -182,1280 +182,1288 @@ void cypherParserInitialize() { 7,176,2,177,7,177,2,178,7,178,2,179,7,179,2,180,7,180,2,181,7,181,2,182, 7,182,2,183,7,183,2,184,7,184,2,185,7,185,2,186,7,186,2,187,7,187,2,188, 7,188,2,189,7,189,2,190,7,190,2,191,7,191,2,192,7,192,2,193,7,193,2,194, - 7,194,2,195,7,195,1,0,1,0,3,0,395,8,0,1,0,1,0,3,0,399,8,0,1,0,5,0,402, - 8,0,10,0,12,0,405,9,0,1,0,3,0,408,8,0,1,0,1,0,1,1,3,1,413,8,1,1,1,3,1, - 416,8,1,1,1,1,1,3,1,420,8,1,1,1,3,1,423,8,1,1,2,1,2,1,2,1,2,1,2,1,2,1, + 7,194,2,195,7,195,2,196,7,196,1,0,1,0,3,0,397,8,0,1,0,1,0,3,0,401,8,0, + 1,0,5,0,404,8,0,10,0,12,0,407,9,0,1,0,3,0,410,8,0,1,0,1,0,1,1,3,1,415, + 8,1,1,1,3,1,418,8,1,1,1,1,1,3,1,422,8,1,1,1,3,1,425,8,1,1,2,1,2,1,2,1, 2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, - 1,2,1,2,3,2,451,8,2,1,3,1,3,1,3,1,3,3,3,457,8,3,1,3,1,3,1,3,1,3,1,3,3, - 3,464,8,3,1,3,1,3,3,3,468,8,3,1,3,1,3,3,3,472,8,3,1,3,1,3,3,3,476,8,3, - 1,4,3,4,479,8,4,1,4,1,4,3,4,483,8,4,1,4,1,4,3,4,487,8,4,1,4,1,4,3,4,491, - 8,4,1,4,5,4,494,8,4,10,4,12,4,497,9,4,1,4,3,4,500,8,4,3,4,502,8,4,1,4, - 1,4,1,5,1,5,1,5,3,5,509,8,5,1,5,1,5,3,5,513,8,5,1,5,1,5,1,5,1,5,1,5,1, - 5,1,5,3,5,522,8,5,1,5,1,5,1,5,3,5,527,8,5,1,6,1,6,1,6,1,6,1,6,1,6,1,6, - 1,6,3,6,537,8,6,1,6,1,6,3,6,541,8,6,1,6,1,6,3,6,545,8,6,1,6,5,6,548,8, - 6,10,6,12,6,551,9,6,1,6,1,6,1,6,1,6,1,6,1,6,1,7,1,7,1,7,1,7,3,7,563,8, - 7,1,7,1,7,3,7,567,8,7,1,7,1,7,1,7,1,7,1,7,1,7,3,7,575,8,7,1,7,1,7,3,7, - 579,8,7,1,7,1,7,3,7,583,8,7,1,7,1,7,3,7,587,8,7,1,8,1,8,1,8,1,8,1,8,1, - 8,3,8,595,8,8,1,8,1,8,3,8,599,8,8,1,8,1,8,3,8,603,8,8,1,8,1,8,3,8,607, - 8,8,1,9,1,9,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1,10,1,10,3,10,622, - 8,10,1,10,1,10,1,10,3,10,627,8,10,1,10,1,10,1,10,1,10,3,10,633,8,10,1, - 10,1,10,3,10,637,8,10,1,10,3,10,640,8,10,1,10,3,10,643,8,10,1,10,1,10, - 1,11,1,11,3,11,649,8,11,1,11,1,11,3,11,653,8,11,1,11,5,11,656,8,11,10, - 11,12,11,659,9,11,3,11,661,8,11,1,11,1,11,3,11,665,8,11,1,11,3,11,668, - 8,11,1,11,3,11,671,8,11,1,12,1,12,3,12,675,8,12,1,12,1,12,3,12,679,8, - 12,1,12,1,12,1,13,1,13,3,13,685,8,13,1,13,1,13,3,13,689,8,13,1,13,5,13, - 692,8,13,10,13,12,13,695,9,13,1,14,1,14,1,14,1,14,1,15,1,15,1,15,1,15, - 1,16,1,16,1,16,1,16,1,16,1,16,1,16,3,16,712,8,16,1,17,1,17,1,17,1,17, - 1,17,1,17,1,18,1,18,1,18,3,18,723,8,18,1,19,1,19,1,19,1,19,3,19,729,8, - 19,1,19,1,19,3,19,733,8,19,1,19,1,19,1,19,1,19,1,19,3,19,740,8,19,1,20, - 1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,21,1,21,1,21, - 1,21,1,21,1,21,3,21,760,8,21,1,21,1,21,3,21,764,8,21,1,21,3,21,767,8, - 21,1,21,3,21,770,8,21,1,21,3,21,773,8,21,1,21,3,21,776,8,21,1,21,1,21, - 3,21,780,8,21,1,21,5,21,783,8,21,10,21,12,21,786,9,21,1,21,3,21,789,8, - 21,1,21,1,21,1,21,1,21,1,21,1,21,1,22,1,22,3,22,799,8,22,1,22,1,22,3, - 22,803,8,22,1,22,5,22,806,8,22,10,22,12,22,809,9,22,1,23,1,23,3,23,813, - 8,23,1,23,1,23,1,23,3,23,818,8,23,1,23,1,23,1,24,1,24,3,24,824,8,24,1, - 24,1,24,3,24,828,8,24,1,24,1,24,3,24,832,8,24,1,24,5,24,835,8,24,10,24, - 12,24,838,9,24,1,24,1,24,1,24,1,24,3,24,844,8,24,1,24,1,24,3,24,848,8, - 24,1,24,1,24,3,24,852,8,24,1,24,3,24,855,8,24,1,25,1,25,1,25,1,25,1,25, - 1,25,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26,3,26,872,8,26,1,26, - 1,26,3,26,876,8,26,1,26,1,26,3,26,880,8,26,1,26,1,26,3,26,884,8,26,1, - 26,1,26,3,26,888,8,26,1,26,3,26,891,8,26,1,26,3,26,894,8,26,1,26,1,26, - 1,26,1,26,1,26,1,26,3,26,902,8,26,1,26,1,26,1,26,3,26,907,8,26,1,26,1, - 26,3,26,911,8,26,1,26,1,26,3,26,915,8,26,1,26,1,26,3,26,919,8,26,1,26, - 1,26,3,26,923,8,26,1,27,1,27,1,27,1,27,1,27,1,27,3,27,931,8,27,1,28,1, - 28,3,28,935,8,28,1,28,1,28,3,28,939,8,28,1,28,1,28,3,28,943,8,28,1,28, - 1,28,1,28,1,28,1,28,1,28,1,29,1,29,3,29,953,8,29,1,29,1,29,3,29,957,8, - 29,1,29,1,29,3,29,961,8,29,1,29,1,29,1,29,1,29,1,29,1,29,1,30,1,30,1, - 30,1,30,1,30,1,30,1,30,3,30,976,8,30,1,30,1,30,3,30,980,8,30,1,30,1,30, - 1,30,3,30,985,8,30,1,30,1,30,3,30,989,8,30,1,30,1,30,3,30,993,8,30,1, - 30,1,30,3,30,997,8,30,1,30,1,30,3,30,1001,8,30,3,30,1003,8,30,1,30,1, - 30,3,30,1007,8,30,1,30,1,30,3,30,1011,8,30,3,30,1013,8,30,1,30,1,30,1, - 30,1,30,1,30,1,30,3,30,1021,8,30,1,30,1,30,1,30,3,30,1026,8,30,1,30,1, - 30,3,30,1030,8,30,1,30,1,30,3,30,1034,8,30,1,30,1,30,3,30,1038,8,30,1, - 31,1,31,1,31,3,31,1043,8,31,1,31,1,31,1,31,1,31,3,31,1049,8,31,1,31,1, - 31,3,31,1053,8,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1, - 31,3,31,1066,8,31,1,31,1,31,3,31,1070,8,31,1,31,3,31,1073,8,31,1,31,3, - 31,1076,8,31,1,31,3,31,1079,8,31,1,32,1,32,3,32,1083,8,32,1,33,1,33,3, - 33,1087,8,33,1,33,3,33,1090,8,33,1,33,3,33,1093,8,33,1,33,1,33,3,33,1097, - 8,33,1,33,1,33,3,33,1101,8,33,1,33,1,33,1,34,1,34,3,34,1107,8,34,1,34, - 1,34,3,34,1111,8,34,1,34,1,34,3,34,1115,8,34,1,34,1,34,3,34,1119,8,34, - 1,34,1,34,1,35,1,35,3,35,1125,8,35,1,35,1,35,3,35,1129,8,35,1,35,1,35, - 3,35,1133,8,35,1,35,1,35,3,35,1137,8,35,1,35,1,35,1,36,1,36,3,36,1143, - 8,36,1,36,1,36,3,36,1147,8,36,1,36,5,36,1150,8,36,10,36,12,36,1153,9, - 36,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,3,37,1164,8,37,1,38,1, - 38,3,38,1168,8,38,1,38,1,38,3,38,1172,8,38,1,38,5,38,1175,8,38,10,38, - 12,38,1178,9,38,1,39,1,39,1,39,1,39,1,39,1,39,1,39,1,39,1,40,1,40,1,40, - 1,40,1,40,1,40,1,40,3,40,1195,8,40,1,40,1,40,1,40,5,40,1200,8,40,10,40, - 12,40,1203,9,40,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,3,41, - 1215,8,41,1,42,1,42,1,42,1,42,1,42,3,42,1222,8,42,1,43,1,43,1,43,1,43, - 1,43,1,43,1,43,1,44,1,44,1,44,1,44,1,44,1,44,1,44,3,44,1238,8,44,1,44, - 1,44,3,44,1242,8,44,1,45,1,45,1,45,1,45,1,45,1,45,1,45,3,45,1251,8,45, - 1,45,1,45,1,46,1,46,1,46,1,46,3,46,1259,8,46,1,46,3,46,1262,8,46,1,46, - 1,46,1,47,1,47,1,47,1,47,1,47,1,47,3,47,1272,8,47,1,47,3,47,1275,8,47, - 1,48,1,48,1,48,1,48,1,48,1,48,3,48,1283,8,48,1,48,3,48,1286,8,48,1,49, - 1,49,1,49,1,49,3,49,1292,8,49,1,49,3,49,1295,8,49,1,49,1,49,1,50,1,50, - 3,50,1301,8,50,1,50,1,50,1,51,1,51,1,51,1,51,1,52,1,52,1,52,1,52,1,52, - 1,52,1,52,3,52,1316,8,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,3,52, - 1326,8,52,1,52,3,52,1329,8,52,1,53,1,53,3,53,1333,8,53,1,53,1,53,3,53, - 1337,8,53,1,53,1,53,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,55,1,55, - 1,55,1,55,1,55,1,55,1,55,3,55,1356,8,55,1,56,1,56,1,56,1,56,1,56,3,56, - 1363,8,56,1,56,1,56,1,56,1,56,1,56,3,56,1370,8,56,1,57,1,57,1,57,1,57, - 1,58,1,58,1,58,1,58,1,58,3,58,1381,8,58,1,58,1,58,1,59,1,59,1,59,1,59, - 1,59,1,59,1,60,1,60,1,60,1,60,1,60,1,60,1,60,1,60,1,61,1,61,1,61,1,61, - 1,61,3,61,1404,8,61,1,61,1,61,1,62,1,62,1,62,1,62,1,62,3,62,1413,8,62, - 1,62,1,62,1,63,1,63,1,63,1,63,1,63,1,63,3,63,1423,8,63,1,63,1,63,3,63, - 1427,8,63,1,63,1,63,3,63,1431,8,63,1,63,1,63,3,63,1435,8,63,1,63,5,63, - 1438,8,63,10,63,12,63,1441,9,63,1,63,3,63,1444,8,63,1,63,1,63,3,63,1448, - 8,63,1,63,3,63,1451,8,63,1,64,1,64,1,64,1,64,1,65,1,65,3,65,1459,8,65, - 1,65,1,65,3,65,1463,8,65,1,65,5,65,1466,8,65,10,65,12,65,1469,9,65,1, - 66,1,66,1,66,1,66,1,67,1,67,3,67,1477,8,67,1,67,1,67,3,67,1481,8,67,1, - 67,5,67,1484,8,67,10,67,12,67,1487,9,67,1,68,1,68,1,68,3,68,1492,8,68, - 1,68,1,68,1,68,1,68,3,68,1498,8,68,1,69,1,69,1,69,1,69,3,69,1504,8,69, - 1,69,1,69,3,69,1508,8,69,1,69,1,69,3,69,1512,8,69,1,69,1,69,1,70,1,70, - 3,70,1518,8,70,1,70,1,70,3,70,1522,8,70,1,70,1,70,3,70,1526,8,70,1,70, - 1,70,1,71,1,71,3,71,1532,8,71,1,71,1,71,3,71,1536,8,71,1,71,1,71,3,71, - 1540,8,71,1,71,1,71,1,72,1,72,3,72,1546,8,72,1,72,1,72,3,72,1550,8,72, - 1,72,1,72,3,72,1554,8,72,1,72,1,72,3,72,1558,8,72,1,72,1,72,3,72,1562, - 8,72,1,72,1,72,1,73,1,73,3,73,1568,8,73,1,73,1,73,3,73,1572,8,73,1,73, - 1,73,3,73,1576,8,73,1,73,1,73,3,73,1580,8,73,1,73,1,73,3,73,1584,8,73, - 1,73,1,73,1,74,1,74,1,74,1,74,1,74,1,74,3,74,1594,8,74,1,74,1,74,5,74, - 1598,8,74,10,74,12,74,1601,9,74,1,75,1,75,5,75,1605,8,75,10,75,12,75, - 1608,9,75,1,76,1,76,3,76,1612,8,76,1,76,1,76,1,77,1,77,3,77,1618,8,77, - 1,78,1,78,1,78,3,78,1623,8,78,1,79,1,79,1,80,1,80,1,80,1,80,1,80,1,80, - 1,80,1,80,1,80,1,80,1,80,1,80,1,80,3,80,1640,8,80,1,81,1,81,1,81,1,81, - 3,81,1646,8,81,1,82,1,82,1,82,1,82,3,82,1652,8,82,1,82,1,82,3,82,1656, - 8,82,1,83,1,83,3,83,1660,8,83,1,83,1,83,1,83,1,83,1,83,1,83,1,83,3,83, - 1669,8,83,1,84,1,84,1,84,1,84,1,85,1,85,1,85,1,85,1,86,1,86,1,87,1,87, - 3,87,1683,8,87,1,87,5,87,1686,8,87,10,87,12,87,1689,9,87,1,87,1,87,3, - 87,1693,8,87,4,87,1695,8,87,11,87,12,87,1696,1,87,1,87,1,87,3,87,1702, - 8,87,1,88,1,88,1,88,1,88,3,88,1708,8,88,1,88,1,88,1,88,3,88,1713,8,88, - 1,88,3,88,1716,8,88,1,89,1,89,3,89,1720,8,89,1,90,1,90,3,90,1724,8,90, - 5,90,1726,8,90,10,90,12,90,1729,9,90,1,90,1,90,1,90,3,90,1734,8,90,5, - 90,1736,8,90,10,90,12,90,1739,9,90,1,90,1,90,3,90,1743,8,90,1,90,5,90, - 1746,8,90,10,90,12,90,1749,9,90,1,90,3,90,1752,8,90,1,90,3,90,1755,8, - 90,3,90,1757,8,90,1,91,1,91,3,91,1761,8,91,4,91,1763,8,91,11,91,12,91, - 1764,1,91,1,91,1,92,1,92,3,92,1771,8,92,5,92,1773,8,92,10,92,12,92,1776, - 9,92,1,92,1,92,3,92,1780,8,92,5,92,1782,8,92,10,92,12,92,1785,9,92,1, - 92,1,92,1,93,1,93,1,93,1,93,3,93,1793,8,93,1,94,1,94,1,94,1,94,3,94,1799, - 8,94,1,95,1,95,1,95,1,95,1,95,1,95,3,95,1807,8,95,1,95,1,95,3,95,1811, - 8,95,1,95,1,95,3,95,1815,8,95,1,95,1,95,3,95,1819,8,95,1,95,1,95,1,95, - 1,95,1,95,3,95,1826,8,95,1,95,1,95,3,95,1830,8,95,1,95,1,95,3,95,1834, - 8,95,1,95,1,95,3,95,1838,8,95,1,95,3,95,1841,8,95,1,95,3,95,1844,8,95, - 1,96,1,96,1,96,1,96,1,96,3,96,1851,8,96,1,96,1,96,1,97,1,97,3,97,1857, - 8,97,1,97,1,97,3,97,1861,8,97,1,97,5,97,1864,8,97,10,97,12,97,1867,9, - 97,1,98,1,98,1,98,1,98,3,98,1873,8,98,1,98,3,98,1876,8,98,1,98,3,98,1879, - 8,98,1,98,1,98,1,98,3,98,1884,8,98,1,99,1,99,3,99,1888,8,99,1,99,1,99, - 3,99,1892,8,99,1,99,1,99,1,99,3,99,1897,8,99,1,99,1,99,3,99,1901,8,99, - 1,100,1,100,1,100,1,100,1,101,1,101,1,101,3,101,1910,8,101,1,101,1,101, - 3,101,1914,8,101,1,101,1,101,1,101,3,101,1919,8,101,1,101,1,101,1,101, - 1,101,1,101,1,101,1,101,1,101,1,101,1,101,4,101,1931,8,101,11,101,12, - 101,1932,5,101,1935,8,101,10,101,12,101,1938,9,101,1,102,1,102,3,102, - 1942,8,102,1,102,1,102,1,102,1,102,1,102,1,102,1,103,1,103,3,103,1952, - 8,103,1,103,1,103,1,104,1,104,3,104,1958,8,104,1,104,1,104,1,104,5,104, - 1963,8,104,10,104,12,104,1966,9,104,1,105,1,105,1,105,1,105,1,105,1,105, - 1,105,1,105,1,105,1,105,3,105,1978,8,105,1,106,1,106,3,106,1982,8,106, - 1,106,1,106,3,106,1986,8,106,1,106,1,106,3,106,1990,8,106,1,106,5,106, - 1993,8,106,10,106,12,106,1996,9,106,1,106,1,106,3,106,2000,8,106,1,106, - 1,106,3,106,2004,8,106,1,106,1,106,3,106,2008,8,106,1,106,1,106,3,106, - 2012,8,106,1,107,1,107,3,107,2016,8,107,1,107,1,107,3,107,2020,8,107, - 1,107,1,107,1,108,1,108,3,108,2026,8,108,1,108,1,108,3,108,2030,8,108, - 1,108,1,108,3,108,2034,8,108,1,108,1,108,3,108,2038,8,108,1,108,5,108, - 2041,8,108,10,108,12,108,2044,9,108,1,109,1,109,1,109,3,109,2049,8,109, - 1,109,3,109,2052,8,109,1,110,1,110,1,110,1,111,3,111,2058,8,111,1,111, - 3,111,2061,8,111,1,111,1,111,1,111,1,111,3,111,2067,8,111,1,111,1,111, - 3,111,2071,8,111,1,111,1,111,3,111,2075,8,111,1,112,1,112,3,112,2079, - 8,112,1,112,1,112,3,112,2083,8,112,1,112,5,112,2086,8,112,10,112,12,112, - 2089,9,112,1,112,1,112,3,112,2093,8,112,1,112,1,112,3,112,2097,8,112, - 1,112,5,112,2100,8,112,10,112,12,112,2103,9,112,3,112,2105,8,112,1,113, - 1,113,1,113,1,113,1,113,1,113,1,113,3,113,2114,8,113,1,114,1,114,1,114, - 1,114,1,114,1,114,1,114,3,114,2123,8,114,1,114,5,114,2126,8,114,10,114, - 12,114,2129,9,114,1,115,1,115,1,115,1,115,1,116,1,116,1,116,1,116,1,117, - 1,117,3,117,2141,8,117,1,117,3,117,2144,8,117,1,118,1,118,1,118,1,118, - 1,119,1,119,3,119,2152,8,119,1,119,1,119,3,119,2156,8,119,1,119,5,119, - 2159,8,119,10,119,12,119,2162,9,119,1,120,1,120,3,120,2166,8,120,1,120, - 1,120,3,120,2170,8,120,1,120,1,120,1,120,3,120,2175,8,120,1,121,1,121, - 1,122,1,122,3,122,2181,8,122,1,122,5,122,2184,8,122,10,122,12,122,2187, - 9,122,1,122,1,122,1,122,1,122,3,122,2193,8,122,1,123,1,123,3,123,2197, - 8,123,1,123,1,123,3,123,2201,8,123,3,123,2203,8,123,1,123,1,123,3,123, - 2207,8,123,3,123,2209,8,123,1,123,1,123,3,123,2213,8,123,3,123,2215,8, - 123,1,123,1,123,1,124,1,124,3,124,2221,8,124,1,124,1,124,1,125,1,125, - 3,125,2227,8,125,1,125,1,125,3,125,2231,8,125,1,125,3,125,2234,8,125, - 1,125,3,125,2237,8,125,1,125,1,125,1,125,1,125,3,125,2243,8,125,1,125, - 3,125,2246,8,125,1,125,3,125,2249,8,125,1,125,1,125,3,125,2253,8,125, - 1,125,1,125,1,125,1,125,3,125,2259,8,125,1,125,3,125,2262,8,125,1,125, - 3,125,2265,8,125,1,125,1,125,3,125,2269,8,125,1,126,1,126,3,126,2273, - 8,126,1,126,1,126,3,126,2277,8,126,3,126,2279,8,126,1,126,1,126,3,126, - 2283,8,126,3,126,2285,8,126,1,126,1,126,3,126,2289,8,126,3,126,2291,8, - 126,1,126,1,126,3,126,2295,8,126,3,126,2297,8,126,1,126,1,126,1,127,1, - 127,3,127,2303,8,127,1,127,1,127,3,127,2307,8,127,1,127,1,127,3,127,2311, - 8,127,1,127,1,127,3,127,2315,8,127,1,127,1,127,3,127,2319,8,127,1,127, - 1,127,3,127,2323,8,127,1,127,1,127,3,127,2327,8,127,1,127,1,127,3,127, - 2331,8,127,5,127,2333,8,127,10,127,12,127,2336,9,127,3,127,2338,8,127, - 1,127,1,127,1,128,1,128,3,128,2344,8,128,1,128,1,128,3,128,2348,8,128, - 1,128,1,128,3,128,2352,8,128,1,128,3,128,2355,8,128,1,128,5,128,2358, - 8,128,10,128,12,128,2361,9,128,1,129,1,129,3,129,2365,8,129,1,129,1,129, - 3,129,2369,8,129,1,129,1,129,3,129,2373,8,129,1,129,3,129,2376,8,129, - 1,129,3,129,2379,8,129,1,129,5,129,2382,8,129,10,129,12,129,2385,9,129, - 1,130,1,130,3,130,2389,8,130,1,130,3,130,2392,8,130,1,130,3,130,2395, - 8,130,1,130,3,130,2398,8,130,1,130,3,130,2401,8,130,1,130,3,130,2404, - 8,130,1,131,1,131,3,131,2408,8,131,1,131,1,131,3,131,2412,8,131,1,131, - 1,131,3,131,2416,8,131,1,131,1,131,3,131,2420,8,131,1,131,1,131,1,131, - 1,131,1,131,1,131,1,131,1,131,3,131,2430,8,131,1,132,3,132,2433,8,132, - 1,132,3,132,2436,8,132,1,132,1,132,3,132,2440,8,132,1,132,3,132,2443, - 8,132,1,132,3,132,2446,8,132,1,133,1,133,3,133,2450,8,133,1,133,1,133, - 3,133,2454,8,133,1,133,1,133,3,133,2458,8,133,1,133,1,133,3,133,2462, - 8,133,1,133,1,133,3,133,2466,8,133,1,133,1,133,3,133,2470,8,133,3,133, - 2472,8,133,1,133,3,133,2475,8,133,1,133,1,133,3,133,2479,8,133,1,133, - 1,133,3,133,2483,8,133,1,133,1,133,3,133,2487,8,133,1,133,1,133,3,133, - 2491,8,133,3,133,2493,8,133,1,133,1,133,1,134,1,134,3,134,2499,8,134, - 1,134,3,134,2502,8,134,1,134,3,134,2505,8,134,1,134,1,134,1,135,1,135, - 1,136,1,136,1,137,1,137,1,137,3,137,2516,8,137,1,138,1,138,1,139,1,139, - 1,140,1,140,1,140,1,140,1,140,5,140,2527,8,140,10,140,12,140,2530,9,140, - 1,141,1,141,1,141,1,141,1,141,5,141,2537,8,141,10,141,12,141,2540,9,141, - 1,142,1,142,1,142,1,142,1,142,5,142,2547,8,142,10,142,12,142,2550,9,142, - 1,143,1,143,3,143,2554,8,143,5,143,2556,8,143,10,143,12,143,2559,9,143, - 1,143,1,143,1,144,1,144,3,144,2565,8,144,1,144,1,144,3,144,2569,8,144, - 1,144,1,144,3,144,2573,8,144,1,144,1,144,3,144,2577,8,144,1,144,1,144, - 3,144,2581,8,144,1,144,1,144,1,144,1,144,1,144,1,144,3,144,2589,8,144, - 1,144,1,144,3,144,2593,8,144,1,144,1,144,3,144,2597,8,144,1,144,1,144, - 3,144,2601,8,144,1,144,1,144,4,144,2605,8,144,11,144,12,144,2606,1,144, - 1,144,3,144,2611,8,144,1,145,1,145,1,146,1,146,3,146,2617,8,146,1,146, - 1,146,3,146,2621,8,146,1,146,5,146,2624,8,146,10,146,12,146,2627,9,146, - 1,147,1,147,3,147,2631,8,147,1,147,1,147,3,147,2635,8,147,1,147,5,147, - 2638,8,147,10,147,12,147,2641,9,147,1,148,1,148,3,148,2645,8,148,1,148, - 1,148,3,148,2649,8,148,1,148,1,148,5,148,2653,8,148,10,148,12,148,2656, - 9,148,1,149,1,149,1,150,1,150,3,150,2662,8,150,1,150,1,150,3,150,2666, - 8,150,1,150,1,150,5,150,2670,8,150,10,150,12,150,2673,9,150,1,151,1,151, - 1,152,1,152,3,152,2679,8,152,1,152,1,152,3,152,2683,8,152,1,152,1,152, - 5,152,2687,8,152,10,152,12,152,2690,9,152,1,153,1,153,1,154,1,154,3,154, - 2696,8,154,1,154,1,154,3,154,2700,8,154,1,154,5,154,2703,8,154,10,154, - 12,154,2706,9,154,1,155,1,155,1,155,4,155,2711,8,155,11,155,12,155,2712, - 1,155,3,155,2716,8,155,1,156,1,156,1,156,3,156,2721,8,156,1,156,1,156, - 1,156,1,156,1,156,1,156,1,156,3,156,2730,8,156,1,156,1,156,3,156,2734, - 8,156,1,156,3,156,2737,8,156,1,157,1,157,1,157,1,157,1,157,1,157,1,157, - 1,157,1,157,1,157,1,157,3,157,2750,8,157,1,157,3,157,2753,8,157,1,157, - 1,157,1,158,3,158,2758,8,158,1,158,1,158,1,159,1,159,1,159,1,159,1,159, - 1,159,1,159,1,159,1,159,1,159,3,159,2772,8,159,1,160,1,160,3,160,2776, - 8,160,5,160,2778,8,160,10,160,12,160,2781,9,160,1,160,1,160,3,160,2785, - 8,160,1,160,3,160,2788,8,160,1,161,1,161,3,161,2792,8,161,1,161,5,161, - 2795,8,161,10,161,12,161,2798,9,161,1,162,1,162,1,162,1,162,1,162,1,162, - 1,162,1,162,1,162,3,162,2809,8,162,1,163,1,163,3,163,2813,8,163,1,163, - 1,163,3,163,2817,8,163,1,163,1,163,3,163,2821,8,163,1,163,1,163,1,163, - 1,163,3,163,2827,8,163,1,163,1,163,3,163,2831,8,163,1,163,1,163,3,163, - 2835,8,163,1,163,1,163,1,163,1,163,3,163,2841,8,163,1,163,1,163,3,163, - 2845,8,163,1,163,1,163,3,163,2849,8,163,1,163,1,163,1,163,1,163,3,163, - 2855,8,163,1,163,1,163,3,163,2859,8,163,1,163,1,163,3,163,2863,8,163, - 1,163,1,163,3,163,2867,8,163,1,164,1,164,1,164,1,164,1,165,1,165,1,165, - 1,165,1,165,1,165,1,166,1,166,1,166,1,166,1,166,1,166,3,166,2885,8,166, - 1,167,1,167,1,168,1,168,3,168,2891,8,168,1,168,1,168,3,168,2895,8,168, - 1,168,1,168,3,168,2899,8,168,5,168,2901,8,168,10,168,12,168,2904,9,168, - 3,168,2906,8,168,1,168,1,168,1,169,1,169,3,169,2912,8,169,1,169,3,169, - 2915,8,169,1,170,1,170,3,170,2919,8,170,1,170,1,170,3,170,2923,8,170, - 1,170,1,170,3,170,2927,8,170,1,170,1,170,3,170,2931,8,170,5,170,2933, - 8,170,10,170,12,170,2936,9,170,1,170,1,170,1,171,1,171,3,171,2942,8,171, - 1,171,3,171,2945,8,171,1,171,1,171,3,171,2949,8,171,1,171,1,171,1,172, - 1,172,3,172,2955,8,172,1,172,1,172,3,172,2959,8,172,1,172,1,172,1,173, - 1,173,3,173,2965,8,173,1,173,1,173,3,173,2969,8,173,1,173,1,173,3,173, - 2973,8,173,1,173,1,173,1,173,3,173,2978,8,173,1,173,1,173,3,173,2982, - 8,173,1,173,1,173,3,173,2986,8,173,1,173,1,173,3,173,2990,8,173,1,173, - 1,173,1,173,3,173,2995,8,173,1,173,3,173,2998,8,173,1,173,3,173,3001, - 8,173,1,173,1,173,1,173,1,173,3,173,3007,8,173,1,173,1,173,3,173,3011, - 8,173,1,173,1,173,3,173,3015,8,173,3,173,3017,8,173,1,173,1,173,3,173, - 3021,8,173,1,173,1,173,3,173,3025,8,173,1,173,1,173,3,173,3029,8,173, - 5,173,3031,8,173,10,173,12,173,3034,9,173,3,173,3036,8,173,1,173,1,173, - 3,173,3040,8,173,1,174,1,174,1,175,1,175,3,175,3046,8,175,1,175,1,175, - 1,175,3,175,3051,8,175,3,175,3053,8,175,1,175,1,175,3,175,3057,8,175, - 1,176,1,176,3,176,3061,8,176,1,176,1,176,1,176,3,176,3066,8,176,1,176, - 1,176,3,176,3070,8,176,1,177,1,177,1,177,3,177,3075,8,177,1,177,1,177, - 3,177,3079,8,177,1,177,1,177,3,177,3083,8,177,1,177,1,177,3,177,3087, - 8,177,5,177,3089,8,177,10,177,12,177,3092,9,177,1,177,1,177,3,177,3096, - 8,177,1,178,1,178,3,178,3100,8,178,1,178,4,178,3103,8,178,11,178,12,178, - 3104,1,179,1,179,3,179,3109,8,179,1,179,1,179,3,179,3113,8,179,1,179, - 1,179,3,179,3117,8,179,1,179,1,179,3,179,3121,8,179,1,179,3,179,3124, - 8,179,1,179,3,179,3127,8,179,1,179,3,179,3130,8,179,1,179,3,179,3133, - 8,179,1,179,1,179,1,180,1,180,3,180,3139,8,180,1,180,1,180,3,180,3143, - 8,180,1,181,1,181,3,181,3147,8,181,1,181,4,181,3150,8,181,11,181,12,181, - 3151,1,181,1,181,3,181,3156,8,181,1,181,1,181,3,181,3160,8,181,1,181, - 4,181,3163,8,181,11,181,12,181,3164,3,181,3167,8,181,1,181,3,181,3170, - 8,181,1,181,1,181,3,181,3174,8,181,1,181,3,181,3177,8,181,1,181,3,181, - 3180,8,181,1,181,1,181,1,182,1,182,3,182,3186,8,182,1,182,1,182,3,182, - 3190,8,182,1,182,1,182,3,182,3194,8,182,1,182,1,182,1,183,1,183,1,184, - 1,184,3,184,3202,8,184,1,185,1,185,1,185,3,185,3207,8,185,1,186,1,186, - 3,186,3211,8,186,1,186,1,186,1,187,1,187,1,188,1,188,1,189,1,189,1,190, - 1,190,1,190,3,190,3224,8,190,1,191,1,191,1,191,1,191,1,191,3,191,3231, - 8,191,1,192,1,192,1,193,1,193,1,194,1,194,1,195,1,195,1,195,0,2,148,202, - 196,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46, - 48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92, - 94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128, - 130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164, - 166,168,170,172,174,176,178,180,182,184,186,188,190,192,194,196,198,200, - 202,204,206,208,210,212,214,216,218,220,222,224,226,228,230,232,234,236, - 238,240,242,244,246,248,250,252,254,256,258,260,262,264,266,268,270,272, - 274,276,278,280,282,284,286,288,290,292,294,296,298,300,302,304,306,308, - 310,312,314,316,318,320,322,324,326,328,330,332,334,336,338,340,342,344, - 346,348,350,352,354,356,358,360,362,364,366,368,370,372,374,376,378,380, - 382,384,386,388,390,0,15,4,0,93,93,110,110,137,137,144,144,2,0,53,53, - 76,76,2,0,53,54,76,77,2,0,6,6,12,16,1,0,18,19,2,0,20,20,176,176,2,0,21, - 22,171,171,1,0,174,175,2,0,88,88,149,149,2,0,68,68,84,84,1,0,187,188, + 1,2,1,2,1,2,1,2,1,2,3,2,453,8,2,1,3,1,3,1,3,1,3,3,3,459,8,3,1,3,1,3,1, + 3,1,3,1,3,3,3,466,8,3,1,3,1,3,3,3,470,8,3,1,3,1,3,3,3,474,8,3,1,3,1,3, + 3,3,478,8,3,1,4,3,4,481,8,4,1,4,1,4,3,4,485,8,4,1,4,1,4,3,4,489,8,4,1, + 4,1,4,3,4,493,8,4,1,4,5,4,496,8,4,10,4,12,4,499,9,4,1,4,3,4,502,8,4,3, + 4,504,8,4,1,4,1,4,1,5,1,5,1,5,3,5,511,8,5,1,5,1,5,3,5,515,8,5,1,5,1,5, + 1,5,1,5,1,5,1,5,1,5,3,5,524,8,5,1,5,1,5,1,5,3,5,529,8,5,1,6,1,6,1,6,1, + 6,1,6,1,6,1,6,1,6,3,6,539,8,6,1,6,1,6,3,6,543,8,6,1,6,1,6,3,6,547,8,6, + 1,6,5,6,550,8,6,10,6,12,6,553,9,6,1,6,1,6,1,6,1,6,1,6,1,6,1,7,1,7,1,7, + 1,7,3,7,565,8,7,1,7,1,7,3,7,569,8,7,1,7,1,7,1,7,1,7,1,7,1,7,3,7,577,8, + 7,1,7,1,7,3,7,581,8,7,1,7,1,7,3,7,585,8,7,1,7,1,7,3,7,589,8,7,1,8,1,8, + 1,8,1,8,1,8,1,8,3,8,597,8,8,1,8,1,8,3,8,601,8,8,1,8,1,8,3,8,605,8,8,1, + 8,1,8,3,8,609,8,8,1,9,1,9,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1, + 10,1,10,3,10,624,8,10,1,10,1,10,1,10,3,10,629,8,10,1,10,1,10,1,10,1,10, + 3,10,635,8,10,1,10,1,10,3,10,639,8,10,1,10,3,10,642,8,10,1,10,3,10,645, + 8,10,1,10,1,10,1,11,1,11,3,11,651,8,11,1,11,1,11,3,11,655,8,11,1,11,5, + 11,658,8,11,10,11,12,11,661,9,11,3,11,663,8,11,1,11,1,11,3,11,667,8,11, + 1,11,3,11,670,8,11,1,11,3,11,673,8,11,1,12,1,12,3,12,677,8,12,1,12,1, + 12,3,12,681,8,12,1,12,1,12,1,13,1,13,3,13,687,8,13,1,13,1,13,3,13,691, + 8,13,1,13,5,13,694,8,13,10,13,12,13,697,9,13,1,14,1,14,1,14,1,14,1,15, + 1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,16,1,16,3,16,714,8,16,1,17, + 1,17,1,17,1,17,1,17,1,17,1,18,1,18,1,18,3,18,725,8,18,1,19,1,19,1,19, + 1,19,3,19,731,8,19,1,19,1,19,3,19,735,8,19,1,19,1,19,1,19,1,19,1,19,3, + 19,742,8,19,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1, + 20,1,21,1,21,1,21,1,21,1,21,1,21,3,21,762,8,21,1,21,1,21,3,21,766,8,21, + 1,21,3,21,769,8,21,1,21,3,21,772,8,21,1,21,3,21,775,8,21,1,21,3,21,778, + 8,21,1,21,1,21,3,21,782,8,21,1,21,5,21,785,8,21,10,21,12,21,788,9,21, + 1,21,3,21,791,8,21,1,21,1,21,1,21,1,21,1,21,1,21,1,22,1,22,3,22,801,8, + 22,1,22,1,22,3,22,805,8,22,1,22,5,22,808,8,22,10,22,12,22,811,9,22,1, + 23,1,23,3,23,815,8,23,1,23,1,23,1,23,3,23,820,8,23,1,23,1,23,1,24,1,24, + 3,24,826,8,24,1,24,1,24,3,24,830,8,24,1,24,1,24,3,24,834,8,24,1,24,5, + 24,837,8,24,10,24,12,24,840,9,24,1,24,1,24,1,24,1,24,3,24,846,8,24,1, + 24,1,24,3,24,850,8,24,1,24,1,24,3,24,854,8,24,1,24,3,24,857,8,24,1,25, + 1,25,1,25,1,25,1,25,1,25,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26, + 3,26,874,8,26,1,26,1,26,3,26,878,8,26,1,26,1,26,3,26,882,8,26,1,26,1, + 26,3,26,886,8,26,1,26,1,26,3,26,890,8,26,1,26,3,26,893,8,26,1,26,3,26, + 896,8,26,1,26,1,26,1,26,1,26,1,26,1,26,3,26,904,8,26,1,26,1,26,1,26,3, + 26,909,8,26,1,26,1,26,3,26,913,8,26,1,26,1,26,3,26,917,8,26,1,26,1,26, + 3,26,921,8,26,1,26,1,26,3,26,925,8,26,1,27,1,27,1,27,1,27,1,27,1,27,1, + 27,3,27,934,8,27,1,28,1,28,3,28,938,8,28,1,28,1,28,3,28,942,8,28,1,28, + 1,28,3,28,946,8,28,1,28,1,28,1,28,1,28,1,28,1,28,1,29,1,29,3,29,956,8, + 29,1,29,1,29,3,29,960,8,29,1,29,1,29,3,29,964,8,29,1,29,1,29,1,29,1,29, + 1,29,1,29,1,30,1,30,3,30,974,8,30,1,30,1,30,3,30,978,8,30,1,30,1,30,3, + 30,982,8,30,1,30,1,30,1,31,1,31,1,31,1,31,1,31,1,31,1,31,3,31,993,8,31, + 1,31,1,31,3,31,997,8,31,1,31,1,31,1,31,3,31,1002,8,31,1,31,1,31,3,31, + 1006,8,31,1,31,1,31,3,31,1010,8,31,1,31,1,31,3,31,1014,8,31,1,31,1,31, + 3,31,1018,8,31,3,31,1020,8,31,1,31,1,31,3,31,1024,8,31,1,31,1,31,3,31, + 1028,8,31,3,31,1030,8,31,1,31,1,31,1,31,1,31,1,31,1,31,3,31,1038,8,31, + 1,31,1,31,1,31,3,31,1043,8,31,1,31,1,31,3,31,1047,8,31,1,31,1,31,3,31, + 1051,8,31,1,31,1,31,3,31,1055,8,31,1,32,1,32,1,32,3,32,1060,8,32,1,32, + 1,32,1,32,1,32,3,32,1066,8,32,1,32,1,32,3,32,1070,8,32,1,32,1,32,1,32, + 1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,3,32,1083,8,32,1,32,1,32,3,32, + 1087,8,32,1,32,3,32,1090,8,32,1,32,3,32,1093,8,32,1,32,3,32,1096,8,32, + 1,33,1,33,3,33,1100,8,33,1,34,1,34,3,34,1104,8,34,1,34,3,34,1107,8,34, + 1,34,3,34,1110,8,34,1,34,1,34,3,34,1114,8,34,1,34,1,34,3,34,1118,8,34, + 1,34,1,34,1,35,1,35,3,35,1124,8,35,1,35,1,35,3,35,1128,8,35,1,35,1,35, + 3,35,1132,8,35,1,35,1,35,3,35,1136,8,35,1,35,1,35,1,36,1,36,3,36,1142, + 8,36,1,36,1,36,3,36,1146,8,36,1,36,1,36,3,36,1150,8,36,1,36,1,36,3,36, + 1154,8,36,1,36,1,36,1,37,1,37,3,37,1160,8,37,1,37,1,37,3,37,1164,8,37, + 1,37,5,37,1167,8,37,10,37,12,37,1170,9,37,1,38,1,38,1,38,1,38,1,38,1, + 38,1,38,1,38,1,38,3,38,1181,8,38,1,39,1,39,3,39,1185,8,39,1,39,1,39,3, + 39,1189,8,39,1,39,5,39,1192,8,39,10,39,12,39,1195,9,39,1,40,1,40,1,40, + 1,40,1,40,1,40,1,40,1,40,1,41,1,41,1,41,1,41,1,41,1,41,1,41,3,41,1212, + 8,41,1,41,1,41,1,41,5,41,1217,8,41,10,41,12,41,1220,9,41,1,42,1,42,1, + 42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,3,42,1232,8,42,1,43,1,43,1,43,1, + 43,1,43,3,43,1239,8,43,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,45,1,45,1, + 45,1,45,1,45,1,45,1,45,3,45,1255,8,45,1,45,1,45,3,45,1259,8,45,1,46,1, + 46,1,46,1,46,1,46,1,46,1,46,3,46,1268,8,46,1,46,1,46,1,47,1,47,1,47,1, + 47,3,47,1276,8,47,1,47,3,47,1279,8,47,1,47,1,47,1,48,1,48,1,48,1,48,1, + 48,1,48,3,48,1289,8,48,1,48,3,48,1292,8,48,1,49,1,49,1,49,1,49,1,49,1, + 49,3,49,1300,8,49,1,49,3,49,1303,8,49,1,50,1,50,1,50,1,50,3,50,1309,8, + 50,1,50,3,50,1312,8,50,1,50,1,50,1,51,1,51,3,51,1318,8,51,1,51,1,51,1, + 52,1,52,1,52,1,52,1,53,1,53,1,53,1,53,1,53,1,53,1,53,3,53,1333,8,53,1, + 53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,3,53,1343,8,53,1,53,3,53,1346,8, + 53,1,54,1,54,3,54,1350,8,54,1,54,1,54,3,54,1354,8,54,1,54,1,54,1,55,1, + 55,1,55,1,55,1,55,1,55,1,55,1,55,1,56,1,56,1,56,1,56,1,56,1,56,1,56,3, + 56,1373,8,56,1,57,1,57,1,57,1,57,1,57,3,57,1380,8,57,1,57,1,57,1,57,1, + 57,1,57,3,57,1387,8,57,1,58,1,58,1,58,1,58,1,59,1,59,1,59,1,59,1,59,3, + 59,1398,8,59,1,59,1,59,1,60,1,60,1,60,1,60,1,60,1,60,1,61,1,61,1,61,1, + 61,1,61,1,61,1,61,1,61,1,62,1,62,1,62,1,62,1,62,3,62,1421,8,62,1,62,1, + 62,1,63,1,63,1,63,1,63,1,63,3,63,1430,8,63,1,63,1,63,1,64,1,64,1,64,1, + 64,1,64,1,64,3,64,1440,8,64,1,64,1,64,3,64,1444,8,64,1,64,1,64,3,64,1448, + 8,64,1,64,1,64,3,64,1452,8,64,1,64,5,64,1455,8,64,10,64,12,64,1458,9, + 64,1,64,3,64,1461,8,64,1,64,1,64,3,64,1465,8,64,1,64,3,64,1468,8,64,1, + 65,1,65,1,65,1,65,1,66,1,66,3,66,1476,8,66,1,66,1,66,3,66,1480,8,66,1, + 66,5,66,1483,8,66,10,66,12,66,1486,9,66,1,67,1,67,1,67,1,67,1,68,1,68, + 3,68,1494,8,68,1,68,1,68,3,68,1498,8,68,1,68,5,68,1501,8,68,10,68,12, + 68,1504,9,68,1,69,1,69,1,69,3,69,1509,8,69,1,69,1,69,1,69,1,69,3,69,1515, + 8,69,1,70,1,70,1,70,1,70,3,70,1521,8,70,1,70,1,70,3,70,1525,8,70,1,70, + 1,70,3,70,1529,8,70,1,70,1,70,1,71,1,71,3,71,1535,8,71,1,71,1,71,3,71, + 1539,8,71,1,71,1,71,3,71,1543,8,71,1,71,1,71,1,72,1,72,3,72,1549,8,72, + 1,72,1,72,3,72,1553,8,72,1,72,1,72,3,72,1557,8,72,1,72,1,72,1,73,1,73, + 3,73,1563,8,73,1,73,1,73,3,73,1567,8,73,1,73,1,73,3,73,1571,8,73,1,73, + 1,73,3,73,1575,8,73,1,73,1,73,3,73,1579,8,73,1,73,1,73,1,74,1,74,3,74, + 1585,8,74,1,74,1,74,3,74,1589,8,74,1,74,1,74,3,74,1593,8,74,1,74,1,74, + 3,74,1597,8,74,1,74,1,74,3,74,1601,8,74,1,74,1,74,1,75,1,75,1,75,1,75, + 1,75,1,75,3,75,1611,8,75,1,75,1,75,5,75,1615,8,75,10,75,12,75,1618,9, + 75,1,76,1,76,5,76,1622,8,76,10,76,12,76,1625,9,76,1,77,1,77,3,77,1629, + 8,77,1,77,1,77,1,78,1,78,3,78,1635,8,78,1,79,1,79,1,79,3,79,1640,8,79, + 1,80,1,80,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81, + 1,81,3,81,1657,8,81,1,82,1,82,1,82,1,82,3,82,1663,8,82,1,83,1,83,1,83, + 1,83,3,83,1669,8,83,1,83,1,83,3,83,1673,8,83,1,84,1,84,3,84,1677,8,84, + 1,84,1,84,1,84,1,84,1,84,1,84,1,84,3,84,1686,8,84,1,85,1,85,1,85,1,85, + 1,86,1,86,1,86,1,86,1,87,1,87,1,88,1,88,3,88,1700,8,88,1,88,5,88,1703, + 8,88,10,88,12,88,1706,9,88,1,88,1,88,3,88,1710,8,88,4,88,1712,8,88,11, + 88,12,88,1713,1,88,1,88,1,88,3,88,1719,8,88,1,89,1,89,1,89,1,89,3,89, + 1725,8,89,1,89,1,89,1,89,3,89,1730,8,89,1,89,3,89,1733,8,89,1,90,1,90, + 3,90,1737,8,90,1,91,1,91,3,91,1741,8,91,5,91,1743,8,91,10,91,12,91,1746, + 9,91,1,91,1,91,1,91,3,91,1751,8,91,5,91,1753,8,91,10,91,12,91,1756,9, + 91,1,91,1,91,3,91,1760,8,91,1,91,5,91,1763,8,91,10,91,12,91,1766,9,91, + 1,91,3,91,1769,8,91,1,91,3,91,1772,8,91,3,91,1774,8,91,1,92,1,92,3,92, + 1778,8,92,4,92,1780,8,92,11,92,12,92,1781,1,92,1,92,1,93,1,93,3,93,1788, + 8,93,5,93,1790,8,93,10,93,12,93,1793,9,93,1,93,1,93,3,93,1797,8,93,5, + 93,1799,8,93,10,93,12,93,1802,9,93,1,93,1,93,1,94,1,94,1,94,1,94,3,94, + 1810,8,94,1,95,1,95,1,95,1,95,3,95,1816,8,95,1,96,1,96,1,96,1,96,1,96, + 1,96,3,96,1824,8,96,1,96,1,96,3,96,1828,8,96,1,96,1,96,3,96,1832,8,96, + 1,96,1,96,3,96,1836,8,96,1,96,1,96,1,96,1,96,1,96,3,96,1843,8,96,1,96, + 1,96,3,96,1847,8,96,1,96,1,96,3,96,1851,8,96,1,96,1,96,3,96,1855,8,96, + 1,96,3,96,1858,8,96,1,96,3,96,1861,8,96,1,97,1,97,1,97,1,97,1,97,3,97, + 1868,8,97,1,97,1,97,1,98,1,98,3,98,1874,8,98,1,98,1,98,3,98,1878,8,98, + 1,98,5,98,1881,8,98,10,98,12,98,1884,9,98,1,99,1,99,1,99,1,99,3,99,1890, + 8,99,1,99,3,99,1893,8,99,1,99,3,99,1896,8,99,1,99,1,99,1,99,3,99,1901, + 8,99,1,100,1,100,3,100,1905,8,100,1,100,1,100,3,100,1909,8,100,1,100, + 1,100,1,100,3,100,1914,8,100,1,100,1,100,3,100,1918,8,100,1,101,1,101, + 1,101,1,101,1,102,1,102,1,102,3,102,1927,8,102,1,102,1,102,3,102,1931, + 8,102,1,102,1,102,1,102,3,102,1936,8,102,1,102,1,102,1,102,1,102,1,102, + 1,102,1,102,1,102,1,102,1,102,4,102,1948,8,102,11,102,12,102,1949,5,102, + 1952,8,102,10,102,12,102,1955,9,102,1,103,1,103,3,103,1959,8,103,1,103, + 1,103,1,103,1,103,1,103,1,103,1,104,1,104,3,104,1969,8,104,1,104,1,104, + 1,105,1,105,3,105,1975,8,105,1,105,1,105,1,105,5,105,1980,8,105,10,105, + 12,105,1983,9,105,1,106,1,106,1,106,1,106,1,106,1,106,1,106,1,106,1,106, + 1,106,3,106,1995,8,106,1,107,1,107,3,107,1999,8,107,1,107,1,107,3,107, + 2003,8,107,1,107,1,107,3,107,2007,8,107,1,107,5,107,2010,8,107,10,107, + 12,107,2013,9,107,1,107,1,107,3,107,2017,8,107,1,107,1,107,3,107,2021, + 8,107,1,107,1,107,3,107,2025,8,107,1,107,1,107,3,107,2029,8,107,1,108, + 1,108,3,108,2033,8,108,1,108,1,108,3,108,2037,8,108,1,108,1,108,1,109, + 1,109,3,109,2043,8,109,1,109,1,109,3,109,2047,8,109,1,109,1,109,3,109, + 2051,8,109,1,109,1,109,3,109,2055,8,109,1,109,5,109,2058,8,109,10,109, + 12,109,2061,9,109,1,110,1,110,1,110,3,110,2066,8,110,1,110,3,110,2069, + 8,110,1,111,1,111,1,111,1,112,3,112,2075,8,112,1,112,3,112,2078,8,112, + 1,112,1,112,1,112,1,112,3,112,2084,8,112,1,112,1,112,3,112,2088,8,112, + 1,112,1,112,3,112,2092,8,112,1,113,1,113,3,113,2096,8,113,1,113,1,113, + 3,113,2100,8,113,1,113,5,113,2103,8,113,10,113,12,113,2106,9,113,1,113, + 1,113,3,113,2110,8,113,1,113,1,113,3,113,2114,8,113,1,113,5,113,2117, + 8,113,10,113,12,113,2120,9,113,3,113,2122,8,113,1,114,1,114,1,114,1,114, + 1,114,1,114,1,114,3,114,2131,8,114,1,115,1,115,1,115,1,115,1,115,1,115, + 1,115,3,115,2140,8,115,1,115,5,115,2143,8,115,10,115,12,115,2146,9,115, + 1,116,1,116,1,116,1,116,1,117,1,117,1,117,1,117,1,118,1,118,3,118,2158, + 8,118,1,118,3,118,2161,8,118,1,119,1,119,1,119,1,119,1,120,1,120,3,120, + 2169,8,120,1,120,1,120,3,120,2173,8,120,1,120,5,120,2176,8,120,10,120, + 12,120,2179,9,120,1,121,1,121,3,121,2183,8,121,1,121,1,121,3,121,2187, + 8,121,1,121,1,121,1,121,3,121,2192,8,121,1,122,1,122,1,123,1,123,3,123, + 2198,8,123,1,123,5,123,2201,8,123,10,123,12,123,2204,9,123,1,123,1,123, + 1,123,1,123,3,123,2210,8,123,1,124,1,124,3,124,2214,8,124,1,124,1,124, + 3,124,2218,8,124,3,124,2220,8,124,1,124,1,124,3,124,2224,8,124,3,124, + 2226,8,124,1,124,1,124,3,124,2230,8,124,3,124,2232,8,124,1,124,1,124, + 1,125,1,125,3,125,2238,8,125,1,125,1,125,1,126,1,126,3,126,2244,8,126, + 1,126,1,126,3,126,2248,8,126,1,126,3,126,2251,8,126,1,126,3,126,2254, + 8,126,1,126,1,126,1,126,1,126,3,126,2260,8,126,1,126,3,126,2263,8,126, + 1,126,3,126,2266,8,126,1,126,1,126,3,126,2270,8,126,1,126,1,126,1,126, + 1,126,3,126,2276,8,126,1,126,3,126,2279,8,126,1,126,3,126,2282,8,126, + 1,126,1,126,3,126,2286,8,126,1,127,1,127,3,127,2290,8,127,1,127,1,127, + 3,127,2294,8,127,3,127,2296,8,127,1,127,1,127,3,127,2300,8,127,3,127, + 2302,8,127,1,127,1,127,3,127,2306,8,127,3,127,2308,8,127,1,127,1,127, + 3,127,2312,8,127,3,127,2314,8,127,1,127,1,127,1,128,1,128,3,128,2320, + 8,128,1,128,1,128,3,128,2324,8,128,1,128,1,128,3,128,2328,8,128,1,128, + 1,128,3,128,2332,8,128,1,128,1,128,3,128,2336,8,128,1,128,1,128,3,128, + 2340,8,128,1,128,1,128,3,128,2344,8,128,1,128,1,128,3,128,2348,8,128, + 5,128,2350,8,128,10,128,12,128,2353,9,128,3,128,2355,8,128,1,128,1,128, + 1,129,1,129,3,129,2361,8,129,1,129,1,129,3,129,2365,8,129,1,129,1,129, + 3,129,2369,8,129,1,129,3,129,2372,8,129,1,129,5,129,2375,8,129,10,129, + 12,129,2378,9,129,1,130,1,130,3,130,2382,8,130,1,130,1,130,3,130,2386, + 8,130,1,130,1,130,3,130,2390,8,130,1,130,3,130,2393,8,130,1,130,3,130, + 2396,8,130,1,130,5,130,2399,8,130,10,130,12,130,2402,9,130,1,131,1,131, + 3,131,2406,8,131,1,131,3,131,2409,8,131,1,131,3,131,2412,8,131,1,131, + 3,131,2415,8,131,1,131,3,131,2418,8,131,1,131,3,131,2421,8,131,1,132, + 1,132,3,132,2425,8,132,1,132,1,132,3,132,2429,8,132,1,132,1,132,3,132, + 2433,8,132,1,132,1,132,3,132,2437,8,132,1,132,1,132,1,132,1,132,1,132, + 1,132,1,132,1,132,3,132,2447,8,132,1,133,3,133,2450,8,133,1,133,3,133, + 2453,8,133,1,133,1,133,3,133,2457,8,133,1,133,3,133,2460,8,133,1,133, + 3,133,2463,8,133,1,134,1,134,3,134,2467,8,134,1,134,1,134,3,134,2471, + 8,134,1,134,1,134,3,134,2475,8,134,1,134,1,134,3,134,2479,8,134,1,134, + 1,134,3,134,2483,8,134,1,134,1,134,3,134,2487,8,134,3,134,2489,8,134, + 1,134,3,134,2492,8,134,1,134,1,134,3,134,2496,8,134,1,134,1,134,3,134, + 2500,8,134,1,134,1,134,3,134,2504,8,134,1,134,1,134,3,134,2508,8,134, + 3,134,2510,8,134,1,134,1,134,1,135,1,135,3,135,2516,8,135,1,135,3,135, + 2519,8,135,1,135,3,135,2522,8,135,1,135,1,135,1,136,1,136,1,137,1,137, + 1,138,1,138,1,138,3,138,2533,8,138,1,139,1,139,1,140,1,140,1,141,1,141, + 1,141,1,141,1,141,5,141,2544,8,141,10,141,12,141,2547,9,141,1,142,1,142, + 1,142,1,142,1,142,5,142,2554,8,142,10,142,12,142,2557,9,142,1,143,1,143, + 1,143,1,143,1,143,5,143,2564,8,143,10,143,12,143,2567,9,143,1,144,1,144, + 3,144,2571,8,144,5,144,2573,8,144,10,144,12,144,2576,9,144,1,144,1,144, + 1,145,1,145,3,145,2582,8,145,1,145,1,145,3,145,2586,8,145,1,145,1,145, + 3,145,2590,8,145,1,145,1,145,3,145,2594,8,145,1,145,1,145,3,145,2598, + 8,145,1,145,1,145,1,145,1,145,1,145,1,145,3,145,2606,8,145,1,145,1,145, + 3,145,2610,8,145,1,145,1,145,3,145,2614,8,145,1,145,1,145,3,145,2618, + 8,145,1,145,1,145,4,145,2622,8,145,11,145,12,145,2623,1,145,1,145,3,145, + 2628,8,145,1,146,1,146,1,147,1,147,3,147,2634,8,147,1,147,1,147,3,147, + 2638,8,147,1,147,5,147,2641,8,147,10,147,12,147,2644,9,147,1,148,1,148, + 3,148,2648,8,148,1,148,1,148,3,148,2652,8,148,1,148,5,148,2655,8,148, + 10,148,12,148,2658,9,148,1,149,1,149,3,149,2662,8,149,1,149,1,149,3,149, + 2666,8,149,1,149,1,149,5,149,2670,8,149,10,149,12,149,2673,9,149,1,150, + 1,150,1,151,1,151,3,151,2679,8,151,1,151,1,151,3,151,2683,8,151,1,151, + 1,151,5,151,2687,8,151,10,151,12,151,2690,9,151,1,152,1,152,1,153,1,153, + 3,153,2696,8,153,1,153,1,153,3,153,2700,8,153,1,153,1,153,5,153,2704, + 8,153,10,153,12,153,2707,9,153,1,154,1,154,1,155,1,155,3,155,2713,8,155, + 1,155,1,155,3,155,2717,8,155,1,155,5,155,2720,8,155,10,155,12,155,2723, + 9,155,1,156,1,156,1,156,4,156,2728,8,156,11,156,12,156,2729,1,156,3,156, + 2733,8,156,1,157,1,157,1,157,3,157,2738,8,157,1,157,1,157,1,157,1,157, + 1,157,1,157,1,157,3,157,2747,8,157,1,157,1,157,3,157,2751,8,157,1,157, + 3,157,2754,8,157,1,158,1,158,1,158,1,158,1,158,1,158,1,158,1,158,1,158, + 1,158,1,158,3,158,2767,8,158,1,158,3,158,2770,8,158,1,158,1,158,1,159, + 3,159,2775,8,159,1,159,1,159,1,160,1,160,1,160,1,160,1,160,1,160,1,160, + 1,160,1,160,1,160,3,160,2789,8,160,1,161,1,161,3,161,2793,8,161,5,161, + 2795,8,161,10,161,12,161,2798,9,161,1,161,1,161,3,161,2802,8,161,1,161, + 3,161,2805,8,161,1,162,1,162,3,162,2809,8,162,1,162,5,162,2812,8,162, + 10,162,12,162,2815,9,162,1,163,1,163,1,163,1,163,1,163,1,163,1,163,1, + 163,1,163,3,163,2826,8,163,1,164,1,164,3,164,2830,8,164,1,164,1,164,3, + 164,2834,8,164,1,164,1,164,3,164,2838,8,164,1,164,1,164,1,164,1,164,3, + 164,2844,8,164,1,164,1,164,3,164,2848,8,164,1,164,1,164,3,164,2852,8, + 164,1,164,1,164,1,164,1,164,3,164,2858,8,164,1,164,1,164,3,164,2862,8, + 164,1,164,1,164,3,164,2866,8,164,1,164,1,164,1,164,1,164,3,164,2872,8, + 164,1,164,1,164,3,164,2876,8,164,1,164,1,164,3,164,2880,8,164,1,164,1, + 164,3,164,2884,8,164,1,165,1,165,1,165,1,165,1,166,1,166,1,166,1,166, + 1,166,1,166,1,167,1,167,1,167,1,167,1,167,1,167,3,167,2902,8,167,1,168, + 1,168,1,169,1,169,3,169,2908,8,169,1,169,1,169,3,169,2912,8,169,1,169, + 1,169,3,169,2916,8,169,5,169,2918,8,169,10,169,12,169,2921,9,169,3,169, + 2923,8,169,1,169,1,169,1,170,1,170,3,170,2929,8,170,1,170,3,170,2932, + 8,170,1,171,1,171,3,171,2936,8,171,1,171,1,171,3,171,2940,8,171,1,171, + 1,171,3,171,2944,8,171,1,171,1,171,3,171,2948,8,171,5,171,2950,8,171, + 10,171,12,171,2953,9,171,1,171,1,171,1,172,1,172,3,172,2959,8,172,1,172, + 3,172,2962,8,172,1,172,1,172,3,172,2966,8,172,1,172,1,172,1,173,1,173, + 3,173,2972,8,173,1,173,1,173,3,173,2976,8,173,1,173,1,173,1,174,1,174, + 3,174,2982,8,174,1,174,1,174,3,174,2986,8,174,1,174,1,174,3,174,2990, + 8,174,1,174,1,174,1,174,3,174,2995,8,174,1,174,1,174,3,174,2999,8,174, + 1,174,1,174,3,174,3003,8,174,1,174,1,174,3,174,3007,8,174,1,174,1,174, + 1,174,3,174,3012,8,174,1,174,3,174,3015,8,174,1,174,3,174,3018,8,174, + 1,174,1,174,1,174,1,174,3,174,3024,8,174,1,174,1,174,3,174,3028,8,174, + 1,174,1,174,3,174,3032,8,174,3,174,3034,8,174,1,174,1,174,3,174,3038, + 8,174,1,174,1,174,3,174,3042,8,174,1,174,1,174,3,174,3046,8,174,5,174, + 3048,8,174,10,174,12,174,3051,9,174,3,174,3053,8,174,1,174,1,174,3,174, + 3057,8,174,1,175,1,175,1,176,1,176,3,176,3063,8,176,1,176,1,176,1,176, + 3,176,3068,8,176,3,176,3070,8,176,1,176,1,176,3,176,3074,8,176,1,177, + 1,177,3,177,3078,8,177,1,177,1,177,1,177,3,177,3083,8,177,1,177,1,177, + 3,177,3087,8,177,1,178,1,178,1,178,3,178,3092,8,178,1,178,1,178,3,178, + 3096,8,178,1,178,1,178,3,178,3100,8,178,1,178,1,178,3,178,3104,8,178, + 5,178,3106,8,178,10,178,12,178,3109,9,178,1,178,1,178,3,178,3113,8,178, + 1,179,1,179,3,179,3117,8,179,1,179,4,179,3120,8,179,11,179,12,179,3121, + 1,180,1,180,3,180,3126,8,180,1,180,1,180,3,180,3130,8,180,1,180,1,180, + 3,180,3134,8,180,1,180,1,180,3,180,3138,8,180,1,180,3,180,3141,8,180, + 1,180,3,180,3144,8,180,1,180,3,180,3147,8,180,1,180,3,180,3150,8,180, + 1,180,1,180,1,181,1,181,3,181,3156,8,181,1,181,1,181,3,181,3160,8,181, + 1,182,1,182,3,182,3164,8,182,1,182,4,182,3167,8,182,11,182,12,182,3168, + 1,182,1,182,3,182,3173,8,182,1,182,1,182,3,182,3177,8,182,1,182,4,182, + 3180,8,182,11,182,12,182,3181,3,182,3184,8,182,1,182,3,182,3187,8,182, + 1,182,1,182,3,182,3191,8,182,1,182,3,182,3194,8,182,1,182,3,182,3197, + 8,182,1,182,1,182,1,183,1,183,3,183,3203,8,183,1,183,1,183,3,183,3207, + 8,183,1,183,1,183,3,183,3211,8,183,1,183,1,183,1,184,1,184,1,185,1,185, + 3,185,3219,8,185,1,186,1,186,1,186,3,186,3224,8,186,1,187,1,187,3,187, + 3228,8,187,1,187,1,187,1,188,1,188,1,189,1,189,1,190,1,190,1,191,1,191, + 1,191,3,191,3241,8,191,1,192,1,192,1,192,1,192,1,192,3,192,3248,8,192, + 1,193,1,193,1,194,1,194,1,195,1,195,1,196,1,196,1,196,0,2,150,204,197, + 0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48, + 50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94, + 96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130, + 132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,166, + 168,170,172,174,176,178,180,182,184,186,188,190,192,194,196,198,200,202, + 204,206,208,210,212,214,216,218,220,222,224,226,228,230,232,234,236,238, + 240,242,244,246,248,250,252,254,256,258,260,262,264,266,268,270,272,274, + 276,278,280,282,284,286,288,290,292,294,296,298,300,302,304,306,308,310, + 312,314,316,318,320,322,324,326,328,330,332,334,336,338,340,342,344,346, + 348,350,352,354,356,358,360,362,364,366,368,370,372,374,376,378,380,382, + 384,386,388,390,392,0,15,4,0,93,93,111,111,138,138,145,145,2,0,53,53, + 76,76,2,0,53,54,76,77,2,0,6,6,12,16,1,0,18,19,2,0,20,20,177,177,2,0,21, + 22,172,172,1,0,175,176,2,0,88,88,150,150,2,0,68,68,84,84,1,0,188,189, 33,0,47,47,49,50,52,52,55,58,61,61,63,64,66,68,71,72,75,75,78,78,80,80, - 85,87,89,90,93,93,95,95,98,98,100,100,102,102,104,104,106,109,111,114, - 116,117,129,135,137,138,141,141,143,143,146,146,148,148,150,150,153,155, - 159,159,163,170,172,172,2,0,13,13,26,29,2,0,15,15,30,33,2,0,34,44,176, - 176,3672,0,392,1,0,0,0,2,412,1,0,0,0,4,450,1,0,0,0,6,452,1,0,0,0,8,478, - 1,0,0,0,10,526,1,0,0,0,12,528,1,0,0,0,14,558,1,0,0,0,16,588,1,0,0,0,18, - 608,1,0,0,0,20,614,1,0,0,0,22,670,1,0,0,0,24,672,1,0,0,0,26,682,1,0,0, - 0,28,696,1,0,0,0,30,700,1,0,0,0,32,704,1,0,0,0,34,713,1,0,0,0,36,719, - 1,0,0,0,38,739,1,0,0,0,40,741,1,0,0,0,42,753,1,0,0,0,44,796,1,0,0,0,46, - 810,1,0,0,0,48,854,1,0,0,0,50,856,1,0,0,0,52,862,1,0,0,0,54,924,1,0,0, - 0,56,932,1,0,0,0,58,950,1,0,0,0,60,968,1,0,0,0,62,1039,1,0,0,0,64,1082, - 1,0,0,0,66,1084,1,0,0,0,68,1104,1,0,0,0,70,1122,1,0,0,0,72,1140,1,0,0, - 0,74,1154,1,0,0,0,76,1165,1,0,0,0,78,1179,1,0,0,0,80,1187,1,0,0,0,82, - 1204,1,0,0,0,84,1221,1,0,0,0,86,1223,1,0,0,0,88,1230,1,0,0,0,90,1243, - 1,0,0,0,92,1254,1,0,0,0,94,1274,1,0,0,0,96,1285,1,0,0,0,98,1287,1,0,0, - 0,100,1300,1,0,0,0,102,1304,1,0,0,0,104,1328,1,0,0,0,106,1330,1,0,0,0, - 108,1340,1,0,0,0,110,1355,1,0,0,0,112,1357,1,0,0,0,114,1371,1,0,0,0,116, - 1375,1,0,0,0,118,1384,1,0,0,0,120,1390,1,0,0,0,122,1398,1,0,0,0,124,1407, - 1,0,0,0,126,1416,1,0,0,0,128,1452,1,0,0,0,130,1456,1,0,0,0,132,1470,1, - 0,0,0,134,1474,1,0,0,0,136,1488,1,0,0,0,138,1499,1,0,0,0,140,1515,1,0, - 0,0,142,1529,1,0,0,0,144,1543,1,0,0,0,146,1565,1,0,0,0,148,1593,1,0,0, - 0,150,1602,1,0,0,0,152,1609,1,0,0,0,154,1617,1,0,0,0,156,1619,1,0,0,0, - 158,1624,1,0,0,0,160,1639,1,0,0,0,162,1645,1,0,0,0,164,1647,1,0,0,0,166, - 1659,1,0,0,0,168,1670,1,0,0,0,170,1674,1,0,0,0,172,1678,1,0,0,0,174,1701, - 1,0,0,0,176,1715,1,0,0,0,178,1719,1,0,0,0,180,1756,1,0,0,0,182,1762,1, - 0,0,0,184,1774,1,0,0,0,186,1792,1,0,0,0,188,1798,1,0,0,0,190,1800,1,0, - 0,0,192,1850,1,0,0,0,194,1854,1,0,0,0,196,1868,1,0,0,0,198,1887,1,0,0, - 0,200,1902,1,0,0,0,202,1918,1,0,0,0,204,1939,1,0,0,0,206,1949,1,0,0,0, - 208,1955,1,0,0,0,210,1977,1,0,0,0,212,2011,1,0,0,0,214,2013,1,0,0,0,216, - 2025,1,0,0,0,218,2045,1,0,0,0,220,2053,1,0,0,0,222,2060,1,0,0,0,224,2104, - 1,0,0,0,226,2113,1,0,0,0,228,2115,1,0,0,0,230,2130,1,0,0,0,232,2134,1, - 0,0,0,234,2138,1,0,0,0,236,2145,1,0,0,0,238,2149,1,0,0,0,240,2174,1,0, - 0,0,242,2176,1,0,0,0,244,2192,1,0,0,0,246,2194,1,0,0,0,248,2218,1,0,0, - 0,250,2268,1,0,0,0,252,2270,1,0,0,0,254,2300,1,0,0,0,256,2341,1,0,0,0, - 258,2362,1,0,0,0,260,2386,1,0,0,0,262,2429,1,0,0,0,264,2445,1,0,0,0,266, - 2447,1,0,0,0,268,2496,1,0,0,0,270,2508,1,0,0,0,272,2510,1,0,0,0,274,2512, - 1,0,0,0,276,2517,1,0,0,0,278,2519,1,0,0,0,280,2521,1,0,0,0,282,2531,1, - 0,0,0,284,2541,1,0,0,0,286,2557,1,0,0,0,288,2610,1,0,0,0,290,2612,1,0, - 0,0,292,2614,1,0,0,0,294,2628,1,0,0,0,296,2642,1,0,0,0,298,2657,1,0,0, - 0,300,2659,1,0,0,0,302,2674,1,0,0,0,304,2676,1,0,0,0,306,2691,1,0,0,0, - 308,2693,1,0,0,0,310,2707,1,0,0,0,312,2736,1,0,0,0,314,2749,1,0,0,0,316, - 2757,1,0,0,0,318,2771,1,0,0,0,320,2779,1,0,0,0,322,2789,1,0,0,0,324,2808, - 1,0,0,0,326,2866,1,0,0,0,328,2868,1,0,0,0,330,2872,1,0,0,0,332,2884,1, - 0,0,0,334,2886,1,0,0,0,336,2888,1,0,0,0,338,2909,1,0,0,0,340,2916,1,0, - 0,0,342,2941,1,0,0,0,344,2952,1,0,0,0,346,3039,1,0,0,0,348,3041,1,0,0, - 0,350,3056,1,0,0,0,352,3058,1,0,0,0,354,3095,1,0,0,0,356,3097,1,0,0,0, - 358,3106,1,0,0,0,360,3136,1,0,0,0,362,3166,1,0,0,0,364,3183,1,0,0,0,366, - 3197,1,0,0,0,368,3201,1,0,0,0,370,3203,1,0,0,0,372,3208,1,0,0,0,374,3214, - 1,0,0,0,376,3216,1,0,0,0,378,3218,1,0,0,0,380,3220,1,0,0,0,382,3230,1, - 0,0,0,384,3232,1,0,0,0,386,3234,1,0,0,0,388,3236,1,0,0,0,390,3238,1,0, - 0,0,392,403,3,2,1,0,393,395,5,193,0,0,394,393,1,0,0,0,394,395,1,0,0,0, - 395,396,1,0,0,0,396,398,5,1,0,0,397,399,5,193,0,0,398,397,1,0,0,0,398, - 399,1,0,0,0,399,400,1,0,0,0,400,402,3,2,1,0,401,394,1,0,0,0,402,405,1, - 0,0,0,403,401,1,0,0,0,403,404,1,0,0,0,404,407,1,0,0,0,405,403,1,0,0,0, - 406,408,5,193,0,0,407,406,1,0,0,0,407,408,1,0,0,0,408,409,1,0,0,0,409, - 410,5,0,0,1,410,1,1,0,0,0,411,413,3,154,77,0,412,411,1,0,0,0,412,413, - 1,0,0,0,413,415,1,0,0,0,414,416,5,193,0,0,415,414,1,0,0,0,415,416,1,0, - 0,0,416,417,1,0,0,0,417,422,3,4,2,0,418,420,5,193,0,0,419,418,1,0,0,0, - 419,420,1,0,0,0,420,421,1,0,0,0,421,423,5,1,0,0,422,419,1,0,0,0,422,423, - 1,0,0,0,423,3,1,0,0,0,424,451,3,172,86,0,425,451,3,36,18,0,426,451,3, - 88,44,0,427,451,3,90,45,0,428,451,3,52,26,0,429,451,3,60,30,0,430,451, - 3,62,31,0,431,451,3,80,40,0,432,451,3,82,41,0,433,451,3,104,52,0,434, - 451,3,108,54,0,435,451,3,6,3,0,436,451,3,12,6,0,437,451,3,14,7,0,438, - 451,3,38,19,0,439,451,3,42,21,0,440,451,3,40,20,0,441,451,3,160,80,0, - 442,451,3,162,81,0,443,451,3,16,8,0,444,451,3,18,9,0,445,451,3,20,10, - 0,446,451,3,28,14,0,447,451,3,30,15,0,448,451,3,32,16,0,449,451,3,34, - 17,0,450,424,1,0,0,0,450,425,1,0,0,0,450,426,1,0,0,0,450,427,1,0,0,0, - 450,428,1,0,0,0,450,429,1,0,0,0,450,430,1,0,0,0,450,431,1,0,0,0,450,432, - 1,0,0,0,450,433,1,0,0,0,450,434,1,0,0,0,450,435,1,0,0,0,450,436,1,0,0, - 0,450,437,1,0,0,0,450,438,1,0,0,0,450,439,1,0,0,0,450,440,1,0,0,0,450, - 441,1,0,0,0,450,442,1,0,0,0,450,443,1,0,0,0,450,444,1,0,0,0,450,445,1, - 0,0,0,450,446,1,0,0,0,450,447,1,0,0,0,450,448,1,0,0,0,450,449,1,0,0,0, - 451,5,1,0,0,0,452,453,5,67,0,0,453,454,5,193,0,0,454,456,3,380,190,0, - 455,457,3,8,4,0,456,455,1,0,0,0,456,457,1,0,0,0,457,458,1,0,0,0,458,459, - 5,193,0,0,459,460,5,89,0,0,460,461,5,193,0,0,461,475,3,10,5,0,462,464, - 5,193,0,0,463,462,1,0,0,0,463,464,1,0,0,0,464,465,1,0,0,0,465,467,5,2, - 0,0,466,468,5,193,0,0,467,466,1,0,0,0,467,468,1,0,0,0,468,469,1,0,0,0, - 469,471,3,26,13,0,470,472,5,193,0,0,471,470,1,0,0,0,471,472,1,0,0,0,472, - 473,1,0,0,0,473,474,5,3,0,0,474,476,1,0,0,0,475,463,1,0,0,0,475,476,1, - 0,0,0,476,7,1,0,0,0,477,479,5,193,0,0,478,477,1,0,0,0,478,479,1,0,0,0, - 479,480,1,0,0,0,480,482,5,2,0,0,481,483,5,193,0,0,482,481,1,0,0,0,482, - 483,1,0,0,0,483,501,1,0,0,0,484,495,3,380,190,0,485,487,5,193,0,0,486, - 485,1,0,0,0,486,487,1,0,0,0,487,488,1,0,0,0,488,490,5,4,0,0,489,491,5, - 193,0,0,490,489,1,0,0,0,490,491,1,0,0,0,491,492,1,0,0,0,492,494,3,380, - 190,0,493,486,1,0,0,0,494,497,1,0,0,0,495,493,1,0,0,0,495,496,1,0,0,0, - 496,499,1,0,0,0,497,495,1,0,0,0,498,500,5,193,0,0,499,498,1,0,0,0,499, - 500,1,0,0,0,500,502,1,0,0,0,501,484,1,0,0,0,501,502,1,0,0,0,502,503,1, - 0,0,0,503,504,5,3,0,0,504,9,1,0,0,0,505,527,3,48,24,0,506,508,5,2,0,0, - 507,509,5,193,0,0,508,507,1,0,0,0,508,509,1,0,0,0,509,510,1,0,0,0,510, - 512,3,172,86,0,511,513,5,193,0,0,512,511,1,0,0,0,512,513,1,0,0,0,513, - 514,1,0,0,0,514,515,5,3,0,0,515,527,1,0,0,0,516,527,3,370,185,0,517,527, - 3,366,183,0,518,519,3,366,183,0,519,521,5,5,0,0,520,522,5,193,0,0,521, - 520,1,0,0,0,521,522,1,0,0,0,522,523,1,0,0,0,523,524,3,380,190,0,524,527, - 1,0,0,0,525,527,3,346,173,0,526,505,1,0,0,0,526,506,1,0,0,0,526,516,1, - 0,0,0,526,517,1,0,0,0,526,518,1,0,0,0,526,525,1,0,0,0,527,11,1,0,0,0, - 528,529,5,67,0,0,529,530,5,193,0,0,530,531,3,380,190,0,531,532,5,193, - 0,0,532,533,5,89,0,0,533,534,5,193,0,0,534,536,5,2,0,0,535,537,5,193, - 0,0,536,535,1,0,0,0,536,537,1,0,0,0,537,538,1,0,0,0,538,549,5,178,0,0, - 539,541,5,193,0,0,540,539,1,0,0,0,540,541,1,0,0,0,541,542,1,0,0,0,542, - 544,5,4,0,0,543,545,5,193,0,0,544,543,1,0,0,0,544,545,1,0,0,0,545,546, - 1,0,0,0,546,548,5,178,0,0,547,540,1,0,0,0,548,551,1,0,0,0,549,547,1,0, - 0,0,549,550,1,0,0,0,550,552,1,0,0,0,551,549,1,0,0,0,552,553,5,3,0,0,553, - 554,5,193,0,0,554,555,5,57,0,0,555,556,5,193,0,0,556,557,5,62,0,0,557, - 13,1,0,0,0,558,559,5,67,0,0,559,560,5,193,0,0,560,562,5,2,0,0,561,563, - 5,193,0,0,562,561,1,0,0,0,562,563,1,0,0,0,563,564,1,0,0,0,564,566,3,172, - 86,0,565,567,5,193,0,0,566,565,1,0,0,0,566,567,1,0,0,0,567,568,1,0,0, - 0,568,569,5,3,0,0,569,570,5,193,0,0,570,571,5,146,0,0,571,572,5,193,0, - 0,572,586,5,178,0,0,573,575,5,193,0,0,574,573,1,0,0,0,574,575,1,0,0,0, - 575,576,1,0,0,0,576,578,5,2,0,0,577,579,5,193,0,0,578,577,1,0,0,0,578, - 579,1,0,0,0,579,580,1,0,0,0,580,582,3,26,13,0,581,583,5,193,0,0,582,581, - 1,0,0,0,582,583,1,0,0,0,583,584,1,0,0,0,584,585,5,3,0,0,585,587,1,0,0, - 0,586,574,1,0,0,0,586,587,1,0,0,0,587,15,1,0,0,0,588,589,5,86,0,0,589, - 590,5,193,0,0,590,591,5,72,0,0,591,592,5,193,0,0,592,606,5,178,0,0,593, - 595,5,193,0,0,594,593,1,0,0,0,594,595,1,0,0,0,595,596,1,0,0,0,596,598, - 5,2,0,0,597,599,5,193,0,0,598,597,1,0,0,0,598,599,1,0,0,0,599,600,1,0, - 0,0,600,602,3,26,13,0,601,603,5,193,0,0,602,601,1,0,0,0,602,603,1,0,0, - 0,603,604,1,0,0,0,604,605,5,3,0,0,605,607,1,0,0,0,606,594,1,0,0,0,606, - 607,1,0,0,0,607,17,1,0,0,0,608,609,5,98,0,0,609,610,5,193,0,0,610,611, - 5,72,0,0,611,612,5,193,0,0,612,613,5,178,0,0,613,19,1,0,0,0,614,615,5, - 55,0,0,615,616,5,193,0,0,616,621,5,178,0,0,617,618,5,193,0,0,618,619, - 5,52,0,0,619,620,5,193,0,0,620,622,3,380,190,0,621,617,1,0,0,0,621,622, - 1,0,0,0,622,623,1,0,0,0,623,624,5,193,0,0,624,626,5,2,0,0,625,627,5,193, - 0,0,626,625,1,0,0,0,626,627,1,0,0,0,627,628,1,0,0,0,628,629,5,73,0,0, - 629,630,5,193,0,0,630,639,3,382,191,0,631,633,5,193,0,0,632,631,1,0,0, - 0,632,633,1,0,0,0,633,634,1,0,0,0,634,636,5,4,0,0,635,637,5,193,0,0,636, - 635,1,0,0,0,636,637,1,0,0,0,637,638,1,0,0,0,638,640,3,26,13,0,639,632, - 1,0,0,0,639,640,1,0,0,0,640,642,1,0,0,0,641,643,5,193,0,0,642,641,1,0, - 0,0,642,643,1,0,0,0,643,644,1,0,0,0,644,645,5,3,0,0,645,21,1,0,0,0,646, - 660,3,382,191,0,647,649,5,193,0,0,648,647,1,0,0,0,648,649,1,0,0,0,649, - 650,1,0,0,0,650,652,5,6,0,0,651,653,5,193,0,0,652,651,1,0,0,0,652,653, - 1,0,0,0,653,661,1,0,0,0,654,656,5,193,0,0,655,654,1,0,0,0,656,659,1,0, - 0,0,657,655,1,0,0,0,657,658,1,0,0,0,658,661,1,0,0,0,659,657,1,0,0,0,660, - 648,1,0,0,0,660,657,1,0,0,0,661,662,1,0,0,0,662,667,3,332,166,0,663,665, - 5,193,0,0,664,663,1,0,0,0,664,665,1,0,0,0,665,666,1,0,0,0,666,668,3,24, - 12,0,667,664,1,0,0,0,667,668,1,0,0,0,668,671,1,0,0,0,669,671,3,382,191, - 0,670,646,1,0,0,0,670,669,1,0,0,0,671,23,1,0,0,0,672,674,5,2,0,0,673, - 675,5,193,0,0,674,673,1,0,0,0,674,675,1,0,0,0,675,676,1,0,0,0,676,678, - 3,382,191,0,677,679,5,193,0,0,678,677,1,0,0,0,678,679,1,0,0,0,679,680, - 1,0,0,0,680,681,5,3,0,0,681,25,1,0,0,0,682,693,3,22,11,0,683,685,5,193, - 0,0,684,683,1,0,0,0,684,685,1,0,0,0,685,686,1,0,0,0,686,688,5,4,0,0,687, - 689,5,193,0,0,688,687,1,0,0,0,688,689,1,0,0,0,689,690,1,0,0,0,690,692, - 3,22,11,0,691,684,1,0,0,0,692,695,1,0,0,0,693,691,1,0,0,0,693,694,1,0, - 0,0,694,27,1,0,0,0,695,693,1,0,0,0,696,697,5,78,0,0,697,698,5,193,0,0, - 698,699,3,380,190,0,699,29,1,0,0,0,700,701,5,155,0,0,701,702,5,193,0, - 0,702,703,3,380,190,0,703,31,1,0,0,0,704,705,5,69,0,0,705,706,5,193,0, - 0,706,707,5,93,0,0,707,708,5,193,0,0,708,711,3,380,190,0,709,710,5,193, - 0,0,710,712,5,46,0,0,711,709,1,0,0,0,711,712,1,0,0,0,712,33,1,0,0,0,713, - 714,5,155,0,0,714,715,5,193,0,0,715,716,5,93,0,0,716,717,5,193,0,0,717, - 718,3,380,190,0,718,35,1,0,0,0,719,722,5,50,0,0,720,721,5,193,0,0,721, - 723,3,380,190,0,722,720,1,0,0,0,722,723,1,0,0,0,723,37,1,0,0,0,724,725, - 5,58,0,0,725,726,5,193,0,0,726,728,3,382,191,0,727,729,5,193,0,0,728, - 727,1,0,0,0,728,729,1,0,0,0,729,730,1,0,0,0,730,732,5,6,0,0,731,733,5, - 193,0,0,732,731,1,0,0,0,732,733,1,0,0,0,733,734,1,0,0,0,734,735,3,278, - 139,0,735,740,1,0,0,0,736,737,5,58,0,0,737,738,5,193,0,0,738,740,3,346, - 173,0,739,724,1,0,0,0,739,736,1,0,0,0,740,39,1,0,0,0,741,742,5,63,0,0, - 742,743,5,193,0,0,743,744,5,121,0,0,744,745,5,193,0,0,745,746,5,144,0, - 0,746,747,5,193,0,0,747,748,3,380,190,0,748,749,5,193,0,0,749,750,5,104, - 0,0,750,751,5,193,0,0,751,752,5,178,0,0,752,41,1,0,0,0,753,754,5,69,0, - 0,754,755,5,193,0,0,755,756,5,110,0,0,756,757,5,193,0,0,757,759,3,348, - 174,0,758,760,5,193,0,0,759,758,1,0,0,0,759,760,1,0,0,0,760,761,1,0,0, - 0,761,763,5,2,0,0,762,764,5,193,0,0,763,762,1,0,0,0,763,764,1,0,0,0,764, - 766,1,0,0,0,765,767,3,44,22,0,766,765,1,0,0,0,766,767,1,0,0,0,767,769, - 1,0,0,0,768,770,5,193,0,0,769,768,1,0,0,0,769,770,1,0,0,0,770,772,1,0, - 0,0,771,773,3,46,23,0,772,771,1,0,0,0,772,773,1,0,0,0,773,784,1,0,0,0, - 774,776,5,193,0,0,775,774,1,0,0,0,775,776,1,0,0,0,776,777,1,0,0,0,777, - 779,5,4,0,0,778,780,5,193,0,0,779,778,1,0,0,0,779,780,1,0,0,0,780,781, - 1,0,0,0,781,783,3,46,23,0,782,775,1,0,0,0,783,786,1,0,0,0,784,782,1,0, - 0,0,784,785,1,0,0,0,785,788,1,0,0,0,786,784,1,0,0,0,787,789,5,193,0,0, - 788,787,1,0,0,0,788,789,1,0,0,0,789,790,1,0,0,0,790,791,5,3,0,0,791,792, - 5,193,0,0,792,793,5,52,0,0,793,794,5,193,0,0,794,795,3,278,139,0,795, - 43,1,0,0,0,796,807,3,382,191,0,797,799,5,193,0,0,798,797,1,0,0,0,798, - 799,1,0,0,0,799,800,1,0,0,0,800,802,5,4,0,0,801,803,5,193,0,0,802,801, - 1,0,0,0,802,803,1,0,0,0,803,804,1,0,0,0,804,806,3,382,191,0,805,798,1, - 0,0,0,806,809,1,0,0,0,807,805,1,0,0,0,807,808,1,0,0,0,808,45,1,0,0,0, - 809,807,1,0,0,0,810,812,3,382,191,0,811,813,5,193,0,0,812,811,1,0,0,0, - 812,813,1,0,0,0,813,814,1,0,0,0,814,815,5,174,0,0,815,817,5,6,0,0,816, - 818,5,193,0,0,817,816,1,0,0,0,817,818,1,0,0,0,818,819,1,0,0,0,819,820, - 3,332,166,0,820,47,1,0,0,0,821,823,5,7,0,0,822,824,5,193,0,0,823,822, - 1,0,0,0,823,824,1,0,0,0,824,825,1,0,0,0,825,836,5,178,0,0,826,828,5,193, - 0,0,827,826,1,0,0,0,827,828,1,0,0,0,828,829,1,0,0,0,829,831,5,4,0,0,830, - 832,5,193,0,0,831,830,1,0,0,0,831,832,1,0,0,0,832,833,1,0,0,0,833,835, - 5,178,0,0,834,827,1,0,0,0,835,838,1,0,0,0,836,834,1,0,0,0,836,837,1,0, - 0,0,837,839,1,0,0,0,838,836,1,0,0,0,839,855,5,8,0,0,840,855,5,178,0,0, - 841,843,5,92,0,0,842,844,5,193,0,0,843,842,1,0,0,0,843,844,1,0,0,0,844, - 845,1,0,0,0,845,847,5,2,0,0,846,848,5,193,0,0,847,846,1,0,0,0,847,848, - 1,0,0,0,848,849,1,0,0,0,849,851,5,178,0,0,850,852,5,193,0,0,851,850,1, - 0,0,0,851,852,1,0,0,0,852,853,1,0,0,0,853,855,5,3,0,0,854,821,1,0,0,0, - 854,840,1,0,0,0,854,841,1,0,0,0,855,49,1,0,0,0,856,857,5,100,0,0,857, - 858,5,193,0,0,858,859,5,118,0,0,859,860,5,193,0,0,860,861,5,84,0,0,861, - 51,1,0,0,0,862,863,5,69,0,0,863,864,5,193,0,0,864,865,5,117,0,0,865,866, - 5,193,0,0,866,867,5,144,0,0,867,871,5,193,0,0,868,869,3,50,25,0,869,870, - 5,193,0,0,870,872,1,0,0,0,871,868,1,0,0,0,871,872,1,0,0,0,872,873,1,0, - 0,0,873,901,3,380,190,0,874,876,5,193,0,0,875,874,1,0,0,0,875,876,1,0, - 0,0,876,877,1,0,0,0,877,879,5,2,0,0,878,880,5,193,0,0,879,878,1,0,0,0, - 879,880,1,0,0,0,880,881,1,0,0,0,881,883,3,134,67,0,882,884,5,193,0,0, - 883,882,1,0,0,0,883,884,1,0,0,0,884,890,1,0,0,0,885,887,5,4,0,0,886,888, - 5,193,0,0,887,886,1,0,0,0,887,888,1,0,0,0,888,889,1,0,0,0,889,891,3,138, - 69,0,890,885,1,0,0,0,890,891,1,0,0,0,891,893,1,0,0,0,892,894,5,193,0, - 0,893,892,1,0,0,0,893,894,1,0,0,0,894,895,1,0,0,0,895,896,5,3,0,0,896, - 902,1,0,0,0,897,898,5,193,0,0,898,899,5,52,0,0,899,900,5,193,0,0,900, - 902,3,172,86,0,901,875,1,0,0,0,901,897,1,0,0,0,902,918,1,0,0,0,903,904, - 5,193,0,0,904,906,5,158,0,0,905,907,5,193,0,0,906,905,1,0,0,0,906,907, - 1,0,0,0,907,908,1,0,0,0,908,910,5,2,0,0,909,911,5,193,0,0,910,909,1,0, - 0,0,910,911,1,0,0,0,911,912,1,0,0,0,912,914,3,26,13,0,913,915,5,193,0, - 0,914,913,1,0,0,0,914,915,1,0,0,0,915,916,1,0,0,0,916,917,5,3,0,0,917, - 919,1,0,0,0,918,903,1,0,0,0,918,919,1,0,0,0,919,922,1,0,0,0,920,921,5, - 193,0,0,921,923,3,54,27,0,922,920,1,0,0,0,922,923,1,0,0,0,923,53,1,0, - 0,0,924,925,5,165,0,0,925,926,5,193,0,0,926,927,5,57,0,0,927,930,5,193, - 0,0,928,931,3,58,29,0,929,931,3,56,28,0,930,928,1,0,0,0,930,929,1,0,0, - 0,931,55,1,0,0,0,932,934,5,95,0,0,933,935,5,193,0,0,934,933,1,0,0,0,934, - 935,1,0,0,0,935,936,1,0,0,0,936,938,5,2,0,0,937,939,5,193,0,0,938,937, - 1,0,0,0,938,939,1,0,0,0,939,940,1,0,0,0,940,942,3,374,187,0,941,943,5, - 193,0,0,942,941,1,0,0,0,942,943,1,0,0,0,943,944,1,0,0,0,944,945,5,3,0, - 0,945,946,5,193,0,0,946,947,5,166,0,0,947,948,5,193,0,0,948,949,3,376, - 188,0,949,57,1,0,0,0,950,952,5,130,0,0,951,953,5,193,0,0,952,951,1,0, - 0,0,952,953,1,0,0,0,953,954,1,0,0,0,954,956,5,2,0,0,955,957,5,193,0,0, - 956,955,1,0,0,0,956,957,1,0,0,0,957,958,1,0,0,0,958,960,3,374,187,0,959, - 961,5,193,0,0,960,959,1,0,0,0,960,961,1,0,0,0,961,962,1,0,0,0,962,963, - 5,3,0,0,963,964,5,193,0,0,964,965,5,166,0,0,965,966,5,193,0,0,966,967, - 3,376,188,0,967,59,1,0,0,0,968,969,5,69,0,0,969,970,5,193,0,0,970,971, - 5,132,0,0,971,972,5,193,0,0,972,975,5,144,0,0,973,974,5,193,0,0,974,976, - 5,94,0,0,975,973,1,0,0,0,975,976,1,0,0,0,976,979,1,0,0,0,977,978,5,193, - 0,0,978,980,3,50,25,0,979,977,1,0,0,0,979,980,1,0,0,0,980,981,1,0,0,0, - 981,982,5,193,0,0,982,984,3,380,190,0,983,985,5,193,0,0,984,983,1,0,0, - 0,984,985,1,0,0,0,985,986,1,0,0,0,986,988,5,2,0,0,987,989,5,193,0,0,988, - 987,1,0,0,0,988,989,1,0,0,0,989,990,1,0,0,0,990,992,3,72,36,0,991,993, - 5,193,0,0,992,991,1,0,0,0,992,993,1,0,0,0,993,1020,1,0,0,0,994,996,5, - 4,0,0,995,997,5,193,0,0,996,995,1,0,0,0,996,997,1,0,0,0,997,998,1,0,0, - 0,998,1000,3,134,67,0,999,1001,5,193,0,0,1000,999,1,0,0,0,1000,1001,1, - 0,0,0,1001,1003,1,0,0,0,1002,994,1,0,0,0,1002,1003,1,0,0,0,1003,1012, - 1,0,0,0,1004,1006,5,4,0,0,1005,1007,5,193,0,0,1006,1005,1,0,0,0,1006, - 1007,1,0,0,0,1007,1008,1,0,0,0,1008,1010,3,382,191,0,1009,1011,5,193, - 0,0,1010,1009,1,0,0,0,1010,1011,1,0,0,0,1011,1013,1,0,0,0,1012,1004,1, - 0,0,0,1012,1013,1,0,0,0,1013,1014,1,0,0,0,1014,1021,5,3,0,0,1015,1016, - 5,3,0,0,1016,1017,5,193,0,0,1017,1018,5,52,0,0,1018,1019,5,193,0,0,1019, - 1021,3,172,86,0,1020,1002,1,0,0,0,1020,1015,1,0,0,0,1021,1037,1,0,0,0, - 1022,1023,5,193,0,0,1023,1025,5,158,0,0,1024,1026,5,193,0,0,1025,1024, - 1,0,0,0,1025,1026,1,0,0,0,1026,1027,1,0,0,0,1027,1029,5,2,0,0,1028,1030, - 5,193,0,0,1029,1028,1,0,0,0,1029,1030,1,0,0,0,1030,1031,1,0,0,0,1031, - 1033,3,26,13,0,1032,1034,5,193,0,0,1033,1032,1,0,0,0,1033,1034,1,0,0, - 0,1034,1035,1,0,0,0,1035,1036,5,3,0,0,1036,1038,1,0,0,0,1037,1022,1,0, - 0,0,1037,1038,1,0,0,0,1038,61,1,0,0,0,1039,1042,5,69,0,0,1040,1041,5, - 193,0,0,1041,1043,3,382,191,0,1042,1040,1,0,0,0,1042,1043,1,0,0,0,1043, - 1044,1,0,0,0,1044,1045,5,193,0,0,1045,1048,5,99,0,0,1046,1047,5,193,0, - 0,1047,1049,3,380,190,0,1048,1046,1,0,0,0,1048,1049,1,0,0,0,1049,1052, - 1,0,0,0,1050,1051,5,193,0,0,1051,1053,3,50,25,0,1052,1050,1,0,0,0,1052, - 1053,1,0,0,0,1053,1054,1,0,0,0,1054,1055,5,193,0,0,1055,1056,5,91,0,0, - 1056,1057,5,193,0,0,1057,1058,3,64,32,0,1058,1059,5,193,0,0,1059,1060, - 5,121,0,0,1060,1061,5,193,0,0,1061,1078,3,70,35,0,1062,1063,5,193,0,0, - 1063,1065,5,123,0,0,1064,1066,5,193,0,0,1065,1064,1,0,0,0,1065,1066,1, - 0,0,0,1066,1067,1,0,0,0,1067,1069,5,9,0,0,1068,1070,5,193,0,0,1069,1068, - 1,0,0,0,1069,1070,1,0,0,0,1070,1072,1,0,0,0,1071,1073,3,26,13,0,1072, - 1071,1,0,0,0,1072,1073,1,0,0,0,1073,1075,1,0,0,0,1074,1076,5,193,0,0, - 1075,1074,1,0,0,0,1075,1076,1,0,0,0,1076,1077,1,0,0,0,1077,1079,5,10, - 0,0,1078,1062,1,0,0,0,1078,1079,1,0,0,0,1079,63,1,0,0,0,1080,1083,3,66, - 33,0,1081,1083,3,68,34,0,1082,1080,1,0,0,0,1082,1081,1,0,0,0,1083,65, - 1,0,0,0,1084,1086,5,2,0,0,1085,1087,5,193,0,0,1086,1085,1,0,0,0,1086, - 1087,1,0,0,0,1087,1089,1,0,0,0,1088,1090,3,366,183,0,1089,1088,1,0,0, - 0,1089,1090,1,0,0,0,1090,1092,1,0,0,0,1091,1093,5,193,0,0,1092,1091,1, - 0,0,0,1092,1093,1,0,0,0,1093,1094,1,0,0,0,1094,1096,5,174,0,0,1095,1097, - 5,193,0,0,1096,1095,1,0,0,0,1096,1097,1,0,0,0,1097,1098,1,0,0,0,1098, - 1100,3,274,137,0,1099,1101,5,193,0,0,1100,1099,1,0,0,0,1100,1101,1,0, - 0,0,1101,1102,1,0,0,0,1102,1103,5,3,0,0,1103,67,1,0,0,0,1104,1106,5,2, - 0,0,1105,1107,5,193,0,0,1106,1105,1,0,0,0,1106,1107,1,0,0,0,1107,1108, - 1,0,0,0,1108,1110,5,3,0,0,1109,1111,5,193,0,0,1110,1109,1,0,0,0,1110, - 1111,1,0,0,0,1111,1112,1,0,0,0,1112,1114,3,250,125,0,1113,1115,5,193, - 0,0,1114,1113,1,0,0,0,1114,1115,1,0,0,0,1115,1116,1,0,0,0,1116,1118,5, - 2,0,0,1117,1119,5,193,0,0,1118,1117,1,0,0,0,1118,1119,1,0,0,0,1119,1120, - 1,0,0,0,1120,1121,5,3,0,0,1121,69,1,0,0,0,1122,1124,5,2,0,0,1123,1125, - 5,193,0,0,1124,1123,1,0,0,0,1124,1125,1,0,0,0,1125,1126,1,0,0,0,1126, - 1128,3,366,183,0,1127,1129,5,193,0,0,1128,1127,1,0,0,0,1128,1129,1,0, - 0,0,1129,1130,1,0,0,0,1130,1132,5,5,0,0,1131,1133,5,193,0,0,1132,1131, - 1,0,0,0,1132,1133,1,0,0,0,1133,1134,1,0,0,0,1134,1136,3,374,187,0,1135, - 1137,5,193,0,0,1136,1135,1,0,0,0,1136,1137,1,0,0,0,1137,1138,1,0,0,0, - 1138,1139,5,3,0,0,1139,71,1,0,0,0,1140,1151,3,74,37,0,1141,1143,5,193, - 0,0,1142,1141,1,0,0,0,1142,1143,1,0,0,0,1143,1144,1,0,0,0,1144,1146,5, - 4,0,0,1145,1147,5,193,0,0,1146,1145,1,0,0,0,1146,1147,1,0,0,0,1147,1148, - 1,0,0,0,1148,1150,3,74,37,0,1149,1142,1,0,0,0,1150,1153,1,0,0,0,1151, - 1149,1,0,0,0,1151,1152,1,0,0,0,1152,73,1,0,0,0,1153,1151,1,0,0,0,1154, - 1155,5,89,0,0,1155,1156,5,193,0,0,1156,1157,3,380,190,0,1157,1158,5,193, - 0,0,1158,1159,5,146,0,0,1159,1160,5,193,0,0,1160,1163,3,380,190,0,1161, - 1162,5,193,0,0,1162,1164,3,382,191,0,1163,1161,1,0,0,0,1163,1164,1,0, - 0,0,1164,75,1,0,0,0,1165,1176,3,78,39,0,1166,1168,5,193,0,0,1167,1166, - 1,0,0,0,1167,1168,1,0,0,0,1168,1169,1,0,0,0,1169,1171,5,4,0,0,1170,1172, - 5,193,0,0,1171,1170,1,0,0,0,1171,1172,1,0,0,0,1172,1173,1,0,0,0,1173, - 1175,3,78,39,0,1174,1167,1,0,0,0,1175,1178,1,0,0,0,1176,1174,1,0,0,0, - 1176,1177,1,0,0,0,1177,77,1,0,0,0,1178,1176,1,0,0,0,1179,1180,5,89,0, - 0,1180,1181,5,193,0,0,1181,1182,3,380,190,0,1182,1183,5,193,0,0,1183, - 1184,5,146,0,0,1184,1185,5,193,0,0,1185,1186,3,380,190,0,1186,79,1,0, - 0,0,1187,1188,5,69,0,0,1188,1189,5,193,0,0,1189,1190,5,137,0,0,1190,1194, - 5,193,0,0,1191,1192,3,50,25,0,1192,1193,5,193,0,0,1193,1195,1,0,0,0,1194, - 1191,1,0,0,0,1194,1195,1,0,0,0,1195,1196,1,0,0,0,1196,1201,3,380,190, - 0,1197,1198,5,193,0,0,1198,1200,3,84,42,0,1199,1197,1,0,0,0,1200,1203, - 1,0,0,0,1201,1199,1,0,0,0,1201,1202,1,0,0,0,1202,81,1,0,0,0,1203,1201, - 1,0,0,0,1204,1205,5,69,0,0,1205,1206,5,193,0,0,1206,1207,5,150,0,0,1207, - 1208,5,193,0,0,1208,1209,3,380,190,0,1209,1210,5,193,0,0,1210,1211,5, - 52,0,0,1211,1212,5,193,0,0,1212,1214,3,148,74,0,1213,1215,5,193,0,0,1214, - 1213,1,0,0,0,1214,1215,1,0,0,0,1215,83,1,0,0,0,1216,1222,3,92,46,0,1217, - 1222,3,94,47,0,1218,1222,3,96,48,0,1219,1222,3,98,49,0,1220,1222,3,100, - 50,0,1221,1216,1,0,0,0,1221,1217,1,0,0,0,1221,1218,1,0,0,0,1221,1219, - 1,0,0,0,1221,1220,1,0,0,0,1222,85,1,0,0,0,1223,1224,5,193,0,0,1224,1225, - 5,158,0,0,1225,1226,5,193,0,0,1226,1227,5,167,0,0,1227,1228,5,193,0,0, - 1228,1229,5,178,0,0,1229,87,1,0,0,0,1230,1231,5,69,0,0,1231,1232,5,193, - 0,0,1232,1233,5,164,0,0,1233,1237,5,193,0,0,1234,1235,3,50,25,0,1235, - 1236,5,193,0,0,1236,1238,1,0,0,0,1237,1234,1,0,0,0,1237,1238,1,0,0,0, - 1238,1239,1,0,0,0,1239,1241,3,366,183,0,1240,1242,3,86,43,0,1241,1240, - 1,0,0,0,1241,1242,1,0,0,0,1242,89,1,0,0,0,1243,1244,5,69,0,0,1244,1245, - 5,193,0,0,1245,1246,5,168,0,0,1246,1250,5,193,0,0,1247,1248,3,50,25,0, - 1248,1249,5,193,0,0,1249,1251,1,0,0,0,1250,1247,1,0,0,0,1250,1251,1,0, - 0,0,1251,1252,1,0,0,0,1252,1253,3,366,183,0,1253,91,1,0,0,0,1254,1255, - 5,102,0,0,1255,1258,5,193,0,0,1256,1257,5,57,0,0,1257,1259,5,193,0,0, - 1258,1256,1,0,0,0,1258,1259,1,0,0,0,1259,1261,1,0,0,0,1260,1262,5,176, - 0,0,1261,1260,1,0,0,0,1261,1262,1,0,0,0,1262,1263,1,0,0,0,1263,1264,3, - 376,188,0,1264,93,1,0,0,0,1265,1266,5,116,0,0,1266,1267,5,193,0,0,1267, - 1275,5,114,0,0,1268,1269,5,114,0,0,1269,1271,5,193,0,0,1270,1272,5,176, - 0,0,1271,1270,1,0,0,0,1271,1272,1,0,0,0,1272,1273,1,0,0,0,1273,1275,3, - 376,188,0,1274,1265,1,0,0,0,1274,1268,1,0,0,0,1275,95,1,0,0,0,1276,1277, - 5,116,0,0,1277,1278,5,193,0,0,1278,1286,5,112,0,0,1279,1280,5,112,0,0, - 1280,1282,5,193,0,0,1281,1283,5,176,0,0,1282,1281,1,0,0,0,1282,1283,1, - 0,0,0,1283,1284,1,0,0,0,1284,1286,3,376,188,0,1285,1276,1,0,0,0,1285, - 1279,1,0,0,0,1286,97,1,0,0,0,1287,1288,5,141,0,0,1288,1291,5,193,0,0, - 1289,1290,5,158,0,0,1290,1292,5,193,0,0,1291,1289,1,0,0,0,1291,1292,1, - 0,0,0,1292,1294,1,0,0,0,1293,1295,5,176,0,0,1294,1293,1,0,0,0,1294,1295, - 1,0,0,0,1295,1296,1,0,0,0,1296,1297,3,376,188,0,1297,99,1,0,0,0,1298, - 1299,5,116,0,0,1299,1301,5,193,0,0,1300,1298,1,0,0,0,1300,1301,1,0,0, - 0,1301,1302,1,0,0,0,1302,1303,5,71,0,0,1303,101,1,0,0,0,1304,1305,5,100, - 0,0,1305,1306,5,193,0,0,1306,1307,5,84,0,0,1307,103,1,0,0,0,1308,1309, - 5,80,0,0,1309,1310,5,193,0,0,1310,1311,7,0,0,0,1311,1315,5,193,0,0,1312, - 1313,3,102,51,0,1313,1314,5,193,0,0,1314,1316,1,0,0,0,1315,1312,1,0,0, - 0,1315,1316,1,0,0,0,1316,1317,1,0,0,0,1317,1329,3,380,190,0,1318,1319, - 5,80,0,0,1319,1320,5,193,0,0,1320,1321,5,99,0,0,1321,1325,5,193,0,0,1322, - 1323,3,102,51,0,1323,1324,5,193,0,0,1324,1326,1,0,0,0,1325,1322,1,0,0, - 0,1325,1326,1,0,0,0,1326,1327,1,0,0,0,1327,1329,3,106,53,0,1328,1308, - 1,0,0,0,1328,1318,1,0,0,0,1329,105,1,0,0,0,1330,1332,3,380,190,0,1331, - 1333,5,193,0,0,1332,1331,1,0,0,0,1332,1333,1,0,0,0,1333,1334,1,0,0,0, - 1334,1336,5,5,0,0,1335,1337,5,193,0,0,1336,1335,1,0,0,0,1336,1337,1,0, - 0,0,1337,1338,1,0,0,0,1338,1339,3,380,190,0,1339,107,1,0,0,0,1340,1341, - 5,49,0,0,1341,1342,5,193,0,0,1342,1343,5,144,0,0,1343,1344,5,193,0,0, - 1344,1345,3,380,190,0,1345,1346,5,193,0,0,1346,1347,3,110,55,0,1347,109, - 1,0,0,0,1348,1356,3,112,56,0,1349,1356,3,116,58,0,1350,1356,3,118,59, - 0,1351,1356,3,120,60,0,1352,1356,3,122,61,0,1353,1356,3,124,62,0,1354, - 1356,3,126,63,0,1355,1348,1,0,0,0,1355,1349,1,0,0,0,1355,1350,1,0,0,0, - 1355,1351,1,0,0,0,1355,1352,1,0,0,0,1355,1353,1,0,0,0,1355,1354,1,0,0, - 0,1356,111,1,0,0,0,1357,1358,5,47,0,0,1358,1362,5,193,0,0,1359,1360,3, - 50,25,0,1360,1361,5,193,0,0,1361,1363,1,0,0,0,1362,1359,1,0,0,0,1362, - 1363,1,0,0,0,1363,1364,1,0,0,0,1364,1365,3,374,187,0,1365,1366,5,193, - 0,0,1366,1369,3,148,74,0,1367,1368,5,193,0,0,1368,1370,3,114,57,0,1369, - 1367,1,0,0,0,1369,1370,1,0,0,0,1370,113,1,0,0,0,1371,1372,5,74,0,0,1372, - 1373,5,193,0,0,1373,1374,3,278,139,0,1374,115,1,0,0,0,1375,1376,5,80, - 0,0,1376,1380,5,193,0,0,1377,1378,3,102,51,0,1378,1379,5,193,0,0,1379, - 1381,1,0,0,0,1380,1377,1,0,0,0,1380,1381,1,0,0,0,1381,1382,1,0,0,0,1382, - 1383,3,374,187,0,1383,117,1,0,0,0,1384,1385,5,133,0,0,1385,1386,5,193, - 0,0,1386,1387,5,146,0,0,1387,1388,5,193,0,0,1388,1389,3,380,190,0,1389, - 119,1,0,0,0,1390,1391,5,133,0,0,1391,1392,5,193,0,0,1392,1393,3,374,187, - 0,1393,1394,5,193,0,0,1394,1395,5,146,0,0,1395,1396,5,193,0,0,1396,1397, - 3,374,187,0,1397,121,1,0,0,0,1398,1399,5,47,0,0,1399,1403,5,193,0,0,1400, - 1401,3,50,25,0,1401,1402,5,193,0,0,1402,1404,1,0,0,0,1403,1400,1,0,0, - 0,1403,1404,1,0,0,0,1404,1405,1,0,0,0,1405,1406,3,78,39,0,1406,123,1, - 0,0,0,1407,1408,5,80,0,0,1408,1412,5,193,0,0,1409,1410,3,102,51,0,1410, - 1411,5,193,0,0,1411,1413,1,0,0,0,1412,1409,1,0,0,0,1412,1413,1,0,0,0, - 1413,1414,1,0,0,0,1414,1415,3,78,39,0,1415,125,1,0,0,0,1416,1417,5,138, - 0,0,1417,1418,5,193,0,0,1418,1419,5,139,0,0,1419,1420,5,193,0,0,1420, - 1422,5,57,0,0,1421,1423,5,193,0,0,1422,1421,1,0,0,0,1422,1423,1,0,0,0, - 1423,1424,1,0,0,0,1424,1426,5,2,0,0,1425,1427,5,193,0,0,1426,1425,1,0, - 0,0,1426,1427,1,0,0,0,1427,1428,1,0,0,0,1428,1439,3,128,64,0,1429,1431, - 5,193,0,0,1430,1429,1,0,0,0,1430,1431,1,0,0,0,1431,1432,1,0,0,0,1432, - 1434,5,4,0,0,1433,1435,5,193,0,0,1434,1433,1,0,0,0,1434,1435,1,0,0,0, - 1435,1436,1,0,0,0,1436,1438,3,128,64,0,1437,1430,1,0,0,0,1438,1441,1, - 0,0,0,1439,1437,1,0,0,0,1439,1440,1,0,0,0,1440,1443,1,0,0,0,1441,1439, - 1,0,0,0,1442,1444,5,193,0,0,1443,1442,1,0,0,0,1443,1444,1,0,0,0,1444, - 1445,1,0,0,0,1445,1447,5,3,0,0,1446,1448,5,193,0,0,1447,1446,1,0,0,0, - 1447,1448,1,0,0,0,1448,1450,1,0,0,0,1449,1451,5,70,0,0,1450,1449,1,0, - 0,0,1450,1451,1,0,0,0,1451,127,1,0,0,0,1452,1453,3,374,187,0,1453,1454, - 5,193,0,0,1454,1455,7,1,0,0,1455,129,1,0,0,0,1456,1467,3,132,66,0,1457, - 1459,5,193,0,0,1458,1457,1,0,0,0,1458,1459,1,0,0,0,1459,1460,1,0,0,0, - 1460,1462,5,4,0,0,1461,1463,5,193,0,0,1462,1461,1,0,0,0,1462,1463,1,0, - 0,0,1463,1464,1,0,0,0,1464,1466,3,132,66,0,1465,1458,1,0,0,0,1466,1469, - 1,0,0,0,1467,1465,1,0,0,0,1467,1468,1,0,0,0,1468,131,1,0,0,0,1469,1467, - 1,0,0,0,1470,1471,3,374,187,0,1471,1472,5,193,0,0,1472,1473,3,148,74, - 0,1473,133,1,0,0,0,1474,1485,3,136,68,0,1475,1477,5,193,0,0,1476,1475, - 1,0,0,0,1476,1477,1,0,0,0,1477,1478,1,0,0,0,1478,1480,5,4,0,0,1479,1481, - 5,193,0,0,1480,1479,1,0,0,0,1480,1481,1,0,0,0,1481,1482,1,0,0,0,1482, - 1484,3,136,68,0,1483,1476,1,0,0,0,1484,1487,1,0,0,0,1485,1483,1,0,0,0, - 1485,1486,1,0,0,0,1486,135,1,0,0,0,1487,1485,1,0,0,0,1488,1491,3,132, - 66,0,1489,1490,5,193,0,0,1490,1492,3,114,57,0,1491,1489,1,0,0,0,1491, - 1492,1,0,0,0,1492,1497,1,0,0,0,1493,1494,5,193,0,0,1494,1495,5,127,0, - 0,1495,1496,5,193,0,0,1496,1498,5,106,0,0,1497,1493,1,0,0,0,1497,1498, - 1,0,0,0,1498,137,1,0,0,0,1499,1500,5,127,0,0,1500,1501,5,193,0,0,1501, - 1503,5,106,0,0,1502,1504,5,193,0,0,1503,1502,1,0,0,0,1503,1504,1,0,0, - 0,1504,1505,1,0,0,0,1505,1507,5,2,0,0,1506,1508,5,193,0,0,1507,1506,1, - 0,0,0,1507,1508,1,0,0,0,1508,1509,1,0,0,0,1509,1511,3,374,187,0,1510, - 1512,5,193,0,0,1511,1510,1,0,0,0,1511,1512,1,0,0,0,1512,1513,1,0,0,0, - 1513,1514,5,3,0,0,1514,139,1,0,0,0,1515,1517,5,151,0,0,1516,1518,5,193, - 0,0,1517,1516,1,0,0,0,1517,1518,1,0,0,0,1518,1519,1,0,0,0,1519,1521,5, - 2,0,0,1520,1522,5,193,0,0,1521,1520,1,0,0,0,1521,1522,1,0,0,0,1522,1523, - 1,0,0,0,1523,1525,3,130,65,0,1524,1526,5,193,0,0,1525,1524,1,0,0,0,1525, - 1526,1,0,0,0,1526,1527,1,0,0,0,1527,1528,5,3,0,0,1528,141,1,0,0,0,1529, - 1531,5,143,0,0,1530,1532,5,193,0,0,1531,1530,1,0,0,0,1531,1532,1,0,0, - 0,1532,1533,1,0,0,0,1533,1535,5,2,0,0,1534,1536,5,193,0,0,1535,1534,1, - 0,0,0,1535,1536,1,0,0,0,1536,1537,1,0,0,0,1537,1539,3,130,65,0,1538,1540, - 5,193,0,0,1539,1538,1,0,0,0,1539,1540,1,0,0,0,1540,1541,1,0,0,0,1541, - 1542,5,3,0,0,1542,143,1,0,0,0,1543,1545,5,169,0,0,1544,1546,5,193,0,0, - 1545,1544,1,0,0,0,1545,1546,1,0,0,0,1546,1547,1,0,0,0,1547,1549,5,2,0, - 0,1548,1550,5,193,0,0,1549,1548,1,0,0,0,1549,1550,1,0,0,0,1550,1551,1, - 0,0,0,1551,1553,3,148,74,0,1552,1554,5,193,0,0,1553,1552,1,0,0,0,1553, - 1554,1,0,0,0,1554,1555,1,0,0,0,1555,1557,5,4,0,0,1556,1558,5,193,0,0, - 1557,1556,1,0,0,0,1557,1558,1,0,0,0,1558,1559,1,0,0,0,1559,1561,3,148, - 74,0,1560,1562,5,193,0,0,1561,1560,1,0,0,0,1561,1562,1,0,0,0,1562,1563, - 1,0,0,0,1563,1564,5,3,0,0,1564,145,1,0,0,0,1565,1567,5,170,0,0,1566,1568, - 5,193,0,0,1567,1566,1,0,0,0,1567,1568,1,0,0,0,1568,1569,1,0,0,0,1569, - 1571,5,2,0,0,1570,1572,5,193,0,0,1571,1570,1,0,0,0,1571,1572,1,0,0,0, - 1572,1573,1,0,0,0,1573,1575,3,376,188,0,1574,1576,5,193,0,0,1575,1574, - 1,0,0,0,1575,1576,1,0,0,0,1576,1577,1,0,0,0,1577,1579,5,4,0,0,1578,1580, - 5,193,0,0,1579,1578,1,0,0,0,1579,1580,1,0,0,0,1580,1581,1,0,0,0,1581, - 1583,3,376,188,0,1582,1584,5,193,0,0,1583,1582,1,0,0,0,1583,1584,1,0, - 0,0,1584,1585,1,0,0,0,1585,1586,5,3,0,0,1586,147,1,0,0,0,1587,1588,6, - 74,-1,0,1588,1594,3,382,191,0,1589,1594,3,140,70,0,1590,1594,3,142,71, - 0,1591,1594,3,144,72,0,1592,1594,3,146,73,0,1593,1587,1,0,0,0,1593,1589, - 1,0,0,0,1593,1590,1,0,0,0,1593,1591,1,0,0,0,1593,1592,1,0,0,0,1594,1599, - 1,0,0,0,1595,1596,10,5,0,0,1596,1598,3,150,75,0,1597,1595,1,0,0,0,1598, - 1601,1,0,0,0,1599,1597,1,0,0,0,1599,1600,1,0,0,0,1600,149,1,0,0,0,1601, - 1599,1,0,0,0,1602,1606,3,152,76,0,1603,1605,3,152,76,0,1604,1603,1,0, - 0,0,1605,1608,1,0,0,0,1606,1604,1,0,0,0,1606,1607,1,0,0,0,1607,151,1, - 0,0,0,1608,1606,1,0,0,0,1609,1611,5,7,0,0,1610,1612,3,376,188,0,1611, - 1610,1,0,0,0,1611,1612,1,0,0,0,1612,1613,1,0,0,0,1613,1614,5,8,0,0,1614, - 153,1,0,0,0,1615,1618,3,156,78,0,1616,1618,3,158,79,0,1617,1615,1,0,0, - 0,1617,1616,1,0,0,0,1618,155,1,0,0,0,1619,1622,5,85,0,0,1620,1621,5,193, - 0,0,1621,1623,5,109,0,0,1622,1620,1,0,0,0,1622,1623,1,0,0,0,1623,157, - 1,0,0,0,1624,1625,5,128,0,0,1625,159,1,0,0,0,1626,1627,5,56,0,0,1627, - 1628,5,193,0,0,1628,1640,5,148,0,0,1629,1630,5,56,0,0,1630,1631,5,193, - 0,0,1631,1632,5,148,0,0,1632,1633,5,193,0,0,1633,1634,5,131,0,0,1634, - 1635,5,193,0,0,1635,1640,5,122,0,0,1636,1640,5,64,0,0,1637,1640,5,135, - 0,0,1638,1640,5,61,0,0,1639,1626,1,0,0,0,1639,1629,1,0,0,0,1639,1636, - 1,0,0,0,1639,1637,1,0,0,0,1639,1638,1,0,0,0,1640,161,1,0,0,0,1641,1646, - 3,164,82,0,1642,1646,3,166,83,0,1643,1646,3,168,84,0,1644,1646,3,170, - 85,0,1645,1641,1,0,0,0,1645,1642,1,0,0,0,1645,1643,1,0,0,0,1645,1644, - 1,0,0,0,1646,163,1,0,0,0,1647,1648,5,108,0,0,1648,1651,5,193,0,0,1649, - 1650,5,87,0,0,1650,1652,5,193,0,0,1651,1649,1,0,0,0,1651,1652,1,0,0,0, - 1652,1655,1,0,0,0,1653,1656,5,178,0,0,1654,1656,3,366,183,0,1655,1653, - 1,0,0,0,1655,1654,1,0,0,0,1656,165,1,0,0,0,1657,1658,5,90,0,0,1658,1660, - 5,193,0,0,1659,1657,1,0,0,0,1659,1660,1,0,0,0,1660,1661,1,0,0,0,1661, - 1662,5,103,0,0,1662,1663,5,193,0,0,1663,1668,3,366,183,0,1664,1665,5, - 193,0,0,1665,1666,5,89,0,0,1666,1667,5,193,0,0,1667,1669,5,178,0,0,1668, - 1664,1,0,0,0,1668,1669,1,0,0,0,1669,167,1,0,0,0,1670,1671,5,153,0,0,1671, - 1672,5,193,0,0,1672,1673,3,366,183,0,1673,169,1,0,0,0,1674,1675,5,154, - 0,0,1675,1676,5,193,0,0,1676,1677,3,366,183,0,1677,171,1,0,0,0,1678,1679, - 3,174,87,0,1679,173,1,0,0,0,1680,1687,3,178,89,0,1681,1683,5,193,0,0, - 1682,1681,1,0,0,0,1682,1683,1,0,0,0,1683,1684,1,0,0,0,1684,1686,3,176, - 88,0,1685,1682,1,0,0,0,1686,1689,1,0,0,0,1687,1685,1,0,0,0,1687,1688, - 1,0,0,0,1688,1702,1,0,0,0,1689,1687,1,0,0,0,1690,1692,3,220,110,0,1691, - 1693,5,193,0,0,1692,1691,1,0,0,0,1692,1693,1,0,0,0,1693,1695,1,0,0,0, - 1694,1690,1,0,0,0,1695,1696,1,0,0,0,1696,1694,1,0,0,0,1696,1697,1,0,0, - 0,1697,1698,1,0,0,0,1698,1699,3,178,89,0,1699,1700,6,87,-1,0,1700,1702, - 1,0,0,0,1701,1680,1,0,0,0,1701,1694,1,0,0,0,1702,175,1,0,0,0,1703,1704, - 5,151,0,0,1704,1705,5,193,0,0,1705,1707,5,48,0,0,1706,1708,5,193,0,0, - 1707,1706,1,0,0,0,1707,1708,1,0,0,0,1708,1709,1,0,0,0,1709,1716,3,178, - 89,0,1710,1712,5,151,0,0,1711,1713,5,193,0,0,1712,1711,1,0,0,0,1712,1713, - 1,0,0,0,1713,1714,1,0,0,0,1714,1716,3,178,89,0,1715,1703,1,0,0,0,1715, - 1710,1,0,0,0,1716,177,1,0,0,0,1717,1720,3,180,90,0,1718,1720,3,182,91, - 0,1719,1717,1,0,0,0,1719,1718,1,0,0,0,1720,179,1,0,0,0,1721,1723,3,188, - 94,0,1722,1724,5,193,0,0,1723,1722,1,0,0,0,1723,1724,1,0,0,0,1724,1726, - 1,0,0,0,1725,1721,1,0,0,0,1726,1729,1,0,0,0,1727,1725,1,0,0,0,1727,1728, - 1,0,0,0,1728,1730,1,0,0,0,1729,1727,1,0,0,0,1730,1757,3,220,110,0,1731, - 1733,3,188,94,0,1732,1734,5,193,0,0,1733,1732,1,0,0,0,1733,1734,1,0,0, - 0,1734,1736,1,0,0,0,1735,1731,1,0,0,0,1736,1739,1,0,0,0,1737,1735,1,0, - 0,0,1737,1738,1,0,0,0,1738,1740,1,0,0,0,1739,1737,1,0,0,0,1740,1747,3, - 186,93,0,1741,1743,5,193,0,0,1742,1741,1,0,0,0,1742,1743,1,0,0,0,1743, - 1744,1,0,0,0,1744,1746,3,186,93,0,1745,1742,1,0,0,0,1746,1749,1,0,0,0, - 1747,1745,1,0,0,0,1747,1748,1,0,0,0,1748,1754,1,0,0,0,1749,1747,1,0,0, - 0,1750,1752,5,193,0,0,1751,1750,1,0,0,0,1751,1752,1,0,0,0,1752,1753,1, - 0,0,0,1753,1755,3,220,110,0,1754,1751,1,0,0,0,1754,1755,1,0,0,0,1755, - 1757,1,0,0,0,1756,1727,1,0,0,0,1756,1737,1,0,0,0,1757,181,1,0,0,0,1758, - 1760,3,184,92,0,1759,1761,5,193,0,0,1760,1759,1,0,0,0,1760,1761,1,0,0, - 0,1761,1763,1,0,0,0,1762,1758,1,0,0,0,1763,1764,1,0,0,0,1764,1762,1,0, - 0,0,1764,1765,1,0,0,0,1765,1766,1,0,0,0,1766,1767,3,180,90,0,1767,183, - 1,0,0,0,1768,1770,3,188,94,0,1769,1771,5,193,0,0,1770,1769,1,0,0,0,1770, - 1771,1,0,0,0,1771,1773,1,0,0,0,1772,1768,1,0,0,0,1773,1776,1,0,0,0,1774, - 1772,1,0,0,0,1774,1775,1,0,0,0,1775,1783,1,0,0,0,1776,1774,1,0,0,0,1777, - 1779,3,186,93,0,1778,1780,5,193,0,0,1779,1778,1,0,0,0,1779,1780,1,0,0, - 0,1780,1782,1,0,0,0,1781,1777,1,0,0,0,1782,1785,1,0,0,0,1783,1781,1,0, - 0,0,1783,1784,1,0,0,0,1784,1786,1,0,0,0,1785,1783,1,0,0,0,1786,1787,3, - 218,109,0,1787,185,1,0,0,0,1788,1793,3,206,103,0,1789,1793,3,208,104, - 0,1790,1793,3,212,106,0,1791,1793,3,216,108,0,1792,1788,1,0,0,0,1792, - 1789,1,0,0,0,1792,1790,1,0,0,0,1792,1791,1,0,0,0,1793,187,1,0,0,0,1794, - 1799,3,198,99,0,1795,1799,3,204,102,0,1796,1799,3,196,98,0,1797,1799, - 3,190,95,0,1798,1794,1,0,0,0,1798,1795,1,0,0,0,1798,1796,1,0,0,0,1798, - 1797,1,0,0,0,1799,189,1,0,0,0,1800,1818,5,108,0,0,1801,1802,5,193,0,0, - 1802,1803,5,158,0,0,1803,1804,5,193,0,0,1804,1806,5,96,0,0,1805,1807, - 5,193,0,0,1806,1805,1,0,0,0,1806,1807,1,0,0,0,1807,1808,1,0,0,0,1808, - 1810,5,2,0,0,1809,1811,5,193,0,0,1810,1809,1,0,0,0,1810,1811,1,0,0,0, - 1811,1812,1,0,0,0,1812,1814,3,130,65,0,1813,1815,5,193,0,0,1814,1813, - 1,0,0,0,1814,1815,1,0,0,0,1815,1816,1,0,0,0,1816,1817,5,3,0,0,1817,1819, - 1,0,0,0,1818,1801,1,0,0,0,1818,1819,1,0,0,0,1819,1820,1,0,0,0,1820,1821, - 5,193,0,0,1821,1822,5,89,0,0,1822,1823,5,193,0,0,1823,1837,3,10,5,0,1824, - 1826,5,193,0,0,1825,1824,1,0,0,0,1825,1826,1,0,0,0,1826,1827,1,0,0,0, - 1827,1829,5,2,0,0,1828,1830,5,193,0,0,1829,1828,1,0,0,0,1829,1830,1,0, - 0,0,1830,1831,1,0,0,0,1831,1833,3,26,13,0,1832,1834,5,193,0,0,1833,1832, - 1,0,0,0,1833,1834,1,0,0,0,1834,1835,1,0,0,0,1835,1836,5,3,0,0,1836,1838, - 1,0,0,0,1837,1825,1,0,0,0,1837,1838,1,0,0,0,1838,1843,1,0,0,0,1839,1841, - 5,193,0,0,1840,1839,1,0,0,0,1840,1841,1,0,0,0,1841,1842,1,0,0,0,1842, - 1844,3,236,118,0,1843,1840,1,0,0,0,1843,1844,1,0,0,0,1844,191,1,0,0,0, - 1845,1846,3,366,183,0,1846,1847,5,193,0,0,1847,1848,5,52,0,0,1848,1849, - 5,193,0,0,1849,1851,1,0,0,0,1850,1845,1,0,0,0,1850,1851,1,0,0,0,1851, - 1852,1,0,0,0,1852,1853,3,366,183,0,1853,193,1,0,0,0,1854,1865,3,192,96, - 0,1855,1857,5,193,0,0,1856,1855,1,0,0,0,1856,1857,1,0,0,0,1857,1858,1, - 0,0,0,1858,1860,5,4,0,0,1859,1861,5,193,0,0,1860,1859,1,0,0,0,1860,1861, - 1,0,0,0,1861,1862,1,0,0,0,1862,1864,3,192,96,0,1863,1856,1,0,0,0,1864, - 1867,1,0,0,0,1865,1863,1,0,0,0,1865,1866,1,0,0,0,1866,195,1,0,0,0,1867, - 1865,1,0,0,0,1868,1869,5,58,0,0,1869,1870,5,193,0,0,1870,1875,3,346,173, - 0,1871,1873,5,193,0,0,1872,1871,1,0,0,0,1872,1873,1,0,0,0,1873,1874,1, - 0,0,0,1874,1876,3,236,118,0,1875,1872,1,0,0,0,1875,1876,1,0,0,0,1876, - 1883,1,0,0,0,1877,1879,5,193,0,0,1878,1877,1,0,0,0,1878,1879,1,0,0,0, - 1879,1880,1,0,0,0,1880,1881,5,163,0,0,1881,1882,5,193,0,0,1882,1884,3, - 194,97,0,1883,1878,1,0,0,0,1883,1884,1,0,0,0,1884,197,1,0,0,0,1885,1886, - 5,124,0,0,1886,1888,5,193,0,0,1887,1885,1,0,0,0,1887,1888,1,0,0,0,1888, - 1889,1,0,0,0,1889,1891,5,111,0,0,1890,1892,5,193,0,0,1891,1890,1,0,0, - 0,1891,1892,1,0,0,0,1892,1893,1,0,0,0,1893,1896,3,238,119,0,1894,1895, - 5,193,0,0,1895,1897,3,236,118,0,1896,1894,1,0,0,0,1896,1897,1,0,0,0,1897, - 1900,1,0,0,0,1898,1899,5,193,0,0,1899,1901,3,200,100,0,1900,1898,1,0, - 0,0,1900,1901,1,0,0,0,1901,199,1,0,0,0,1902,1903,5,97,0,0,1903,1904,5, - 193,0,0,1904,1905,3,202,101,0,1905,201,1,0,0,0,1906,1907,6,101,-1,0,1907, - 1909,5,2,0,0,1908,1910,5,193,0,0,1909,1908,1,0,0,0,1909,1910,1,0,0,0, - 1910,1911,1,0,0,0,1911,1913,3,202,101,0,1912,1914,5,193,0,0,1913,1912, - 1,0,0,0,1913,1914,1,0,0,0,1914,1915,1,0,0,0,1915,1916,5,3,0,0,1916,1919, - 1,0,0,0,1917,1919,3,380,190,0,1918,1906,1,0,0,0,1918,1917,1,0,0,0,1919, - 1936,1,0,0,0,1920,1921,10,4,0,0,1921,1922,5,193,0,0,1922,1923,5,105,0, - 0,1923,1924,5,193,0,0,1924,1935,3,202,101,5,1925,1930,10,3,0,0,1926,1927, - 5,193,0,0,1927,1928,5,115,0,0,1928,1929,5,193,0,0,1929,1931,3,380,190, - 0,1930,1926,1,0,0,0,1931,1932,1,0,0,0,1932,1930,1,0,0,0,1932,1933,1,0, - 0,0,1933,1935,1,0,0,0,1934,1920,1,0,0,0,1934,1925,1,0,0,0,1935,1938,1, - 0,0,0,1936,1934,1,0,0,0,1936,1937,1,0,0,0,1937,203,1,0,0,0,1938,1936, - 1,0,0,0,1939,1941,5,152,0,0,1940,1942,5,193,0,0,1941,1940,1,0,0,0,1941, - 1942,1,0,0,0,1942,1943,1,0,0,0,1943,1944,3,278,139,0,1944,1945,5,193, - 0,0,1945,1946,5,52,0,0,1946,1947,5,193,0,0,1947,1948,3,366,183,0,1948, - 205,1,0,0,0,1949,1951,5,69,0,0,1950,1952,5,193,0,0,1951,1950,1,0,0,0, - 1951,1952,1,0,0,0,1952,1953,1,0,0,0,1953,1954,3,238,119,0,1954,207,1, - 0,0,0,1955,1957,5,113,0,0,1956,1958,5,193,0,0,1957,1956,1,0,0,0,1957, - 1958,1,0,0,0,1958,1959,1,0,0,0,1959,1964,3,238,119,0,1960,1961,5,193, - 0,0,1961,1963,3,210,105,0,1962,1960,1,0,0,0,1963,1966,1,0,0,0,1964,1962, - 1,0,0,0,1964,1965,1,0,0,0,1965,209,1,0,0,0,1966,1964,1,0,0,0,1967,1968, - 5,121,0,0,1968,1969,5,193,0,0,1969,1970,5,111,0,0,1970,1971,5,193,0,0, - 1971,1978,3,212,106,0,1972,1973,5,121,0,0,1973,1974,5,193,0,0,1974,1975, - 5,69,0,0,1975,1976,5,193,0,0,1976,1978,3,212,106,0,1977,1967,1,0,0,0, - 1977,1972,1,0,0,0,1978,211,1,0,0,0,1979,1981,5,138,0,0,1980,1982,5,193, - 0,0,1981,1980,1,0,0,0,1981,1982,1,0,0,0,1982,1983,1,0,0,0,1983,1994,3, - 214,107,0,1984,1986,5,193,0,0,1985,1984,1,0,0,0,1985,1986,1,0,0,0,1986, - 1987,1,0,0,0,1987,1989,5,4,0,0,1988,1990,5,193,0,0,1989,1988,1,0,0,0, - 1989,1990,1,0,0,0,1990,1991,1,0,0,0,1991,1993,3,214,107,0,1992,1985,1, - 0,0,0,1993,1996,1,0,0,0,1994,1992,1,0,0,0,1994,1995,1,0,0,0,1995,2012, - 1,0,0,0,1996,1994,1,0,0,0,1997,1999,5,138,0,0,1998,2000,5,193,0,0,1999, - 1998,1,0,0,0,1999,2000,1,0,0,0,2000,2001,1,0,0,0,2001,2003,3,324,162, - 0,2002,2004,5,193,0,0,2003,2002,1,0,0,0,2003,2004,1,0,0,0,2004,2005,1, - 0,0,0,2005,2007,5,6,0,0,2006,2008,5,193,0,0,2007,2006,1,0,0,0,2007,2008, - 1,0,0,0,2008,2009,1,0,0,0,2009,2010,3,254,127,0,2010,2012,1,0,0,0,2011, - 1979,1,0,0,0,2011,1997,1,0,0,0,2012,213,1,0,0,0,2013,2015,3,372,186,0, - 2014,2016,5,193,0,0,2015,2014,1,0,0,0,2015,2016,1,0,0,0,2016,2017,1,0, - 0,0,2017,2019,5,6,0,0,2018,2020,5,193,0,0,2019,2018,1,0,0,0,2019,2020, - 1,0,0,0,2020,2021,1,0,0,0,2021,2022,3,278,139,0,2022,215,1,0,0,0,2023, - 2024,5,78,0,0,2024,2026,5,193,0,0,2025,2023,1,0,0,0,2025,2026,1,0,0,0, - 2026,2027,1,0,0,0,2027,2029,5,75,0,0,2028,2030,5,193,0,0,2029,2028,1, - 0,0,0,2029,2030,1,0,0,0,2030,2031,1,0,0,0,2031,2042,3,278,139,0,2032, - 2034,5,193,0,0,2033,2032,1,0,0,0,2033,2034,1,0,0,0,2034,2035,1,0,0,0, - 2035,2037,5,4,0,0,2036,2038,5,193,0,0,2037,2036,1,0,0,0,2037,2038,1,0, - 0,0,2038,2039,1,0,0,0,2039,2041,3,278,139,0,2040,2033,1,0,0,0,2041,2044, - 1,0,0,0,2042,2040,1,0,0,0,2042,2043,1,0,0,0,2043,217,1,0,0,0,2044,2042, - 1,0,0,0,2045,2046,5,158,0,0,2046,2051,3,222,111,0,2047,2049,5,193,0,0, - 2048,2047,1,0,0,0,2048,2049,1,0,0,0,2049,2050,1,0,0,0,2050,2052,3,236, - 118,0,2051,2048,1,0,0,0,2051,2052,1,0,0,0,2052,219,1,0,0,0,2053,2054, - 5,134,0,0,2054,2055,3,222,111,0,2055,221,1,0,0,0,2056,2058,5,193,0,0, - 2057,2056,1,0,0,0,2057,2058,1,0,0,0,2058,2059,1,0,0,0,2059,2061,5,79, - 0,0,2060,2057,1,0,0,0,2060,2061,1,0,0,0,2061,2062,1,0,0,0,2062,2063,5, - 193,0,0,2063,2066,3,224,112,0,2064,2065,5,193,0,0,2065,2067,3,228,114, - 0,2066,2064,1,0,0,0,2066,2067,1,0,0,0,2067,2070,1,0,0,0,2068,2069,5,193, - 0,0,2069,2071,3,230,115,0,2070,2068,1,0,0,0,2070,2071,1,0,0,0,2071,2074, - 1,0,0,0,2072,2073,5,193,0,0,2073,2075,3,232,116,0,2074,2072,1,0,0,0,2074, - 2075,1,0,0,0,2075,223,1,0,0,0,2076,2087,5,171,0,0,2077,2079,5,193,0,0, - 2078,2077,1,0,0,0,2078,2079,1,0,0,0,2079,2080,1,0,0,0,2080,2082,5,4,0, - 0,2081,2083,5,193,0,0,2082,2081,1,0,0,0,2082,2083,1,0,0,0,2083,2084,1, - 0,0,0,2084,2086,3,226,113,0,2085,2078,1,0,0,0,2086,2089,1,0,0,0,2087, - 2085,1,0,0,0,2087,2088,1,0,0,0,2088,2105,1,0,0,0,2089,2087,1,0,0,0,2090, - 2101,3,226,113,0,2091,2093,5,193,0,0,2092,2091,1,0,0,0,2092,2093,1,0, - 0,0,2093,2094,1,0,0,0,2094,2096,5,4,0,0,2095,2097,5,193,0,0,2096,2095, - 1,0,0,0,2096,2097,1,0,0,0,2097,2098,1,0,0,0,2098,2100,3,226,113,0,2099, - 2092,1,0,0,0,2100,2103,1,0,0,0,2101,2099,1,0,0,0,2101,2102,1,0,0,0,2102, - 2105,1,0,0,0,2103,2101,1,0,0,0,2104,2076,1,0,0,0,2104,2090,1,0,0,0,2105, - 225,1,0,0,0,2106,2107,3,278,139,0,2107,2108,5,193,0,0,2108,2109,5,52, - 0,0,2109,2110,5,193,0,0,2110,2111,3,366,183,0,2111,2114,1,0,0,0,2112, - 2114,3,278,139,0,2113,2106,1,0,0,0,2113,2112,1,0,0,0,2114,227,1,0,0,0, - 2115,2116,5,126,0,0,2116,2117,5,193,0,0,2117,2118,5,57,0,0,2118,2119, - 5,193,0,0,2119,2127,3,234,117,0,2120,2122,5,4,0,0,2121,2123,5,193,0,0, - 2122,2121,1,0,0,0,2122,2123,1,0,0,0,2123,2124,1,0,0,0,2124,2126,3,234, - 117,0,2125,2120,1,0,0,0,2126,2129,1,0,0,0,2127,2125,1,0,0,0,2127,2128, - 1,0,0,0,2128,229,1,0,0,0,2129,2127,1,0,0,0,2130,2131,5,172,0,0,2131,2132, - 5,193,0,0,2132,2133,3,278,139,0,2133,231,1,0,0,0,2134,2135,5,107,0,0, - 2135,2136,5,193,0,0,2136,2137,3,278,139,0,2137,233,1,0,0,0,2138,2143, - 3,278,139,0,2139,2141,5,193,0,0,2140,2139,1,0,0,0,2140,2141,1,0,0,0,2141, - 2142,1,0,0,0,2142,2144,7,2,0,0,2143,2140,1,0,0,0,2143,2144,1,0,0,0,2144, - 235,1,0,0,0,2145,2146,5,157,0,0,2146,2147,5,193,0,0,2147,2148,3,278,139, - 0,2148,237,1,0,0,0,2149,2160,3,240,120,0,2150,2152,5,193,0,0,2151,2150, - 1,0,0,0,2151,2152,1,0,0,0,2152,2153,1,0,0,0,2153,2155,5,4,0,0,2154,2156, - 5,193,0,0,2155,2154,1,0,0,0,2155,2156,1,0,0,0,2156,2157,1,0,0,0,2157, - 2159,3,240,120,0,2158,2151,1,0,0,0,2159,2162,1,0,0,0,2160,2158,1,0,0, - 0,2160,2161,1,0,0,0,2161,239,1,0,0,0,2162,2160,1,0,0,0,2163,2165,3,366, - 183,0,2164,2166,5,193,0,0,2165,2164,1,0,0,0,2165,2166,1,0,0,0,2166,2167, - 1,0,0,0,2167,2169,5,6,0,0,2168,2170,5,193,0,0,2169,2168,1,0,0,0,2169, - 2170,1,0,0,0,2170,2171,1,0,0,0,2171,2172,3,242,121,0,2172,2175,1,0,0, - 0,2173,2175,3,242,121,0,2174,2163,1,0,0,0,2174,2173,1,0,0,0,2175,241, - 1,0,0,0,2176,2177,3,244,122,0,2177,243,1,0,0,0,2178,2185,3,246,123,0, - 2179,2181,5,193,0,0,2180,2179,1,0,0,0,2180,2181,1,0,0,0,2181,2182,1,0, - 0,0,2182,2184,3,248,124,0,2183,2180,1,0,0,0,2184,2187,1,0,0,0,2185,2183, - 1,0,0,0,2185,2186,1,0,0,0,2186,2193,1,0,0,0,2187,2185,1,0,0,0,2188,2189, - 5,2,0,0,2189,2190,3,244,122,0,2190,2191,5,3,0,0,2191,2193,1,0,0,0,2192, - 2178,1,0,0,0,2192,2188,1,0,0,0,2193,245,1,0,0,0,2194,2196,5,2,0,0,2195, - 2197,5,193,0,0,2196,2195,1,0,0,0,2196,2197,1,0,0,0,2197,2202,1,0,0,0, - 2198,2200,3,366,183,0,2199,2201,5,193,0,0,2200,2199,1,0,0,0,2200,2201, - 1,0,0,0,2201,2203,1,0,0,0,2202,2198,1,0,0,0,2202,2203,1,0,0,0,2203,2208, - 1,0,0,0,2204,2206,3,258,129,0,2205,2207,5,193,0,0,2206,2205,1,0,0,0,2206, - 2207,1,0,0,0,2207,2209,1,0,0,0,2208,2204,1,0,0,0,2208,2209,1,0,0,0,2209, - 2214,1,0,0,0,2210,2212,3,254,127,0,2211,2213,5,193,0,0,2212,2211,1,0, - 0,0,2212,2213,1,0,0,0,2213,2215,1,0,0,0,2214,2210,1,0,0,0,2214,2215,1, - 0,0,0,2215,2216,1,0,0,0,2216,2217,5,3,0,0,2217,247,1,0,0,0,2218,2220, - 3,250,125,0,2219,2221,5,193,0,0,2220,2219,1,0,0,0,2220,2221,1,0,0,0,2221, - 2222,1,0,0,0,2222,2223,3,246,123,0,2223,249,1,0,0,0,2224,2226,3,386,193, - 0,2225,2227,5,193,0,0,2226,2225,1,0,0,0,2226,2227,1,0,0,0,2227,2228,1, - 0,0,0,2228,2230,3,390,195,0,2229,2231,5,193,0,0,2230,2229,1,0,0,0,2230, - 2231,1,0,0,0,2231,2233,1,0,0,0,2232,2234,3,252,126,0,2233,2232,1,0,0, - 0,2233,2234,1,0,0,0,2234,2236,1,0,0,0,2235,2237,5,193,0,0,2236,2235,1, - 0,0,0,2236,2237,1,0,0,0,2237,2238,1,0,0,0,2238,2239,3,390,195,0,2239, - 2269,1,0,0,0,2240,2242,3,390,195,0,2241,2243,5,193,0,0,2242,2241,1,0, - 0,0,2242,2243,1,0,0,0,2243,2245,1,0,0,0,2244,2246,3,252,126,0,2245,2244, - 1,0,0,0,2245,2246,1,0,0,0,2246,2248,1,0,0,0,2247,2249,5,193,0,0,2248, - 2247,1,0,0,0,2248,2249,1,0,0,0,2249,2250,1,0,0,0,2250,2252,3,390,195, - 0,2251,2253,5,193,0,0,2252,2251,1,0,0,0,2252,2253,1,0,0,0,2253,2254,1, - 0,0,0,2254,2255,3,388,194,0,2255,2269,1,0,0,0,2256,2258,3,390,195,0,2257, - 2259,5,193,0,0,2258,2257,1,0,0,0,2258,2259,1,0,0,0,2259,2261,1,0,0,0, - 2260,2262,3,252,126,0,2261,2260,1,0,0,0,2261,2262,1,0,0,0,2262,2264,1, - 0,0,0,2263,2265,5,193,0,0,2264,2263,1,0,0,0,2264,2265,1,0,0,0,2265,2266, - 1,0,0,0,2266,2267,3,390,195,0,2267,2269,1,0,0,0,2268,2224,1,0,0,0,2268, - 2240,1,0,0,0,2268,2256,1,0,0,0,2269,251,1,0,0,0,2270,2272,5,7,0,0,2271, - 2273,5,193,0,0,2272,2271,1,0,0,0,2272,2273,1,0,0,0,2273,2278,1,0,0,0, - 2274,2276,3,366,183,0,2275,2277,5,193,0,0,2276,2275,1,0,0,0,2276,2277, - 1,0,0,0,2277,2279,1,0,0,0,2278,2274,1,0,0,0,2278,2279,1,0,0,0,2279,2284, - 1,0,0,0,2280,2282,3,256,128,0,2281,2283,5,193,0,0,2282,2281,1,0,0,0,2282, - 2283,1,0,0,0,2283,2285,1,0,0,0,2284,2280,1,0,0,0,2284,2285,1,0,0,0,2285, - 2290,1,0,0,0,2286,2288,3,260,130,0,2287,2289,5,193,0,0,2288,2287,1,0, - 0,0,2288,2289,1,0,0,0,2289,2291,1,0,0,0,2290,2286,1,0,0,0,2290,2291,1, - 0,0,0,2291,2296,1,0,0,0,2292,2294,3,254,127,0,2293,2295,5,193,0,0,2294, - 2293,1,0,0,0,2294,2295,1,0,0,0,2295,2297,1,0,0,0,2296,2292,1,0,0,0,2296, - 2297,1,0,0,0,2297,2298,1,0,0,0,2298,2299,5,8,0,0,2299,253,1,0,0,0,2300, - 2302,5,9,0,0,2301,2303,5,193,0,0,2302,2301,1,0,0,0,2302,2303,1,0,0,0, - 2303,2337,1,0,0,0,2304,2306,3,374,187,0,2305,2307,5,193,0,0,2306,2305, - 1,0,0,0,2306,2307,1,0,0,0,2307,2308,1,0,0,0,2308,2310,5,174,0,0,2309, - 2311,5,193,0,0,2310,2309,1,0,0,0,2310,2311,1,0,0,0,2311,2312,1,0,0,0, - 2312,2314,3,278,139,0,2313,2315,5,193,0,0,2314,2313,1,0,0,0,2314,2315, - 1,0,0,0,2315,2334,1,0,0,0,2316,2318,5,4,0,0,2317,2319,5,193,0,0,2318, - 2317,1,0,0,0,2318,2319,1,0,0,0,2319,2320,1,0,0,0,2320,2322,3,374,187, - 0,2321,2323,5,193,0,0,2322,2321,1,0,0,0,2322,2323,1,0,0,0,2323,2324,1, - 0,0,0,2324,2326,5,174,0,0,2325,2327,5,193,0,0,2326,2325,1,0,0,0,2326, - 2327,1,0,0,0,2327,2328,1,0,0,0,2328,2330,3,278,139,0,2329,2331,5,193, - 0,0,2330,2329,1,0,0,0,2330,2331,1,0,0,0,2331,2333,1,0,0,0,2332,2316,1, - 0,0,0,2333,2336,1,0,0,0,2334,2332,1,0,0,0,2334,2335,1,0,0,0,2335,2338, - 1,0,0,0,2336,2334,1,0,0,0,2337,2304,1,0,0,0,2337,2338,1,0,0,0,2338,2339, - 1,0,0,0,2339,2340,5,10,0,0,2340,255,1,0,0,0,2341,2343,5,174,0,0,2342, - 2344,5,193,0,0,2343,2342,1,0,0,0,2343,2344,1,0,0,0,2344,2345,1,0,0,0, - 2345,2359,3,276,138,0,2346,2348,5,193,0,0,2347,2346,1,0,0,0,2347,2348, - 1,0,0,0,2348,2349,1,0,0,0,2349,2351,5,11,0,0,2350,2352,5,174,0,0,2351, - 2350,1,0,0,0,2351,2352,1,0,0,0,2352,2354,1,0,0,0,2353,2355,5,193,0,0, - 2354,2353,1,0,0,0,2354,2355,1,0,0,0,2355,2356,1,0,0,0,2356,2358,3,276, - 138,0,2357,2347,1,0,0,0,2358,2361,1,0,0,0,2359,2357,1,0,0,0,2359,2360, - 1,0,0,0,2360,257,1,0,0,0,2361,2359,1,0,0,0,2362,2364,5,174,0,0,2363,2365, - 5,193,0,0,2364,2363,1,0,0,0,2364,2365,1,0,0,0,2365,2366,1,0,0,0,2366, - 2383,3,274,137,0,2367,2369,5,193,0,0,2368,2367,1,0,0,0,2368,2369,1,0, - 0,0,2369,2375,1,0,0,0,2370,2372,5,11,0,0,2371,2373,5,174,0,0,2372,2371, - 1,0,0,0,2372,2373,1,0,0,0,2373,2376,1,0,0,0,2374,2376,5,174,0,0,2375, - 2370,1,0,0,0,2375,2374,1,0,0,0,2376,2378,1,0,0,0,2377,2379,5,193,0,0, - 2378,2377,1,0,0,0,2378,2379,1,0,0,0,2379,2380,1,0,0,0,2380,2382,3,274, - 137,0,2381,2368,1,0,0,0,2382,2385,1,0,0,0,2383,2381,1,0,0,0,2383,2384, - 1,0,0,0,2384,259,1,0,0,0,2385,2383,1,0,0,0,2386,2391,5,171,0,0,2387,2389, - 5,193,0,0,2388,2387,1,0,0,0,2388,2389,1,0,0,0,2389,2390,1,0,0,0,2390, - 2392,3,262,131,0,2391,2388,1,0,0,0,2391,2392,1,0,0,0,2392,2397,1,0,0, - 0,2393,2395,5,193,0,0,2394,2393,1,0,0,0,2394,2395,1,0,0,0,2395,2396,1, - 0,0,0,2396,2398,3,264,132,0,2397,2394,1,0,0,0,2397,2398,1,0,0,0,2398, - 2403,1,0,0,0,2399,2401,5,193,0,0,2400,2399,1,0,0,0,2400,2401,1,0,0,0, - 2401,2402,1,0,0,0,2402,2404,3,266,133,0,2403,2400,1,0,0,0,2403,2404,1, - 0,0,0,2404,261,1,0,0,0,2405,2406,5,48,0,0,2406,2408,5,193,0,0,2407,2405, - 1,0,0,0,2407,2408,1,0,0,0,2408,2409,1,0,0,0,2409,2411,5,160,0,0,2410, - 2412,5,193,0,0,2411,2410,1,0,0,0,2411,2412,1,0,0,0,2412,2413,1,0,0,0, - 2413,2415,5,2,0,0,2414,2416,5,193,0,0,2415,2414,1,0,0,0,2415,2416,1,0, - 0,0,2416,2417,1,0,0,0,2417,2419,3,374,187,0,2418,2420,5,193,0,0,2419, - 2418,1,0,0,0,2419,2420,1,0,0,0,2420,2421,1,0,0,0,2421,2422,5,3,0,0,2422, - 2430,1,0,0,0,2423,2430,5,140,0,0,2424,2425,5,48,0,0,2425,2426,5,193,0, - 0,2426,2430,5,140,0,0,2427,2430,5,147,0,0,2428,2430,5,45,0,0,2429,2407, - 1,0,0,0,2429,2423,1,0,0,0,2429,2424,1,0,0,0,2429,2427,1,0,0,0,2429,2428, - 1,0,0,0,2430,263,1,0,0,0,2431,2433,3,270,135,0,2432,2431,1,0,0,0,2432, - 2433,1,0,0,0,2433,2435,1,0,0,0,2434,2436,5,193,0,0,2435,2434,1,0,0,0, - 2435,2436,1,0,0,0,2436,2437,1,0,0,0,2437,2439,5,175,0,0,2438,2440,5,193, - 0,0,2439,2438,1,0,0,0,2439,2440,1,0,0,0,2440,2442,1,0,0,0,2441,2443,3, - 272,136,0,2442,2441,1,0,0,0,2442,2443,1,0,0,0,2443,2446,1,0,0,0,2444, - 2446,3,376,188,0,2445,2432,1,0,0,0,2445,2444,1,0,0,0,2446,265,1,0,0,0, - 2447,2449,5,2,0,0,2448,2450,5,193,0,0,2449,2448,1,0,0,0,2449,2450,1,0, - 0,0,2450,2451,1,0,0,0,2451,2453,3,366,183,0,2452,2454,5,193,0,0,2453, - 2452,1,0,0,0,2453,2454,1,0,0,0,2454,2455,1,0,0,0,2455,2457,5,4,0,0,2456, - 2458,5,193,0,0,2457,2456,1,0,0,0,2457,2458,1,0,0,0,2458,2459,1,0,0,0, - 2459,2471,3,366,183,0,2460,2462,5,193,0,0,2461,2460,1,0,0,0,2461,2462, - 1,0,0,0,2462,2463,1,0,0,0,2463,2465,5,11,0,0,2464,2466,5,193,0,0,2465, - 2464,1,0,0,0,2465,2466,1,0,0,0,2466,2467,1,0,0,0,2467,2469,3,236,118, - 0,2468,2470,5,193,0,0,2469,2468,1,0,0,0,2469,2470,1,0,0,0,2470,2472,1, - 0,0,0,2471,2461,1,0,0,0,2471,2472,1,0,0,0,2472,2492,1,0,0,0,2473,2475, - 5,193,0,0,2474,2473,1,0,0,0,2474,2475,1,0,0,0,2475,2476,1,0,0,0,2476, - 2478,5,11,0,0,2477,2479,5,193,0,0,2478,2477,1,0,0,0,2478,2479,1,0,0,0, - 2479,2480,1,0,0,0,2480,2482,3,268,134,0,2481,2483,5,193,0,0,2482,2481, - 1,0,0,0,2482,2483,1,0,0,0,2483,2484,1,0,0,0,2484,2486,5,4,0,0,2485,2487, - 5,193,0,0,2486,2485,1,0,0,0,2486,2487,1,0,0,0,2487,2488,1,0,0,0,2488, - 2490,3,268,134,0,2489,2491,5,193,0,0,2490,2489,1,0,0,0,2490,2491,1,0, - 0,0,2491,2493,1,0,0,0,2492,2474,1,0,0,0,2492,2493,1,0,0,0,2493,2494,1, - 0,0,0,2494,2495,5,3,0,0,2495,267,1,0,0,0,2496,2498,5,9,0,0,2497,2499, - 5,193,0,0,2498,2497,1,0,0,0,2498,2499,1,0,0,0,2499,2501,1,0,0,0,2500, - 2502,3,224,112,0,2501,2500,1,0,0,0,2501,2502,1,0,0,0,2502,2504,1,0,0, - 0,2503,2505,5,193,0,0,2504,2503,1,0,0,0,2504,2505,1,0,0,0,2505,2506,1, - 0,0,0,2506,2507,5,10,0,0,2507,269,1,0,0,0,2508,2509,5,180,0,0,2509,271, - 1,0,0,0,2510,2511,5,180,0,0,2511,273,1,0,0,0,2512,2515,3,380,190,0,2513, - 2514,5,5,0,0,2514,2516,3,380,190,0,2515,2513,1,0,0,0,2515,2516,1,0,0, - 0,2516,275,1,0,0,0,2517,2518,3,380,190,0,2518,277,1,0,0,0,2519,2520,3, - 280,140,0,2520,279,1,0,0,0,2521,2528,3,282,141,0,2522,2523,5,193,0,0, - 2523,2524,5,125,0,0,2524,2525,5,193,0,0,2525,2527,3,282,141,0,2526,2522, - 1,0,0,0,2527,2530,1,0,0,0,2528,2526,1,0,0,0,2528,2529,1,0,0,0,2529,281, - 1,0,0,0,2530,2528,1,0,0,0,2531,2538,3,284,142,0,2532,2533,5,193,0,0,2533, - 2534,5,161,0,0,2534,2535,5,193,0,0,2535,2537,3,284,142,0,2536,2532,1, - 0,0,0,2537,2540,1,0,0,0,2538,2536,1,0,0,0,2538,2539,1,0,0,0,2539,283, - 1,0,0,0,2540,2538,1,0,0,0,2541,2548,3,286,143,0,2542,2543,5,193,0,0,2543, - 2544,5,51,0,0,2544,2545,5,193,0,0,2545,2547,3,286,143,0,2546,2542,1,0, - 0,0,2547,2550,1,0,0,0,2548,2546,1,0,0,0,2548,2549,1,0,0,0,2549,285,1, - 0,0,0,2550,2548,1,0,0,0,2551,2553,5,118,0,0,2552,2554,5,193,0,0,2553, - 2552,1,0,0,0,2553,2554,1,0,0,0,2554,2556,1,0,0,0,2555,2551,1,0,0,0,2556, - 2559,1,0,0,0,2557,2555,1,0,0,0,2557,2558,1,0,0,0,2558,2560,1,0,0,0,2559, - 2557,1,0,0,0,2560,2561,3,288,144,0,2561,287,1,0,0,0,2562,2572,3,292,146, - 0,2563,2565,5,193,0,0,2564,2563,1,0,0,0,2564,2565,1,0,0,0,2565,2566,1, - 0,0,0,2566,2568,3,290,145,0,2567,2569,5,193,0,0,2568,2567,1,0,0,0,2568, - 2569,1,0,0,0,2569,2570,1,0,0,0,2570,2571,3,292,146,0,2571,2573,1,0,0, - 0,2572,2564,1,0,0,0,2572,2573,1,0,0,0,2573,2611,1,0,0,0,2574,2576,3,292, - 146,0,2575,2577,5,193,0,0,2576,2575,1,0,0,0,2576,2577,1,0,0,0,2577,2578, - 1,0,0,0,2578,2580,5,173,0,0,2579,2581,5,193,0,0,2580,2579,1,0,0,0,2580, - 2581,1,0,0,0,2581,2582,1,0,0,0,2582,2583,3,292,146,0,2583,2584,1,0,0, - 0,2584,2585,6,144,-1,0,2585,2611,1,0,0,0,2586,2588,3,292,146,0,2587,2589, - 5,193,0,0,2588,2587,1,0,0,0,2588,2589,1,0,0,0,2589,2590,1,0,0,0,2590, - 2592,3,290,145,0,2591,2593,5,193,0,0,2592,2591,1,0,0,0,2592,2593,1,0, - 0,0,2593,2594,1,0,0,0,2594,2604,3,292,146,0,2595,2597,5,193,0,0,2596, - 2595,1,0,0,0,2596,2597,1,0,0,0,2597,2598,1,0,0,0,2598,2600,3,290,145, - 0,2599,2601,5,193,0,0,2600,2599,1,0,0,0,2600,2601,1,0,0,0,2601,2602,1, - 0,0,0,2602,2603,3,292,146,0,2603,2605,1,0,0,0,2604,2596,1,0,0,0,2605, - 2606,1,0,0,0,2606,2604,1,0,0,0,2606,2607,1,0,0,0,2607,2608,1,0,0,0,2608, - 2609,6,144,-1,0,2609,2611,1,0,0,0,2610,2562,1,0,0,0,2610,2574,1,0,0,0, - 2610,2586,1,0,0,0,2611,289,1,0,0,0,2612,2613,7,3,0,0,2613,291,1,0,0,0, - 2614,2625,3,294,147,0,2615,2617,5,193,0,0,2616,2615,1,0,0,0,2616,2617, - 1,0,0,0,2617,2618,1,0,0,0,2618,2620,5,11,0,0,2619,2621,5,193,0,0,2620, - 2619,1,0,0,0,2620,2621,1,0,0,0,2621,2622,1,0,0,0,2622,2624,3,294,147, - 0,2623,2616,1,0,0,0,2624,2627,1,0,0,0,2625,2623,1,0,0,0,2625,2626,1,0, - 0,0,2626,293,1,0,0,0,2627,2625,1,0,0,0,2628,2639,3,296,148,0,2629,2631, - 5,193,0,0,2630,2629,1,0,0,0,2630,2631,1,0,0,0,2631,2632,1,0,0,0,2632, - 2634,5,17,0,0,2633,2635,5,193,0,0,2634,2633,1,0,0,0,2634,2635,1,0,0,0, - 2635,2636,1,0,0,0,2636,2638,3,296,148,0,2637,2630,1,0,0,0,2638,2641,1, - 0,0,0,2639,2637,1,0,0,0,2639,2640,1,0,0,0,2640,295,1,0,0,0,2641,2639, - 1,0,0,0,2642,2654,3,300,150,0,2643,2645,5,193,0,0,2644,2643,1,0,0,0,2644, - 2645,1,0,0,0,2645,2646,1,0,0,0,2646,2648,3,298,149,0,2647,2649,5,193, - 0,0,2648,2647,1,0,0,0,2648,2649,1,0,0,0,2649,2650,1,0,0,0,2650,2651,3, - 300,150,0,2651,2653,1,0,0,0,2652,2644,1,0,0,0,2653,2656,1,0,0,0,2654, - 2652,1,0,0,0,2654,2655,1,0,0,0,2655,297,1,0,0,0,2656,2654,1,0,0,0,2657, - 2658,7,4,0,0,2658,299,1,0,0,0,2659,2671,3,304,152,0,2660,2662,5,193,0, - 0,2661,2660,1,0,0,0,2661,2662,1,0,0,0,2662,2663,1,0,0,0,2663,2665,3,302, - 151,0,2664,2666,5,193,0,0,2665,2664,1,0,0,0,2665,2666,1,0,0,0,2666,2667, - 1,0,0,0,2667,2668,3,304,152,0,2668,2670,1,0,0,0,2669,2661,1,0,0,0,2670, - 2673,1,0,0,0,2671,2669,1,0,0,0,2671,2672,1,0,0,0,2672,301,1,0,0,0,2673, - 2671,1,0,0,0,2674,2675,7,5,0,0,2675,303,1,0,0,0,2676,2688,3,308,154,0, - 2677,2679,5,193,0,0,2678,2677,1,0,0,0,2678,2679,1,0,0,0,2679,2680,1,0, - 0,0,2680,2682,3,306,153,0,2681,2683,5,193,0,0,2682,2681,1,0,0,0,2682, - 2683,1,0,0,0,2683,2684,1,0,0,0,2684,2685,3,308,154,0,2685,2687,1,0,0, - 0,2686,2678,1,0,0,0,2687,2690,1,0,0,0,2688,2686,1,0,0,0,2688,2689,1,0, - 0,0,2689,305,1,0,0,0,2690,2688,1,0,0,0,2691,2692,7,6,0,0,2692,307,1,0, - 0,0,2693,2704,3,310,155,0,2694,2696,5,193,0,0,2695,2694,1,0,0,0,2695, - 2696,1,0,0,0,2696,2697,1,0,0,0,2697,2699,5,23,0,0,2698,2700,5,193,0,0, - 2699,2698,1,0,0,0,2699,2700,1,0,0,0,2700,2701,1,0,0,0,2701,2703,3,310, - 155,0,2702,2695,1,0,0,0,2703,2706,1,0,0,0,2704,2702,1,0,0,0,2704,2705, - 1,0,0,0,2705,309,1,0,0,0,2706,2704,1,0,0,0,2707,2715,3,320,160,0,2708, - 2716,3,314,157,0,2709,2711,3,312,156,0,2710,2709,1,0,0,0,2711,2712,1, - 0,0,0,2712,2710,1,0,0,0,2712,2713,1,0,0,0,2713,2716,1,0,0,0,2714,2716, - 3,318,159,0,2715,2708,1,0,0,0,2715,2710,1,0,0,0,2715,2714,1,0,0,0,2715, - 2716,1,0,0,0,2716,311,1,0,0,0,2717,2718,5,193,0,0,2718,2720,5,101,0,0, - 2719,2721,5,193,0,0,2720,2719,1,0,0,0,2720,2721,1,0,0,0,2721,2722,1,0, - 0,0,2722,2737,3,322,161,0,2723,2724,5,7,0,0,2724,2725,3,278,139,0,2725, - 2726,5,8,0,0,2726,2737,1,0,0,0,2727,2729,5,7,0,0,2728,2730,3,278,139, - 0,2729,2728,1,0,0,0,2729,2730,1,0,0,0,2730,2731,1,0,0,0,2731,2733,7,7, - 0,0,2732,2734,3,278,139,0,2733,2732,1,0,0,0,2733,2734,1,0,0,0,2734,2735, - 1,0,0,0,2735,2737,5,8,0,0,2736,2717,1,0,0,0,2736,2723,1,0,0,0,2736,2727, - 1,0,0,0,2737,313,1,0,0,0,2738,2750,3,316,158,0,2739,2740,5,193,0,0,2740, - 2741,5,142,0,0,2741,2742,5,193,0,0,2742,2750,5,158,0,0,2743,2744,5,193, - 0,0,2744,2745,5,83,0,0,2745,2746,5,193,0,0,2746,2750,5,158,0,0,2747,2748, - 5,193,0,0,2748,2750,5,66,0,0,2749,2738,1,0,0,0,2749,2739,1,0,0,0,2749, - 2743,1,0,0,0,2749,2747,1,0,0,0,2750,2752,1,0,0,0,2751,2753,5,193,0,0, - 2752,2751,1,0,0,0,2752,2753,1,0,0,0,2753,2754,1,0,0,0,2754,2755,3,322, - 161,0,2755,315,1,0,0,0,2756,2758,5,193,0,0,2757,2756,1,0,0,0,2757,2758, - 1,0,0,0,2758,2759,1,0,0,0,2759,2760,5,24,0,0,2760,317,1,0,0,0,2761,2762, - 5,193,0,0,2762,2763,5,104,0,0,2763,2764,5,193,0,0,2764,2772,5,120,0,0, - 2765,2766,5,193,0,0,2766,2767,5,104,0,0,2767,2768,5,193,0,0,2768,2769, - 5,118,0,0,2769,2770,5,193,0,0,2770,2772,5,120,0,0,2771,2761,1,0,0,0,2771, - 2765,1,0,0,0,2772,319,1,0,0,0,2773,2775,5,176,0,0,2774,2776,5,193,0,0, - 2775,2774,1,0,0,0,2775,2776,1,0,0,0,2776,2778,1,0,0,0,2777,2773,1,0,0, - 0,2778,2781,1,0,0,0,2779,2777,1,0,0,0,2779,2780,1,0,0,0,2780,2782,1,0, - 0,0,2781,2779,1,0,0,0,2782,2787,3,322,161,0,2783,2785,5,193,0,0,2784, - 2783,1,0,0,0,2784,2785,1,0,0,0,2785,2786,1,0,0,0,2786,2788,5,177,0,0, - 2787,2784,1,0,0,0,2787,2788,1,0,0,0,2788,321,1,0,0,0,2789,2796,3,324, - 162,0,2790,2792,5,193,0,0,2791,2790,1,0,0,0,2791,2792,1,0,0,0,2792,2793, - 1,0,0,0,2793,2795,3,360,180,0,2794,2791,1,0,0,0,2795,2798,1,0,0,0,2796, - 2794,1,0,0,0,2796,2797,1,0,0,0,2797,323,1,0,0,0,2798,2796,1,0,0,0,2799, - 2809,3,332,166,0,2800,2809,3,370,185,0,2801,2809,3,362,181,0,2802,2809, - 3,344,172,0,2803,2809,3,346,173,0,2804,2809,3,356,178,0,2805,2809,3,358, - 179,0,2806,2809,3,366,183,0,2807,2809,3,326,163,0,2808,2799,1,0,0,0,2808, - 2800,1,0,0,0,2808,2801,1,0,0,0,2808,2802,1,0,0,0,2808,2803,1,0,0,0,2808, - 2804,1,0,0,0,2808,2805,1,0,0,0,2808,2806,1,0,0,0,2808,2807,1,0,0,0,2809, - 325,1,0,0,0,2810,2812,5,48,0,0,2811,2813,5,193,0,0,2812,2811,1,0,0,0, - 2812,2813,1,0,0,0,2813,2814,1,0,0,0,2814,2816,5,2,0,0,2815,2817,5,193, - 0,0,2816,2815,1,0,0,0,2816,2817,1,0,0,0,2817,2818,1,0,0,0,2818,2820,3, - 328,164,0,2819,2821,5,193,0,0,2820,2819,1,0,0,0,2820,2821,1,0,0,0,2821, - 2822,1,0,0,0,2822,2823,5,3,0,0,2823,2867,1,0,0,0,2824,2826,5,46,0,0,2825, - 2827,5,193,0,0,2826,2825,1,0,0,0,2826,2827,1,0,0,0,2827,2828,1,0,0,0, - 2828,2830,5,2,0,0,2829,2831,5,193,0,0,2830,2829,1,0,0,0,2830,2831,1,0, - 0,0,2831,2832,1,0,0,0,2832,2834,3,328,164,0,2833,2835,5,193,0,0,2834, - 2833,1,0,0,0,2834,2835,1,0,0,0,2835,2836,1,0,0,0,2836,2837,5,3,0,0,2837, - 2867,1,0,0,0,2838,2840,5,119,0,0,2839,2841,5,193,0,0,2840,2839,1,0,0, - 0,2840,2841,1,0,0,0,2841,2842,1,0,0,0,2842,2844,5,2,0,0,2843,2845,5,193, - 0,0,2844,2843,1,0,0,0,2844,2845,1,0,0,0,2845,2846,1,0,0,0,2846,2848,3, - 328,164,0,2847,2849,5,193,0,0,2848,2847,1,0,0,0,2848,2849,1,0,0,0,2849, - 2850,1,0,0,0,2850,2851,5,3,0,0,2851,2867,1,0,0,0,2852,2854,5,162,0,0, - 2853,2855,5,193,0,0,2854,2853,1,0,0,0,2854,2855,1,0,0,0,2855,2856,1,0, - 0,0,2856,2858,5,2,0,0,2857,2859,5,193,0,0,2858,2857,1,0,0,0,2858,2859, - 1,0,0,0,2859,2860,1,0,0,0,2860,2862,3,328,164,0,2861,2863,5,193,0,0,2862, - 2861,1,0,0,0,2862,2863,1,0,0,0,2863,2864,1,0,0,0,2864,2865,5,3,0,0,2865, - 2867,1,0,0,0,2866,2810,1,0,0,0,2866,2824,1,0,0,0,2866,2838,1,0,0,0,2866, - 2852,1,0,0,0,2867,327,1,0,0,0,2868,2869,3,330,165,0,2869,2870,5,193,0, - 0,2870,2871,3,236,118,0,2871,329,1,0,0,0,2872,2873,3,366,183,0,2873,2874, - 5,193,0,0,2874,2875,5,101,0,0,2875,2876,5,193,0,0,2876,2877,3,278,139, - 0,2877,331,1,0,0,0,2878,2885,3,368,184,0,2879,2885,5,178,0,0,2880,2885, - 3,334,167,0,2881,2885,5,120,0,0,2882,2885,3,336,168,0,2883,2885,3,340, - 170,0,2884,2878,1,0,0,0,2884,2879,1,0,0,0,2884,2880,1,0,0,0,2884,2881, - 1,0,0,0,2884,2882,1,0,0,0,2884,2883,1,0,0,0,2885,333,1,0,0,0,2886,2887, - 7,8,0,0,2887,335,1,0,0,0,2888,2890,5,7,0,0,2889,2891,5,193,0,0,2890,2889, - 1,0,0,0,2890,2891,1,0,0,0,2891,2905,1,0,0,0,2892,2894,3,278,139,0,2893, - 2895,5,193,0,0,2894,2893,1,0,0,0,2894,2895,1,0,0,0,2895,2902,1,0,0,0, - 2896,2898,3,338,169,0,2897,2899,5,193,0,0,2898,2897,1,0,0,0,2898,2899, - 1,0,0,0,2899,2901,1,0,0,0,2900,2896,1,0,0,0,2901,2904,1,0,0,0,2902,2900, - 1,0,0,0,2902,2903,1,0,0,0,2903,2906,1,0,0,0,2904,2902,1,0,0,0,2905,2892, - 1,0,0,0,2905,2906,1,0,0,0,2906,2907,1,0,0,0,2907,2908,5,8,0,0,2908,337, - 1,0,0,0,2909,2911,5,4,0,0,2910,2912,5,193,0,0,2911,2910,1,0,0,0,2911, - 2912,1,0,0,0,2912,2914,1,0,0,0,2913,2915,3,278,139,0,2914,2913,1,0,0, - 0,2914,2915,1,0,0,0,2915,339,1,0,0,0,2916,2918,5,9,0,0,2917,2919,5,193, - 0,0,2918,2917,1,0,0,0,2918,2919,1,0,0,0,2919,2920,1,0,0,0,2920,2922,3, - 342,171,0,2921,2923,5,193,0,0,2922,2921,1,0,0,0,2922,2923,1,0,0,0,2923, - 2934,1,0,0,0,2924,2926,5,4,0,0,2925,2927,5,193,0,0,2926,2925,1,0,0,0, - 2926,2927,1,0,0,0,2927,2928,1,0,0,0,2928,2930,3,342,171,0,2929,2931,5, - 193,0,0,2930,2929,1,0,0,0,2930,2931,1,0,0,0,2931,2933,1,0,0,0,2932,2924, - 1,0,0,0,2933,2936,1,0,0,0,2934,2932,1,0,0,0,2934,2935,1,0,0,0,2935,2937, - 1,0,0,0,2936,2934,1,0,0,0,2937,2938,5,10,0,0,2938,341,1,0,0,0,2939,2942, - 3,382,191,0,2940,2942,5,178,0,0,2941,2939,1,0,0,0,2941,2940,1,0,0,0,2942, - 2944,1,0,0,0,2943,2945,5,193,0,0,2944,2943,1,0,0,0,2944,2945,1,0,0,0, - 2945,2946,1,0,0,0,2946,2948,5,174,0,0,2947,2949,5,193,0,0,2948,2947,1, - 0,0,0,2948,2949,1,0,0,0,2949,2950,1,0,0,0,2950,2951,3,278,139,0,2951, - 343,1,0,0,0,2952,2954,5,2,0,0,2953,2955,5,193,0,0,2954,2953,1,0,0,0,2954, - 2955,1,0,0,0,2955,2956,1,0,0,0,2956,2958,3,278,139,0,2957,2959,5,193, - 0,0,2958,2957,1,0,0,0,2958,2959,1,0,0,0,2959,2960,1,0,0,0,2960,2961,5, - 3,0,0,2961,345,1,0,0,0,2962,2964,5,68,0,0,2963,2965,5,193,0,0,2964,2963, - 1,0,0,0,2964,2965,1,0,0,0,2965,2966,1,0,0,0,2966,2968,5,2,0,0,2967,2969, - 5,193,0,0,2968,2967,1,0,0,0,2968,2969,1,0,0,0,2969,2970,1,0,0,0,2970, - 2972,5,171,0,0,2971,2973,5,193,0,0,2972,2971,1,0,0,0,2972,2973,1,0,0, - 0,2973,2974,1,0,0,0,2974,3040,5,3,0,0,2975,2977,5,60,0,0,2976,2978,5, - 193,0,0,2977,2976,1,0,0,0,2977,2978,1,0,0,0,2978,2979,1,0,0,0,2979,2981, - 5,2,0,0,2980,2982,5,193,0,0,2981,2980,1,0,0,0,2981,2982,1,0,0,0,2982, - 2983,1,0,0,0,2983,2985,3,350,175,0,2984,2986,5,193,0,0,2985,2984,1,0, - 0,0,2985,2986,1,0,0,0,2986,2997,1,0,0,0,2987,2989,5,52,0,0,2988,2990, - 5,193,0,0,2989,2988,1,0,0,0,2989,2990,1,0,0,0,2990,2991,1,0,0,0,2991, - 2998,3,148,74,0,2992,2994,5,4,0,0,2993,2995,5,193,0,0,2994,2993,1,0,0, - 0,2994,2995,1,0,0,0,2995,2996,1,0,0,0,2996,2998,3,350,175,0,2997,2987, - 1,0,0,0,2997,2992,1,0,0,0,2998,3000,1,0,0,0,2999,3001,5,193,0,0,3000, - 2999,1,0,0,0,3000,3001,1,0,0,0,3001,3002,1,0,0,0,3002,3003,5,3,0,0,3003, - 3040,1,0,0,0,3004,3006,3,348,174,0,3005,3007,5,193,0,0,3006,3005,1,0, - 0,0,3006,3007,1,0,0,0,3007,3008,1,0,0,0,3008,3010,5,2,0,0,3009,3011,5, - 193,0,0,3010,3009,1,0,0,0,3010,3011,1,0,0,0,3011,3016,1,0,0,0,3012,3014, - 5,79,0,0,3013,3015,5,193,0,0,3014,3013,1,0,0,0,3014,3015,1,0,0,0,3015, - 3017,1,0,0,0,3016,3012,1,0,0,0,3016,3017,1,0,0,0,3017,3035,1,0,0,0,3018, - 3020,3,350,175,0,3019,3021,5,193,0,0,3020,3019,1,0,0,0,3020,3021,1,0, - 0,0,3021,3032,1,0,0,0,3022,3024,5,4,0,0,3023,3025,5,193,0,0,3024,3023, - 1,0,0,0,3024,3025,1,0,0,0,3025,3026,1,0,0,0,3026,3028,3,350,175,0,3027, - 3029,5,193,0,0,3028,3027,1,0,0,0,3028,3029,1,0,0,0,3029,3031,1,0,0,0, - 3030,3022,1,0,0,0,3031,3034,1,0,0,0,3032,3030,1,0,0,0,3032,3033,1,0,0, - 0,3033,3036,1,0,0,0,3034,3032,1,0,0,0,3035,3018,1,0,0,0,3035,3036,1,0, - 0,0,3036,3037,1,0,0,0,3037,3038,5,3,0,0,3038,3040,1,0,0,0,3039,2962,1, - 0,0,0,3039,2975,1,0,0,0,3039,3004,1,0,0,0,3040,347,1,0,0,0,3041,3042, - 3,382,191,0,3042,349,1,0,0,0,3043,3045,3,382,191,0,3044,3046,5,193,0, - 0,3045,3044,1,0,0,0,3045,3046,1,0,0,0,3046,3047,1,0,0,0,3047,3048,5,174, - 0,0,3048,3050,5,6,0,0,3049,3051,5,193,0,0,3050,3049,1,0,0,0,3050,3051, - 1,0,0,0,3051,3053,1,0,0,0,3052,3043,1,0,0,0,3052,3053,1,0,0,0,3053,3054, - 1,0,0,0,3054,3057,3,278,139,0,3055,3057,3,352,176,0,3056,3052,1,0,0,0, - 3056,3055,1,0,0,0,3057,351,1,0,0,0,3058,3060,3,354,177,0,3059,3061,5, - 193,0,0,3060,3059,1,0,0,0,3060,3061,1,0,0,0,3061,3062,1,0,0,0,3062,3063, - 5,176,0,0,3063,3065,5,15,0,0,3064,3066,5,193,0,0,3065,3064,1,0,0,0,3065, - 3066,1,0,0,0,3066,3067,1,0,0,0,3067,3069,3,278,139,0,3068,3070,5,193, - 0,0,3069,3068,1,0,0,0,3069,3070,1,0,0,0,3070,353,1,0,0,0,3071,3096,3, - 382,191,0,3072,3074,5,2,0,0,3073,3075,5,193,0,0,3074,3073,1,0,0,0,3074, - 3075,1,0,0,0,3075,3076,1,0,0,0,3076,3078,3,382,191,0,3077,3079,5,193, - 0,0,3078,3077,1,0,0,0,3078,3079,1,0,0,0,3079,3090,1,0,0,0,3080,3082,5, - 4,0,0,3081,3083,5,193,0,0,3082,3081,1,0,0,0,3082,3083,1,0,0,0,3083,3084, - 1,0,0,0,3084,3086,3,382,191,0,3085,3087,5,193,0,0,3086,3085,1,0,0,0,3086, - 3087,1,0,0,0,3087,3089,1,0,0,0,3088,3080,1,0,0,0,3089,3092,1,0,0,0,3090, - 3088,1,0,0,0,3090,3091,1,0,0,0,3091,3093,1,0,0,0,3092,3090,1,0,0,0,3093, - 3094,5,3,0,0,3094,3096,1,0,0,0,3095,3071,1,0,0,0,3095,3072,1,0,0,0,3096, - 355,1,0,0,0,3097,3102,3,246,123,0,3098,3100,5,193,0,0,3099,3098,1,0,0, - 0,3099,3100,1,0,0,0,3100,3101,1,0,0,0,3101,3103,3,248,124,0,3102,3099, - 1,0,0,0,3103,3104,1,0,0,0,3104,3102,1,0,0,0,3104,3105,1,0,0,0,3105,357, - 1,0,0,0,3106,3108,7,9,0,0,3107,3109,5,193,0,0,3108,3107,1,0,0,0,3108, - 3109,1,0,0,0,3109,3110,1,0,0,0,3110,3112,5,9,0,0,3111,3113,5,193,0,0, - 3112,3111,1,0,0,0,3112,3113,1,0,0,0,3113,3114,1,0,0,0,3114,3116,5,111, - 0,0,3115,3117,5,193,0,0,3116,3115,1,0,0,0,3116,3117,1,0,0,0,3117,3118, - 1,0,0,0,3118,3123,3,238,119,0,3119,3121,5,193,0,0,3120,3119,1,0,0,0,3120, - 3121,1,0,0,0,3121,3122,1,0,0,0,3122,3124,3,236,118,0,3123,3120,1,0,0, - 0,3123,3124,1,0,0,0,3124,3129,1,0,0,0,3125,3127,5,193,0,0,3126,3125,1, - 0,0,0,3126,3127,1,0,0,0,3127,3128,1,0,0,0,3128,3130,3,200,100,0,3129, - 3126,1,0,0,0,3129,3130,1,0,0,0,3130,3132,1,0,0,0,3131,3133,5,193,0,0, - 3132,3131,1,0,0,0,3132,3133,1,0,0,0,3133,3134,1,0,0,0,3134,3135,5,10, - 0,0,3135,359,1,0,0,0,3136,3138,5,5,0,0,3137,3139,5,193,0,0,3138,3137, - 1,0,0,0,3138,3139,1,0,0,0,3139,3142,1,0,0,0,3140,3143,3,374,187,0,3141, - 3143,5,171,0,0,3142,3140,1,0,0,0,3142,3141,1,0,0,0,3143,361,1,0,0,0,3144, - 3149,5,59,0,0,3145,3147,5,193,0,0,3146,3145,1,0,0,0,3146,3147,1,0,0,0, - 3147,3148,1,0,0,0,3148,3150,3,364,182,0,3149,3146,1,0,0,0,3150,3151,1, - 0,0,0,3151,3149,1,0,0,0,3151,3152,1,0,0,0,3152,3167,1,0,0,0,3153,3155, - 5,59,0,0,3154,3156,5,193,0,0,3155,3154,1,0,0,0,3155,3156,1,0,0,0,3156, - 3157,1,0,0,0,3157,3162,3,278,139,0,3158,3160,5,193,0,0,3159,3158,1,0, - 0,0,3159,3160,1,0,0,0,3160,3161,1,0,0,0,3161,3163,3,364,182,0,3162,3159, - 1,0,0,0,3163,3164,1,0,0,0,3164,3162,1,0,0,0,3164,3165,1,0,0,0,3165,3167, - 1,0,0,0,3166,3144,1,0,0,0,3166,3153,1,0,0,0,3167,3176,1,0,0,0,3168,3170, - 5,193,0,0,3169,3168,1,0,0,0,3169,3170,1,0,0,0,3170,3171,1,0,0,0,3171, - 3173,5,81,0,0,3172,3174,5,193,0,0,3173,3172,1,0,0,0,3173,3174,1,0,0,0, - 3174,3175,1,0,0,0,3175,3177,3,278,139,0,3176,3169,1,0,0,0,3176,3177,1, - 0,0,0,3177,3179,1,0,0,0,3178,3180,5,193,0,0,3179,3178,1,0,0,0,3179,3180, - 1,0,0,0,3180,3181,1,0,0,0,3181,3182,5,82,0,0,3182,363,1,0,0,0,3183,3185, - 5,156,0,0,3184,3186,5,193,0,0,3185,3184,1,0,0,0,3185,3186,1,0,0,0,3186, - 3187,1,0,0,0,3187,3189,3,278,139,0,3188,3190,5,193,0,0,3189,3188,1,0, - 0,0,3189,3190,1,0,0,0,3190,3191,1,0,0,0,3191,3193,5,145,0,0,3192,3194, - 5,193,0,0,3193,3192,1,0,0,0,3193,3194,1,0,0,0,3194,3195,1,0,0,0,3195, - 3196,3,278,139,0,3196,365,1,0,0,0,3197,3198,3,382,191,0,3198,367,1,0, - 0,0,3199,3202,3,378,189,0,3200,3202,3,376,188,0,3201,3199,1,0,0,0,3201, - 3200,1,0,0,0,3202,369,1,0,0,0,3203,3206,5,25,0,0,3204,3207,3,382,191, - 0,3205,3207,5,180,0,0,3206,3204,1,0,0,0,3206,3205,1,0,0,0,3207,371,1, - 0,0,0,3208,3210,3,324,162,0,3209,3211,5,193,0,0,3210,3209,1,0,0,0,3210, - 3211,1,0,0,0,3211,3212,1,0,0,0,3212,3213,3,360,180,0,3213,373,1,0,0,0, - 3214,3215,3,382,191,0,3215,375,1,0,0,0,3216,3217,5,180,0,0,3217,377,1, - 0,0,0,3218,3219,7,10,0,0,3219,379,1,0,0,0,3220,3223,3,382,191,0,3221, - 3222,5,5,0,0,3222,3224,3,382,191,0,3223,3221,1,0,0,0,3223,3224,1,0,0, - 0,3224,381,1,0,0,0,3225,3231,5,189,0,0,3226,3227,5,192,0,0,3227,3231, - 6,191,-1,0,3228,3231,5,181,0,0,3229,3231,3,384,192,0,3230,3225,1,0,0, - 0,3230,3226,1,0,0,0,3230,3228,1,0,0,0,3230,3229,1,0,0,0,3231,383,1,0, - 0,0,3232,3233,7,11,0,0,3233,385,1,0,0,0,3234,3235,7,12,0,0,3235,387,1, - 0,0,0,3236,3237,7,13,0,0,3237,389,1,0,0,0,3238,3239,7,14,0,0,3239,391, - 1,0,0,0,553,394,398,403,407,412,415,419,422,450,456,463,467,471,475,478, - 482,486,490,495,499,501,508,512,521,526,536,540,544,549,562,566,574,578, - 582,586,594,598,602,606,621,626,632,636,639,642,648,652,657,660,664,667, - 670,674,678,684,688,693,711,722,728,732,739,759,763,766,769,772,775,779, - 784,788,798,802,807,812,817,823,827,831,836,843,847,851,854,871,875,879, - 883,887,890,893,901,906,910,914,918,922,930,934,938,942,952,956,960,975, - 979,984,988,992,996,1000,1002,1006,1010,1012,1020,1025,1029,1033,1037, - 1042,1048,1052,1065,1069,1072,1075,1078,1082,1086,1089,1092,1096,1100, - 1106,1110,1114,1118,1124,1128,1132,1136,1142,1146,1151,1163,1167,1171, - 1176,1194,1201,1214,1221,1237,1241,1250,1258,1261,1271,1274,1282,1285, - 1291,1294,1300,1315,1325,1328,1332,1336,1355,1362,1369,1380,1403,1412, - 1422,1426,1430,1434,1439,1443,1447,1450,1458,1462,1467,1476,1480,1485, - 1491,1497,1503,1507,1511,1517,1521,1525,1531,1535,1539,1545,1549,1553, - 1557,1561,1567,1571,1575,1579,1583,1593,1599,1606,1611,1617,1622,1639, - 1645,1651,1655,1659,1668,1682,1687,1692,1696,1701,1707,1712,1715,1719, - 1723,1727,1733,1737,1742,1747,1751,1754,1756,1760,1764,1770,1774,1779, - 1783,1792,1798,1806,1810,1814,1818,1825,1829,1833,1837,1840,1843,1850, - 1856,1860,1865,1872,1875,1878,1883,1887,1891,1896,1900,1909,1913,1918, - 1932,1934,1936,1941,1951,1957,1964,1977,1981,1985,1989,1994,1999,2003, - 2007,2011,2015,2019,2025,2029,2033,2037,2042,2048,2051,2057,2060,2066, - 2070,2074,2078,2082,2087,2092,2096,2101,2104,2113,2122,2127,2140,2143, - 2151,2155,2160,2165,2169,2174,2180,2185,2192,2196,2200,2202,2206,2208, - 2212,2214,2220,2226,2230,2233,2236,2242,2245,2248,2252,2258,2261,2264, - 2268,2272,2276,2278,2282,2284,2288,2290,2294,2296,2302,2306,2310,2314, - 2318,2322,2326,2330,2334,2337,2343,2347,2351,2354,2359,2364,2368,2372, - 2375,2378,2383,2388,2391,2394,2397,2400,2403,2407,2411,2415,2419,2429, - 2432,2435,2439,2442,2445,2449,2453,2457,2461,2465,2469,2471,2474,2478, - 2482,2486,2490,2492,2498,2501,2504,2515,2528,2538,2548,2553,2557,2564, - 2568,2572,2576,2580,2588,2592,2596,2600,2606,2610,2616,2620,2625,2630, - 2634,2639,2644,2648,2654,2661,2665,2671,2678,2682,2688,2695,2699,2704, - 2712,2715,2720,2729,2733,2736,2749,2752,2757,2771,2775,2779,2784,2787, - 2791,2796,2808,2812,2816,2820,2826,2830,2834,2840,2844,2848,2854,2858, - 2862,2866,2884,2890,2894,2898,2902,2905,2911,2914,2918,2922,2926,2930, - 2934,2941,2944,2948,2954,2958,2964,2968,2972,2977,2981,2985,2989,2994, - 2997,3000,3006,3010,3014,3016,3020,3024,3028,3032,3035,3039,3045,3050, - 3052,3056,3060,3065,3069,3074,3078,3082,3086,3090,3095,3099,3104,3108, - 3112,3116,3120,3123,3126,3129,3132,3138,3142,3146,3151,3155,3159,3164, - 3166,3169,3173,3176,3179,3185,3189,3193,3201,3206,3210,3223,3230 + 85,87,89,90,93,93,95,95,98,98,100,100,102,102,104,104,106,110,112,115, + 117,118,130,136,138,139,142,142,144,144,147,147,149,149,151,151,154,156, + 160,160,164,171,173,173,2,0,13,13,26,29,2,0,15,15,30,33,2,0,34,44,177, + 177,3692,0,394,1,0,0,0,2,414,1,0,0,0,4,452,1,0,0,0,6,454,1,0,0,0,8,480, + 1,0,0,0,10,528,1,0,0,0,12,530,1,0,0,0,14,560,1,0,0,0,16,590,1,0,0,0,18, + 610,1,0,0,0,20,616,1,0,0,0,22,672,1,0,0,0,24,674,1,0,0,0,26,684,1,0,0, + 0,28,698,1,0,0,0,30,702,1,0,0,0,32,706,1,0,0,0,34,715,1,0,0,0,36,721, + 1,0,0,0,38,741,1,0,0,0,40,743,1,0,0,0,42,755,1,0,0,0,44,798,1,0,0,0,46, + 812,1,0,0,0,48,856,1,0,0,0,50,858,1,0,0,0,52,864,1,0,0,0,54,926,1,0,0, + 0,56,935,1,0,0,0,58,953,1,0,0,0,60,971,1,0,0,0,62,985,1,0,0,0,64,1056, + 1,0,0,0,66,1099,1,0,0,0,68,1101,1,0,0,0,70,1121,1,0,0,0,72,1139,1,0,0, + 0,74,1157,1,0,0,0,76,1171,1,0,0,0,78,1182,1,0,0,0,80,1196,1,0,0,0,82, + 1204,1,0,0,0,84,1221,1,0,0,0,86,1238,1,0,0,0,88,1240,1,0,0,0,90,1247, + 1,0,0,0,92,1260,1,0,0,0,94,1271,1,0,0,0,96,1291,1,0,0,0,98,1302,1,0,0, + 0,100,1304,1,0,0,0,102,1317,1,0,0,0,104,1321,1,0,0,0,106,1345,1,0,0,0, + 108,1347,1,0,0,0,110,1357,1,0,0,0,112,1372,1,0,0,0,114,1374,1,0,0,0,116, + 1388,1,0,0,0,118,1392,1,0,0,0,120,1401,1,0,0,0,122,1407,1,0,0,0,124,1415, + 1,0,0,0,126,1424,1,0,0,0,128,1433,1,0,0,0,130,1469,1,0,0,0,132,1473,1, + 0,0,0,134,1487,1,0,0,0,136,1491,1,0,0,0,138,1505,1,0,0,0,140,1516,1,0, + 0,0,142,1532,1,0,0,0,144,1546,1,0,0,0,146,1560,1,0,0,0,148,1582,1,0,0, + 0,150,1610,1,0,0,0,152,1619,1,0,0,0,154,1626,1,0,0,0,156,1634,1,0,0,0, + 158,1636,1,0,0,0,160,1641,1,0,0,0,162,1656,1,0,0,0,164,1662,1,0,0,0,166, + 1664,1,0,0,0,168,1676,1,0,0,0,170,1687,1,0,0,0,172,1691,1,0,0,0,174,1695, + 1,0,0,0,176,1718,1,0,0,0,178,1732,1,0,0,0,180,1736,1,0,0,0,182,1773,1, + 0,0,0,184,1779,1,0,0,0,186,1791,1,0,0,0,188,1809,1,0,0,0,190,1815,1,0, + 0,0,192,1817,1,0,0,0,194,1867,1,0,0,0,196,1871,1,0,0,0,198,1885,1,0,0, + 0,200,1904,1,0,0,0,202,1919,1,0,0,0,204,1935,1,0,0,0,206,1956,1,0,0,0, + 208,1966,1,0,0,0,210,1972,1,0,0,0,212,1994,1,0,0,0,214,2028,1,0,0,0,216, + 2030,1,0,0,0,218,2042,1,0,0,0,220,2062,1,0,0,0,222,2070,1,0,0,0,224,2077, + 1,0,0,0,226,2121,1,0,0,0,228,2130,1,0,0,0,230,2132,1,0,0,0,232,2147,1, + 0,0,0,234,2151,1,0,0,0,236,2155,1,0,0,0,238,2162,1,0,0,0,240,2166,1,0, + 0,0,242,2191,1,0,0,0,244,2193,1,0,0,0,246,2209,1,0,0,0,248,2211,1,0,0, + 0,250,2235,1,0,0,0,252,2285,1,0,0,0,254,2287,1,0,0,0,256,2317,1,0,0,0, + 258,2358,1,0,0,0,260,2379,1,0,0,0,262,2403,1,0,0,0,264,2446,1,0,0,0,266, + 2462,1,0,0,0,268,2464,1,0,0,0,270,2513,1,0,0,0,272,2525,1,0,0,0,274,2527, + 1,0,0,0,276,2529,1,0,0,0,278,2534,1,0,0,0,280,2536,1,0,0,0,282,2538,1, + 0,0,0,284,2548,1,0,0,0,286,2558,1,0,0,0,288,2574,1,0,0,0,290,2627,1,0, + 0,0,292,2629,1,0,0,0,294,2631,1,0,0,0,296,2645,1,0,0,0,298,2659,1,0,0, + 0,300,2674,1,0,0,0,302,2676,1,0,0,0,304,2691,1,0,0,0,306,2693,1,0,0,0, + 308,2708,1,0,0,0,310,2710,1,0,0,0,312,2724,1,0,0,0,314,2753,1,0,0,0,316, + 2766,1,0,0,0,318,2774,1,0,0,0,320,2788,1,0,0,0,322,2796,1,0,0,0,324,2806, + 1,0,0,0,326,2825,1,0,0,0,328,2883,1,0,0,0,330,2885,1,0,0,0,332,2889,1, + 0,0,0,334,2901,1,0,0,0,336,2903,1,0,0,0,338,2905,1,0,0,0,340,2926,1,0, + 0,0,342,2933,1,0,0,0,344,2958,1,0,0,0,346,2969,1,0,0,0,348,3056,1,0,0, + 0,350,3058,1,0,0,0,352,3073,1,0,0,0,354,3075,1,0,0,0,356,3112,1,0,0,0, + 358,3114,1,0,0,0,360,3123,1,0,0,0,362,3153,1,0,0,0,364,3183,1,0,0,0,366, + 3200,1,0,0,0,368,3214,1,0,0,0,370,3218,1,0,0,0,372,3220,1,0,0,0,374,3225, + 1,0,0,0,376,3231,1,0,0,0,378,3233,1,0,0,0,380,3235,1,0,0,0,382,3237,1, + 0,0,0,384,3247,1,0,0,0,386,3249,1,0,0,0,388,3251,1,0,0,0,390,3253,1,0, + 0,0,392,3255,1,0,0,0,394,405,3,2,1,0,395,397,5,194,0,0,396,395,1,0,0, + 0,396,397,1,0,0,0,397,398,1,0,0,0,398,400,5,1,0,0,399,401,5,194,0,0,400, + 399,1,0,0,0,400,401,1,0,0,0,401,402,1,0,0,0,402,404,3,2,1,0,403,396,1, + 0,0,0,404,407,1,0,0,0,405,403,1,0,0,0,405,406,1,0,0,0,406,409,1,0,0,0, + 407,405,1,0,0,0,408,410,5,194,0,0,409,408,1,0,0,0,409,410,1,0,0,0,410, + 411,1,0,0,0,411,412,5,0,0,1,412,1,1,0,0,0,413,415,3,156,78,0,414,413, + 1,0,0,0,414,415,1,0,0,0,415,417,1,0,0,0,416,418,5,194,0,0,417,416,1,0, + 0,0,417,418,1,0,0,0,418,419,1,0,0,0,419,424,3,4,2,0,420,422,5,194,0,0, + 421,420,1,0,0,0,421,422,1,0,0,0,422,423,1,0,0,0,423,425,5,1,0,0,424,421, + 1,0,0,0,424,425,1,0,0,0,425,3,1,0,0,0,426,453,3,174,87,0,427,453,3,36, + 18,0,428,453,3,90,45,0,429,453,3,92,46,0,430,453,3,52,26,0,431,453,3, + 62,31,0,432,453,3,64,32,0,433,453,3,82,41,0,434,453,3,84,42,0,435,453, + 3,106,53,0,436,453,3,110,55,0,437,453,3,6,3,0,438,453,3,12,6,0,439,453, + 3,14,7,0,440,453,3,38,19,0,441,453,3,42,21,0,442,453,3,40,20,0,443,453, + 3,162,81,0,444,453,3,164,82,0,445,453,3,16,8,0,446,453,3,18,9,0,447,453, + 3,20,10,0,448,453,3,28,14,0,449,453,3,30,15,0,450,453,3,32,16,0,451,453, + 3,34,17,0,452,426,1,0,0,0,452,427,1,0,0,0,452,428,1,0,0,0,452,429,1,0, + 0,0,452,430,1,0,0,0,452,431,1,0,0,0,452,432,1,0,0,0,452,433,1,0,0,0,452, + 434,1,0,0,0,452,435,1,0,0,0,452,436,1,0,0,0,452,437,1,0,0,0,452,438,1, + 0,0,0,452,439,1,0,0,0,452,440,1,0,0,0,452,441,1,0,0,0,452,442,1,0,0,0, + 452,443,1,0,0,0,452,444,1,0,0,0,452,445,1,0,0,0,452,446,1,0,0,0,452,447, + 1,0,0,0,452,448,1,0,0,0,452,449,1,0,0,0,452,450,1,0,0,0,452,451,1,0,0, + 0,453,5,1,0,0,0,454,455,5,67,0,0,455,456,5,194,0,0,456,458,3,382,191, + 0,457,459,3,8,4,0,458,457,1,0,0,0,458,459,1,0,0,0,459,460,1,0,0,0,460, + 461,5,194,0,0,461,462,5,89,0,0,462,463,5,194,0,0,463,477,3,10,5,0,464, + 466,5,194,0,0,465,464,1,0,0,0,465,466,1,0,0,0,466,467,1,0,0,0,467,469, + 5,2,0,0,468,470,5,194,0,0,469,468,1,0,0,0,469,470,1,0,0,0,470,471,1,0, + 0,0,471,473,3,26,13,0,472,474,5,194,0,0,473,472,1,0,0,0,473,474,1,0,0, + 0,474,475,1,0,0,0,475,476,5,3,0,0,476,478,1,0,0,0,477,465,1,0,0,0,477, + 478,1,0,0,0,478,7,1,0,0,0,479,481,5,194,0,0,480,479,1,0,0,0,480,481,1, + 0,0,0,481,482,1,0,0,0,482,484,5,2,0,0,483,485,5,194,0,0,484,483,1,0,0, + 0,484,485,1,0,0,0,485,503,1,0,0,0,486,497,3,382,191,0,487,489,5,194,0, + 0,488,487,1,0,0,0,488,489,1,0,0,0,489,490,1,0,0,0,490,492,5,4,0,0,491, + 493,5,194,0,0,492,491,1,0,0,0,492,493,1,0,0,0,493,494,1,0,0,0,494,496, + 3,382,191,0,495,488,1,0,0,0,496,499,1,0,0,0,497,495,1,0,0,0,497,498,1, + 0,0,0,498,501,1,0,0,0,499,497,1,0,0,0,500,502,5,194,0,0,501,500,1,0,0, + 0,501,502,1,0,0,0,502,504,1,0,0,0,503,486,1,0,0,0,503,504,1,0,0,0,504, + 505,1,0,0,0,505,506,5,3,0,0,506,9,1,0,0,0,507,529,3,48,24,0,508,510,5, + 2,0,0,509,511,5,194,0,0,510,509,1,0,0,0,510,511,1,0,0,0,511,512,1,0,0, + 0,512,514,3,174,87,0,513,515,5,194,0,0,514,513,1,0,0,0,514,515,1,0,0, + 0,515,516,1,0,0,0,516,517,5,3,0,0,517,529,1,0,0,0,518,529,3,372,186,0, + 519,529,3,368,184,0,520,521,3,368,184,0,521,523,5,5,0,0,522,524,5,194, + 0,0,523,522,1,0,0,0,523,524,1,0,0,0,524,525,1,0,0,0,525,526,3,382,191, + 0,526,529,1,0,0,0,527,529,3,348,174,0,528,507,1,0,0,0,528,508,1,0,0,0, + 528,518,1,0,0,0,528,519,1,0,0,0,528,520,1,0,0,0,528,527,1,0,0,0,529,11, + 1,0,0,0,530,531,5,67,0,0,531,532,5,194,0,0,532,533,3,382,191,0,533,534, + 5,194,0,0,534,535,5,89,0,0,535,536,5,194,0,0,536,538,5,2,0,0,537,539, + 5,194,0,0,538,537,1,0,0,0,538,539,1,0,0,0,539,540,1,0,0,0,540,551,5,179, + 0,0,541,543,5,194,0,0,542,541,1,0,0,0,542,543,1,0,0,0,543,544,1,0,0,0, + 544,546,5,4,0,0,545,547,5,194,0,0,546,545,1,0,0,0,546,547,1,0,0,0,547, + 548,1,0,0,0,548,550,5,179,0,0,549,542,1,0,0,0,550,553,1,0,0,0,551,549, + 1,0,0,0,551,552,1,0,0,0,552,554,1,0,0,0,553,551,1,0,0,0,554,555,5,3,0, + 0,555,556,5,194,0,0,556,557,5,57,0,0,557,558,5,194,0,0,558,559,5,62,0, + 0,559,13,1,0,0,0,560,561,5,67,0,0,561,562,5,194,0,0,562,564,5,2,0,0,563, + 565,5,194,0,0,564,563,1,0,0,0,564,565,1,0,0,0,565,566,1,0,0,0,566,568, + 3,174,87,0,567,569,5,194,0,0,568,567,1,0,0,0,568,569,1,0,0,0,569,570, + 1,0,0,0,570,571,5,3,0,0,571,572,5,194,0,0,572,573,5,147,0,0,573,574,5, + 194,0,0,574,588,5,179,0,0,575,577,5,194,0,0,576,575,1,0,0,0,576,577,1, + 0,0,0,577,578,1,0,0,0,578,580,5,2,0,0,579,581,5,194,0,0,580,579,1,0,0, + 0,580,581,1,0,0,0,581,582,1,0,0,0,582,584,3,26,13,0,583,585,5,194,0,0, + 584,583,1,0,0,0,584,585,1,0,0,0,585,586,1,0,0,0,586,587,5,3,0,0,587,589, + 1,0,0,0,588,576,1,0,0,0,588,589,1,0,0,0,589,15,1,0,0,0,590,591,5,86,0, + 0,591,592,5,194,0,0,592,593,5,72,0,0,593,594,5,194,0,0,594,608,5,179, + 0,0,595,597,5,194,0,0,596,595,1,0,0,0,596,597,1,0,0,0,597,598,1,0,0,0, + 598,600,5,2,0,0,599,601,5,194,0,0,600,599,1,0,0,0,600,601,1,0,0,0,601, + 602,1,0,0,0,602,604,3,26,13,0,603,605,5,194,0,0,604,603,1,0,0,0,604,605, + 1,0,0,0,605,606,1,0,0,0,606,607,5,3,0,0,607,609,1,0,0,0,608,596,1,0,0, + 0,608,609,1,0,0,0,609,17,1,0,0,0,610,611,5,98,0,0,611,612,5,194,0,0,612, + 613,5,72,0,0,613,614,5,194,0,0,614,615,5,179,0,0,615,19,1,0,0,0,616,617, + 5,55,0,0,617,618,5,194,0,0,618,623,5,179,0,0,619,620,5,194,0,0,620,621, + 5,52,0,0,621,622,5,194,0,0,622,624,3,382,191,0,623,619,1,0,0,0,623,624, + 1,0,0,0,624,625,1,0,0,0,625,626,5,194,0,0,626,628,5,2,0,0,627,629,5,194, + 0,0,628,627,1,0,0,0,628,629,1,0,0,0,629,630,1,0,0,0,630,631,5,73,0,0, + 631,632,5,194,0,0,632,641,3,384,192,0,633,635,5,194,0,0,634,633,1,0,0, + 0,634,635,1,0,0,0,635,636,1,0,0,0,636,638,5,4,0,0,637,639,5,194,0,0,638, + 637,1,0,0,0,638,639,1,0,0,0,639,640,1,0,0,0,640,642,3,26,13,0,641,634, + 1,0,0,0,641,642,1,0,0,0,642,644,1,0,0,0,643,645,5,194,0,0,644,643,1,0, + 0,0,644,645,1,0,0,0,645,646,1,0,0,0,646,647,5,3,0,0,647,21,1,0,0,0,648, + 662,3,384,192,0,649,651,5,194,0,0,650,649,1,0,0,0,650,651,1,0,0,0,651, + 652,1,0,0,0,652,654,5,6,0,0,653,655,5,194,0,0,654,653,1,0,0,0,654,655, + 1,0,0,0,655,663,1,0,0,0,656,658,5,194,0,0,657,656,1,0,0,0,658,661,1,0, + 0,0,659,657,1,0,0,0,659,660,1,0,0,0,660,663,1,0,0,0,661,659,1,0,0,0,662, + 650,1,0,0,0,662,659,1,0,0,0,663,664,1,0,0,0,664,669,3,334,167,0,665,667, + 5,194,0,0,666,665,1,0,0,0,666,667,1,0,0,0,667,668,1,0,0,0,668,670,3,24, + 12,0,669,666,1,0,0,0,669,670,1,0,0,0,670,673,1,0,0,0,671,673,3,384,192, + 0,672,648,1,0,0,0,672,671,1,0,0,0,673,23,1,0,0,0,674,676,5,2,0,0,675, + 677,5,194,0,0,676,675,1,0,0,0,676,677,1,0,0,0,677,678,1,0,0,0,678,680, + 3,384,192,0,679,681,5,194,0,0,680,679,1,0,0,0,680,681,1,0,0,0,681,682, + 1,0,0,0,682,683,5,3,0,0,683,25,1,0,0,0,684,695,3,22,11,0,685,687,5,194, + 0,0,686,685,1,0,0,0,686,687,1,0,0,0,687,688,1,0,0,0,688,690,5,4,0,0,689, + 691,5,194,0,0,690,689,1,0,0,0,690,691,1,0,0,0,691,692,1,0,0,0,692,694, + 3,22,11,0,693,686,1,0,0,0,694,697,1,0,0,0,695,693,1,0,0,0,695,696,1,0, + 0,0,696,27,1,0,0,0,697,695,1,0,0,0,698,699,5,78,0,0,699,700,5,194,0,0, + 700,701,3,382,191,0,701,29,1,0,0,0,702,703,5,156,0,0,703,704,5,194,0, + 0,704,705,3,382,191,0,705,31,1,0,0,0,706,707,5,69,0,0,707,708,5,194,0, + 0,708,709,5,93,0,0,709,710,5,194,0,0,710,713,3,382,191,0,711,712,5,194, + 0,0,712,714,5,46,0,0,713,711,1,0,0,0,713,714,1,0,0,0,714,33,1,0,0,0,715, + 716,5,156,0,0,716,717,5,194,0,0,717,718,5,93,0,0,718,719,5,194,0,0,719, + 720,3,382,191,0,720,35,1,0,0,0,721,724,5,50,0,0,722,723,5,194,0,0,723, + 725,3,382,191,0,724,722,1,0,0,0,724,725,1,0,0,0,725,37,1,0,0,0,726,727, + 5,58,0,0,727,728,5,194,0,0,728,730,3,384,192,0,729,731,5,194,0,0,730, + 729,1,0,0,0,730,731,1,0,0,0,731,732,1,0,0,0,732,734,5,6,0,0,733,735,5, + 194,0,0,734,733,1,0,0,0,734,735,1,0,0,0,735,736,1,0,0,0,736,737,3,280, + 140,0,737,742,1,0,0,0,738,739,5,58,0,0,739,740,5,194,0,0,740,742,3,348, + 174,0,741,726,1,0,0,0,741,738,1,0,0,0,742,39,1,0,0,0,743,744,5,63,0,0, + 744,745,5,194,0,0,745,746,5,122,0,0,746,747,5,194,0,0,747,748,5,145,0, + 0,748,749,5,194,0,0,749,750,3,382,191,0,750,751,5,194,0,0,751,752,5,104, + 0,0,752,753,5,194,0,0,753,754,5,179,0,0,754,41,1,0,0,0,755,756,5,69,0, + 0,756,757,5,194,0,0,757,758,5,111,0,0,758,759,5,194,0,0,759,761,3,350, + 175,0,760,762,5,194,0,0,761,760,1,0,0,0,761,762,1,0,0,0,762,763,1,0,0, + 0,763,765,5,2,0,0,764,766,5,194,0,0,765,764,1,0,0,0,765,766,1,0,0,0,766, + 768,1,0,0,0,767,769,3,44,22,0,768,767,1,0,0,0,768,769,1,0,0,0,769,771, + 1,0,0,0,770,772,5,194,0,0,771,770,1,0,0,0,771,772,1,0,0,0,772,774,1,0, + 0,0,773,775,3,46,23,0,774,773,1,0,0,0,774,775,1,0,0,0,775,786,1,0,0,0, + 776,778,5,194,0,0,777,776,1,0,0,0,777,778,1,0,0,0,778,779,1,0,0,0,779, + 781,5,4,0,0,780,782,5,194,0,0,781,780,1,0,0,0,781,782,1,0,0,0,782,783, + 1,0,0,0,783,785,3,46,23,0,784,777,1,0,0,0,785,788,1,0,0,0,786,784,1,0, + 0,0,786,787,1,0,0,0,787,790,1,0,0,0,788,786,1,0,0,0,789,791,5,194,0,0, + 790,789,1,0,0,0,790,791,1,0,0,0,791,792,1,0,0,0,792,793,5,3,0,0,793,794, + 5,194,0,0,794,795,5,52,0,0,795,796,5,194,0,0,796,797,3,280,140,0,797, + 43,1,0,0,0,798,809,3,384,192,0,799,801,5,194,0,0,800,799,1,0,0,0,800, + 801,1,0,0,0,801,802,1,0,0,0,802,804,5,4,0,0,803,805,5,194,0,0,804,803, + 1,0,0,0,804,805,1,0,0,0,805,806,1,0,0,0,806,808,3,384,192,0,807,800,1, + 0,0,0,808,811,1,0,0,0,809,807,1,0,0,0,809,810,1,0,0,0,810,45,1,0,0,0, + 811,809,1,0,0,0,812,814,3,384,192,0,813,815,5,194,0,0,814,813,1,0,0,0, + 814,815,1,0,0,0,815,816,1,0,0,0,816,817,5,175,0,0,817,819,5,6,0,0,818, + 820,5,194,0,0,819,818,1,0,0,0,819,820,1,0,0,0,820,821,1,0,0,0,821,822, + 3,334,167,0,822,47,1,0,0,0,823,825,5,7,0,0,824,826,5,194,0,0,825,824, + 1,0,0,0,825,826,1,0,0,0,826,827,1,0,0,0,827,838,5,179,0,0,828,830,5,194, + 0,0,829,828,1,0,0,0,829,830,1,0,0,0,830,831,1,0,0,0,831,833,5,4,0,0,832, + 834,5,194,0,0,833,832,1,0,0,0,833,834,1,0,0,0,834,835,1,0,0,0,835,837, + 5,179,0,0,836,829,1,0,0,0,837,840,1,0,0,0,838,836,1,0,0,0,838,839,1,0, + 0,0,839,841,1,0,0,0,840,838,1,0,0,0,841,857,5,8,0,0,842,857,5,179,0,0, + 843,845,5,92,0,0,844,846,5,194,0,0,845,844,1,0,0,0,845,846,1,0,0,0,846, + 847,1,0,0,0,847,849,5,2,0,0,848,850,5,194,0,0,849,848,1,0,0,0,849,850, + 1,0,0,0,850,851,1,0,0,0,851,853,5,179,0,0,852,854,5,194,0,0,853,852,1, + 0,0,0,853,854,1,0,0,0,854,855,1,0,0,0,855,857,5,3,0,0,856,823,1,0,0,0, + 856,842,1,0,0,0,856,843,1,0,0,0,857,49,1,0,0,0,858,859,5,100,0,0,859, + 860,5,194,0,0,860,861,5,119,0,0,861,862,5,194,0,0,862,863,5,84,0,0,863, + 51,1,0,0,0,864,865,5,69,0,0,865,866,5,194,0,0,866,867,5,118,0,0,867,868, + 5,194,0,0,868,869,5,145,0,0,869,873,5,194,0,0,870,871,3,50,25,0,871,872, + 5,194,0,0,872,874,1,0,0,0,873,870,1,0,0,0,873,874,1,0,0,0,874,875,1,0, + 0,0,875,903,3,382,191,0,876,878,5,194,0,0,877,876,1,0,0,0,877,878,1,0, + 0,0,878,879,1,0,0,0,879,881,5,2,0,0,880,882,5,194,0,0,881,880,1,0,0,0, + 881,882,1,0,0,0,882,883,1,0,0,0,883,885,3,136,68,0,884,886,5,194,0,0, + 885,884,1,0,0,0,885,886,1,0,0,0,886,892,1,0,0,0,887,889,5,4,0,0,888,890, + 5,194,0,0,889,888,1,0,0,0,889,890,1,0,0,0,890,891,1,0,0,0,891,893,3,140, + 70,0,892,887,1,0,0,0,892,893,1,0,0,0,893,895,1,0,0,0,894,896,5,194,0, + 0,895,894,1,0,0,0,895,896,1,0,0,0,896,897,1,0,0,0,897,898,5,3,0,0,898, + 904,1,0,0,0,899,900,5,194,0,0,900,901,5,52,0,0,901,902,5,194,0,0,902, + 904,3,174,87,0,903,877,1,0,0,0,903,899,1,0,0,0,904,920,1,0,0,0,905,906, + 5,194,0,0,906,908,5,159,0,0,907,909,5,194,0,0,908,907,1,0,0,0,908,909, + 1,0,0,0,909,910,1,0,0,0,910,912,5,2,0,0,911,913,5,194,0,0,912,911,1,0, + 0,0,912,913,1,0,0,0,913,914,1,0,0,0,914,916,3,26,13,0,915,917,5,194,0, + 0,916,915,1,0,0,0,916,917,1,0,0,0,917,918,1,0,0,0,918,919,5,3,0,0,919, + 921,1,0,0,0,920,905,1,0,0,0,920,921,1,0,0,0,921,924,1,0,0,0,922,923,5, + 194,0,0,923,925,3,54,27,0,924,922,1,0,0,0,924,925,1,0,0,0,925,53,1,0, + 0,0,926,927,5,166,0,0,927,928,5,194,0,0,928,929,5,57,0,0,929,933,5,194, + 0,0,930,934,3,58,29,0,931,934,3,56,28,0,932,934,3,60,30,0,933,930,1,0, + 0,0,933,931,1,0,0,0,933,932,1,0,0,0,934,55,1,0,0,0,935,937,5,95,0,0,936, + 938,5,194,0,0,937,936,1,0,0,0,937,938,1,0,0,0,938,939,1,0,0,0,939,941, + 5,2,0,0,940,942,5,194,0,0,941,940,1,0,0,0,941,942,1,0,0,0,942,943,1,0, + 0,0,943,945,3,376,188,0,944,946,5,194,0,0,945,944,1,0,0,0,945,946,1,0, + 0,0,946,947,1,0,0,0,947,948,5,3,0,0,948,949,5,194,0,0,949,950,5,167,0, + 0,950,951,5,194,0,0,951,952,3,378,189,0,952,57,1,0,0,0,953,955,5,131, + 0,0,954,956,5,194,0,0,955,954,1,0,0,0,955,956,1,0,0,0,956,957,1,0,0,0, + 957,959,5,2,0,0,958,960,5,194,0,0,959,958,1,0,0,0,959,960,1,0,0,0,960, + 961,1,0,0,0,961,963,3,376,188,0,962,964,5,194,0,0,963,962,1,0,0,0,963, + 964,1,0,0,0,964,965,1,0,0,0,965,966,5,3,0,0,966,967,5,194,0,0,967,968, + 5,167,0,0,968,969,5,194,0,0,969,970,3,378,189,0,970,59,1,0,0,0,971,973, + 5,108,0,0,972,974,5,194,0,0,973,972,1,0,0,0,973,974,1,0,0,0,974,975,1, + 0,0,0,975,977,5,2,0,0,976,978,5,194,0,0,977,976,1,0,0,0,977,978,1,0,0, + 0,978,979,1,0,0,0,979,981,3,376,188,0,980,982,5,194,0,0,981,980,1,0,0, + 0,981,982,1,0,0,0,982,983,1,0,0,0,983,984,5,3,0,0,984,61,1,0,0,0,985, + 986,5,69,0,0,986,987,5,194,0,0,987,988,5,133,0,0,988,989,5,194,0,0,989, + 992,5,145,0,0,990,991,5,194,0,0,991,993,5,94,0,0,992,990,1,0,0,0,992, + 993,1,0,0,0,993,996,1,0,0,0,994,995,5,194,0,0,995,997,3,50,25,0,996,994, + 1,0,0,0,996,997,1,0,0,0,997,998,1,0,0,0,998,999,5,194,0,0,999,1001,3, + 382,191,0,1000,1002,5,194,0,0,1001,1000,1,0,0,0,1001,1002,1,0,0,0,1002, + 1003,1,0,0,0,1003,1005,5,2,0,0,1004,1006,5,194,0,0,1005,1004,1,0,0,0, + 1005,1006,1,0,0,0,1006,1007,1,0,0,0,1007,1009,3,74,37,0,1008,1010,5,194, + 0,0,1009,1008,1,0,0,0,1009,1010,1,0,0,0,1010,1037,1,0,0,0,1011,1013,5, + 4,0,0,1012,1014,5,194,0,0,1013,1012,1,0,0,0,1013,1014,1,0,0,0,1014,1015, + 1,0,0,0,1015,1017,3,136,68,0,1016,1018,5,194,0,0,1017,1016,1,0,0,0,1017, + 1018,1,0,0,0,1018,1020,1,0,0,0,1019,1011,1,0,0,0,1019,1020,1,0,0,0,1020, + 1029,1,0,0,0,1021,1023,5,4,0,0,1022,1024,5,194,0,0,1023,1022,1,0,0,0, + 1023,1024,1,0,0,0,1024,1025,1,0,0,0,1025,1027,3,384,192,0,1026,1028,5, + 194,0,0,1027,1026,1,0,0,0,1027,1028,1,0,0,0,1028,1030,1,0,0,0,1029,1021, + 1,0,0,0,1029,1030,1,0,0,0,1030,1031,1,0,0,0,1031,1038,5,3,0,0,1032,1033, + 5,3,0,0,1033,1034,5,194,0,0,1034,1035,5,52,0,0,1035,1036,5,194,0,0,1036, + 1038,3,174,87,0,1037,1019,1,0,0,0,1037,1032,1,0,0,0,1038,1054,1,0,0,0, + 1039,1040,5,194,0,0,1040,1042,5,159,0,0,1041,1043,5,194,0,0,1042,1041, + 1,0,0,0,1042,1043,1,0,0,0,1043,1044,1,0,0,0,1044,1046,5,2,0,0,1045,1047, + 5,194,0,0,1046,1045,1,0,0,0,1046,1047,1,0,0,0,1047,1048,1,0,0,0,1048, + 1050,3,26,13,0,1049,1051,5,194,0,0,1050,1049,1,0,0,0,1050,1051,1,0,0, + 0,1051,1052,1,0,0,0,1052,1053,5,3,0,0,1053,1055,1,0,0,0,1054,1039,1,0, + 0,0,1054,1055,1,0,0,0,1055,63,1,0,0,0,1056,1059,5,69,0,0,1057,1058,5, + 194,0,0,1058,1060,3,384,192,0,1059,1057,1,0,0,0,1059,1060,1,0,0,0,1060, + 1061,1,0,0,0,1061,1062,5,194,0,0,1062,1065,5,99,0,0,1063,1064,5,194,0, + 0,1064,1066,3,382,191,0,1065,1063,1,0,0,0,1065,1066,1,0,0,0,1066,1069, + 1,0,0,0,1067,1068,5,194,0,0,1068,1070,3,50,25,0,1069,1067,1,0,0,0,1069, + 1070,1,0,0,0,1070,1071,1,0,0,0,1071,1072,5,194,0,0,1072,1073,5,91,0,0, + 1073,1074,5,194,0,0,1074,1075,3,66,33,0,1075,1076,5,194,0,0,1076,1077, + 5,122,0,0,1077,1078,5,194,0,0,1078,1095,3,72,36,0,1079,1080,5,194,0,0, + 1080,1082,5,124,0,0,1081,1083,5,194,0,0,1082,1081,1,0,0,0,1082,1083,1, + 0,0,0,1083,1084,1,0,0,0,1084,1086,5,9,0,0,1085,1087,5,194,0,0,1086,1085, + 1,0,0,0,1086,1087,1,0,0,0,1087,1089,1,0,0,0,1088,1090,3,26,13,0,1089, + 1088,1,0,0,0,1089,1090,1,0,0,0,1090,1092,1,0,0,0,1091,1093,5,194,0,0, + 1092,1091,1,0,0,0,1092,1093,1,0,0,0,1093,1094,1,0,0,0,1094,1096,5,10, + 0,0,1095,1079,1,0,0,0,1095,1096,1,0,0,0,1096,65,1,0,0,0,1097,1100,3,68, + 34,0,1098,1100,3,70,35,0,1099,1097,1,0,0,0,1099,1098,1,0,0,0,1100,67, + 1,0,0,0,1101,1103,5,2,0,0,1102,1104,5,194,0,0,1103,1102,1,0,0,0,1103, + 1104,1,0,0,0,1104,1106,1,0,0,0,1105,1107,3,368,184,0,1106,1105,1,0,0, + 0,1106,1107,1,0,0,0,1107,1109,1,0,0,0,1108,1110,5,194,0,0,1109,1108,1, + 0,0,0,1109,1110,1,0,0,0,1110,1111,1,0,0,0,1111,1113,5,175,0,0,1112,1114, + 5,194,0,0,1113,1112,1,0,0,0,1113,1114,1,0,0,0,1114,1115,1,0,0,0,1115, + 1117,3,276,138,0,1116,1118,5,194,0,0,1117,1116,1,0,0,0,1117,1118,1,0, + 0,0,1118,1119,1,0,0,0,1119,1120,5,3,0,0,1120,69,1,0,0,0,1121,1123,5,2, + 0,0,1122,1124,5,194,0,0,1123,1122,1,0,0,0,1123,1124,1,0,0,0,1124,1125, + 1,0,0,0,1125,1127,5,3,0,0,1126,1128,5,194,0,0,1127,1126,1,0,0,0,1127, + 1128,1,0,0,0,1128,1129,1,0,0,0,1129,1131,3,252,126,0,1130,1132,5,194, + 0,0,1131,1130,1,0,0,0,1131,1132,1,0,0,0,1132,1133,1,0,0,0,1133,1135,5, + 2,0,0,1134,1136,5,194,0,0,1135,1134,1,0,0,0,1135,1136,1,0,0,0,1136,1137, + 1,0,0,0,1137,1138,5,3,0,0,1138,71,1,0,0,0,1139,1141,5,2,0,0,1140,1142, + 5,194,0,0,1141,1140,1,0,0,0,1141,1142,1,0,0,0,1142,1143,1,0,0,0,1143, + 1145,3,368,184,0,1144,1146,5,194,0,0,1145,1144,1,0,0,0,1145,1146,1,0, + 0,0,1146,1147,1,0,0,0,1147,1149,5,5,0,0,1148,1150,5,194,0,0,1149,1148, + 1,0,0,0,1149,1150,1,0,0,0,1150,1151,1,0,0,0,1151,1153,3,376,188,0,1152, + 1154,5,194,0,0,1153,1152,1,0,0,0,1153,1154,1,0,0,0,1154,1155,1,0,0,0, + 1155,1156,5,3,0,0,1156,73,1,0,0,0,1157,1168,3,76,38,0,1158,1160,5,194, + 0,0,1159,1158,1,0,0,0,1159,1160,1,0,0,0,1160,1161,1,0,0,0,1161,1163,5, + 4,0,0,1162,1164,5,194,0,0,1163,1162,1,0,0,0,1163,1164,1,0,0,0,1164,1165, + 1,0,0,0,1165,1167,3,76,38,0,1166,1159,1,0,0,0,1167,1170,1,0,0,0,1168, + 1166,1,0,0,0,1168,1169,1,0,0,0,1169,75,1,0,0,0,1170,1168,1,0,0,0,1171, + 1172,5,89,0,0,1172,1173,5,194,0,0,1173,1174,3,382,191,0,1174,1175,5,194, + 0,0,1175,1176,5,147,0,0,1176,1177,5,194,0,0,1177,1180,3,382,191,0,1178, + 1179,5,194,0,0,1179,1181,3,384,192,0,1180,1178,1,0,0,0,1180,1181,1,0, + 0,0,1181,77,1,0,0,0,1182,1193,3,80,40,0,1183,1185,5,194,0,0,1184,1183, + 1,0,0,0,1184,1185,1,0,0,0,1185,1186,1,0,0,0,1186,1188,5,4,0,0,1187,1189, + 5,194,0,0,1188,1187,1,0,0,0,1188,1189,1,0,0,0,1189,1190,1,0,0,0,1190, + 1192,3,80,40,0,1191,1184,1,0,0,0,1192,1195,1,0,0,0,1193,1191,1,0,0,0, + 1193,1194,1,0,0,0,1194,79,1,0,0,0,1195,1193,1,0,0,0,1196,1197,5,89,0, + 0,1197,1198,5,194,0,0,1198,1199,3,382,191,0,1199,1200,5,194,0,0,1200, + 1201,5,147,0,0,1201,1202,5,194,0,0,1202,1203,3,382,191,0,1203,81,1,0, + 0,0,1204,1205,5,69,0,0,1205,1206,5,194,0,0,1206,1207,5,138,0,0,1207,1211, + 5,194,0,0,1208,1209,3,50,25,0,1209,1210,5,194,0,0,1210,1212,1,0,0,0,1211, + 1208,1,0,0,0,1211,1212,1,0,0,0,1212,1213,1,0,0,0,1213,1218,3,382,191, + 0,1214,1215,5,194,0,0,1215,1217,3,86,43,0,1216,1214,1,0,0,0,1217,1220, + 1,0,0,0,1218,1216,1,0,0,0,1218,1219,1,0,0,0,1219,83,1,0,0,0,1220,1218, + 1,0,0,0,1221,1222,5,69,0,0,1222,1223,5,194,0,0,1223,1224,5,151,0,0,1224, + 1225,5,194,0,0,1225,1226,3,382,191,0,1226,1227,5,194,0,0,1227,1228,5, + 52,0,0,1228,1229,5,194,0,0,1229,1231,3,150,75,0,1230,1232,5,194,0,0,1231, + 1230,1,0,0,0,1231,1232,1,0,0,0,1232,85,1,0,0,0,1233,1239,3,94,47,0,1234, + 1239,3,96,48,0,1235,1239,3,98,49,0,1236,1239,3,100,50,0,1237,1239,3,102, + 51,0,1238,1233,1,0,0,0,1238,1234,1,0,0,0,1238,1235,1,0,0,0,1238,1236, + 1,0,0,0,1238,1237,1,0,0,0,1239,87,1,0,0,0,1240,1241,5,194,0,0,1241,1242, + 5,159,0,0,1242,1243,5,194,0,0,1243,1244,5,168,0,0,1244,1245,5,194,0,0, + 1245,1246,5,179,0,0,1246,89,1,0,0,0,1247,1248,5,69,0,0,1248,1249,5,194, + 0,0,1249,1250,5,165,0,0,1250,1254,5,194,0,0,1251,1252,3,50,25,0,1252, + 1253,5,194,0,0,1253,1255,1,0,0,0,1254,1251,1,0,0,0,1254,1255,1,0,0,0, + 1255,1256,1,0,0,0,1256,1258,3,368,184,0,1257,1259,3,88,44,0,1258,1257, + 1,0,0,0,1258,1259,1,0,0,0,1259,91,1,0,0,0,1260,1261,5,69,0,0,1261,1262, + 5,194,0,0,1262,1263,5,169,0,0,1263,1267,5,194,0,0,1264,1265,3,50,25,0, + 1265,1266,5,194,0,0,1266,1268,1,0,0,0,1267,1264,1,0,0,0,1267,1268,1,0, + 0,0,1268,1269,1,0,0,0,1269,1270,3,368,184,0,1270,93,1,0,0,0,1271,1272, + 5,102,0,0,1272,1275,5,194,0,0,1273,1274,5,57,0,0,1274,1276,5,194,0,0, + 1275,1273,1,0,0,0,1275,1276,1,0,0,0,1276,1278,1,0,0,0,1277,1279,5,177, + 0,0,1278,1277,1,0,0,0,1278,1279,1,0,0,0,1279,1280,1,0,0,0,1280,1281,3, + 378,189,0,1281,95,1,0,0,0,1282,1283,5,117,0,0,1283,1284,5,194,0,0,1284, + 1292,5,115,0,0,1285,1286,5,115,0,0,1286,1288,5,194,0,0,1287,1289,5,177, + 0,0,1288,1287,1,0,0,0,1288,1289,1,0,0,0,1289,1290,1,0,0,0,1290,1292,3, + 378,189,0,1291,1282,1,0,0,0,1291,1285,1,0,0,0,1292,97,1,0,0,0,1293,1294, + 5,117,0,0,1294,1295,5,194,0,0,1295,1303,5,113,0,0,1296,1297,5,113,0,0, + 1297,1299,5,194,0,0,1298,1300,5,177,0,0,1299,1298,1,0,0,0,1299,1300,1, + 0,0,0,1300,1301,1,0,0,0,1301,1303,3,378,189,0,1302,1293,1,0,0,0,1302, + 1296,1,0,0,0,1303,99,1,0,0,0,1304,1305,5,142,0,0,1305,1308,5,194,0,0, + 1306,1307,5,159,0,0,1307,1309,5,194,0,0,1308,1306,1,0,0,0,1308,1309,1, + 0,0,0,1309,1311,1,0,0,0,1310,1312,5,177,0,0,1311,1310,1,0,0,0,1311,1312, + 1,0,0,0,1312,1313,1,0,0,0,1313,1314,3,378,189,0,1314,101,1,0,0,0,1315, + 1316,5,117,0,0,1316,1318,5,194,0,0,1317,1315,1,0,0,0,1317,1318,1,0,0, + 0,1318,1319,1,0,0,0,1319,1320,5,71,0,0,1320,103,1,0,0,0,1321,1322,5,100, + 0,0,1322,1323,5,194,0,0,1323,1324,5,84,0,0,1324,105,1,0,0,0,1325,1326, + 5,80,0,0,1326,1327,5,194,0,0,1327,1328,7,0,0,0,1328,1332,5,194,0,0,1329, + 1330,3,104,52,0,1330,1331,5,194,0,0,1331,1333,1,0,0,0,1332,1329,1,0,0, + 0,1332,1333,1,0,0,0,1333,1334,1,0,0,0,1334,1346,3,382,191,0,1335,1336, + 5,80,0,0,1336,1337,5,194,0,0,1337,1338,5,99,0,0,1338,1342,5,194,0,0,1339, + 1340,3,104,52,0,1340,1341,5,194,0,0,1341,1343,1,0,0,0,1342,1339,1,0,0, + 0,1342,1343,1,0,0,0,1343,1344,1,0,0,0,1344,1346,3,108,54,0,1345,1325, + 1,0,0,0,1345,1335,1,0,0,0,1346,107,1,0,0,0,1347,1349,3,382,191,0,1348, + 1350,5,194,0,0,1349,1348,1,0,0,0,1349,1350,1,0,0,0,1350,1351,1,0,0,0, + 1351,1353,5,5,0,0,1352,1354,5,194,0,0,1353,1352,1,0,0,0,1353,1354,1,0, + 0,0,1354,1355,1,0,0,0,1355,1356,3,382,191,0,1356,109,1,0,0,0,1357,1358, + 5,49,0,0,1358,1359,5,194,0,0,1359,1360,5,145,0,0,1360,1361,5,194,0,0, + 1361,1362,3,382,191,0,1362,1363,5,194,0,0,1363,1364,3,112,56,0,1364,111, + 1,0,0,0,1365,1373,3,114,57,0,1366,1373,3,118,59,0,1367,1373,3,120,60, + 0,1368,1373,3,122,61,0,1369,1373,3,124,62,0,1370,1373,3,126,63,0,1371, + 1373,3,128,64,0,1372,1365,1,0,0,0,1372,1366,1,0,0,0,1372,1367,1,0,0,0, + 1372,1368,1,0,0,0,1372,1369,1,0,0,0,1372,1370,1,0,0,0,1372,1371,1,0,0, + 0,1373,113,1,0,0,0,1374,1375,5,47,0,0,1375,1379,5,194,0,0,1376,1377,3, + 50,25,0,1377,1378,5,194,0,0,1378,1380,1,0,0,0,1379,1376,1,0,0,0,1379, + 1380,1,0,0,0,1380,1381,1,0,0,0,1381,1382,3,376,188,0,1382,1383,5,194, + 0,0,1383,1386,3,150,75,0,1384,1385,5,194,0,0,1385,1387,3,116,58,0,1386, + 1384,1,0,0,0,1386,1387,1,0,0,0,1387,115,1,0,0,0,1388,1389,5,74,0,0,1389, + 1390,5,194,0,0,1390,1391,3,280,140,0,1391,117,1,0,0,0,1392,1393,5,80, + 0,0,1393,1397,5,194,0,0,1394,1395,3,104,52,0,1395,1396,5,194,0,0,1396, + 1398,1,0,0,0,1397,1394,1,0,0,0,1397,1398,1,0,0,0,1398,1399,1,0,0,0,1399, + 1400,3,376,188,0,1400,119,1,0,0,0,1401,1402,5,134,0,0,1402,1403,5,194, + 0,0,1403,1404,5,147,0,0,1404,1405,5,194,0,0,1405,1406,3,382,191,0,1406, + 121,1,0,0,0,1407,1408,5,134,0,0,1408,1409,5,194,0,0,1409,1410,3,376,188, + 0,1410,1411,5,194,0,0,1411,1412,5,147,0,0,1412,1413,5,194,0,0,1413,1414, + 3,376,188,0,1414,123,1,0,0,0,1415,1416,5,47,0,0,1416,1420,5,194,0,0,1417, + 1418,3,50,25,0,1418,1419,5,194,0,0,1419,1421,1,0,0,0,1420,1417,1,0,0, + 0,1420,1421,1,0,0,0,1421,1422,1,0,0,0,1422,1423,3,80,40,0,1423,125,1, + 0,0,0,1424,1425,5,80,0,0,1425,1429,5,194,0,0,1426,1427,3,104,52,0,1427, + 1428,5,194,0,0,1428,1430,1,0,0,0,1429,1426,1,0,0,0,1429,1430,1,0,0,0, + 1430,1431,1,0,0,0,1431,1432,3,80,40,0,1432,127,1,0,0,0,1433,1434,5,139, + 0,0,1434,1435,5,194,0,0,1435,1436,5,140,0,0,1436,1437,5,194,0,0,1437, + 1439,5,57,0,0,1438,1440,5,194,0,0,1439,1438,1,0,0,0,1439,1440,1,0,0,0, + 1440,1441,1,0,0,0,1441,1443,5,2,0,0,1442,1444,5,194,0,0,1443,1442,1,0, + 0,0,1443,1444,1,0,0,0,1444,1445,1,0,0,0,1445,1456,3,130,65,0,1446,1448, + 5,194,0,0,1447,1446,1,0,0,0,1447,1448,1,0,0,0,1448,1449,1,0,0,0,1449, + 1451,5,4,0,0,1450,1452,5,194,0,0,1451,1450,1,0,0,0,1451,1452,1,0,0,0, + 1452,1453,1,0,0,0,1453,1455,3,130,65,0,1454,1447,1,0,0,0,1455,1458,1, + 0,0,0,1456,1454,1,0,0,0,1456,1457,1,0,0,0,1457,1460,1,0,0,0,1458,1456, + 1,0,0,0,1459,1461,5,194,0,0,1460,1459,1,0,0,0,1460,1461,1,0,0,0,1461, + 1462,1,0,0,0,1462,1464,5,3,0,0,1463,1465,5,194,0,0,1464,1463,1,0,0,0, + 1464,1465,1,0,0,0,1465,1467,1,0,0,0,1466,1468,5,70,0,0,1467,1466,1,0, + 0,0,1467,1468,1,0,0,0,1468,129,1,0,0,0,1469,1470,3,376,188,0,1470,1471, + 5,194,0,0,1471,1472,7,1,0,0,1472,131,1,0,0,0,1473,1484,3,134,67,0,1474, + 1476,5,194,0,0,1475,1474,1,0,0,0,1475,1476,1,0,0,0,1476,1477,1,0,0,0, + 1477,1479,5,4,0,0,1478,1480,5,194,0,0,1479,1478,1,0,0,0,1479,1480,1,0, + 0,0,1480,1481,1,0,0,0,1481,1483,3,134,67,0,1482,1475,1,0,0,0,1483,1486, + 1,0,0,0,1484,1482,1,0,0,0,1484,1485,1,0,0,0,1485,133,1,0,0,0,1486,1484, + 1,0,0,0,1487,1488,3,376,188,0,1488,1489,5,194,0,0,1489,1490,3,150,75, + 0,1490,135,1,0,0,0,1491,1502,3,138,69,0,1492,1494,5,194,0,0,1493,1492, + 1,0,0,0,1493,1494,1,0,0,0,1494,1495,1,0,0,0,1495,1497,5,4,0,0,1496,1498, + 5,194,0,0,1497,1496,1,0,0,0,1497,1498,1,0,0,0,1498,1499,1,0,0,0,1499, + 1501,3,138,69,0,1500,1493,1,0,0,0,1501,1504,1,0,0,0,1502,1500,1,0,0,0, + 1502,1503,1,0,0,0,1503,137,1,0,0,0,1504,1502,1,0,0,0,1505,1508,3,134, + 67,0,1506,1507,5,194,0,0,1507,1509,3,116,58,0,1508,1506,1,0,0,0,1508, + 1509,1,0,0,0,1509,1514,1,0,0,0,1510,1511,5,194,0,0,1511,1512,5,128,0, + 0,1512,1513,5,194,0,0,1513,1515,5,106,0,0,1514,1510,1,0,0,0,1514,1515, + 1,0,0,0,1515,139,1,0,0,0,1516,1517,5,128,0,0,1517,1518,5,194,0,0,1518, + 1520,5,106,0,0,1519,1521,5,194,0,0,1520,1519,1,0,0,0,1520,1521,1,0,0, + 0,1521,1522,1,0,0,0,1522,1524,5,2,0,0,1523,1525,5,194,0,0,1524,1523,1, + 0,0,0,1524,1525,1,0,0,0,1525,1526,1,0,0,0,1526,1528,3,376,188,0,1527, + 1529,5,194,0,0,1528,1527,1,0,0,0,1528,1529,1,0,0,0,1529,1530,1,0,0,0, + 1530,1531,5,3,0,0,1531,141,1,0,0,0,1532,1534,5,152,0,0,1533,1535,5,194, + 0,0,1534,1533,1,0,0,0,1534,1535,1,0,0,0,1535,1536,1,0,0,0,1536,1538,5, + 2,0,0,1537,1539,5,194,0,0,1538,1537,1,0,0,0,1538,1539,1,0,0,0,1539,1540, + 1,0,0,0,1540,1542,3,132,66,0,1541,1543,5,194,0,0,1542,1541,1,0,0,0,1542, + 1543,1,0,0,0,1543,1544,1,0,0,0,1544,1545,5,3,0,0,1545,143,1,0,0,0,1546, + 1548,5,144,0,0,1547,1549,5,194,0,0,1548,1547,1,0,0,0,1548,1549,1,0,0, + 0,1549,1550,1,0,0,0,1550,1552,5,2,0,0,1551,1553,5,194,0,0,1552,1551,1, + 0,0,0,1552,1553,1,0,0,0,1553,1554,1,0,0,0,1554,1556,3,132,66,0,1555,1557, + 5,194,0,0,1556,1555,1,0,0,0,1556,1557,1,0,0,0,1557,1558,1,0,0,0,1558, + 1559,5,3,0,0,1559,145,1,0,0,0,1560,1562,5,170,0,0,1561,1563,5,194,0,0, + 1562,1561,1,0,0,0,1562,1563,1,0,0,0,1563,1564,1,0,0,0,1564,1566,5,2,0, + 0,1565,1567,5,194,0,0,1566,1565,1,0,0,0,1566,1567,1,0,0,0,1567,1568,1, + 0,0,0,1568,1570,3,150,75,0,1569,1571,5,194,0,0,1570,1569,1,0,0,0,1570, + 1571,1,0,0,0,1571,1572,1,0,0,0,1572,1574,5,4,0,0,1573,1575,5,194,0,0, + 1574,1573,1,0,0,0,1574,1575,1,0,0,0,1575,1576,1,0,0,0,1576,1578,3,150, + 75,0,1577,1579,5,194,0,0,1578,1577,1,0,0,0,1578,1579,1,0,0,0,1579,1580, + 1,0,0,0,1580,1581,5,3,0,0,1581,147,1,0,0,0,1582,1584,5,171,0,0,1583,1585, + 5,194,0,0,1584,1583,1,0,0,0,1584,1585,1,0,0,0,1585,1586,1,0,0,0,1586, + 1588,5,2,0,0,1587,1589,5,194,0,0,1588,1587,1,0,0,0,1588,1589,1,0,0,0, + 1589,1590,1,0,0,0,1590,1592,3,378,189,0,1591,1593,5,194,0,0,1592,1591, + 1,0,0,0,1592,1593,1,0,0,0,1593,1594,1,0,0,0,1594,1596,5,4,0,0,1595,1597, + 5,194,0,0,1596,1595,1,0,0,0,1596,1597,1,0,0,0,1597,1598,1,0,0,0,1598, + 1600,3,378,189,0,1599,1601,5,194,0,0,1600,1599,1,0,0,0,1600,1601,1,0, + 0,0,1601,1602,1,0,0,0,1602,1603,5,3,0,0,1603,149,1,0,0,0,1604,1605,6, + 75,-1,0,1605,1611,3,384,192,0,1606,1611,3,142,71,0,1607,1611,3,144,72, + 0,1608,1611,3,146,73,0,1609,1611,3,148,74,0,1610,1604,1,0,0,0,1610,1606, + 1,0,0,0,1610,1607,1,0,0,0,1610,1608,1,0,0,0,1610,1609,1,0,0,0,1611,1616, + 1,0,0,0,1612,1613,10,5,0,0,1613,1615,3,152,76,0,1614,1612,1,0,0,0,1615, + 1618,1,0,0,0,1616,1614,1,0,0,0,1616,1617,1,0,0,0,1617,151,1,0,0,0,1618, + 1616,1,0,0,0,1619,1623,3,154,77,0,1620,1622,3,154,77,0,1621,1620,1,0, + 0,0,1622,1625,1,0,0,0,1623,1621,1,0,0,0,1623,1624,1,0,0,0,1624,153,1, + 0,0,0,1625,1623,1,0,0,0,1626,1628,5,7,0,0,1627,1629,3,378,189,0,1628, + 1627,1,0,0,0,1628,1629,1,0,0,0,1629,1630,1,0,0,0,1630,1631,5,8,0,0,1631, + 155,1,0,0,0,1632,1635,3,158,79,0,1633,1635,3,160,80,0,1634,1632,1,0,0, + 0,1634,1633,1,0,0,0,1635,157,1,0,0,0,1636,1639,5,85,0,0,1637,1638,5,194, + 0,0,1638,1640,5,110,0,0,1639,1637,1,0,0,0,1639,1640,1,0,0,0,1640,159, + 1,0,0,0,1641,1642,5,129,0,0,1642,161,1,0,0,0,1643,1644,5,56,0,0,1644, + 1645,5,194,0,0,1645,1657,5,149,0,0,1646,1647,5,56,0,0,1647,1648,5,194, + 0,0,1648,1649,5,149,0,0,1649,1650,5,194,0,0,1650,1651,5,132,0,0,1651, + 1652,5,194,0,0,1652,1657,5,123,0,0,1653,1657,5,64,0,0,1654,1657,5,136, + 0,0,1655,1657,5,61,0,0,1656,1643,1,0,0,0,1656,1646,1,0,0,0,1656,1653, + 1,0,0,0,1656,1654,1,0,0,0,1656,1655,1,0,0,0,1657,163,1,0,0,0,1658,1663, + 3,166,83,0,1659,1663,3,168,84,0,1660,1663,3,170,85,0,1661,1663,3,172, + 86,0,1662,1658,1,0,0,0,1662,1659,1,0,0,0,1662,1660,1,0,0,0,1662,1661, + 1,0,0,0,1663,165,1,0,0,0,1664,1665,5,109,0,0,1665,1668,5,194,0,0,1666, + 1667,5,87,0,0,1667,1669,5,194,0,0,1668,1666,1,0,0,0,1668,1669,1,0,0,0, + 1669,1672,1,0,0,0,1670,1673,5,179,0,0,1671,1673,3,368,184,0,1672,1670, + 1,0,0,0,1672,1671,1,0,0,0,1673,167,1,0,0,0,1674,1675,5,90,0,0,1675,1677, + 5,194,0,0,1676,1674,1,0,0,0,1676,1677,1,0,0,0,1677,1678,1,0,0,0,1678, + 1679,5,103,0,0,1679,1680,5,194,0,0,1680,1685,3,368,184,0,1681,1682,5, + 194,0,0,1682,1683,5,89,0,0,1683,1684,5,194,0,0,1684,1686,5,179,0,0,1685, + 1681,1,0,0,0,1685,1686,1,0,0,0,1686,169,1,0,0,0,1687,1688,5,154,0,0,1688, + 1689,5,194,0,0,1689,1690,3,368,184,0,1690,171,1,0,0,0,1691,1692,5,155, + 0,0,1692,1693,5,194,0,0,1693,1694,3,368,184,0,1694,173,1,0,0,0,1695,1696, + 3,176,88,0,1696,175,1,0,0,0,1697,1704,3,180,90,0,1698,1700,5,194,0,0, + 1699,1698,1,0,0,0,1699,1700,1,0,0,0,1700,1701,1,0,0,0,1701,1703,3,178, + 89,0,1702,1699,1,0,0,0,1703,1706,1,0,0,0,1704,1702,1,0,0,0,1704,1705, + 1,0,0,0,1705,1719,1,0,0,0,1706,1704,1,0,0,0,1707,1709,3,222,111,0,1708, + 1710,5,194,0,0,1709,1708,1,0,0,0,1709,1710,1,0,0,0,1710,1712,1,0,0,0, + 1711,1707,1,0,0,0,1712,1713,1,0,0,0,1713,1711,1,0,0,0,1713,1714,1,0,0, + 0,1714,1715,1,0,0,0,1715,1716,3,180,90,0,1716,1717,6,88,-1,0,1717,1719, + 1,0,0,0,1718,1697,1,0,0,0,1718,1711,1,0,0,0,1719,177,1,0,0,0,1720,1721, + 5,152,0,0,1721,1722,5,194,0,0,1722,1724,5,48,0,0,1723,1725,5,194,0,0, + 1724,1723,1,0,0,0,1724,1725,1,0,0,0,1725,1726,1,0,0,0,1726,1733,3,180, + 90,0,1727,1729,5,152,0,0,1728,1730,5,194,0,0,1729,1728,1,0,0,0,1729,1730, + 1,0,0,0,1730,1731,1,0,0,0,1731,1733,3,180,90,0,1732,1720,1,0,0,0,1732, + 1727,1,0,0,0,1733,179,1,0,0,0,1734,1737,3,182,91,0,1735,1737,3,184,92, + 0,1736,1734,1,0,0,0,1736,1735,1,0,0,0,1737,181,1,0,0,0,1738,1740,3,190, + 95,0,1739,1741,5,194,0,0,1740,1739,1,0,0,0,1740,1741,1,0,0,0,1741,1743, + 1,0,0,0,1742,1738,1,0,0,0,1743,1746,1,0,0,0,1744,1742,1,0,0,0,1744,1745, + 1,0,0,0,1745,1747,1,0,0,0,1746,1744,1,0,0,0,1747,1774,3,222,111,0,1748, + 1750,3,190,95,0,1749,1751,5,194,0,0,1750,1749,1,0,0,0,1750,1751,1,0,0, + 0,1751,1753,1,0,0,0,1752,1748,1,0,0,0,1753,1756,1,0,0,0,1754,1752,1,0, + 0,0,1754,1755,1,0,0,0,1755,1757,1,0,0,0,1756,1754,1,0,0,0,1757,1764,3, + 188,94,0,1758,1760,5,194,0,0,1759,1758,1,0,0,0,1759,1760,1,0,0,0,1760, + 1761,1,0,0,0,1761,1763,3,188,94,0,1762,1759,1,0,0,0,1763,1766,1,0,0,0, + 1764,1762,1,0,0,0,1764,1765,1,0,0,0,1765,1771,1,0,0,0,1766,1764,1,0,0, + 0,1767,1769,5,194,0,0,1768,1767,1,0,0,0,1768,1769,1,0,0,0,1769,1770,1, + 0,0,0,1770,1772,3,222,111,0,1771,1768,1,0,0,0,1771,1772,1,0,0,0,1772, + 1774,1,0,0,0,1773,1744,1,0,0,0,1773,1754,1,0,0,0,1774,183,1,0,0,0,1775, + 1777,3,186,93,0,1776,1778,5,194,0,0,1777,1776,1,0,0,0,1777,1778,1,0,0, + 0,1778,1780,1,0,0,0,1779,1775,1,0,0,0,1780,1781,1,0,0,0,1781,1779,1,0, + 0,0,1781,1782,1,0,0,0,1782,1783,1,0,0,0,1783,1784,3,182,91,0,1784,185, + 1,0,0,0,1785,1787,3,190,95,0,1786,1788,5,194,0,0,1787,1786,1,0,0,0,1787, + 1788,1,0,0,0,1788,1790,1,0,0,0,1789,1785,1,0,0,0,1790,1793,1,0,0,0,1791, + 1789,1,0,0,0,1791,1792,1,0,0,0,1792,1800,1,0,0,0,1793,1791,1,0,0,0,1794, + 1796,3,188,94,0,1795,1797,5,194,0,0,1796,1795,1,0,0,0,1796,1797,1,0,0, + 0,1797,1799,1,0,0,0,1798,1794,1,0,0,0,1799,1802,1,0,0,0,1800,1798,1,0, + 0,0,1800,1801,1,0,0,0,1801,1803,1,0,0,0,1802,1800,1,0,0,0,1803,1804,3, + 220,110,0,1804,187,1,0,0,0,1805,1810,3,208,104,0,1806,1810,3,210,105, + 0,1807,1810,3,214,107,0,1808,1810,3,218,109,0,1809,1805,1,0,0,0,1809, + 1806,1,0,0,0,1809,1807,1,0,0,0,1809,1808,1,0,0,0,1810,189,1,0,0,0,1811, + 1816,3,200,100,0,1812,1816,3,206,103,0,1813,1816,3,198,99,0,1814,1816, + 3,192,96,0,1815,1811,1,0,0,0,1815,1812,1,0,0,0,1815,1813,1,0,0,0,1815, + 1814,1,0,0,0,1816,191,1,0,0,0,1817,1835,5,109,0,0,1818,1819,5,194,0,0, + 1819,1820,5,159,0,0,1820,1821,5,194,0,0,1821,1823,5,96,0,0,1822,1824, + 5,194,0,0,1823,1822,1,0,0,0,1823,1824,1,0,0,0,1824,1825,1,0,0,0,1825, + 1827,5,2,0,0,1826,1828,5,194,0,0,1827,1826,1,0,0,0,1827,1828,1,0,0,0, + 1828,1829,1,0,0,0,1829,1831,3,132,66,0,1830,1832,5,194,0,0,1831,1830, + 1,0,0,0,1831,1832,1,0,0,0,1832,1833,1,0,0,0,1833,1834,5,3,0,0,1834,1836, + 1,0,0,0,1835,1818,1,0,0,0,1835,1836,1,0,0,0,1836,1837,1,0,0,0,1837,1838, + 5,194,0,0,1838,1839,5,89,0,0,1839,1840,5,194,0,0,1840,1854,3,10,5,0,1841, + 1843,5,194,0,0,1842,1841,1,0,0,0,1842,1843,1,0,0,0,1843,1844,1,0,0,0, + 1844,1846,5,2,0,0,1845,1847,5,194,0,0,1846,1845,1,0,0,0,1846,1847,1,0, + 0,0,1847,1848,1,0,0,0,1848,1850,3,26,13,0,1849,1851,5,194,0,0,1850,1849, + 1,0,0,0,1850,1851,1,0,0,0,1851,1852,1,0,0,0,1852,1853,5,3,0,0,1853,1855, + 1,0,0,0,1854,1842,1,0,0,0,1854,1855,1,0,0,0,1855,1860,1,0,0,0,1856,1858, + 5,194,0,0,1857,1856,1,0,0,0,1857,1858,1,0,0,0,1858,1859,1,0,0,0,1859, + 1861,3,238,119,0,1860,1857,1,0,0,0,1860,1861,1,0,0,0,1861,193,1,0,0,0, + 1862,1863,3,368,184,0,1863,1864,5,194,0,0,1864,1865,5,52,0,0,1865,1866, + 5,194,0,0,1866,1868,1,0,0,0,1867,1862,1,0,0,0,1867,1868,1,0,0,0,1868, + 1869,1,0,0,0,1869,1870,3,368,184,0,1870,195,1,0,0,0,1871,1882,3,194,97, + 0,1872,1874,5,194,0,0,1873,1872,1,0,0,0,1873,1874,1,0,0,0,1874,1875,1, + 0,0,0,1875,1877,5,4,0,0,1876,1878,5,194,0,0,1877,1876,1,0,0,0,1877,1878, + 1,0,0,0,1878,1879,1,0,0,0,1879,1881,3,194,97,0,1880,1873,1,0,0,0,1881, + 1884,1,0,0,0,1882,1880,1,0,0,0,1882,1883,1,0,0,0,1883,197,1,0,0,0,1884, + 1882,1,0,0,0,1885,1886,5,58,0,0,1886,1887,5,194,0,0,1887,1892,3,348,174, + 0,1888,1890,5,194,0,0,1889,1888,1,0,0,0,1889,1890,1,0,0,0,1890,1891,1, + 0,0,0,1891,1893,3,238,119,0,1892,1889,1,0,0,0,1892,1893,1,0,0,0,1893, + 1900,1,0,0,0,1894,1896,5,194,0,0,1895,1894,1,0,0,0,1895,1896,1,0,0,0, + 1896,1897,1,0,0,0,1897,1898,5,164,0,0,1898,1899,5,194,0,0,1899,1901,3, + 196,98,0,1900,1895,1,0,0,0,1900,1901,1,0,0,0,1901,199,1,0,0,0,1902,1903, + 5,125,0,0,1903,1905,5,194,0,0,1904,1902,1,0,0,0,1904,1905,1,0,0,0,1905, + 1906,1,0,0,0,1906,1908,5,112,0,0,1907,1909,5,194,0,0,1908,1907,1,0,0, + 0,1908,1909,1,0,0,0,1909,1910,1,0,0,0,1910,1913,3,240,120,0,1911,1912, + 5,194,0,0,1912,1914,3,238,119,0,1913,1911,1,0,0,0,1913,1914,1,0,0,0,1914, + 1917,1,0,0,0,1915,1916,5,194,0,0,1916,1918,3,202,101,0,1917,1915,1,0, + 0,0,1917,1918,1,0,0,0,1918,201,1,0,0,0,1919,1920,5,97,0,0,1920,1921,5, + 194,0,0,1921,1922,3,204,102,0,1922,203,1,0,0,0,1923,1924,6,102,-1,0,1924, + 1926,5,2,0,0,1925,1927,5,194,0,0,1926,1925,1,0,0,0,1926,1927,1,0,0,0, + 1927,1928,1,0,0,0,1928,1930,3,204,102,0,1929,1931,5,194,0,0,1930,1929, + 1,0,0,0,1930,1931,1,0,0,0,1931,1932,1,0,0,0,1932,1933,5,3,0,0,1933,1936, + 1,0,0,0,1934,1936,3,382,191,0,1935,1923,1,0,0,0,1935,1934,1,0,0,0,1936, + 1953,1,0,0,0,1937,1938,10,4,0,0,1938,1939,5,194,0,0,1939,1940,5,105,0, + 0,1940,1941,5,194,0,0,1941,1952,3,204,102,5,1942,1947,10,3,0,0,1943,1944, + 5,194,0,0,1944,1945,5,116,0,0,1945,1946,5,194,0,0,1946,1948,3,382,191, + 0,1947,1943,1,0,0,0,1948,1949,1,0,0,0,1949,1947,1,0,0,0,1949,1950,1,0, + 0,0,1950,1952,1,0,0,0,1951,1937,1,0,0,0,1951,1942,1,0,0,0,1952,1955,1, + 0,0,0,1953,1951,1,0,0,0,1953,1954,1,0,0,0,1954,205,1,0,0,0,1955,1953, + 1,0,0,0,1956,1958,5,153,0,0,1957,1959,5,194,0,0,1958,1957,1,0,0,0,1958, + 1959,1,0,0,0,1959,1960,1,0,0,0,1960,1961,3,280,140,0,1961,1962,5,194, + 0,0,1962,1963,5,52,0,0,1963,1964,5,194,0,0,1964,1965,3,368,184,0,1965, + 207,1,0,0,0,1966,1968,5,69,0,0,1967,1969,5,194,0,0,1968,1967,1,0,0,0, + 1968,1969,1,0,0,0,1969,1970,1,0,0,0,1970,1971,3,240,120,0,1971,209,1, + 0,0,0,1972,1974,5,114,0,0,1973,1975,5,194,0,0,1974,1973,1,0,0,0,1974, + 1975,1,0,0,0,1975,1976,1,0,0,0,1976,1981,3,240,120,0,1977,1978,5,194, + 0,0,1978,1980,3,212,106,0,1979,1977,1,0,0,0,1980,1983,1,0,0,0,1981,1979, + 1,0,0,0,1981,1982,1,0,0,0,1982,211,1,0,0,0,1983,1981,1,0,0,0,1984,1985, + 5,122,0,0,1985,1986,5,194,0,0,1986,1987,5,112,0,0,1987,1988,5,194,0,0, + 1988,1995,3,214,107,0,1989,1990,5,122,0,0,1990,1991,5,194,0,0,1991,1992, + 5,69,0,0,1992,1993,5,194,0,0,1993,1995,3,214,107,0,1994,1984,1,0,0,0, + 1994,1989,1,0,0,0,1995,213,1,0,0,0,1996,1998,5,139,0,0,1997,1999,5,194, + 0,0,1998,1997,1,0,0,0,1998,1999,1,0,0,0,1999,2000,1,0,0,0,2000,2011,3, + 216,108,0,2001,2003,5,194,0,0,2002,2001,1,0,0,0,2002,2003,1,0,0,0,2003, + 2004,1,0,0,0,2004,2006,5,4,0,0,2005,2007,5,194,0,0,2006,2005,1,0,0,0, + 2006,2007,1,0,0,0,2007,2008,1,0,0,0,2008,2010,3,216,108,0,2009,2002,1, + 0,0,0,2010,2013,1,0,0,0,2011,2009,1,0,0,0,2011,2012,1,0,0,0,2012,2029, + 1,0,0,0,2013,2011,1,0,0,0,2014,2016,5,139,0,0,2015,2017,5,194,0,0,2016, + 2015,1,0,0,0,2016,2017,1,0,0,0,2017,2018,1,0,0,0,2018,2020,3,326,163, + 0,2019,2021,5,194,0,0,2020,2019,1,0,0,0,2020,2021,1,0,0,0,2021,2022,1, + 0,0,0,2022,2024,5,6,0,0,2023,2025,5,194,0,0,2024,2023,1,0,0,0,2024,2025, + 1,0,0,0,2025,2026,1,0,0,0,2026,2027,3,256,128,0,2027,2029,1,0,0,0,2028, + 1996,1,0,0,0,2028,2014,1,0,0,0,2029,215,1,0,0,0,2030,2032,3,374,187,0, + 2031,2033,5,194,0,0,2032,2031,1,0,0,0,2032,2033,1,0,0,0,2033,2034,1,0, + 0,0,2034,2036,5,6,0,0,2035,2037,5,194,0,0,2036,2035,1,0,0,0,2036,2037, + 1,0,0,0,2037,2038,1,0,0,0,2038,2039,3,280,140,0,2039,217,1,0,0,0,2040, + 2041,5,78,0,0,2041,2043,5,194,0,0,2042,2040,1,0,0,0,2042,2043,1,0,0,0, + 2043,2044,1,0,0,0,2044,2046,5,75,0,0,2045,2047,5,194,0,0,2046,2045,1, + 0,0,0,2046,2047,1,0,0,0,2047,2048,1,0,0,0,2048,2059,3,280,140,0,2049, + 2051,5,194,0,0,2050,2049,1,0,0,0,2050,2051,1,0,0,0,2051,2052,1,0,0,0, + 2052,2054,5,4,0,0,2053,2055,5,194,0,0,2054,2053,1,0,0,0,2054,2055,1,0, + 0,0,2055,2056,1,0,0,0,2056,2058,3,280,140,0,2057,2050,1,0,0,0,2058,2061, + 1,0,0,0,2059,2057,1,0,0,0,2059,2060,1,0,0,0,2060,219,1,0,0,0,2061,2059, + 1,0,0,0,2062,2063,5,159,0,0,2063,2068,3,224,112,0,2064,2066,5,194,0,0, + 2065,2064,1,0,0,0,2065,2066,1,0,0,0,2066,2067,1,0,0,0,2067,2069,3,238, + 119,0,2068,2065,1,0,0,0,2068,2069,1,0,0,0,2069,221,1,0,0,0,2070,2071, + 5,135,0,0,2071,2072,3,224,112,0,2072,223,1,0,0,0,2073,2075,5,194,0,0, + 2074,2073,1,0,0,0,2074,2075,1,0,0,0,2075,2076,1,0,0,0,2076,2078,5,79, + 0,0,2077,2074,1,0,0,0,2077,2078,1,0,0,0,2078,2079,1,0,0,0,2079,2080,5, + 194,0,0,2080,2083,3,226,113,0,2081,2082,5,194,0,0,2082,2084,3,230,115, + 0,2083,2081,1,0,0,0,2083,2084,1,0,0,0,2084,2087,1,0,0,0,2085,2086,5,194, + 0,0,2086,2088,3,232,116,0,2087,2085,1,0,0,0,2087,2088,1,0,0,0,2088,2091, + 1,0,0,0,2089,2090,5,194,0,0,2090,2092,3,234,117,0,2091,2089,1,0,0,0,2091, + 2092,1,0,0,0,2092,225,1,0,0,0,2093,2104,5,172,0,0,2094,2096,5,194,0,0, + 2095,2094,1,0,0,0,2095,2096,1,0,0,0,2096,2097,1,0,0,0,2097,2099,5,4,0, + 0,2098,2100,5,194,0,0,2099,2098,1,0,0,0,2099,2100,1,0,0,0,2100,2101,1, + 0,0,0,2101,2103,3,228,114,0,2102,2095,1,0,0,0,2103,2106,1,0,0,0,2104, + 2102,1,0,0,0,2104,2105,1,0,0,0,2105,2122,1,0,0,0,2106,2104,1,0,0,0,2107, + 2118,3,228,114,0,2108,2110,5,194,0,0,2109,2108,1,0,0,0,2109,2110,1,0, + 0,0,2110,2111,1,0,0,0,2111,2113,5,4,0,0,2112,2114,5,194,0,0,2113,2112, + 1,0,0,0,2113,2114,1,0,0,0,2114,2115,1,0,0,0,2115,2117,3,228,114,0,2116, + 2109,1,0,0,0,2117,2120,1,0,0,0,2118,2116,1,0,0,0,2118,2119,1,0,0,0,2119, + 2122,1,0,0,0,2120,2118,1,0,0,0,2121,2093,1,0,0,0,2121,2107,1,0,0,0,2122, + 227,1,0,0,0,2123,2124,3,280,140,0,2124,2125,5,194,0,0,2125,2126,5,52, + 0,0,2126,2127,5,194,0,0,2127,2128,3,368,184,0,2128,2131,1,0,0,0,2129, + 2131,3,280,140,0,2130,2123,1,0,0,0,2130,2129,1,0,0,0,2131,229,1,0,0,0, + 2132,2133,5,127,0,0,2133,2134,5,194,0,0,2134,2135,5,57,0,0,2135,2136, + 5,194,0,0,2136,2144,3,236,118,0,2137,2139,5,4,0,0,2138,2140,5,194,0,0, + 2139,2138,1,0,0,0,2139,2140,1,0,0,0,2140,2141,1,0,0,0,2141,2143,3,236, + 118,0,2142,2137,1,0,0,0,2143,2146,1,0,0,0,2144,2142,1,0,0,0,2144,2145, + 1,0,0,0,2145,231,1,0,0,0,2146,2144,1,0,0,0,2147,2148,5,173,0,0,2148,2149, + 5,194,0,0,2149,2150,3,280,140,0,2150,233,1,0,0,0,2151,2152,5,107,0,0, + 2152,2153,5,194,0,0,2153,2154,3,280,140,0,2154,235,1,0,0,0,2155,2160, + 3,280,140,0,2156,2158,5,194,0,0,2157,2156,1,0,0,0,2157,2158,1,0,0,0,2158, + 2159,1,0,0,0,2159,2161,7,2,0,0,2160,2157,1,0,0,0,2160,2161,1,0,0,0,2161, + 237,1,0,0,0,2162,2163,5,158,0,0,2163,2164,5,194,0,0,2164,2165,3,280,140, + 0,2165,239,1,0,0,0,2166,2177,3,242,121,0,2167,2169,5,194,0,0,2168,2167, + 1,0,0,0,2168,2169,1,0,0,0,2169,2170,1,0,0,0,2170,2172,5,4,0,0,2171,2173, + 5,194,0,0,2172,2171,1,0,0,0,2172,2173,1,0,0,0,2173,2174,1,0,0,0,2174, + 2176,3,242,121,0,2175,2168,1,0,0,0,2176,2179,1,0,0,0,2177,2175,1,0,0, + 0,2177,2178,1,0,0,0,2178,241,1,0,0,0,2179,2177,1,0,0,0,2180,2182,3,368, + 184,0,2181,2183,5,194,0,0,2182,2181,1,0,0,0,2182,2183,1,0,0,0,2183,2184, + 1,0,0,0,2184,2186,5,6,0,0,2185,2187,5,194,0,0,2186,2185,1,0,0,0,2186, + 2187,1,0,0,0,2187,2188,1,0,0,0,2188,2189,3,244,122,0,2189,2192,1,0,0, + 0,2190,2192,3,244,122,0,2191,2180,1,0,0,0,2191,2190,1,0,0,0,2192,243, + 1,0,0,0,2193,2194,3,246,123,0,2194,245,1,0,0,0,2195,2202,3,248,124,0, + 2196,2198,5,194,0,0,2197,2196,1,0,0,0,2197,2198,1,0,0,0,2198,2199,1,0, + 0,0,2199,2201,3,250,125,0,2200,2197,1,0,0,0,2201,2204,1,0,0,0,2202,2200, + 1,0,0,0,2202,2203,1,0,0,0,2203,2210,1,0,0,0,2204,2202,1,0,0,0,2205,2206, + 5,2,0,0,2206,2207,3,246,123,0,2207,2208,5,3,0,0,2208,2210,1,0,0,0,2209, + 2195,1,0,0,0,2209,2205,1,0,0,0,2210,247,1,0,0,0,2211,2213,5,2,0,0,2212, + 2214,5,194,0,0,2213,2212,1,0,0,0,2213,2214,1,0,0,0,2214,2219,1,0,0,0, + 2215,2217,3,368,184,0,2216,2218,5,194,0,0,2217,2216,1,0,0,0,2217,2218, + 1,0,0,0,2218,2220,1,0,0,0,2219,2215,1,0,0,0,2219,2220,1,0,0,0,2220,2225, + 1,0,0,0,2221,2223,3,260,130,0,2222,2224,5,194,0,0,2223,2222,1,0,0,0,2223, + 2224,1,0,0,0,2224,2226,1,0,0,0,2225,2221,1,0,0,0,2225,2226,1,0,0,0,2226, + 2231,1,0,0,0,2227,2229,3,256,128,0,2228,2230,5,194,0,0,2229,2228,1,0, + 0,0,2229,2230,1,0,0,0,2230,2232,1,0,0,0,2231,2227,1,0,0,0,2231,2232,1, + 0,0,0,2232,2233,1,0,0,0,2233,2234,5,3,0,0,2234,249,1,0,0,0,2235,2237, + 3,252,126,0,2236,2238,5,194,0,0,2237,2236,1,0,0,0,2237,2238,1,0,0,0,2238, + 2239,1,0,0,0,2239,2240,3,248,124,0,2240,251,1,0,0,0,2241,2243,3,388,194, + 0,2242,2244,5,194,0,0,2243,2242,1,0,0,0,2243,2244,1,0,0,0,2244,2245,1, + 0,0,0,2245,2247,3,392,196,0,2246,2248,5,194,0,0,2247,2246,1,0,0,0,2247, + 2248,1,0,0,0,2248,2250,1,0,0,0,2249,2251,3,254,127,0,2250,2249,1,0,0, + 0,2250,2251,1,0,0,0,2251,2253,1,0,0,0,2252,2254,5,194,0,0,2253,2252,1, + 0,0,0,2253,2254,1,0,0,0,2254,2255,1,0,0,0,2255,2256,3,392,196,0,2256, + 2286,1,0,0,0,2257,2259,3,392,196,0,2258,2260,5,194,0,0,2259,2258,1,0, + 0,0,2259,2260,1,0,0,0,2260,2262,1,0,0,0,2261,2263,3,254,127,0,2262,2261, + 1,0,0,0,2262,2263,1,0,0,0,2263,2265,1,0,0,0,2264,2266,5,194,0,0,2265, + 2264,1,0,0,0,2265,2266,1,0,0,0,2266,2267,1,0,0,0,2267,2269,3,392,196, + 0,2268,2270,5,194,0,0,2269,2268,1,0,0,0,2269,2270,1,0,0,0,2270,2271,1, + 0,0,0,2271,2272,3,390,195,0,2272,2286,1,0,0,0,2273,2275,3,392,196,0,2274, + 2276,5,194,0,0,2275,2274,1,0,0,0,2275,2276,1,0,0,0,2276,2278,1,0,0,0, + 2277,2279,3,254,127,0,2278,2277,1,0,0,0,2278,2279,1,0,0,0,2279,2281,1, + 0,0,0,2280,2282,5,194,0,0,2281,2280,1,0,0,0,2281,2282,1,0,0,0,2282,2283, + 1,0,0,0,2283,2284,3,392,196,0,2284,2286,1,0,0,0,2285,2241,1,0,0,0,2285, + 2257,1,0,0,0,2285,2273,1,0,0,0,2286,253,1,0,0,0,2287,2289,5,7,0,0,2288, + 2290,5,194,0,0,2289,2288,1,0,0,0,2289,2290,1,0,0,0,2290,2295,1,0,0,0, + 2291,2293,3,368,184,0,2292,2294,5,194,0,0,2293,2292,1,0,0,0,2293,2294, + 1,0,0,0,2294,2296,1,0,0,0,2295,2291,1,0,0,0,2295,2296,1,0,0,0,2296,2301, + 1,0,0,0,2297,2299,3,258,129,0,2298,2300,5,194,0,0,2299,2298,1,0,0,0,2299, + 2300,1,0,0,0,2300,2302,1,0,0,0,2301,2297,1,0,0,0,2301,2302,1,0,0,0,2302, + 2307,1,0,0,0,2303,2305,3,262,131,0,2304,2306,5,194,0,0,2305,2304,1,0, + 0,0,2305,2306,1,0,0,0,2306,2308,1,0,0,0,2307,2303,1,0,0,0,2307,2308,1, + 0,0,0,2308,2313,1,0,0,0,2309,2311,3,256,128,0,2310,2312,5,194,0,0,2311, + 2310,1,0,0,0,2311,2312,1,0,0,0,2312,2314,1,0,0,0,2313,2309,1,0,0,0,2313, + 2314,1,0,0,0,2314,2315,1,0,0,0,2315,2316,5,8,0,0,2316,255,1,0,0,0,2317, + 2319,5,9,0,0,2318,2320,5,194,0,0,2319,2318,1,0,0,0,2319,2320,1,0,0,0, + 2320,2354,1,0,0,0,2321,2323,3,376,188,0,2322,2324,5,194,0,0,2323,2322, + 1,0,0,0,2323,2324,1,0,0,0,2324,2325,1,0,0,0,2325,2327,5,175,0,0,2326, + 2328,5,194,0,0,2327,2326,1,0,0,0,2327,2328,1,0,0,0,2328,2329,1,0,0,0, + 2329,2331,3,280,140,0,2330,2332,5,194,0,0,2331,2330,1,0,0,0,2331,2332, + 1,0,0,0,2332,2351,1,0,0,0,2333,2335,5,4,0,0,2334,2336,5,194,0,0,2335, + 2334,1,0,0,0,2335,2336,1,0,0,0,2336,2337,1,0,0,0,2337,2339,3,376,188, + 0,2338,2340,5,194,0,0,2339,2338,1,0,0,0,2339,2340,1,0,0,0,2340,2341,1, + 0,0,0,2341,2343,5,175,0,0,2342,2344,5,194,0,0,2343,2342,1,0,0,0,2343, + 2344,1,0,0,0,2344,2345,1,0,0,0,2345,2347,3,280,140,0,2346,2348,5,194, + 0,0,2347,2346,1,0,0,0,2347,2348,1,0,0,0,2348,2350,1,0,0,0,2349,2333,1, + 0,0,0,2350,2353,1,0,0,0,2351,2349,1,0,0,0,2351,2352,1,0,0,0,2352,2355, + 1,0,0,0,2353,2351,1,0,0,0,2354,2321,1,0,0,0,2354,2355,1,0,0,0,2355,2356, + 1,0,0,0,2356,2357,5,10,0,0,2357,257,1,0,0,0,2358,2360,5,175,0,0,2359, + 2361,5,194,0,0,2360,2359,1,0,0,0,2360,2361,1,0,0,0,2361,2362,1,0,0,0, + 2362,2376,3,278,139,0,2363,2365,5,194,0,0,2364,2363,1,0,0,0,2364,2365, + 1,0,0,0,2365,2366,1,0,0,0,2366,2368,5,11,0,0,2367,2369,5,175,0,0,2368, + 2367,1,0,0,0,2368,2369,1,0,0,0,2369,2371,1,0,0,0,2370,2372,5,194,0,0, + 2371,2370,1,0,0,0,2371,2372,1,0,0,0,2372,2373,1,0,0,0,2373,2375,3,278, + 139,0,2374,2364,1,0,0,0,2375,2378,1,0,0,0,2376,2374,1,0,0,0,2376,2377, + 1,0,0,0,2377,259,1,0,0,0,2378,2376,1,0,0,0,2379,2381,5,175,0,0,2380,2382, + 5,194,0,0,2381,2380,1,0,0,0,2381,2382,1,0,0,0,2382,2383,1,0,0,0,2383, + 2400,3,276,138,0,2384,2386,5,194,0,0,2385,2384,1,0,0,0,2385,2386,1,0, + 0,0,2386,2392,1,0,0,0,2387,2389,5,11,0,0,2388,2390,5,175,0,0,2389,2388, + 1,0,0,0,2389,2390,1,0,0,0,2390,2393,1,0,0,0,2391,2393,5,175,0,0,2392, + 2387,1,0,0,0,2392,2391,1,0,0,0,2393,2395,1,0,0,0,2394,2396,5,194,0,0, + 2395,2394,1,0,0,0,2395,2396,1,0,0,0,2396,2397,1,0,0,0,2397,2399,3,276, + 138,0,2398,2385,1,0,0,0,2399,2402,1,0,0,0,2400,2398,1,0,0,0,2400,2401, + 1,0,0,0,2401,261,1,0,0,0,2402,2400,1,0,0,0,2403,2408,5,172,0,0,2404,2406, + 5,194,0,0,2405,2404,1,0,0,0,2405,2406,1,0,0,0,2406,2407,1,0,0,0,2407, + 2409,3,264,132,0,2408,2405,1,0,0,0,2408,2409,1,0,0,0,2409,2414,1,0,0, + 0,2410,2412,5,194,0,0,2411,2410,1,0,0,0,2411,2412,1,0,0,0,2412,2413,1, + 0,0,0,2413,2415,3,266,133,0,2414,2411,1,0,0,0,2414,2415,1,0,0,0,2415, + 2420,1,0,0,0,2416,2418,5,194,0,0,2417,2416,1,0,0,0,2417,2418,1,0,0,0, + 2418,2419,1,0,0,0,2419,2421,3,268,134,0,2420,2417,1,0,0,0,2420,2421,1, + 0,0,0,2421,263,1,0,0,0,2422,2423,5,48,0,0,2423,2425,5,194,0,0,2424,2422, + 1,0,0,0,2424,2425,1,0,0,0,2425,2426,1,0,0,0,2426,2428,5,161,0,0,2427, + 2429,5,194,0,0,2428,2427,1,0,0,0,2428,2429,1,0,0,0,2429,2430,1,0,0,0, + 2430,2432,5,2,0,0,2431,2433,5,194,0,0,2432,2431,1,0,0,0,2432,2433,1,0, + 0,0,2433,2434,1,0,0,0,2434,2436,3,376,188,0,2435,2437,5,194,0,0,2436, + 2435,1,0,0,0,2436,2437,1,0,0,0,2437,2438,1,0,0,0,2438,2439,5,3,0,0,2439, + 2447,1,0,0,0,2440,2447,5,141,0,0,2441,2442,5,48,0,0,2442,2443,5,194,0, + 0,2443,2447,5,141,0,0,2444,2447,5,148,0,0,2445,2447,5,45,0,0,2446,2424, + 1,0,0,0,2446,2440,1,0,0,0,2446,2441,1,0,0,0,2446,2444,1,0,0,0,2446,2445, + 1,0,0,0,2447,265,1,0,0,0,2448,2450,3,272,136,0,2449,2448,1,0,0,0,2449, + 2450,1,0,0,0,2450,2452,1,0,0,0,2451,2453,5,194,0,0,2452,2451,1,0,0,0, + 2452,2453,1,0,0,0,2453,2454,1,0,0,0,2454,2456,5,176,0,0,2455,2457,5,194, + 0,0,2456,2455,1,0,0,0,2456,2457,1,0,0,0,2457,2459,1,0,0,0,2458,2460,3, + 274,137,0,2459,2458,1,0,0,0,2459,2460,1,0,0,0,2460,2463,1,0,0,0,2461, + 2463,3,378,189,0,2462,2449,1,0,0,0,2462,2461,1,0,0,0,2463,267,1,0,0,0, + 2464,2466,5,2,0,0,2465,2467,5,194,0,0,2466,2465,1,0,0,0,2466,2467,1,0, + 0,0,2467,2468,1,0,0,0,2468,2470,3,368,184,0,2469,2471,5,194,0,0,2470, + 2469,1,0,0,0,2470,2471,1,0,0,0,2471,2472,1,0,0,0,2472,2474,5,4,0,0,2473, + 2475,5,194,0,0,2474,2473,1,0,0,0,2474,2475,1,0,0,0,2475,2476,1,0,0,0, + 2476,2488,3,368,184,0,2477,2479,5,194,0,0,2478,2477,1,0,0,0,2478,2479, + 1,0,0,0,2479,2480,1,0,0,0,2480,2482,5,11,0,0,2481,2483,5,194,0,0,2482, + 2481,1,0,0,0,2482,2483,1,0,0,0,2483,2484,1,0,0,0,2484,2486,3,238,119, + 0,2485,2487,5,194,0,0,2486,2485,1,0,0,0,2486,2487,1,0,0,0,2487,2489,1, + 0,0,0,2488,2478,1,0,0,0,2488,2489,1,0,0,0,2489,2509,1,0,0,0,2490,2492, + 5,194,0,0,2491,2490,1,0,0,0,2491,2492,1,0,0,0,2492,2493,1,0,0,0,2493, + 2495,5,11,0,0,2494,2496,5,194,0,0,2495,2494,1,0,0,0,2495,2496,1,0,0,0, + 2496,2497,1,0,0,0,2497,2499,3,270,135,0,2498,2500,5,194,0,0,2499,2498, + 1,0,0,0,2499,2500,1,0,0,0,2500,2501,1,0,0,0,2501,2503,5,4,0,0,2502,2504, + 5,194,0,0,2503,2502,1,0,0,0,2503,2504,1,0,0,0,2504,2505,1,0,0,0,2505, + 2507,3,270,135,0,2506,2508,5,194,0,0,2507,2506,1,0,0,0,2507,2508,1,0, + 0,0,2508,2510,1,0,0,0,2509,2491,1,0,0,0,2509,2510,1,0,0,0,2510,2511,1, + 0,0,0,2511,2512,5,3,0,0,2512,269,1,0,0,0,2513,2515,5,9,0,0,2514,2516, + 5,194,0,0,2515,2514,1,0,0,0,2515,2516,1,0,0,0,2516,2518,1,0,0,0,2517, + 2519,3,226,113,0,2518,2517,1,0,0,0,2518,2519,1,0,0,0,2519,2521,1,0,0, + 0,2520,2522,5,194,0,0,2521,2520,1,0,0,0,2521,2522,1,0,0,0,2522,2523,1, + 0,0,0,2523,2524,5,10,0,0,2524,271,1,0,0,0,2525,2526,5,181,0,0,2526,273, + 1,0,0,0,2527,2528,5,181,0,0,2528,275,1,0,0,0,2529,2532,3,382,191,0,2530, + 2531,5,5,0,0,2531,2533,3,382,191,0,2532,2530,1,0,0,0,2532,2533,1,0,0, + 0,2533,277,1,0,0,0,2534,2535,3,382,191,0,2535,279,1,0,0,0,2536,2537,3, + 282,141,0,2537,281,1,0,0,0,2538,2545,3,284,142,0,2539,2540,5,194,0,0, + 2540,2541,5,126,0,0,2541,2542,5,194,0,0,2542,2544,3,284,142,0,2543,2539, + 1,0,0,0,2544,2547,1,0,0,0,2545,2543,1,0,0,0,2545,2546,1,0,0,0,2546,283, + 1,0,0,0,2547,2545,1,0,0,0,2548,2555,3,286,143,0,2549,2550,5,194,0,0,2550, + 2551,5,162,0,0,2551,2552,5,194,0,0,2552,2554,3,286,143,0,2553,2549,1, + 0,0,0,2554,2557,1,0,0,0,2555,2553,1,0,0,0,2555,2556,1,0,0,0,2556,285, + 1,0,0,0,2557,2555,1,0,0,0,2558,2565,3,288,144,0,2559,2560,5,194,0,0,2560, + 2561,5,51,0,0,2561,2562,5,194,0,0,2562,2564,3,288,144,0,2563,2559,1,0, + 0,0,2564,2567,1,0,0,0,2565,2563,1,0,0,0,2565,2566,1,0,0,0,2566,287,1, + 0,0,0,2567,2565,1,0,0,0,2568,2570,5,119,0,0,2569,2571,5,194,0,0,2570, + 2569,1,0,0,0,2570,2571,1,0,0,0,2571,2573,1,0,0,0,2572,2568,1,0,0,0,2573, + 2576,1,0,0,0,2574,2572,1,0,0,0,2574,2575,1,0,0,0,2575,2577,1,0,0,0,2576, + 2574,1,0,0,0,2577,2578,3,290,145,0,2578,289,1,0,0,0,2579,2589,3,294,147, + 0,2580,2582,5,194,0,0,2581,2580,1,0,0,0,2581,2582,1,0,0,0,2582,2583,1, + 0,0,0,2583,2585,3,292,146,0,2584,2586,5,194,0,0,2585,2584,1,0,0,0,2585, + 2586,1,0,0,0,2586,2587,1,0,0,0,2587,2588,3,294,147,0,2588,2590,1,0,0, + 0,2589,2581,1,0,0,0,2589,2590,1,0,0,0,2590,2628,1,0,0,0,2591,2593,3,294, + 147,0,2592,2594,5,194,0,0,2593,2592,1,0,0,0,2593,2594,1,0,0,0,2594,2595, + 1,0,0,0,2595,2597,5,174,0,0,2596,2598,5,194,0,0,2597,2596,1,0,0,0,2597, + 2598,1,0,0,0,2598,2599,1,0,0,0,2599,2600,3,294,147,0,2600,2601,1,0,0, + 0,2601,2602,6,145,-1,0,2602,2628,1,0,0,0,2603,2605,3,294,147,0,2604,2606, + 5,194,0,0,2605,2604,1,0,0,0,2605,2606,1,0,0,0,2606,2607,1,0,0,0,2607, + 2609,3,292,146,0,2608,2610,5,194,0,0,2609,2608,1,0,0,0,2609,2610,1,0, + 0,0,2610,2611,1,0,0,0,2611,2621,3,294,147,0,2612,2614,5,194,0,0,2613, + 2612,1,0,0,0,2613,2614,1,0,0,0,2614,2615,1,0,0,0,2615,2617,3,292,146, + 0,2616,2618,5,194,0,0,2617,2616,1,0,0,0,2617,2618,1,0,0,0,2618,2619,1, + 0,0,0,2619,2620,3,294,147,0,2620,2622,1,0,0,0,2621,2613,1,0,0,0,2622, + 2623,1,0,0,0,2623,2621,1,0,0,0,2623,2624,1,0,0,0,2624,2625,1,0,0,0,2625, + 2626,6,145,-1,0,2626,2628,1,0,0,0,2627,2579,1,0,0,0,2627,2591,1,0,0,0, + 2627,2603,1,0,0,0,2628,291,1,0,0,0,2629,2630,7,3,0,0,2630,293,1,0,0,0, + 2631,2642,3,296,148,0,2632,2634,5,194,0,0,2633,2632,1,0,0,0,2633,2634, + 1,0,0,0,2634,2635,1,0,0,0,2635,2637,5,11,0,0,2636,2638,5,194,0,0,2637, + 2636,1,0,0,0,2637,2638,1,0,0,0,2638,2639,1,0,0,0,2639,2641,3,296,148, + 0,2640,2633,1,0,0,0,2641,2644,1,0,0,0,2642,2640,1,0,0,0,2642,2643,1,0, + 0,0,2643,295,1,0,0,0,2644,2642,1,0,0,0,2645,2656,3,298,149,0,2646,2648, + 5,194,0,0,2647,2646,1,0,0,0,2647,2648,1,0,0,0,2648,2649,1,0,0,0,2649, + 2651,5,17,0,0,2650,2652,5,194,0,0,2651,2650,1,0,0,0,2651,2652,1,0,0,0, + 2652,2653,1,0,0,0,2653,2655,3,298,149,0,2654,2647,1,0,0,0,2655,2658,1, + 0,0,0,2656,2654,1,0,0,0,2656,2657,1,0,0,0,2657,297,1,0,0,0,2658,2656, + 1,0,0,0,2659,2671,3,302,151,0,2660,2662,5,194,0,0,2661,2660,1,0,0,0,2661, + 2662,1,0,0,0,2662,2663,1,0,0,0,2663,2665,3,300,150,0,2664,2666,5,194, + 0,0,2665,2664,1,0,0,0,2665,2666,1,0,0,0,2666,2667,1,0,0,0,2667,2668,3, + 302,151,0,2668,2670,1,0,0,0,2669,2661,1,0,0,0,2670,2673,1,0,0,0,2671, + 2669,1,0,0,0,2671,2672,1,0,0,0,2672,299,1,0,0,0,2673,2671,1,0,0,0,2674, + 2675,7,4,0,0,2675,301,1,0,0,0,2676,2688,3,306,153,0,2677,2679,5,194,0, + 0,2678,2677,1,0,0,0,2678,2679,1,0,0,0,2679,2680,1,0,0,0,2680,2682,3,304, + 152,0,2681,2683,5,194,0,0,2682,2681,1,0,0,0,2682,2683,1,0,0,0,2683,2684, + 1,0,0,0,2684,2685,3,306,153,0,2685,2687,1,0,0,0,2686,2678,1,0,0,0,2687, + 2690,1,0,0,0,2688,2686,1,0,0,0,2688,2689,1,0,0,0,2689,303,1,0,0,0,2690, + 2688,1,0,0,0,2691,2692,7,5,0,0,2692,305,1,0,0,0,2693,2705,3,310,155,0, + 2694,2696,5,194,0,0,2695,2694,1,0,0,0,2695,2696,1,0,0,0,2696,2697,1,0, + 0,0,2697,2699,3,308,154,0,2698,2700,5,194,0,0,2699,2698,1,0,0,0,2699, + 2700,1,0,0,0,2700,2701,1,0,0,0,2701,2702,3,310,155,0,2702,2704,1,0,0, + 0,2703,2695,1,0,0,0,2704,2707,1,0,0,0,2705,2703,1,0,0,0,2705,2706,1,0, + 0,0,2706,307,1,0,0,0,2707,2705,1,0,0,0,2708,2709,7,6,0,0,2709,309,1,0, + 0,0,2710,2721,3,312,156,0,2711,2713,5,194,0,0,2712,2711,1,0,0,0,2712, + 2713,1,0,0,0,2713,2714,1,0,0,0,2714,2716,5,23,0,0,2715,2717,5,194,0,0, + 2716,2715,1,0,0,0,2716,2717,1,0,0,0,2717,2718,1,0,0,0,2718,2720,3,312, + 156,0,2719,2712,1,0,0,0,2720,2723,1,0,0,0,2721,2719,1,0,0,0,2721,2722, + 1,0,0,0,2722,311,1,0,0,0,2723,2721,1,0,0,0,2724,2732,3,322,161,0,2725, + 2733,3,316,158,0,2726,2728,3,314,157,0,2727,2726,1,0,0,0,2728,2729,1, + 0,0,0,2729,2727,1,0,0,0,2729,2730,1,0,0,0,2730,2733,1,0,0,0,2731,2733, + 3,320,160,0,2732,2725,1,0,0,0,2732,2727,1,0,0,0,2732,2731,1,0,0,0,2732, + 2733,1,0,0,0,2733,313,1,0,0,0,2734,2735,5,194,0,0,2735,2737,5,101,0,0, + 2736,2738,5,194,0,0,2737,2736,1,0,0,0,2737,2738,1,0,0,0,2738,2739,1,0, + 0,0,2739,2754,3,324,162,0,2740,2741,5,7,0,0,2741,2742,3,280,140,0,2742, + 2743,5,8,0,0,2743,2754,1,0,0,0,2744,2746,5,7,0,0,2745,2747,3,280,140, + 0,2746,2745,1,0,0,0,2746,2747,1,0,0,0,2747,2748,1,0,0,0,2748,2750,7,7, + 0,0,2749,2751,3,280,140,0,2750,2749,1,0,0,0,2750,2751,1,0,0,0,2751,2752, + 1,0,0,0,2752,2754,5,8,0,0,2753,2734,1,0,0,0,2753,2740,1,0,0,0,2753,2744, + 1,0,0,0,2754,315,1,0,0,0,2755,2767,3,318,159,0,2756,2757,5,194,0,0,2757, + 2758,5,143,0,0,2758,2759,5,194,0,0,2759,2767,5,159,0,0,2760,2761,5,194, + 0,0,2761,2762,5,83,0,0,2762,2763,5,194,0,0,2763,2767,5,159,0,0,2764,2765, + 5,194,0,0,2765,2767,5,66,0,0,2766,2755,1,0,0,0,2766,2756,1,0,0,0,2766, + 2760,1,0,0,0,2766,2764,1,0,0,0,2767,2769,1,0,0,0,2768,2770,5,194,0,0, + 2769,2768,1,0,0,0,2769,2770,1,0,0,0,2770,2771,1,0,0,0,2771,2772,3,324, + 162,0,2772,317,1,0,0,0,2773,2775,5,194,0,0,2774,2773,1,0,0,0,2774,2775, + 1,0,0,0,2775,2776,1,0,0,0,2776,2777,5,24,0,0,2777,319,1,0,0,0,2778,2779, + 5,194,0,0,2779,2780,5,104,0,0,2780,2781,5,194,0,0,2781,2789,5,121,0,0, + 2782,2783,5,194,0,0,2783,2784,5,104,0,0,2784,2785,5,194,0,0,2785,2786, + 5,119,0,0,2786,2787,5,194,0,0,2787,2789,5,121,0,0,2788,2778,1,0,0,0,2788, + 2782,1,0,0,0,2789,321,1,0,0,0,2790,2792,5,177,0,0,2791,2793,5,194,0,0, + 2792,2791,1,0,0,0,2792,2793,1,0,0,0,2793,2795,1,0,0,0,2794,2790,1,0,0, + 0,2795,2798,1,0,0,0,2796,2794,1,0,0,0,2796,2797,1,0,0,0,2797,2799,1,0, + 0,0,2798,2796,1,0,0,0,2799,2804,3,324,162,0,2800,2802,5,194,0,0,2801, + 2800,1,0,0,0,2801,2802,1,0,0,0,2802,2803,1,0,0,0,2803,2805,5,178,0,0, + 2804,2801,1,0,0,0,2804,2805,1,0,0,0,2805,323,1,0,0,0,2806,2813,3,326, + 163,0,2807,2809,5,194,0,0,2808,2807,1,0,0,0,2808,2809,1,0,0,0,2809,2810, + 1,0,0,0,2810,2812,3,362,181,0,2811,2808,1,0,0,0,2812,2815,1,0,0,0,2813, + 2811,1,0,0,0,2813,2814,1,0,0,0,2814,325,1,0,0,0,2815,2813,1,0,0,0,2816, + 2826,3,334,167,0,2817,2826,3,372,186,0,2818,2826,3,364,182,0,2819,2826, + 3,346,173,0,2820,2826,3,348,174,0,2821,2826,3,358,179,0,2822,2826,3,360, + 180,0,2823,2826,3,368,184,0,2824,2826,3,328,164,0,2825,2816,1,0,0,0,2825, + 2817,1,0,0,0,2825,2818,1,0,0,0,2825,2819,1,0,0,0,2825,2820,1,0,0,0,2825, + 2821,1,0,0,0,2825,2822,1,0,0,0,2825,2823,1,0,0,0,2825,2824,1,0,0,0,2826, + 327,1,0,0,0,2827,2829,5,48,0,0,2828,2830,5,194,0,0,2829,2828,1,0,0,0, + 2829,2830,1,0,0,0,2830,2831,1,0,0,0,2831,2833,5,2,0,0,2832,2834,5,194, + 0,0,2833,2832,1,0,0,0,2833,2834,1,0,0,0,2834,2835,1,0,0,0,2835,2837,3, + 330,165,0,2836,2838,5,194,0,0,2837,2836,1,0,0,0,2837,2838,1,0,0,0,2838, + 2839,1,0,0,0,2839,2840,5,3,0,0,2840,2884,1,0,0,0,2841,2843,5,46,0,0,2842, + 2844,5,194,0,0,2843,2842,1,0,0,0,2843,2844,1,0,0,0,2844,2845,1,0,0,0, + 2845,2847,5,2,0,0,2846,2848,5,194,0,0,2847,2846,1,0,0,0,2847,2848,1,0, + 0,0,2848,2849,1,0,0,0,2849,2851,3,330,165,0,2850,2852,5,194,0,0,2851, + 2850,1,0,0,0,2851,2852,1,0,0,0,2852,2853,1,0,0,0,2853,2854,5,3,0,0,2854, + 2884,1,0,0,0,2855,2857,5,120,0,0,2856,2858,5,194,0,0,2857,2856,1,0,0, + 0,2857,2858,1,0,0,0,2858,2859,1,0,0,0,2859,2861,5,2,0,0,2860,2862,5,194, + 0,0,2861,2860,1,0,0,0,2861,2862,1,0,0,0,2862,2863,1,0,0,0,2863,2865,3, + 330,165,0,2864,2866,5,194,0,0,2865,2864,1,0,0,0,2865,2866,1,0,0,0,2866, + 2867,1,0,0,0,2867,2868,5,3,0,0,2868,2884,1,0,0,0,2869,2871,5,163,0,0, + 2870,2872,5,194,0,0,2871,2870,1,0,0,0,2871,2872,1,0,0,0,2872,2873,1,0, + 0,0,2873,2875,5,2,0,0,2874,2876,5,194,0,0,2875,2874,1,0,0,0,2875,2876, + 1,0,0,0,2876,2877,1,0,0,0,2877,2879,3,330,165,0,2878,2880,5,194,0,0,2879, + 2878,1,0,0,0,2879,2880,1,0,0,0,2880,2881,1,0,0,0,2881,2882,5,3,0,0,2882, + 2884,1,0,0,0,2883,2827,1,0,0,0,2883,2841,1,0,0,0,2883,2855,1,0,0,0,2883, + 2869,1,0,0,0,2884,329,1,0,0,0,2885,2886,3,332,166,0,2886,2887,5,194,0, + 0,2887,2888,3,238,119,0,2888,331,1,0,0,0,2889,2890,3,368,184,0,2890,2891, + 5,194,0,0,2891,2892,5,101,0,0,2892,2893,5,194,0,0,2893,2894,3,280,140, + 0,2894,333,1,0,0,0,2895,2902,3,370,185,0,2896,2902,5,179,0,0,2897,2902, + 3,336,168,0,2898,2902,5,121,0,0,2899,2902,3,338,169,0,2900,2902,3,342, + 171,0,2901,2895,1,0,0,0,2901,2896,1,0,0,0,2901,2897,1,0,0,0,2901,2898, + 1,0,0,0,2901,2899,1,0,0,0,2901,2900,1,0,0,0,2902,335,1,0,0,0,2903,2904, + 7,8,0,0,2904,337,1,0,0,0,2905,2907,5,7,0,0,2906,2908,5,194,0,0,2907,2906, + 1,0,0,0,2907,2908,1,0,0,0,2908,2922,1,0,0,0,2909,2911,3,280,140,0,2910, + 2912,5,194,0,0,2911,2910,1,0,0,0,2911,2912,1,0,0,0,2912,2919,1,0,0,0, + 2913,2915,3,340,170,0,2914,2916,5,194,0,0,2915,2914,1,0,0,0,2915,2916, + 1,0,0,0,2916,2918,1,0,0,0,2917,2913,1,0,0,0,2918,2921,1,0,0,0,2919,2917, + 1,0,0,0,2919,2920,1,0,0,0,2920,2923,1,0,0,0,2921,2919,1,0,0,0,2922,2909, + 1,0,0,0,2922,2923,1,0,0,0,2923,2924,1,0,0,0,2924,2925,5,8,0,0,2925,339, + 1,0,0,0,2926,2928,5,4,0,0,2927,2929,5,194,0,0,2928,2927,1,0,0,0,2928, + 2929,1,0,0,0,2929,2931,1,0,0,0,2930,2932,3,280,140,0,2931,2930,1,0,0, + 0,2931,2932,1,0,0,0,2932,341,1,0,0,0,2933,2935,5,9,0,0,2934,2936,5,194, + 0,0,2935,2934,1,0,0,0,2935,2936,1,0,0,0,2936,2937,1,0,0,0,2937,2939,3, + 344,172,0,2938,2940,5,194,0,0,2939,2938,1,0,0,0,2939,2940,1,0,0,0,2940, + 2951,1,0,0,0,2941,2943,5,4,0,0,2942,2944,5,194,0,0,2943,2942,1,0,0,0, + 2943,2944,1,0,0,0,2944,2945,1,0,0,0,2945,2947,3,344,172,0,2946,2948,5, + 194,0,0,2947,2946,1,0,0,0,2947,2948,1,0,0,0,2948,2950,1,0,0,0,2949,2941, + 1,0,0,0,2950,2953,1,0,0,0,2951,2949,1,0,0,0,2951,2952,1,0,0,0,2952,2954, + 1,0,0,0,2953,2951,1,0,0,0,2954,2955,5,10,0,0,2955,343,1,0,0,0,2956,2959, + 3,384,192,0,2957,2959,5,179,0,0,2958,2956,1,0,0,0,2958,2957,1,0,0,0,2959, + 2961,1,0,0,0,2960,2962,5,194,0,0,2961,2960,1,0,0,0,2961,2962,1,0,0,0, + 2962,2963,1,0,0,0,2963,2965,5,175,0,0,2964,2966,5,194,0,0,2965,2964,1, + 0,0,0,2965,2966,1,0,0,0,2966,2967,1,0,0,0,2967,2968,3,280,140,0,2968, + 345,1,0,0,0,2969,2971,5,2,0,0,2970,2972,5,194,0,0,2971,2970,1,0,0,0,2971, + 2972,1,0,0,0,2972,2973,1,0,0,0,2973,2975,3,280,140,0,2974,2976,5,194, + 0,0,2975,2974,1,0,0,0,2975,2976,1,0,0,0,2976,2977,1,0,0,0,2977,2978,5, + 3,0,0,2978,347,1,0,0,0,2979,2981,5,68,0,0,2980,2982,5,194,0,0,2981,2980, + 1,0,0,0,2981,2982,1,0,0,0,2982,2983,1,0,0,0,2983,2985,5,2,0,0,2984,2986, + 5,194,0,0,2985,2984,1,0,0,0,2985,2986,1,0,0,0,2986,2987,1,0,0,0,2987, + 2989,5,172,0,0,2988,2990,5,194,0,0,2989,2988,1,0,0,0,2989,2990,1,0,0, + 0,2990,2991,1,0,0,0,2991,3057,5,3,0,0,2992,2994,5,60,0,0,2993,2995,5, + 194,0,0,2994,2993,1,0,0,0,2994,2995,1,0,0,0,2995,2996,1,0,0,0,2996,2998, + 5,2,0,0,2997,2999,5,194,0,0,2998,2997,1,0,0,0,2998,2999,1,0,0,0,2999, + 3000,1,0,0,0,3000,3002,3,352,176,0,3001,3003,5,194,0,0,3002,3001,1,0, + 0,0,3002,3003,1,0,0,0,3003,3014,1,0,0,0,3004,3006,5,52,0,0,3005,3007, + 5,194,0,0,3006,3005,1,0,0,0,3006,3007,1,0,0,0,3007,3008,1,0,0,0,3008, + 3015,3,150,75,0,3009,3011,5,4,0,0,3010,3012,5,194,0,0,3011,3010,1,0,0, + 0,3011,3012,1,0,0,0,3012,3013,1,0,0,0,3013,3015,3,352,176,0,3014,3004, + 1,0,0,0,3014,3009,1,0,0,0,3015,3017,1,0,0,0,3016,3018,5,194,0,0,3017, + 3016,1,0,0,0,3017,3018,1,0,0,0,3018,3019,1,0,0,0,3019,3020,5,3,0,0,3020, + 3057,1,0,0,0,3021,3023,3,350,175,0,3022,3024,5,194,0,0,3023,3022,1,0, + 0,0,3023,3024,1,0,0,0,3024,3025,1,0,0,0,3025,3027,5,2,0,0,3026,3028,5, + 194,0,0,3027,3026,1,0,0,0,3027,3028,1,0,0,0,3028,3033,1,0,0,0,3029,3031, + 5,79,0,0,3030,3032,5,194,0,0,3031,3030,1,0,0,0,3031,3032,1,0,0,0,3032, + 3034,1,0,0,0,3033,3029,1,0,0,0,3033,3034,1,0,0,0,3034,3052,1,0,0,0,3035, + 3037,3,352,176,0,3036,3038,5,194,0,0,3037,3036,1,0,0,0,3037,3038,1,0, + 0,0,3038,3049,1,0,0,0,3039,3041,5,4,0,0,3040,3042,5,194,0,0,3041,3040, + 1,0,0,0,3041,3042,1,0,0,0,3042,3043,1,0,0,0,3043,3045,3,352,176,0,3044, + 3046,5,194,0,0,3045,3044,1,0,0,0,3045,3046,1,0,0,0,3046,3048,1,0,0,0, + 3047,3039,1,0,0,0,3048,3051,1,0,0,0,3049,3047,1,0,0,0,3049,3050,1,0,0, + 0,3050,3053,1,0,0,0,3051,3049,1,0,0,0,3052,3035,1,0,0,0,3052,3053,1,0, + 0,0,3053,3054,1,0,0,0,3054,3055,5,3,0,0,3055,3057,1,0,0,0,3056,2979,1, + 0,0,0,3056,2992,1,0,0,0,3056,3021,1,0,0,0,3057,349,1,0,0,0,3058,3059, + 3,384,192,0,3059,351,1,0,0,0,3060,3062,3,384,192,0,3061,3063,5,194,0, + 0,3062,3061,1,0,0,0,3062,3063,1,0,0,0,3063,3064,1,0,0,0,3064,3065,5,175, + 0,0,3065,3067,5,6,0,0,3066,3068,5,194,0,0,3067,3066,1,0,0,0,3067,3068, + 1,0,0,0,3068,3070,1,0,0,0,3069,3060,1,0,0,0,3069,3070,1,0,0,0,3070,3071, + 1,0,0,0,3071,3074,3,280,140,0,3072,3074,3,354,177,0,3073,3069,1,0,0,0, + 3073,3072,1,0,0,0,3074,353,1,0,0,0,3075,3077,3,356,178,0,3076,3078,5, + 194,0,0,3077,3076,1,0,0,0,3077,3078,1,0,0,0,3078,3079,1,0,0,0,3079,3080, + 5,177,0,0,3080,3082,5,15,0,0,3081,3083,5,194,0,0,3082,3081,1,0,0,0,3082, + 3083,1,0,0,0,3083,3084,1,0,0,0,3084,3086,3,280,140,0,3085,3087,5,194, + 0,0,3086,3085,1,0,0,0,3086,3087,1,0,0,0,3087,355,1,0,0,0,3088,3113,3, + 384,192,0,3089,3091,5,2,0,0,3090,3092,5,194,0,0,3091,3090,1,0,0,0,3091, + 3092,1,0,0,0,3092,3093,1,0,0,0,3093,3095,3,384,192,0,3094,3096,5,194, + 0,0,3095,3094,1,0,0,0,3095,3096,1,0,0,0,3096,3107,1,0,0,0,3097,3099,5, + 4,0,0,3098,3100,5,194,0,0,3099,3098,1,0,0,0,3099,3100,1,0,0,0,3100,3101, + 1,0,0,0,3101,3103,3,384,192,0,3102,3104,5,194,0,0,3103,3102,1,0,0,0,3103, + 3104,1,0,0,0,3104,3106,1,0,0,0,3105,3097,1,0,0,0,3106,3109,1,0,0,0,3107, + 3105,1,0,0,0,3107,3108,1,0,0,0,3108,3110,1,0,0,0,3109,3107,1,0,0,0,3110, + 3111,5,3,0,0,3111,3113,1,0,0,0,3112,3088,1,0,0,0,3112,3089,1,0,0,0,3113, + 357,1,0,0,0,3114,3119,3,248,124,0,3115,3117,5,194,0,0,3116,3115,1,0,0, + 0,3116,3117,1,0,0,0,3117,3118,1,0,0,0,3118,3120,3,250,125,0,3119,3116, + 1,0,0,0,3120,3121,1,0,0,0,3121,3119,1,0,0,0,3121,3122,1,0,0,0,3122,359, + 1,0,0,0,3123,3125,7,9,0,0,3124,3126,5,194,0,0,3125,3124,1,0,0,0,3125, + 3126,1,0,0,0,3126,3127,1,0,0,0,3127,3129,5,9,0,0,3128,3130,5,194,0,0, + 3129,3128,1,0,0,0,3129,3130,1,0,0,0,3130,3131,1,0,0,0,3131,3133,5,112, + 0,0,3132,3134,5,194,0,0,3133,3132,1,0,0,0,3133,3134,1,0,0,0,3134,3135, + 1,0,0,0,3135,3140,3,240,120,0,3136,3138,5,194,0,0,3137,3136,1,0,0,0,3137, + 3138,1,0,0,0,3138,3139,1,0,0,0,3139,3141,3,238,119,0,3140,3137,1,0,0, + 0,3140,3141,1,0,0,0,3141,3146,1,0,0,0,3142,3144,5,194,0,0,3143,3142,1, + 0,0,0,3143,3144,1,0,0,0,3144,3145,1,0,0,0,3145,3147,3,202,101,0,3146, + 3143,1,0,0,0,3146,3147,1,0,0,0,3147,3149,1,0,0,0,3148,3150,5,194,0,0, + 3149,3148,1,0,0,0,3149,3150,1,0,0,0,3150,3151,1,0,0,0,3151,3152,5,10, + 0,0,3152,361,1,0,0,0,3153,3155,5,5,0,0,3154,3156,5,194,0,0,3155,3154, + 1,0,0,0,3155,3156,1,0,0,0,3156,3159,1,0,0,0,3157,3160,3,376,188,0,3158, + 3160,5,172,0,0,3159,3157,1,0,0,0,3159,3158,1,0,0,0,3160,363,1,0,0,0,3161, + 3166,5,59,0,0,3162,3164,5,194,0,0,3163,3162,1,0,0,0,3163,3164,1,0,0,0, + 3164,3165,1,0,0,0,3165,3167,3,366,183,0,3166,3163,1,0,0,0,3167,3168,1, + 0,0,0,3168,3166,1,0,0,0,3168,3169,1,0,0,0,3169,3184,1,0,0,0,3170,3172, + 5,59,0,0,3171,3173,5,194,0,0,3172,3171,1,0,0,0,3172,3173,1,0,0,0,3173, + 3174,1,0,0,0,3174,3179,3,280,140,0,3175,3177,5,194,0,0,3176,3175,1,0, + 0,0,3176,3177,1,0,0,0,3177,3178,1,0,0,0,3178,3180,3,366,183,0,3179,3176, + 1,0,0,0,3180,3181,1,0,0,0,3181,3179,1,0,0,0,3181,3182,1,0,0,0,3182,3184, + 1,0,0,0,3183,3161,1,0,0,0,3183,3170,1,0,0,0,3184,3193,1,0,0,0,3185,3187, + 5,194,0,0,3186,3185,1,0,0,0,3186,3187,1,0,0,0,3187,3188,1,0,0,0,3188, + 3190,5,81,0,0,3189,3191,5,194,0,0,3190,3189,1,0,0,0,3190,3191,1,0,0,0, + 3191,3192,1,0,0,0,3192,3194,3,280,140,0,3193,3186,1,0,0,0,3193,3194,1, + 0,0,0,3194,3196,1,0,0,0,3195,3197,5,194,0,0,3196,3195,1,0,0,0,3196,3197, + 1,0,0,0,3197,3198,1,0,0,0,3198,3199,5,82,0,0,3199,365,1,0,0,0,3200,3202, + 5,157,0,0,3201,3203,5,194,0,0,3202,3201,1,0,0,0,3202,3203,1,0,0,0,3203, + 3204,1,0,0,0,3204,3206,3,280,140,0,3205,3207,5,194,0,0,3206,3205,1,0, + 0,0,3206,3207,1,0,0,0,3207,3208,1,0,0,0,3208,3210,5,146,0,0,3209,3211, + 5,194,0,0,3210,3209,1,0,0,0,3210,3211,1,0,0,0,3211,3212,1,0,0,0,3212, + 3213,3,280,140,0,3213,367,1,0,0,0,3214,3215,3,384,192,0,3215,369,1,0, + 0,0,3216,3219,3,380,190,0,3217,3219,3,378,189,0,3218,3216,1,0,0,0,3218, + 3217,1,0,0,0,3219,371,1,0,0,0,3220,3223,5,25,0,0,3221,3224,3,384,192, + 0,3222,3224,5,181,0,0,3223,3221,1,0,0,0,3223,3222,1,0,0,0,3224,373,1, + 0,0,0,3225,3227,3,326,163,0,3226,3228,5,194,0,0,3227,3226,1,0,0,0,3227, + 3228,1,0,0,0,3228,3229,1,0,0,0,3229,3230,3,362,181,0,3230,375,1,0,0,0, + 3231,3232,3,384,192,0,3232,377,1,0,0,0,3233,3234,5,181,0,0,3234,379,1, + 0,0,0,3235,3236,7,10,0,0,3236,381,1,0,0,0,3237,3240,3,384,192,0,3238, + 3239,5,5,0,0,3239,3241,3,384,192,0,3240,3238,1,0,0,0,3240,3241,1,0,0, + 0,3241,383,1,0,0,0,3242,3248,5,190,0,0,3243,3244,5,193,0,0,3244,3248, + 6,192,-1,0,3245,3248,5,182,0,0,3246,3248,3,386,193,0,3247,3242,1,0,0, + 0,3247,3243,1,0,0,0,3247,3245,1,0,0,0,3247,3246,1,0,0,0,3248,385,1,0, + 0,0,3249,3250,7,11,0,0,3250,387,1,0,0,0,3251,3252,7,12,0,0,3252,389,1, + 0,0,0,3253,3254,7,13,0,0,3254,391,1,0,0,0,3255,3256,7,14,0,0,3256,393, + 1,0,0,0,556,396,400,405,409,414,417,421,424,452,458,465,469,473,477,480, + 484,488,492,497,501,503,510,514,523,528,538,542,546,551,564,568,576,580, + 584,588,596,600,604,608,623,628,634,638,641,644,650,654,659,662,666,669, + 672,676,680,686,690,695,713,724,730,734,741,761,765,768,771,774,777,781, + 786,790,800,804,809,814,819,825,829,833,838,845,849,853,856,873,877,881, + 885,889,892,895,903,908,912,916,920,924,933,937,941,945,955,959,963,973, + 977,981,992,996,1001,1005,1009,1013,1017,1019,1023,1027,1029,1037,1042, + 1046,1050,1054,1059,1065,1069,1082,1086,1089,1092,1095,1099,1103,1106, + 1109,1113,1117,1123,1127,1131,1135,1141,1145,1149,1153,1159,1163,1168, + 1180,1184,1188,1193,1211,1218,1231,1238,1254,1258,1267,1275,1278,1288, + 1291,1299,1302,1308,1311,1317,1332,1342,1345,1349,1353,1372,1379,1386, + 1397,1420,1429,1439,1443,1447,1451,1456,1460,1464,1467,1475,1479,1484, + 1493,1497,1502,1508,1514,1520,1524,1528,1534,1538,1542,1548,1552,1556, + 1562,1566,1570,1574,1578,1584,1588,1592,1596,1600,1610,1616,1623,1628, + 1634,1639,1656,1662,1668,1672,1676,1685,1699,1704,1709,1713,1718,1724, + 1729,1732,1736,1740,1744,1750,1754,1759,1764,1768,1771,1773,1777,1781, + 1787,1791,1796,1800,1809,1815,1823,1827,1831,1835,1842,1846,1850,1854, + 1857,1860,1867,1873,1877,1882,1889,1892,1895,1900,1904,1908,1913,1917, + 1926,1930,1935,1949,1951,1953,1958,1968,1974,1981,1994,1998,2002,2006, + 2011,2016,2020,2024,2028,2032,2036,2042,2046,2050,2054,2059,2065,2068, + 2074,2077,2083,2087,2091,2095,2099,2104,2109,2113,2118,2121,2130,2139, + 2144,2157,2160,2168,2172,2177,2182,2186,2191,2197,2202,2209,2213,2217, + 2219,2223,2225,2229,2231,2237,2243,2247,2250,2253,2259,2262,2265,2269, + 2275,2278,2281,2285,2289,2293,2295,2299,2301,2305,2307,2311,2313,2319, + 2323,2327,2331,2335,2339,2343,2347,2351,2354,2360,2364,2368,2371,2376, + 2381,2385,2389,2392,2395,2400,2405,2408,2411,2414,2417,2420,2424,2428, + 2432,2436,2446,2449,2452,2456,2459,2462,2466,2470,2474,2478,2482,2486, + 2488,2491,2495,2499,2503,2507,2509,2515,2518,2521,2532,2545,2555,2565, + 2570,2574,2581,2585,2589,2593,2597,2605,2609,2613,2617,2623,2627,2633, + 2637,2642,2647,2651,2656,2661,2665,2671,2678,2682,2688,2695,2699,2705, + 2712,2716,2721,2729,2732,2737,2746,2750,2753,2766,2769,2774,2788,2792, + 2796,2801,2804,2808,2813,2825,2829,2833,2837,2843,2847,2851,2857,2861, + 2865,2871,2875,2879,2883,2901,2907,2911,2915,2919,2922,2928,2931,2935, + 2939,2943,2947,2951,2958,2961,2965,2971,2975,2981,2985,2989,2994,2998, + 3002,3006,3011,3014,3017,3023,3027,3031,3033,3037,3041,3045,3049,3052, + 3056,3062,3067,3069,3073,3077,3082,3086,3091,3095,3099,3103,3107,3112, + 3116,3121,3125,3129,3133,3137,3140,3143,3146,3149,3155,3159,3163,3168, + 3172,3176,3181,3183,3186,3190,3193,3196,3202,3206,3210,3218,3223,3227, + 3240,3247 }; staticData->serializedATN = antlr4::atn::SerializedATNView(serializedATNSegment, sizeof(serializedATNSegment) / sizeof(serializedATNSegment[0])); @@ -1551,29 +1559,29 @@ CypherParser::IC_StatementsContext* CypherParser::iC_Statements() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(392); + setState(394); oC_Cypher(); - setState(403); + setState(405); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 2, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(394); + setState(396); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(393); + setState(395); match(CypherParser::SP); } - setState(396); - match(CypherParser::T__0); setState(398); + match(CypherParser::T__0); + setState(400); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 1, _ctx)) { case 1: { - setState(397); + setState(399); match(CypherParser::SP); break; } @@ -1581,22 +1589,22 @@ CypherParser::IC_StatementsContext* CypherParser::iC_Statements() { default: break; } - setState(400); + setState(402); oC_Cypher(); } - setState(405); + setState(407); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 2, _ctx); } - setState(407); + setState(409); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(406); + setState(408); match(CypherParser::SP); } - setState(409); + setState(411); match(CypherParser::EOF); } @@ -1651,41 +1659,41 @@ CypherParser::OC_CypherContext* CypherParser::oC_Cypher() { }); try { enterOuterAlt(_localctx, 1); - setState(412); + setState(414); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::EXPLAIN || _la == CypherParser::PROFILE) { - setState(411); + setState(413); oC_AnyCypherOption(); } - setState(415); + setState(417); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(414); + setState(416); match(CypherParser::SP); } - setState(417); + setState(419); oC_Statement(); - setState(422); + setState(424); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 7, _ctx)) { case 1: { - setState(419); + setState(421); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(418); + setState(420); match(CypherParser::SP); } - setState(421); + setState(423); match(CypherParser::T__0); break; } @@ -1832,187 +1840,187 @@ CypherParser::OC_StatementContext* CypherParser::oC_Statement() { exitRule(); }); try { - setState(450); + setState(452); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 8, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(424); + setState(426); oC_Query(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(425); + setState(427); iC_Analyze(); break; } case 3: { enterOuterAlt(_localctx, 3); - setState(426); + setState(428); iC_CreateUser(); break; } case 4: { enterOuterAlt(_localctx, 4); - setState(427); + setState(429); iC_CreateRole(); break; } case 5: { enterOuterAlt(_localctx, 5); - setState(428); + setState(430); iC_CreateNodeTable(); break; } case 6: { enterOuterAlt(_localctx, 6); - setState(429); + setState(431); iC_CreateRelTable(); break; } case 7: { enterOuterAlt(_localctx, 7); - setState(430); + setState(432); iC_CreateIndex(); break; } case 8: { enterOuterAlt(_localctx, 8); - setState(431); + setState(433); iC_CreateSequence(); break; } case 9: { enterOuterAlt(_localctx, 9); - setState(432); + setState(434); iC_CreateType(); break; } case 10: { enterOuterAlt(_localctx, 10); - setState(433); + setState(435); iC_Drop(); break; } case 11: { enterOuterAlt(_localctx, 11); - setState(434); + setState(436); iC_AlterTable(); break; } case 12: { enterOuterAlt(_localctx, 12); - setState(435); + setState(437); iC_CopyFrom(); break; } case 13: { enterOuterAlt(_localctx, 13); - setState(436); + setState(438); iC_CopyFromByColumn(); break; } case 14: { enterOuterAlt(_localctx, 14); - setState(437); + setState(439); iC_CopyTO(); break; } case 15: { enterOuterAlt(_localctx, 15); - setState(438); + setState(440); iC_StandaloneCall(); break; } case 16: { enterOuterAlt(_localctx, 16); - setState(439); + setState(441); iC_CreateMacro(); break; } case 17: { enterOuterAlt(_localctx, 17); - setState(440); + setState(442); iC_CommentOn(); break; } case 18: { enterOuterAlt(_localctx, 18); - setState(441); + setState(443); iC_Transaction(); break; } case 19: { enterOuterAlt(_localctx, 19); - setState(442); + setState(444); iC_Extension(); break; } case 20: { enterOuterAlt(_localctx, 20); - setState(443); + setState(445); iC_ExportDatabase(); break; } case 21: { enterOuterAlt(_localctx, 21); - setState(444); + setState(446); iC_ImportDatabase(); break; } case 22: { enterOuterAlt(_localctx, 22); - setState(445); + setState(447); iC_AttachDatabase(); break; } case 23: { enterOuterAlt(_localctx, 23); - setState(446); + setState(448); iC_DetachDatabase(); break; } case 24: { enterOuterAlt(_localctx, 24); - setState(447); + setState(449); iC_UseDatabase(); break; } case 25: { enterOuterAlt(_localctx, 25); - setState(448); + setState(450); iC_CreateGraph(); break; } case 26: { enterOuterAlt(_localctx, 26); - setState(449); + setState(451); iC_UseGraph(); break; } @@ -2089,18 +2097,18 @@ CypherParser::IC_CopyFromContext* CypherParser::iC_CopyFrom() { }); try { enterOuterAlt(_localctx, 1); - setState(452); + setState(454); match(CypherParser::COPY); - setState(453); + setState(455); match(CypherParser::SP); - setState(454); - oC_SchemaName(); setState(456); + oC_SchemaName(); + setState(458); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 9, _ctx)) { case 1: { - setState(455); + setState(457); iC_ColumnNames(); break; } @@ -2108,48 +2116,48 @@ CypherParser::IC_CopyFromContext* CypherParser::iC_CopyFrom() { default: break; } - setState(458); - match(CypherParser::SP); - setState(459); - match(CypherParser::FROM); setState(460); match(CypherParser::SP); setState(461); + match(CypherParser::FROM); + setState(462); + match(CypherParser::SP); + setState(463); iC_ScanSource(); - setState(475); + setState(477); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 13, _ctx)) { case 1: { - setState(463); + setState(465); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(462); + setState(464); match(CypherParser::SP); } - setState(465); - match(CypherParser::T__1); setState(467); + match(CypherParser::T__1); + setState(469); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(466); + setState(468); match(CypherParser::SP); } - setState(469); - iC_Options(); setState(471); + iC_Options(); + setState(473); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(470); + setState(472); match(CypherParser::SP); } - setState(473); + setState(475); match(CypherParser::T__2); break; } @@ -2211,74 +2219,74 @@ CypherParser::IC_ColumnNamesContext* CypherParser::iC_ColumnNames() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(478); + setState(480); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(477); + setState(479); match(CypherParser::SP); } - setState(480); - match(CypherParser::T__1); setState(482); + match(CypherParser::T__1); + setState(484); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(481); + setState(483); match(CypherParser::SP); } - setState(501); + setState(503); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & -6370763885380632576) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 15689294993770909) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 129)) & -8065933754466937985) != 0)) { - setState(484); + ((1ULL << (_la - 64)) & 31381524945389981) != 0) || ((((_la - 130) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 130)) & -8065933754466937985) != 0)) { + setState(486); oC_SchemaName(); - setState(495); + setState(497); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 18, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(486); + setState(488); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(485); + setState(487); match(CypherParser::SP); } - setState(488); - match(CypherParser::T__3); setState(490); + match(CypherParser::T__3); + setState(492); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(489); + setState(491); match(CypherParser::SP); } - setState(492); + setState(494); oC_SchemaName(); } - setState(497); + setState(499); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 18, _ctx); } - setState(499); + setState(501); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(498); + setState(500); match(CypherParser::SP); } } - setState(503); + setState(505); match(CypherParser::T__2); } @@ -2348,79 +2356,79 @@ CypherParser::IC_ScanSourceContext* CypherParser::iC_ScanSource() { exitRule(); }); try { - setState(526); + setState(528); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 24, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(505); + setState(507); iC_FilePaths(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(506); - match(CypherParser::T__1); setState(508); + match(CypherParser::T__1); + setState(510); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(507); + setState(509); match(CypherParser::SP); } - setState(510); - oC_Query(); setState(512); + oC_Query(); + setState(514); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(511); + setState(513); match(CypherParser::SP); } - setState(514); + setState(516); match(CypherParser::T__2); break; } case 3: { enterOuterAlt(_localctx, 3); - setState(516); + setState(518); oC_Parameter(); break; } case 4: { enterOuterAlt(_localctx, 4); - setState(517); + setState(519); oC_Variable(); break; } case 5: { enterOuterAlt(_localctx, 5); - setState(518); + setState(520); oC_Variable(); - setState(519); - match(CypherParser::T__4); setState(521); + match(CypherParser::T__4); + setState(523); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(520); + setState(522); match(CypherParser::SP); } - setState(523); + setState(525); oC_SchemaName(); break; } case 6: { enterOuterAlt(_localctx, 6); - setState(525); + setState(527); oC_FunctionInvocation(); break; } @@ -2501,67 +2509,67 @@ CypherParser::IC_CopyFromByColumnContext* CypherParser::iC_CopyFromByColumn() { }); try { enterOuterAlt(_localctx, 1); - setState(528); - match(CypherParser::COPY); - setState(529); - match(CypherParser::SP); setState(530); - oC_SchemaName(); + match(CypherParser::COPY); setState(531); match(CypherParser::SP); setState(532); - match(CypherParser::FROM); + oC_SchemaName(); setState(533); match(CypherParser::SP); setState(534); - match(CypherParser::T__1); + match(CypherParser::FROM); + setState(535); + match(CypherParser::SP); setState(536); + match(CypherParser::T__1); + setState(538); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(535); + setState(537); match(CypherParser::SP); } - setState(538); + setState(540); match(CypherParser::StringLiteral); - setState(549); + setState(551); _errHandler->sync(this); _la = _input->LA(1); while (_la == CypherParser::T__3 || _la == CypherParser::SP) { - setState(540); + setState(542); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(539); + setState(541); match(CypherParser::SP); } - setState(542); - match(CypherParser::T__3); setState(544); + match(CypherParser::T__3); + setState(546); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(543); + setState(545); match(CypherParser::SP); } - setState(546); + setState(548); match(CypherParser::StringLiteral); - setState(551); + setState(553); _errHandler->sync(this); _la = _input->LA(1); } - setState(552); - match(CypherParser::T__2); - setState(553); - match(CypherParser::SP); setState(554); - match(CypherParser::BY); + match(CypherParser::T__2); setState(555); match(CypherParser::SP); setState(556); + match(CypherParser::BY); + setState(557); + match(CypherParser::SP); + setState(558); match(CypherParser::COLUMN); } @@ -2628,74 +2636,74 @@ CypherParser::IC_CopyTOContext* CypherParser::iC_CopyTO() { }); try { enterOuterAlt(_localctx, 1); - setState(558); + setState(560); match(CypherParser::COPY); - setState(559); + setState(561); match(CypherParser::SP); - setState(560); - match(CypherParser::T__1); setState(562); + match(CypherParser::T__1); + setState(564); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(561); + setState(563); match(CypherParser::SP); } - setState(564); - oC_Query(); setState(566); + oC_Query(); + setState(568); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(565); + setState(567); match(CypherParser::SP); } - setState(568); - match(CypherParser::T__2); - setState(569); - match(CypherParser::SP); setState(570); - match(CypherParser::TO); + match(CypherParser::T__2); setState(571); match(CypherParser::SP); setState(572); + match(CypherParser::TO); + setState(573); + match(CypherParser::SP); + setState(574); match(CypherParser::StringLiteral); - setState(586); + setState(588); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 34, _ctx)) { case 1: { - setState(574); + setState(576); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(573); + setState(575); match(CypherParser::SP); } - setState(576); - match(CypherParser::T__1); setState(578); + match(CypherParser::T__1); + setState(580); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(577); + setState(579); match(CypherParser::SP); } - setState(580); - iC_Options(); setState(582); + iC_Options(); + setState(584); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(581); + setState(583); match(CypherParser::SP); } - setState(584); + setState(586); match(CypherParser::T__2); break; } @@ -2764,50 +2772,50 @@ CypherParser::IC_ExportDatabaseContext* CypherParser::iC_ExportDatabase() { }); try { enterOuterAlt(_localctx, 1); - setState(588); - match(CypherParser::EXPORT); - setState(589); - match(CypherParser::SP); setState(590); - match(CypherParser::DATABASE); + match(CypherParser::EXPORT); setState(591); match(CypherParser::SP); setState(592); + match(CypherParser::DATABASE); + setState(593); + match(CypherParser::SP); + setState(594); match(CypherParser::StringLiteral); - setState(606); + setState(608); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 38, _ctx)) { case 1: { - setState(594); + setState(596); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(593); + setState(595); match(CypherParser::SP); } - setState(596); - match(CypherParser::T__1); setState(598); + match(CypherParser::T__1); + setState(600); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(597); + setState(599); match(CypherParser::SP); } - setState(600); - iC_Options(); setState(602); + iC_Options(); + setState(604); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(601); + setState(603); match(CypherParser::SP); } - setState(604); + setState(606); match(CypherParser::T__2); break; } @@ -2871,15 +2879,15 @@ CypherParser::IC_ImportDatabaseContext* CypherParser::iC_ImportDatabase() { }); try { enterOuterAlt(_localctx, 1); - setState(608); - match(CypherParser::IMPORT); - setState(609); - match(CypherParser::SP); setState(610); - match(CypherParser::DATABASE); + match(CypherParser::IMPORT); setState(611); match(CypherParser::SP); setState(612); + match(CypherParser::DATABASE); + setState(613); + match(CypherParser::SP); + setState(614); match(CypherParser::StringLiteral); } @@ -2954,24 +2962,24 @@ CypherParser::IC_AttachDatabaseContext* CypherParser::iC_AttachDatabase() { }); try { enterOuterAlt(_localctx, 1); - setState(614); + setState(616); match(CypherParser::ATTACH); - setState(615); + setState(617); match(CypherParser::SP); - setState(616); + setState(618); match(CypherParser::StringLiteral); - setState(621); + setState(623); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 39, _ctx)) { case 1: { - setState(617); - match(CypherParser::SP); - setState(618); - match(CypherParser::AS); setState(619); match(CypherParser::SP); setState(620); + match(CypherParser::AS); + setState(621); + match(CypherParser::SP); + setState(622); oC_SchemaName(); break; } @@ -2979,48 +2987,48 @@ CypherParser::IC_AttachDatabaseContext* CypherParser::iC_AttachDatabase() { default: break; } - setState(623); + setState(625); match(CypherParser::SP); - setState(624); - match(CypherParser::T__1); setState(626); + match(CypherParser::T__1); + setState(628); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(625); + setState(627); match(CypherParser::SP); } - setState(628); + setState(630); match(CypherParser::DBTYPE); - setState(629); + setState(631); match(CypherParser::SP); - setState(630); + setState(632); oC_SymbolicName(); - setState(639); + setState(641); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 43, _ctx)) { case 1: { - setState(632); + setState(634); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(631); + setState(633); match(CypherParser::SP); } - setState(634); - match(CypherParser::T__3); setState(636); + match(CypherParser::T__3); + setState(638); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(635); + setState(637); match(CypherParser::SP); } - setState(638); + setState(640); iC_Options(); break; } @@ -3028,15 +3036,15 @@ CypherParser::IC_AttachDatabaseContext* CypherParser::iC_AttachDatabase() { default: break; } - setState(642); + setState(644); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(641); + setState(643); match(CypherParser::SP); } - setState(644); + setState(646); match(CypherParser::T__2); } @@ -3094,46 +3102,46 @@ CypherParser::IC_OptionContext* CypherParser::iC_Option() { exitRule(); }); try { - setState(670); + setState(672); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 51, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(646); + setState(648); oC_SymbolicName(); - setState(660); + setState(662); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 48, _ctx)) { case 1: { - setState(648); + setState(650); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(647); + setState(649); match(CypherParser::SP); } - setState(650); - match(CypherParser::T__5); setState(652); + match(CypherParser::T__5); + setState(654); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(651); + setState(653); match(CypherParser::SP); } break; } case 2: { - setState(657); + setState(659); _errHandler->sync(this); _la = _input->LA(1); while (_la == CypherParser::SP) { - setState(654); + setState(656); match(CypherParser::SP); - setState(659); + setState(661); _errHandler->sync(this); _la = _input->LA(1); } @@ -3143,22 +3151,22 @@ CypherParser::IC_OptionContext* CypherParser::iC_Option() { default: break; } - setState(662); + setState(664); oC_Literal(); - setState(667); + setState(669); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 50, _ctx)) { case 1: { - setState(664); + setState(666); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(663); + setState(665); match(CypherParser::SP); } - setState(666); + setState(668); iC_OptionQualifier(); break; } @@ -3171,7 +3179,7 @@ CypherParser::IC_OptionContext* CypherParser::iC_Option() { case 2: { enterOuterAlt(_localctx, 2); - setState(669); + setState(671); oC_SymbolicName(); break; } @@ -3228,27 +3236,27 @@ CypherParser::IC_OptionQualifierContext* CypherParser::iC_OptionQualifier() { }); try { enterOuterAlt(_localctx, 1); - setState(672); - match(CypherParser::T__1); setState(674); + match(CypherParser::T__1); + setState(676); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(673); + setState(675); match(CypherParser::SP); } - setState(676); - oC_SymbolicName(); setState(678); + oC_SymbolicName(); + setState(680); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(677); + setState(679); match(CypherParser::SP); } - setState(680); + setState(682); match(CypherParser::T__2); } @@ -3304,35 +3312,35 @@ CypherParser::IC_OptionsContext* CypherParser::iC_Options() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(682); + setState(684); iC_Option(); - setState(693); + setState(695); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 56, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(684); + setState(686); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(683); + setState(685); match(CypherParser::SP); } - setState(686); - match(CypherParser::T__3); setState(688); + match(CypherParser::T__3); + setState(690); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(687); + setState(689); match(CypherParser::SP); } - setState(690); + setState(692); iC_Option(); } - setState(695); + setState(697); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 56, _ctx); } @@ -3384,11 +3392,11 @@ CypherParser::IC_DetachDatabaseContext* CypherParser::iC_DetachDatabase() { }); try { enterOuterAlt(_localctx, 1); - setState(696); + setState(698); match(CypherParser::DETACH); - setState(697); + setState(699); match(CypherParser::SP); - setState(698); + setState(700); oC_SchemaName(); } @@ -3438,11 +3446,11 @@ CypherParser::IC_UseDatabaseContext* CypherParser::iC_UseDatabase() { }); try { enterOuterAlt(_localctx, 1); - setState(700); + setState(702); match(CypherParser::USE); - setState(701); + setState(703); match(CypherParser::SP); - setState(702); + setState(704); oC_SchemaName(); } @@ -3504,24 +3512,24 @@ CypherParser::IC_CreateGraphContext* CypherParser::iC_CreateGraph() { }); try { enterOuterAlt(_localctx, 1); - setState(704); + setState(706); match(CypherParser::CREATE); - setState(705); + setState(707); match(CypherParser::SP); - setState(706); + setState(708); match(CypherParser::GRAPH); - setState(707); + setState(709); match(CypherParser::SP); - setState(708); + setState(710); oC_SchemaName(); - setState(711); + setState(713); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 57, _ctx)) { case 1: { - setState(709); + setState(711); match(CypherParser::SP); - setState(710); + setState(712); match(CypherParser::ANY); break; } @@ -3585,15 +3593,15 @@ CypherParser::IC_UseGraphContext* CypherParser::iC_UseGraph() { }); try { enterOuterAlt(_localctx, 1); - setState(713); - match(CypherParser::USE); - setState(714); - match(CypherParser::SP); setState(715); - match(CypherParser::GRAPH); + match(CypherParser::USE); setState(716); match(CypherParser::SP); setState(717); + match(CypherParser::GRAPH); + setState(718); + match(CypherParser::SP); + setState(719); oC_SchemaName(); } @@ -3643,16 +3651,16 @@ CypherParser::IC_AnalyzeContext* CypherParser::iC_Analyze() { }); try { enterOuterAlt(_localctx, 1); - setState(719); + setState(721); match(CypherParser::ANALYZE); - setState(722); + setState(724); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 58, _ctx)) { case 1: { - setState(720); + setState(722); match(CypherParser::SP); - setState(721); + setState(723); oC_SchemaName(); break; } @@ -3720,47 +3728,47 @@ CypherParser::IC_StandaloneCallContext* CypherParser::iC_StandaloneCall() { exitRule(); }); try { - setState(739); + setState(741); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 61, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(724); + setState(726); match(CypherParser::CALL); - setState(725); + setState(727); match(CypherParser::SP); - setState(726); - oC_SymbolicName(); setState(728); + oC_SymbolicName(); + setState(730); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(727); + setState(729); match(CypherParser::SP); } - setState(730); - match(CypherParser::T__5); setState(732); + match(CypherParser::T__5); + setState(734); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(731); + setState(733); match(CypherParser::SP); } - setState(734); + setState(736); oC_Expression(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(736); + setState(738); match(CypherParser::CALL); - setState(737); + setState(739); match(CypherParser::SP); - setState(738); + setState(740); oC_FunctionInvocation(); break; } @@ -3836,27 +3844,27 @@ CypherParser::IC_CommentOnContext* CypherParser::iC_CommentOn() { }); try { enterOuterAlt(_localctx, 1); - setState(741); - match(CypherParser::COMMENT); - setState(742); - match(CypherParser::SP); setState(743); - match(CypherParser::ON); + match(CypherParser::COMMENT); setState(744); match(CypherParser::SP); setState(745); - match(CypherParser::TABLE); + match(CypherParser::ON); setState(746); match(CypherParser::SP); setState(747); - oC_SchemaName(); + match(CypherParser::TABLE); setState(748); match(CypherParser::SP); setState(749); - match(CypherParser::IS); + oC_SchemaName(); setState(750); match(CypherParser::SP); setState(751); + match(CypherParser::IS); + setState(752); + match(CypherParser::SP); + setState(753); match(CypherParser::StringLiteral); } @@ -3936,32 +3944,32 @@ CypherParser::IC_CreateMacroContext* CypherParser::iC_CreateMacro() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(753); - match(CypherParser::CREATE); - setState(754); - match(CypherParser::SP); setState(755); - match(CypherParser::MACRO); + match(CypherParser::CREATE); setState(756); match(CypherParser::SP); setState(757); - oC_FunctionName(); + match(CypherParser::MACRO); + setState(758); + match(CypherParser::SP); setState(759); + oC_FunctionName(); + setState(761); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(758); + setState(760); match(CypherParser::SP); } - setState(761); - match(CypherParser::T__1); setState(763); + match(CypherParser::T__1); + setState(765); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 63, _ctx)) { case 1: { - setState(762); + setState(764); match(CypherParser::SP); break; } @@ -3969,12 +3977,12 @@ CypherParser::IC_CreateMacroContext* CypherParser::iC_CreateMacro() { default: break; } - setState(766); + setState(768); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 64, _ctx)) { case 1: { - setState(765); + setState(767); iC_PositionalArgs(); break; } @@ -3982,12 +3990,12 @@ CypherParser::IC_CreateMacroContext* CypherParser::iC_CreateMacro() { default: break; } - setState(769); + setState(771); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 65, _ctx)) { case 1: { - setState(768); + setState(770); match(CypherParser::SP); break; } @@ -3995,64 +4003,64 @@ CypherParser::IC_CreateMacroContext* CypherParser::iC_CreateMacro() { default: break; } - setState(772); + setState(774); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & -6370763885380632576) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 15689294993770909) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 129)) & -8065933754466937985) != 0)) { - setState(771); + ((1ULL << (_la - 64)) & 31381524945389981) != 0) || ((((_la - 130) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 130)) & -8065933754466937985) != 0)) { + setState(773); iC_DefaultArg(); } - setState(784); + setState(786); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 69, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(775); + setState(777); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(774); + setState(776); match(CypherParser::SP); } - setState(777); - match(CypherParser::T__3); setState(779); + match(CypherParser::T__3); + setState(781); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(778); + setState(780); match(CypherParser::SP); } - setState(781); + setState(783); iC_DefaultArg(); } - setState(786); + setState(788); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 69, _ctx); } - setState(788); + setState(790); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(787); + setState(789); match(CypherParser::SP); } - setState(790); - match(CypherParser::T__2); - setState(791); - match(CypherParser::SP); setState(792); - match(CypherParser::AS); + match(CypherParser::T__2); setState(793); match(CypherParser::SP); setState(794); + match(CypherParser::AS); + setState(795); + match(CypherParser::SP); + setState(796); oC_Expression(); } @@ -4108,35 +4116,35 @@ CypherParser::IC_PositionalArgsContext* CypherParser::iC_PositionalArgs() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(796); + setState(798); oC_SymbolicName(); - setState(807); + setState(809); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 73, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(798); + setState(800); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(797); + setState(799); match(CypherParser::SP); } - setState(800); - match(CypherParser::T__3); setState(802); + match(CypherParser::T__3); + setState(804); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(801); + setState(803); match(CypherParser::SP); } - setState(804); + setState(806); oC_SymbolicName(); } - setState(809); + setState(811); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 73, _ctx); } @@ -4197,29 +4205,29 @@ CypherParser::IC_DefaultArgContext* CypherParser::iC_DefaultArg() { }); try { enterOuterAlt(_localctx, 1); - setState(810); - oC_SymbolicName(); setState(812); + oC_SymbolicName(); + setState(814); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(811); + setState(813); match(CypherParser::SP); } - setState(814); + setState(816); match(CypherParser::COLON); - setState(815); - match(CypherParser::T__5); setState(817); + match(CypherParser::T__5); + setState(819); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(816); + setState(818); match(CypherParser::SP); } - setState(819); + setState(821); oC_Literal(); } @@ -4277,96 +4285,96 @@ CypherParser::IC_FilePathsContext* CypherParser::iC_FilePaths() { exitRule(); }); try { - setState(854); + setState(856); _errHandler->sync(this); switch (_input->LA(1)) { case CypherParser::T__6: { enterOuterAlt(_localctx, 1); - setState(821); - match(CypherParser::T__6); setState(823); + match(CypherParser::T__6); + setState(825); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(822); + setState(824); match(CypherParser::SP); } - setState(825); + setState(827); match(CypherParser::StringLiteral); - setState(836); + setState(838); _errHandler->sync(this); _la = _input->LA(1); while (_la == CypherParser::T__3 || _la == CypherParser::SP) { - setState(827); + setState(829); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(826); + setState(828); match(CypherParser::SP); } - setState(829); - match(CypherParser::T__3); setState(831); + match(CypherParser::T__3); + setState(833); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(830); + setState(832); match(CypherParser::SP); } - setState(833); + setState(835); match(CypherParser::StringLiteral); - setState(838); + setState(840); _errHandler->sync(this); _la = _input->LA(1); } - setState(839); + setState(841); match(CypherParser::T__7); break; } case CypherParser::StringLiteral: { enterOuterAlt(_localctx, 2); - setState(840); + setState(842); match(CypherParser::StringLiteral); break; } case CypherParser::GLOB: { enterOuterAlt(_localctx, 3); - setState(841); - match(CypherParser::GLOB); setState(843); + match(CypherParser::GLOB); + setState(845); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(842); + setState(844); match(CypherParser::SP); } - setState(845); - match(CypherParser::T__1); setState(847); + match(CypherParser::T__1); + setState(849); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(846); + setState(848); match(CypherParser::SP); } - setState(849); - match(CypherParser::StringLiteral); setState(851); + match(CypherParser::StringLiteral); + setState(853); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(850); + setState(852); match(CypherParser::SP); } - setState(853); + setState(855); match(CypherParser::T__2); break; } @@ -4430,15 +4438,15 @@ CypherParser::IC_IfNotExistsContext* CypherParser::iC_IfNotExists() { }); try { enterOuterAlt(_localctx, 1); - setState(856); - match(CypherParser::IF); - setState(857); - match(CypherParser::SP); setState(858); - match(CypherParser::NOT); + match(CypherParser::IF); setState(859); match(CypherParser::SP); setState(860); + match(CypherParser::NOT); + setState(861); + match(CypherParser::SP); + setState(862); match(CypherParser::EXISTS); } @@ -4533,26 +4541,26 @@ CypherParser::IC_CreateNodeTableContext* CypherParser::iC_CreateNodeTable() { }); try { enterOuterAlt(_localctx, 1); - setState(862); - match(CypherParser::CREATE); - setState(863); - match(CypherParser::SP); setState(864); - match(CypherParser::NODE); + match(CypherParser::CREATE); setState(865); match(CypherParser::SP); setState(866); - match(CypherParser::TABLE); + match(CypherParser::NODE); setState(867); match(CypherParser::SP); - setState(871); + setState(868); + match(CypherParser::TABLE); + setState(869); + match(CypherParser::SP); + setState(873); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 84, _ctx)) { case 1: { - setState(868); + setState(870); iC_IfNotExists(); - setState(869); + setState(871); match(CypherParser::SP); break; } @@ -4560,38 +4568,38 @@ CypherParser::IC_CreateNodeTableContext* CypherParser::iC_CreateNodeTable() { default: break; } - setState(873); + setState(875); oC_SchemaName(); - setState(901); + setState(903); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 91, _ctx)) { case 1: { - setState(875); + setState(877); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(874); + setState(876); match(CypherParser::SP); } - setState(877); - match(CypherParser::T__1); setState(879); + match(CypherParser::T__1); + setState(881); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(878); + setState(880); match(CypherParser::SP); } - setState(881); - iC_PropertyDefinitions(); setState(883); + iC_PropertyDefinitions(); + setState(885); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 87, _ctx)) { case 1: { - setState(882); + setState(884); match(CypherParser::SP); break; } @@ -4599,45 +4607,45 @@ CypherParser::IC_CreateNodeTableContext* CypherParser::iC_CreateNodeTable() { default: break; } - setState(890); + setState(892); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::T__3) { - setState(885); - match(CypherParser::T__3); setState(887); + match(CypherParser::T__3); + setState(889); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(886); + setState(888); match(CypherParser::SP); } - setState(889); + setState(891); iC_CreateNodeConstraint(); } - setState(893); + setState(895); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(892); + setState(894); match(CypherParser::SP); } - setState(895); + setState(897); match(CypherParser::T__2); break; } case 2: { - setState(897); - match(CypherParser::SP); - setState(898); - match(CypherParser::AS); setState(899); match(CypherParser::SP); setState(900); + match(CypherParser::AS); + setState(901); + match(CypherParser::SP); + setState(902); oC_Query(); break; } @@ -4645,44 +4653,44 @@ CypherParser::IC_CreateNodeTableContext* CypherParser::iC_CreateNodeTable() { default: break; } - setState(918); + setState(920); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 95, _ctx)) { case 1: { - setState(903); + setState(905); match(CypherParser::SP); - setState(904); - match(CypherParser::WITH); setState(906); + match(CypherParser::WITH); + setState(908); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(905); + setState(907); match(CypherParser::SP); } - setState(908); - match(CypherParser::T__1); setState(910); + match(CypherParser::T__1); + setState(912); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(909); + setState(911); match(CypherParser::SP); } - setState(912); - iC_Options(); setState(914); + iC_Options(); + setState(916); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(913); + setState(915); match(CypherParser::SP); } - setState(916); + setState(918); match(CypherParser::T__2); break; } @@ -4690,14 +4698,14 @@ CypherParser::IC_CreateNodeTableContext* CypherParser::iC_CreateNodeTable() { default: break; } - setState(922); + setState(924); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 96, _ctx)) { case 1: { - setState(920); + setState(922); match(CypherParser::SP); - setState(921); + setState(923); iC_PartitionBy(); break; } @@ -4746,6 +4754,10 @@ CypherParser::IC_PartitionHashContext* CypherParser::IC_PartitionByContext::iC_P return getRuleContext(0); } +CypherParser::IC_PartitionListContext* CypherParser::IC_PartitionByContext::iC_PartitionList() { + return getRuleContext(0); +} + size_t CypherParser::IC_PartitionByContext::getRuleIndex() const { return CypherParser::RuleIC_PartitionBy; @@ -4765,29 +4777,35 @@ CypherParser::IC_PartitionByContext* CypherParser::iC_PartitionBy() { }); try { enterOuterAlt(_localctx, 1); - setState(924); + setState(926); match(CypherParser::PARTITION); - setState(925); + setState(927); match(CypherParser::SP); - setState(926); + setState(928); match(CypherParser::BY); - setState(927); + setState(929); match(CypherParser::SP); - setState(930); + setState(933); _errHandler->sync(this); switch (_input->LA(1)) { case CypherParser::RANGE: { - setState(928); + setState(930); iC_PartitionRange(); break; } case CypherParser::HASH: { - setState(929); + setState(931); iC_PartitionHash(); break; } + case CypherParser::LIST: { + setState(932); + iC_PartitionList(); + break; + } + default: throw NoViableAltException(this); } @@ -4852,45 +4870,45 @@ CypherParser::IC_PartitionHashContext* CypherParser::iC_PartitionHash() { }); try { enterOuterAlt(_localctx, 1); - setState(932); + setState(935); match(CypherParser::HASH); - setState(934); + setState(937); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(933); + setState(936); match(CypherParser::SP); } - setState(936); + setState(939); match(CypherParser::T__1); - setState(938); + setState(941); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(937); + setState(940); match(CypherParser::SP); } - setState(940); + setState(943); oC_PropertyKeyName(); - setState(942); + setState(945); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(941); + setState(944); match(CypherParser::SP); } - setState(944); + setState(947); match(CypherParser::T__2); - setState(945); + setState(948); match(CypherParser::SP); - setState(946); + setState(949); match(CypherParser::PARTITIONS); - setState(947); + setState(950); match(CypherParser::SP); - setState(948); + setState(951); oC_IntegerLiteral(); } @@ -4953,45 +4971,45 @@ CypherParser::IC_PartitionRangeContext* CypherParser::iC_PartitionRange() { }); try { enterOuterAlt(_localctx, 1); - setState(950); + setState(953); match(CypherParser::RANGE); - setState(952); + setState(955); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(951); + setState(954); match(CypherParser::SP); } - setState(954); + setState(957); match(CypherParser::T__1); - setState(956); + setState(959); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(955); + setState(958); match(CypherParser::SP); } - setState(958); + setState(961); oC_PropertyKeyName(); - setState(960); + setState(963); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(959); + setState(962); match(CypherParser::SP); } - setState(962); + setState(965); match(CypherParser::T__2); - setState(963); + setState(966); match(CypherParser::SP); - setState(964); + setState(967); match(CypherParser::PARTITIONS); - setState(965); + setState(968); match(CypherParser::SP); - setState(966); + setState(969); oC_IntegerLiteral(); } @@ -5004,6 +5022,91 @@ CypherParser::IC_PartitionRangeContext* CypherParser::iC_PartitionRange() { return _localctx; } +//----------------- IC_PartitionListContext ------------------------------------------------------------------ + +CypherParser::IC_PartitionListContext::IC_PartitionListContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* CypherParser::IC_PartitionListContext::LIST() { + return getToken(CypherParser::LIST, 0); +} + +CypherParser::OC_PropertyKeyNameContext* CypherParser::IC_PartitionListContext::oC_PropertyKeyName() { + return getRuleContext(0); +} + +std::vector CypherParser::IC_PartitionListContext::SP() { + return getTokens(CypherParser::SP); +} + +tree::TerminalNode* CypherParser::IC_PartitionListContext::SP(size_t i) { + return getToken(CypherParser::SP, i); +} + + +size_t CypherParser::IC_PartitionListContext::getRuleIndex() const { + return CypherParser::RuleIC_PartitionList; +} + + +CypherParser::IC_PartitionListContext* CypherParser::iC_PartitionList() { + IC_PartitionListContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 60, CypherParser::RuleIC_PartitionList); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(971); + match(CypherParser::LIST); + setState(973); + _errHandler->sync(this); + + _la = _input->LA(1); + if (_la == CypherParser::SP) { + setState(972); + match(CypherParser::SP); + } + setState(975); + match(CypherParser::T__1); + setState(977); + _errHandler->sync(this); + + _la = _input->LA(1); + if (_la == CypherParser::SP) { + setState(976); + match(CypherParser::SP); + } + setState(979); + oC_PropertyKeyName(); + setState(981); + _errHandler->sync(this); + + _la = _input->LA(1); + if (_la == CypherParser::SP) { + setState(980); + match(CypherParser::SP); + } + setState(983); + match(CypherParser::T__2); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + //----------------- IC_CreateRelTableContext ------------------------------------------------------------------ CypherParser::IC_CreateRelTableContext::IC_CreateRelTableContext(ParserRuleContext *parent, size_t invokingState) @@ -5078,7 +5181,7 @@ size_t CypherParser::IC_CreateRelTableContext::getRuleIndex() const { CypherParser::IC_CreateRelTableContext* CypherParser::iC_CreateRelTable() { IC_CreateRelTableContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 60, CypherParser::RuleIC_CreateRelTable); + enterRule(_localctx, 62, CypherParser::RuleIC_CreateRelTable); size_t _la = 0; #if __cplusplus > 201703L @@ -5090,24 +5193,24 @@ CypherParser::IC_CreateRelTableContext* CypherParser::iC_CreateRelTable() { }); try { enterOuterAlt(_localctx, 1); - setState(968); + setState(985); match(CypherParser::CREATE); - setState(969); + setState(986); match(CypherParser::SP); - setState(970); + setState(987); match(CypherParser::REL); - setState(971); + setState(988); match(CypherParser::SP); - setState(972); + setState(989); match(CypherParser::TABLE); - setState(975); + setState(992); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 104, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 107, _ctx)) { case 1: { - setState(973); + setState(990); match(CypherParser::SP); - setState(974); + setState(991); match(CypherParser::GROUP); break; } @@ -5115,14 +5218,14 @@ CypherParser::IC_CreateRelTableContext* CypherParser::iC_CreateRelTable() { default: break; } - setState(979); + setState(996); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 105, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 108, _ctx)) { case 1: { - setState(977); + setState(994); match(CypherParser::SP); - setState(978); + setState(995); iC_IfNotExists(); break; } @@ -5130,65 +5233,65 @@ CypherParser::IC_CreateRelTableContext* CypherParser::iC_CreateRelTable() { default: break; } - setState(981); + setState(998); match(CypherParser::SP); - setState(982); + setState(999); oC_SchemaName(); - setState(984); + setState(1001); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(983); + setState(1000); match(CypherParser::SP); } - setState(986); + setState(1003); match(CypherParser::T__1); - setState(988); + setState(1005); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(987); + setState(1004); match(CypherParser::SP); } - setState(990); + setState(1007); iC_CreateFromToConnections(); - setState(992); + setState(1009); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(991); + setState(1008); match(CypherParser::SP); } - setState(1020); + setState(1037); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 115, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 118, _ctx)) { case 1: { - setState(1002); + setState(1019); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 111, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 114, _ctx)) { case 1: { - setState(994); + setState(1011); match(CypherParser::T__3); - setState(996); + setState(1013); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(995); + setState(1012); match(CypherParser::SP); } - setState(998); + setState(1015); iC_PropertyDefinitions(); - setState(1000); + setState(1017); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(999); + setState(1016); match(CypherParser::SP); } break; @@ -5197,47 +5300,47 @@ CypherParser::IC_CreateRelTableContext* CypherParser::iC_CreateRelTable() { default: break; } - setState(1012); + setState(1029); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::T__3) { - setState(1004); + setState(1021); match(CypherParser::T__3); - setState(1006); + setState(1023); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1005); + setState(1022); match(CypherParser::SP); } - setState(1008); + setState(1025); oC_SymbolicName(); - setState(1010); + setState(1027); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1009); + setState(1026); match(CypherParser::SP); } } - setState(1014); + setState(1031); match(CypherParser::T__2); break; } case 2: { - setState(1015); + setState(1032); match(CypherParser::T__2); - setState(1016); + setState(1033); match(CypherParser::SP); - setState(1017); + setState(1034); match(CypherParser::AS); - setState(1018); + setState(1035); match(CypherParser::SP); - setState(1019); + setState(1036); oC_Query(); break; } @@ -5245,44 +5348,44 @@ CypherParser::IC_CreateRelTableContext* CypherParser::iC_CreateRelTable() { default: break; } - setState(1037); + setState(1054); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 119, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 122, _ctx)) { case 1: { - setState(1022); + setState(1039); match(CypherParser::SP); - setState(1023); + setState(1040); match(CypherParser::WITH); - setState(1025); + setState(1042); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1024); + setState(1041); match(CypherParser::SP); } - setState(1027); + setState(1044); match(CypherParser::T__1); - setState(1029); + setState(1046); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1028); + setState(1045); match(CypherParser::SP); } - setState(1031); + setState(1048); iC_Options(); - setState(1033); + setState(1050); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1032); + setState(1049); match(CypherParser::SP); } - setState(1035); + setState(1052); match(CypherParser::T__2); break; } @@ -5367,7 +5470,7 @@ size_t CypherParser::IC_CreateIndexContext::getRuleIndex() const { CypherParser::IC_CreateIndexContext* CypherParser::iC_CreateIndex() { IC_CreateIndexContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 62, CypherParser::RuleIC_CreateIndex); + enterRule(_localctx, 64, CypherParser::RuleIC_CreateIndex); size_t _la = 0; #if __cplusplus > 201703L @@ -5379,16 +5482,16 @@ CypherParser::IC_CreateIndexContext* CypherParser::iC_CreateIndex() { }); try { enterOuterAlt(_localctx, 1); - setState(1039); + setState(1056); match(CypherParser::CREATE); - setState(1042); + setState(1059); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 120, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 123, _ctx)) { case 1: { - setState(1040); + setState(1057); match(CypherParser::SP); - setState(1041); + setState(1058); oC_SymbolicName(); break; } @@ -5396,18 +5499,18 @@ CypherParser::IC_CreateIndexContext* CypherParser::iC_CreateIndex() { default: break; } - setState(1044); + setState(1061); match(CypherParser::SP); - setState(1045); + setState(1062); match(CypherParser::INDEX); - setState(1048); + setState(1065); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 121, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 124, _ctx)) { case 1: { - setState(1046); + setState(1063); match(CypherParser::SP); - setState(1047); + setState(1064); oC_SchemaName(); break; } @@ -5415,14 +5518,14 @@ CypherParser::IC_CreateIndexContext* CypherParser::iC_CreateIndex() { default: break; } - setState(1052); + setState(1069); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 122, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 125, _ctx)) { case 1: { - setState(1050); + setState(1067); match(CypherParser::SP); - setState(1051); + setState(1068); iC_IfNotExists(); break; } @@ -5430,47 +5533,47 @@ CypherParser::IC_CreateIndexContext* CypherParser::iC_CreateIndex() { default: break; } - setState(1054); + setState(1071); match(CypherParser::SP); - setState(1055); + setState(1072); match(CypherParser::FOR); - setState(1056); + setState(1073); match(CypherParser::SP); - setState(1057); + setState(1074); iC_IndexPattern(); - setState(1058); + setState(1075); match(CypherParser::SP); - setState(1059); + setState(1076); match(CypherParser::ON); - setState(1060); + setState(1077); match(CypherParser::SP); - setState(1061); - iC_IndexPropertyPattern(); setState(1078); + iC_IndexPropertyPattern(); + setState(1095); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 127, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 130, _ctx)) { case 1: { - setState(1062); + setState(1079); match(CypherParser::SP); - setState(1063); + setState(1080); match(CypherParser::OPTIONS); - setState(1065); + setState(1082); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1064); + setState(1081); match(CypherParser::SP); } - setState(1067); + setState(1084); match(CypherParser::T__8); - setState(1069); + setState(1086); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 124, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 127, _ctx)) { case 1: { - setState(1068); + setState(1085); match(CypherParser::SP); break; } @@ -5478,26 +5581,26 @@ CypherParser::IC_CreateIndexContext* CypherParser::iC_CreateIndex() { default: break; } - setState(1072); + setState(1089); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & -6370763885380632576) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 15689294993770909) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 129)) & -8065933754466937985) != 0)) { - setState(1071); + ((1ULL << (_la - 64)) & 31381524945389981) != 0) || ((((_la - 130) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 130)) & -8065933754466937985) != 0)) { + setState(1088); iC_Options(); } - setState(1075); + setState(1092); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1074); + setState(1091); match(CypherParser::SP); } - setState(1077); + setState(1094); match(CypherParser::T__9); break; } @@ -5538,7 +5641,7 @@ size_t CypherParser::IC_IndexPatternContext::getRuleIndex() const { CypherParser::IC_IndexPatternContext* CypherParser::iC_IndexPattern() { IC_IndexPatternContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 64, CypherParser::RuleIC_IndexPattern); + enterRule(_localctx, 66, CypherParser::RuleIC_IndexPattern); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -5548,19 +5651,19 @@ CypherParser::IC_IndexPatternContext* CypherParser::iC_IndexPattern() { exitRule(); }); try { - setState(1082); + setState(1099); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 128, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 131, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(1080); + setState(1097); iC_IndexNodePattern(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(1081); + setState(1098); iC_IndexRelationshipPattern(); break; } @@ -5613,7 +5716,7 @@ size_t CypherParser::IC_IndexNodePatternContext::getRuleIndex() const { CypherParser::IC_IndexNodePatternContext* CypherParser::iC_IndexNodePattern() { IC_IndexNodePatternContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 66, CypherParser::RuleIC_IndexNodePattern); + enterRule(_localctx, 68, CypherParser::RuleIC_IndexNodePattern); size_t _la = 0; #if __cplusplus > 201703L @@ -5625,14 +5728,14 @@ CypherParser::IC_IndexNodePatternContext* CypherParser::iC_IndexNodePattern() { }); try { enterOuterAlt(_localctx, 1); - setState(1084); + setState(1101); match(CypherParser::T__1); - setState(1086); + setState(1103); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 129, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 132, _ctx)) { case 1: { - setState(1085); + setState(1102); match(CypherParser::SP); break; } @@ -5640,46 +5743,46 @@ CypherParser::IC_IndexNodePatternContext* CypherParser::iC_IndexNodePattern() { default: break; } - setState(1089); + setState(1106); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & -6370763885380632576) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 15689294993770909) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 129)) & -8065933754466937985) != 0)) { - setState(1088); + ((1ULL << (_la - 64)) & 31381524945389981) != 0) || ((((_la - 130) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 130)) & -8065933754466937985) != 0)) { + setState(1105); oC_Variable(); } - setState(1092); + setState(1109); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1091); + setState(1108); match(CypherParser::SP); } - setState(1094); + setState(1111); match(CypherParser::COLON); - setState(1096); + setState(1113); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1095); + setState(1112); match(CypherParser::SP); } - setState(1098); + setState(1115); oC_LabelName(); - setState(1100); + setState(1117); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1099); + setState(1116); match(CypherParser::SP); } - setState(1102); + setState(1119); match(CypherParser::T__2); } @@ -5718,7 +5821,7 @@ size_t CypherParser::IC_IndexRelationshipPatternContext::getRuleIndex() const { CypherParser::IC_IndexRelationshipPatternContext* CypherParser::iC_IndexRelationshipPattern() { IC_IndexRelationshipPatternContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 68, CypherParser::RuleIC_IndexRelationshipPattern); + enterRule(_localctx, 70, CypherParser::RuleIC_IndexRelationshipPattern); size_t _la = 0; #if __cplusplus > 201703L @@ -5730,47 +5833,47 @@ CypherParser::IC_IndexRelationshipPatternContext* CypherParser::iC_IndexRelation }); try { enterOuterAlt(_localctx, 1); - setState(1104); + setState(1121); match(CypherParser::T__1); - setState(1106); + setState(1123); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1105); + setState(1122); match(CypherParser::SP); } - setState(1108); + setState(1125); match(CypherParser::T__2); - setState(1110); + setState(1127); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1109); + setState(1126); match(CypherParser::SP); } - setState(1112); + setState(1129); oC_RelationshipPattern(); - setState(1114); + setState(1131); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1113); + setState(1130); match(CypherParser::SP); } - setState(1116); + setState(1133); match(CypherParser::T__1); - setState(1118); + setState(1135); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1117); + setState(1134); match(CypherParser::SP); } - setState(1120); + setState(1137); match(CypherParser::T__2); } @@ -5813,7 +5916,7 @@ size_t CypherParser::IC_IndexPropertyPatternContext::getRuleIndex() const { CypherParser::IC_IndexPropertyPatternContext* CypherParser::iC_IndexPropertyPattern() { IC_IndexPropertyPatternContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 70, CypherParser::RuleIC_IndexPropertyPattern); + enterRule(_localctx, 72, CypherParser::RuleIC_IndexPropertyPattern); size_t _la = 0; #if __cplusplus > 201703L @@ -5825,47 +5928,47 @@ CypherParser::IC_IndexPropertyPatternContext* CypherParser::iC_IndexPropertyPatt }); try { enterOuterAlt(_localctx, 1); - setState(1122); + setState(1139); match(CypherParser::T__1); - setState(1124); + setState(1141); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1123); + setState(1140); match(CypherParser::SP); } - setState(1126); + setState(1143); oC_Variable(); - setState(1128); + setState(1145); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1127); + setState(1144); match(CypherParser::SP); } - setState(1130); + setState(1147); match(CypherParser::T__4); - setState(1132); + setState(1149); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1131); + setState(1148); match(CypherParser::SP); } - setState(1134); + setState(1151); oC_PropertyKeyName(); - setState(1136); + setState(1153); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1135); + setState(1152); match(CypherParser::SP); } - setState(1138); + setState(1155); match(CypherParser::T__2); } @@ -5908,7 +6011,7 @@ size_t CypherParser::IC_CreateFromToConnectionsContext::getRuleIndex() const { CypherParser::IC_CreateFromToConnectionsContext* CypherParser::iC_CreateFromToConnections() { IC_CreateFromToConnectionsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 72, CypherParser::RuleIC_CreateFromToConnections); + enterRule(_localctx, 74, CypherParser::RuleIC_CreateFromToConnections); size_t _la = 0; #if __cplusplus > 201703L @@ -5921,37 +6024,37 @@ CypherParser::IC_CreateFromToConnectionsContext* CypherParser::iC_CreateFromToCo try { size_t alt; enterOuterAlt(_localctx, 1); - setState(1140); + setState(1157); iC_CreateFromToConnection(); - setState(1151); + setState(1168); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 144, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 147, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(1142); + setState(1159); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1141); + setState(1158); match(CypherParser::SP); } - setState(1144); + setState(1161); match(CypherParser::T__3); - setState(1146); + setState(1163); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1145); + setState(1162); match(CypherParser::SP); } - setState(1148); + setState(1165); iC_CreateFromToConnection(); } - setState(1153); + setState(1170); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 144, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 147, _ctx); } } @@ -6006,7 +6109,7 @@ size_t CypherParser::IC_CreateFromToConnectionContext::getRuleIndex() const { CypherParser::IC_CreateFromToConnectionContext* CypherParser::iC_CreateFromToConnection() { IC_CreateFromToConnectionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 74, CypherParser::RuleIC_CreateFromToConnection); + enterRule(_localctx, 76, CypherParser::RuleIC_CreateFromToConnection); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -6017,28 +6120,28 @@ CypherParser::IC_CreateFromToConnectionContext* CypherParser::iC_CreateFromToCon }); try { enterOuterAlt(_localctx, 1); - setState(1154); + setState(1171); match(CypherParser::FROM); - setState(1155); + setState(1172); match(CypherParser::SP); - setState(1156); + setState(1173); oC_SchemaName(); - setState(1157); + setState(1174); match(CypherParser::SP); - setState(1158); + setState(1175); match(CypherParser::TO); - setState(1159); + setState(1176); match(CypherParser::SP); - setState(1160); + setState(1177); oC_SchemaName(); - setState(1163); + setState(1180); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 145, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 148, _ctx)) { case 1: { - setState(1161); + setState(1178); match(CypherParser::SP); - setState(1162); + setState(1179); oC_SymbolicName(); break; } @@ -6087,7 +6190,7 @@ size_t CypherParser::IC_FromToConnectionsContext::getRuleIndex() const { CypherParser::IC_FromToConnectionsContext* CypherParser::iC_FromToConnections() { IC_FromToConnectionsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 76, CypherParser::RuleIC_FromToConnections); + enterRule(_localctx, 78, CypherParser::RuleIC_FromToConnections); size_t _la = 0; #if __cplusplus > 201703L @@ -6099,33 +6202,33 @@ CypherParser::IC_FromToConnectionsContext* CypherParser::iC_FromToConnections() }); try { enterOuterAlt(_localctx, 1); - setState(1165); + setState(1182); iC_FromToConnection(); - setState(1176); + setState(1193); _errHandler->sync(this); _la = _input->LA(1); while (_la == CypherParser::T__3 || _la == CypherParser::SP) { - setState(1167); + setState(1184); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1166); + setState(1183); match(CypherParser::SP); } - setState(1169); + setState(1186); match(CypherParser::T__3); - setState(1171); + setState(1188); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1170); + setState(1187); match(CypherParser::SP); } - setState(1173); + setState(1190); iC_FromToConnection(); - setState(1178); + setState(1195); _errHandler->sync(this); _la = _input->LA(1); } @@ -6178,7 +6281,7 @@ size_t CypherParser::IC_FromToConnectionContext::getRuleIndex() const { CypherParser::IC_FromToConnectionContext* CypherParser::iC_FromToConnection() { IC_FromToConnectionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 78, CypherParser::RuleIC_FromToConnection); + enterRule(_localctx, 80, CypherParser::RuleIC_FromToConnection); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -6189,19 +6292,19 @@ CypherParser::IC_FromToConnectionContext* CypherParser::iC_FromToConnection() { }); try { enterOuterAlt(_localctx, 1); - setState(1179); + setState(1196); match(CypherParser::FROM); - setState(1180); + setState(1197); match(CypherParser::SP); - setState(1181); + setState(1198); oC_SchemaName(); - setState(1182); + setState(1199); match(CypherParser::SP); - setState(1183); + setState(1200); match(CypherParser::TO); - setState(1184); + setState(1201); match(CypherParser::SP); - setState(1185); + setState(1202); oC_SchemaName(); } @@ -6260,7 +6363,7 @@ size_t CypherParser::IC_CreateSequenceContext::getRuleIndex() const { CypherParser::IC_CreateSequenceContext* CypherParser::iC_CreateSequence() { IC_CreateSequenceContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 80, CypherParser::RuleIC_CreateSequence); + enterRule(_localctx, 82, CypherParser::RuleIC_CreateSequence); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -6272,22 +6375,22 @@ CypherParser::IC_CreateSequenceContext* CypherParser::iC_CreateSequence() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(1187); + setState(1204); match(CypherParser::CREATE); - setState(1188); + setState(1205); match(CypherParser::SP); - setState(1189); + setState(1206); match(CypherParser::SEQUENCE); - setState(1190); + setState(1207); match(CypherParser::SP); - setState(1194); + setState(1211); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 149, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 152, _ctx)) { case 1: { - setState(1191); + setState(1208); iC_IfNotExists(); - setState(1192); + setState(1209); match(CypherParser::SP); break; } @@ -6295,21 +6398,21 @@ CypherParser::IC_CreateSequenceContext* CypherParser::iC_CreateSequence() { default: break; } - setState(1196); + setState(1213); oC_SchemaName(); - setState(1201); + setState(1218); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 150, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 153, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(1197); + setState(1214); match(CypherParser::SP); - setState(1198); + setState(1215); iC_SequenceOptions(); } - setState(1203); + setState(1220); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 150, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 153, _ctx); } } @@ -6364,7 +6467,7 @@ size_t CypherParser::IC_CreateTypeContext::getRuleIndex() const { CypherParser::IC_CreateTypeContext* CypherParser::iC_CreateType() { IC_CreateTypeContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 82, CypherParser::RuleIC_CreateType); + enterRule(_localctx, 84, CypherParser::RuleIC_CreateType); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -6375,30 +6478,30 @@ CypherParser::IC_CreateTypeContext* CypherParser::iC_CreateType() { }); try { enterOuterAlt(_localctx, 1); - setState(1204); + setState(1221); match(CypherParser::CREATE); - setState(1205); + setState(1222); match(CypherParser::SP); - setState(1206); + setState(1223); match(CypherParser::TYPE); - setState(1207); + setState(1224); match(CypherParser::SP); - setState(1208); + setState(1225); oC_SchemaName(); - setState(1209); + setState(1226); match(CypherParser::SP); - setState(1210); + setState(1227); match(CypherParser::AS); - setState(1211); + setState(1228); match(CypherParser::SP); - setState(1212); + setState(1229); iC_DataType(0); - setState(1214); + setState(1231); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 151, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 154, _ctx)) { case 1: { - setState(1213); + setState(1230); match(CypherParser::SP); break; } @@ -6451,7 +6554,7 @@ size_t CypherParser::IC_SequenceOptionsContext::getRuleIndex() const { CypherParser::IC_SequenceOptionsContext* CypherParser::iC_SequenceOptions() { IC_SequenceOptionsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 84, CypherParser::RuleIC_SequenceOptions); + enterRule(_localctx, 86, CypherParser::RuleIC_SequenceOptions); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -6461,40 +6564,40 @@ CypherParser::IC_SequenceOptionsContext* CypherParser::iC_SequenceOptions() { exitRule(); }); try { - setState(1221); + setState(1238); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 152, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 155, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(1216); + setState(1233); iC_IncrementBy(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(1217); + setState(1234); iC_MinValue(); break; } case 3: { enterOuterAlt(_localctx, 3); - setState(1218); + setState(1235); iC_MaxValue(); break; } case 4: { enterOuterAlt(_localctx, 4); - setState(1219); + setState(1236); iC_StartWith(); break; } case 5: { enterOuterAlt(_localctx, 5); - setState(1220); + setState(1237); iC_Cycle(); break; } @@ -6547,7 +6650,7 @@ size_t CypherParser::IC_WithPasswdContext::getRuleIndex() const { CypherParser::IC_WithPasswdContext* CypherParser::iC_WithPasswd() { IC_WithPasswdContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 86, CypherParser::RuleIC_WithPasswd); + enterRule(_localctx, 88, CypherParser::RuleIC_WithPasswd); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -6558,17 +6661,17 @@ CypherParser::IC_WithPasswdContext* CypherParser::iC_WithPasswd() { }); try { enterOuterAlt(_localctx, 1); - setState(1223); + setState(1240); match(CypherParser::SP); - setState(1224); + setState(1241); match(CypherParser::WITH); - setState(1225); + setState(1242); match(CypherParser::SP); - setState(1226); + setState(1243); match(CypherParser::PASSWORD); - setState(1227); + setState(1244); match(CypherParser::SP); - setState(1228); + setState(1245); match(CypherParser::StringLiteral); } @@ -6623,7 +6726,7 @@ size_t CypherParser::IC_CreateUserContext::getRuleIndex() const { CypherParser::IC_CreateUserContext* CypherParser::iC_CreateUser() { IC_CreateUserContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 88, CypherParser::RuleIC_CreateUser); + enterRule(_localctx, 90, CypherParser::RuleIC_CreateUser); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -6634,22 +6737,22 @@ CypherParser::IC_CreateUserContext* CypherParser::iC_CreateUser() { }); try { enterOuterAlt(_localctx, 1); - setState(1230); + setState(1247); match(CypherParser::CREATE); - setState(1231); + setState(1248); match(CypherParser::SP); - setState(1232); + setState(1249); match(CypherParser::USER); - setState(1233); + setState(1250); match(CypherParser::SP); - setState(1237); + setState(1254); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 153, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 156, _ctx)) { case 1: { - setState(1234); + setState(1251); iC_IfNotExists(); - setState(1235); + setState(1252); match(CypherParser::SP); break; } @@ -6657,14 +6760,14 @@ CypherParser::IC_CreateUserContext* CypherParser::iC_CreateUser() { default: break; } - setState(1239); + setState(1256); oC_Variable(); - setState(1241); + setState(1258); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 154, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 157, _ctx)) { case 1: { - setState(1240); + setState(1257); iC_WithPasswd(); break; } @@ -6721,7 +6824,7 @@ size_t CypherParser::IC_CreateRoleContext::getRuleIndex() const { CypherParser::IC_CreateRoleContext* CypherParser::iC_CreateRole() { IC_CreateRoleContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 90, CypherParser::RuleIC_CreateRole); + enterRule(_localctx, 92, CypherParser::RuleIC_CreateRole); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -6732,22 +6835,22 @@ CypherParser::IC_CreateRoleContext* CypherParser::iC_CreateRole() { }); try { enterOuterAlt(_localctx, 1); - setState(1243); + setState(1260); match(CypherParser::CREATE); - setState(1244); + setState(1261); match(CypherParser::SP); - setState(1245); + setState(1262); match(CypherParser::ROLE); - setState(1246); + setState(1263); match(CypherParser::SP); - setState(1250); + setState(1267); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 155, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 158, _ctx)) { case 1: { - setState(1247); + setState(1264); iC_IfNotExists(); - setState(1248); + setState(1265); match(CypherParser::SP); break; } @@ -6755,7 +6858,7 @@ CypherParser::IC_CreateRoleContext* CypherParser::iC_CreateRole() { default: break; } - setState(1252); + setState(1269); oC_Variable(); } @@ -6806,7 +6909,7 @@ size_t CypherParser::IC_IncrementByContext::getRuleIndex() const { CypherParser::IC_IncrementByContext* CypherParser::iC_IncrementBy() { IC_IncrementByContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 92, CypherParser::RuleIC_IncrementBy); + enterRule(_localctx, 94, CypherParser::RuleIC_IncrementBy); size_t _la = 0; #if __cplusplus > 201703L @@ -6818,29 +6921,29 @@ CypherParser::IC_IncrementByContext* CypherParser::iC_IncrementBy() { }); try { enterOuterAlt(_localctx, 1); - setState(1254); + setState(1271); match(CypherParser::INCREMENT); - setState(1255); + setState(1272); match(CypherParser::SP); - setState(1258); + setState(1275); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::BY) { - setState(1256); + setState(1273); match(CypherParser::BY); - setState(1257); + setState(1274); match(CypherParser::SP); } - setState(1261); + setState(1278); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::MINUS) { - setState(1260); + setState(1277); match(CypherParser::MINUS); } - setState(1263); + setState(1280); oC_IntegerLiteral(); } @@ -6887,7 +6990,7 @@ size_t CypherParser::IC_MinValueContext::getRuleIndex() const { CypherParser::IC_MinValueContext* CypherParser::iC_MinValue() { IC_MinValueContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 94, CypherParser::RuleIC_MinValue); + enterRule(_localctx, 96, CypherParser::RuleIC_MinValue); size_t _la = 0; #if __cplusplus > 201703L @@ -6898,35 +7001,35 @@ CypherParser::IC_MinValueContext* CypherParser::iC_MinValue() { exitRule(); }); try { - setState(1274); + setState(1291); _errHandler->sync(this); switch (_input->LA(1)) { case CypherParser::NO: { enterOuterAlt(_localctx, 1); - setState(1265); + setState(1282); match(CypherParser::NO); - setState(1266); + setState(1283); match(CypherParser::SP); - setState(1267); + setState(1284); match(CypherParser::MINVALUE); break; } case CypherParser::MINVALUE: { enterOuterAlt(_localctx, 2); - setState(1268); + setState(1285); match(CypherParser::MINVALUE); - setState(1269); + setState(1286); match(CypherParser::SP); - setState(1271); + setState(1288); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::MINUS) { - setState(1270); + setState(1287); match(CypherParser::MINUS); } - setState(1273); + setState(1290); oC_IntegerLiteral(); break; } @@ -6979,7 +7082,7 @@ size_t CypherParser::IC_MaxValueContext::getRuleIndex() const { CypherParser::IC_MaxValueContext* CypherParser::iC_MaxValue() { IC_MaxValueContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 96, CypherParser::RuleIC_MaxValue); + enterRule(_localctx, 98, CypherParser::RuleIC_MaxValue); size_t _la = 0; #if __cplusplus > 201703L @@ -6990,35 +7093,35 @@ CypherParser::IC_MaxValueContext* CypherParser::iC_MaxValue() { exitRule(); }); try { - setState(1285); + setState(1302); _errHandler->sync(this); switch (_input->LA(1)) { case CypherParser::NO: { enterOuterAlt(_localctx, 1); - setState(1276); + setState(1293); match(CypherParser::NO); - setState(1277); + setState(1294); match(CypherParser::SP); - setState(1278); + setState(1295); match(CypherParser::MAXVALUE); break; } case CypherParser::MAXVALUE: { enterOuterAlt(_localctx, 2); - setState(1279); + setState(1296); match(CypherParser::MAXVALUE); - setState(1280); + setState(1297); match(CypherParser::SP); - setState(1282); + setState(1299); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::MINUS) { - setState(1281); + setState(1298); match(CypherParser::MINUS); } - setState(1284); + setState(1301); oC_IntegerLiteral(); break; } @@ -7075,7 +7178,7 @@ size_t CypherParser::IC_StartWithContext::getRuleIndex() const { CypherParser::IC_StartWithContext* CypherParser::iC_StartWith() { IC_StartWithContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 98, CypherParser::RuleIC_StartWith); + enterRule(_localctx, 100, CypherParser::RuleIC_StartWith); size_t _la = 0; #if __cplusplus > 201703L @@ -7087,29 +7190,29 @@ CypherParser::IC_StartWithContext* CypherParser::iC_StartWith() { }); try { enterOuterAlt(_localctx, 1); - setState(1287); + setState(1304); match(CypherParser::START); - setState(1288); + setState(1305); match(CypherParser::SP); - setState(1291); + setState(1308); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::WITH) { - setState(1289); + setState(1306); match(CypherParser::WITH); - setState(1290); + setState(1307); match(CypherParser::SP); } - setState(1294); + setState(1311); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::MINUS) { - setState(1293); + setState(1310); match(CypherParser::MINUS); } - setState(1296); + setState(1313); oC_IntegerLiteral(); } @@ -7148,7 +7251,7 @@ size_t CypherParser::IC_CycleContext::getRuleIndex() const { CypherParser::IC_CycleContext* CypherParser::iC_Cycle() { IC_CycleContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 100, CypherParser::RuleIC_Cycle); + enterRule(_localctx, 102, CypherParser::RuleIC_Cycle); size_t _la = 0; #if __cplusplus > 201703L @@ -7160,17 +7263,17 @@ CypherParser::IC_CycleContext* CypherParser::iC_Cycle() { }); try { enterOuterAlt(_localctx, 1); - setState(1300); + setState(1317); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::NO) { - setState(1298); + setState(1315); match(CypherParser::NO); - setState(1299); + setState(1316); match(CypherParser::SP); } - setState(1302); + setState(1319); match(CypherParser::CYCLE); } @@ -7209,7 +7312,7 @@ size_t CypherParser::IC_IfExistsContext::getRuleIndex() const { CypherParser::IC_IfExistsContext* CypherParser::iC_IfExists() { IC_IfExistsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 102, CypherParser::RuleIC_IfExists); + enterRule(_localctx, 104, CypherParser::RuleIC_IfExists); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -7220,11 +7323,11 @@ CypherParser::IC_IfExistsContext* CypherParser::iC_IfExists() { }); try { enterOuterAlt(_localctx, 1); - setState(1304); + setState(1321); match(CypherParser::IF); - setState(1305); + setState(1322); match(CypherParser::SP); - setState(1306); + setState(1323); match(CypherParser::EXISTS); } @@ -7295,7 +7398,7 @@ size_t CypherParser::IC_DropContext::getRuleIndex() const { CypherParser::IC_DropContext* CypherParser::iC_Drop() { IC_DropContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 104, CypherParser::RuleIC_Drop); + enterRule(_localctx, 106, CypherParser::RuleIC_Drop); size_t _la = 0; #if __cplusplus > 201703L @@ -7306,35 +7409,35 @@ CypherParser::IC_DropContext* CypherParser::iC_Drop() { exitRule(); }); try { - setState(1328); + setState(1345); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 167, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 170, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(1308); + setState(1325); match(CypherParser::DROP); - setState(1309); + setState(1326); match(CypherParser::SP); - setState(1310); + setState(1327); _la = _input->LA(1); if (!(((((_la - 93) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 93)) & 2269391999860737) != 0))) { + ((1ULL << (_la - 93)) & 4538783999721473) != 0))) { _errHandler->recoverInline(this); } else { _errHandler->reportMatch(this); consume(); } - setState(1311); + setState(1328); match(CypherParser::SP); - setState(1315); + setState(1332); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 165, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 168, _ctx)) { case 1: { - setState(1312); + setState(1329); iC_IfExists(); - setState(1313); + setState(1330); match(CypherParser::SP); break; } @@ -7342,29 +7445,29 @@ CypherParser::IC_DropContext* CypherParser::iC_Drop() { default: break; } - setState(1317); + setState(1334); oC_SchemaName(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(1318); + setState(1335); match(CypherParser::DROP); - setState(1319); + setState(1336); match(CypherParser::SP); - setState(1320); + setState(1337); match(CypherParser::INDEX); - setState(1321); + setState(1338); match(CypherParser::SP); - setState(1325); + setState(1342); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 166, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 169, _ctx)) { case 1: { - setState(1322); + setState(1339); iC_IfExists(); - setState(1323); + setState(1340); match(CypherParser::SP); break; } @@ -7372,7 +7475,7 @@ CypherParser::IC_DropContext* CypherParser::iC_Drop() { default: break; } - setState(1327); + setState(1344); iC_DropIndexName(); break; } @@ -7421,7 +7524,7 @@ size_t CypherParser::IC_DropIndexNameContext::getRuleIndex() const { CypherParser::IC_DropIndexNameContext* CypherParser::iC_DropIndexName() { IC_DropIndexNameContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 106, CypherParser::RuleIC_DropIndexName); + enterRule(_localctx, 108, CypherParser::RuleIC_DropIndexName); size_t _la = 0; #if __cplusplus > 201703L @@ -7433,27 +7536,27 @@ CypherParser::IC_DropIndexNameContext* CypherParser::iC_DropIndexName() { }); try { enterOuterAlt(_localctx, 1); - setState(1330); + setState(1347); oC_SchemaName(); - setState(1332); + setState(1349); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1331); + setState(1348); match(CypherParser::SP); } - setState(1334); + setState(1351); match(CypherParser::T__4); - setState(1336); + setState(1353); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1335); + setState(1352); match(CypherParser::SP); } - setState(1338); + setState(1355); oC_SchemaName(); } @@ -7504,7 +7607,7 @@ size_t CypherParser::IC_AlterTableContext::getRuleIndex() const { CypherParser::IC_AlterTableContext* CypherParser::iC_AlterTable() { IC_AlterTableContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 108, CypherParser::RuleIC_AlterTable); + enterRule(_localctx, 110, CypherParser::RuleIC_AlterTable); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -7515,19 +7618,19 @@ CypherParser::IC_AlterTableContext* CypherParser::iC_AlterTable() { }); try { enterOuterAlt(_localctx, 1); - setState(1340); + setState(1357); match(CypherParser::ALTER); - setState(1341); + setState(1358); match(CypherParser::SP); - setState(1342); + setState(1359); match(CypherParser::TABLE); - setState(1343); + setState(1360); match(CypherParser::SP); - setState(1344); + setState(1361); oC_SchemaName(); - setState(1345); + setState(1362); match(CypherParser::SP); - setState(1346); + setState(1363); iC_AlterOptions(); } @@ -7582,7 +7685,7 @@ size_t CypherParser::IC_AlterOptionsContext::getRuleIndex() const { CypherParser::IC_AlterOptionsContext* CypherParser::iC_AlterOptions() { IC_AlterOptionsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 110, CypherParser::RuleIC_AlterOptions); + enterRule(_localctx, 112, CypherParser::RuleIC_AlterOptions); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -7592,54 +7695,54 @@ CypherParser::IC_AlterOptionsContext* CypherParser::iC_AlterOptions() { exitRule(); }); try { - setState(1355); + setState(1372); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 170, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 173, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(1348); + setState(1365); iC_AddProperty(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(1349); + setState(1366); iC_DropProperty(); break; } case 3: { enterOuterAlt(_localctx, 3); - setState(1350); + setState(1367); iC_RenameTable(); break; } case 4: { enterOuterAlt(_localctx, 4); - setState(1351); + setState(1368); iC_RenameProperty(); break; } case 5: { enterOuterAlt(_localctx, 5); - setState(1352); + setState(1369); iC_AddFromToConnection(); break; } case 6: { enterOuterAlt(_localctx, 6); - setState(1353); + setState(1370); iC_DropFromToConnection(); break; } case 7: { enterOuterAlt(_localctx, 7); - setState(1354); + setState(1371); iC_SetSortedBy(); break; } @@ -7700,7 +7803,7 @@ size_t CypherParser::IC_AddPropertyContext::getRuleIndex() const { CypherParser::IC_AddPropertyContext* CypherParser::iC_AddProperty() { IC_AddPropertyContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 112, CypherParser::RuleIC_AddProperty); + enterRule(_localctx, 114, CypherParser::RuleIC_AddProperty); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -7711,18 +7814,18 @@ CypherParser::IC_AddPropertyContext* CypherParser::iC_AddProperty() { }); try { enterOuterAlt(_localctx, 1); - setState(1357); + setState(1374); match(CypherParser::ADD); - setState(1358); + setState(1375); match(CypherParser::SP); - setState(1362); + setState(1379); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 171, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 174, _ctx)) { case 1: { - setState(1359); + setState(1376); iC_IfNotExists(); - setState(1360); + setState(1377); match(CypherParser::SP); break; } @@ -7730,20 +7833,20 @@ CypherParser::IC_AddPropertyContext* CypherParser::iC_AddProperty() { default: break; } - setState(1364); + setState(1381); oC_PropertyKeyName(); - setState(1365); + setState(1382); match(CypherParser::SP); - setState(1366); + setState(1383); iC_DataType(0); - setState(1369); + setState(1386); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 172, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 175, _ctx)) { case 1: { - setState(1367); + setState(1384); match(CypherParser::SP); - setState(1368); + setState(1385); iC_Default(); break; } @@ -7788,7 +7891,7 @@ size_t CypherParser::IC_DefaultContext::getRuleIndex() const { CypherParser::IC_DefaultContext* CypherParser::iC_Default() { IC_DefaultContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 114, CypherParser::RuleIC_Default); + enterRule(_localctx, 116, CypherParser::RuleIC_Default); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -7799,11 +7902,11 @@ CypherParser::IC_DefaultContext* CypherParser::iC_Default() { }); try { enterOuterAlt(_localctx, 1); - setState(1371); + setState(1388); match(CypherParser::DEFAULT); - setState(1372); + setState(1389); match(CypherParser::SP); - setState(1373); + setState(1390); oC_Expression(); } @@ -7850,7 +7953,7 @@ size_t CypherParser::IC_DropPropertyContext::getRuleIndex() const { CypherParser::IC_DropPropertyContext* CypherParser::iC_DropProperty() { IC_DropPropertyContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 116, CypherParser::RuleIC_DropProperty); + enterRule(_localctx, 118, CypherParser::RuleIC_DropProperty); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -7861,18 +7964,18 @@ CypherParser::IC_DropPropertyContext* CypherParser::iC_DropProperty() { }); try { enterOuterAlt(_localctx, 1); - setState(1375); + setState(1392); match(CypherParser::DROP); - setState(1376); + setState(1393); match(CypherParser::SP); - setState(1380); + setState(1397); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 173, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 176, _ctx)) { case 1: { - setState(1377); + setState(1394); iC_IfExists(); - setState(1378); + setState(1395); match(CypherParser::SP); break; } @@ -7880,7 +7983,7 @@ CypherParser::IC_DropPropertyContext* CypherParser::iC_DropProperty() { default: break; } - setState(1382); + setState(1399); oC_PropertyKeyName(); } @@ -7927,7 +8030,7 @@ size_t CypherParser::IC_RenameTableContext::getRuleIndex() const { CypherParser::IC_RenameTableContext* CypherParser::iC_RenameTable() { IC_RenameTableContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 118, CypherParser::RuleIC_RenameTable); + enterRule(_localctx, 120, CypherParser::RuleIC_RenameTable); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -7938,15 +8041,15 @@ CypherParser::IC_RenameTableContext* CypherParser::iC_RenameTable() { }); try { enterOuterAlt(_localctx, 1); - setState(1384); + setState(1401); match(CypherParser::RENAME); - setState(1385); + setState(1402); match(CypherParser::SP); - setState(1386); + setState(1403); match(CypherParser::TO); - setState(1387); + setState(1404); match(CypherParser::SP); - setState(1388); + setState(1405); oC_SchemaName(); } @@ -7997,7 +8100,7 @@ size_t CypherParser::IC_RenamePropertyContext::getRuleIndex() const { CypherParser::IC_RenamePropertyContext* CypherParser::iC_RenameProperty() { IC_RenamePropertyContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 120, CypherParser::RuleIC_RenameProperty); + enterRule(_localctx, 122, CypherParser::RuleIC_RenameProperty); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -8008,19 +8111,19 @@ CypherParser::IC_RenamePropertyContext* CypherParser::iC_RenameProperty() { }); try { enterOuterAlt(_localctx, 1); - setState(1390); + setState(1407); match(CypherParser::RENAME); - setState(1391); + setState(1408); match(CypherParser::SP); - setState(1392); + setState(1409); oC_PropertyKeyName(); - setState(1393); + setState(1410); match(CypherParser::SP); - setState(1394); + setState(1411); match(CypherParser::TO); - setState(1395); + setState(1412); match(CypherParser::SP); - setState(1396); + setState(1413); oC_PropertyKeyName(); } @@ -8067,7 +8170,7 @@ size_t CypherParser::IC_AddFromToConnectionContext::getRuleIndex() const { CypherParser::IC_AddFromToConnectionContext* CypherParser::iC_AddFromToConnection() { IC_AddFromToConnectionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 122, CypherParser::RuleIC_AddFromToConnection); + enterRule(_localctx, 124, CypherParser::RuleIC_AddFromToConnection); size_t _la = 0; #if __cplusplus > 201703L @@ -8079,21 +8182,21 @@ CypherParser::IC_AddFromToConnectionContext* CypherParser::iC_AddFromToConnectio }); try { enterOuterAlt(_localctx, 1); - setState(1398); + setState(1415); match(CypherParser::ADD); - setState(1399); + setState(1416); match(CypherParser::SP); - setState(1403); + setState(1420); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::IF) { - setState(1400); + setState(1417); iC_IfNotExists(); - setState(1401); + setState(1418); match(CypherParser::SP); } - setState(1405); + setState(1422); iC_FromToConnection(); } @@ -8140,7 +8243,7 @@ size_t CypherParser::IC_DropFromToConnectionContext::getRuleIndex() const { CypherParser::IC_DropFromToConnectionContext* CypherParser::iC_DropFromToConnection() { IC_DropFromToConnectionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 124, CypherParser::RuleIC_DropFromToConnection); + enterRule(_localctx, 126, CypherParser::RuleIC_DropFromToConnection); size_t _la = 0; #if __cplusplus > 201703L @@ -8152,21 +8255,21 @@ CypherParser::IC_DropFromToConnectionContext* CypherParser::iC_DropFromToConnect }); try { enterOuterAlt(_localctx, 1); - setState(1407); + setState(1424); match(CypherParser::DROP); - setState(1408); + setState(1425); match(CypherParser::SP); - setState(1412); + setState(1429); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::IF) { - setState(1409); + setState(1426); iC_IfExists(); - setState(1410); + setState(1427); match(CypherParser::SP); } - setState(1414); + setState(1431); iC_FromToConnection(); } @@ -8225,7 +8328,7 @@ size_t CypherParser::IC_SetSortedByContext::getRuleIndex() const { CypherParser::IC_SetSortedByContext* CypherParser::iC_SetSortedBy() { IC_SetSortedByContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 126, CypherParser::RuleIC_SetSortedBy); + enterRule(_localctx, 128, CypherParser::RuleIC_SetSortedBy); size_t _la = 0; #if __cplusplus > 201703L @@ -8238,82 +8341,82 @@ CypherParser::IC_SetSortedByContext* CypherParser::iC_SetSortedBy() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(1416); + setState(1433); match(CypherParser::SET); - setState(1417); + setState(1434); match(CypherParser::SP); - setState(1418); + setState(1435); match(CypherParser::SORTED); - setState(1419); + setState(1436); match(CypherParser::SP); - setState(1420); + setState(1437); match(CypherParser::BY); - setState(1422); + setState(1439); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1421); + setState(1438); match(CypherParser::SP); } - setState(1424); + setState(1441); match(CypherParser::T__1); - setState(1426); + setState(1443); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1425); + setState(1442); match(CypherParser::SP); } - setState(1428); + setState(1445); iC_SortedByItem(); - setState(1439); + setState(1456); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 180, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 183, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(1430); + setState(1447); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1429); + setState(1446); match(CypherParser::SP); } - setState(1432); + setState(1449); match(CypherParser::T__3); - setState(1434); + setState(1451); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1433); + setState(1450); match(CypherParser::SP); } - setState(1436); + setState(1453); iC_SortedByItem(); } - setState(1441); + setState(1458); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 180, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 183, _ctx); } - setState(1443); + setState(1460); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1442); + setState(1459); match(CypherParser::SP); } - setState(1445); + setState(1462); match(CypherParser::T__2); - setState(1447); + setState(1464); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 182, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 185, _ctx)) { case 1: { - setState(1446); + setState(1463); match(CypherParser::SP); break; } @@ -8321,12 +8424,12 @@ CypherParser::IC_SetSortedByContext* CypherParser::iC_SetSortedBy() { default: break; } - setState(1450); + setState(1467); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::CSR) { - setState(1449); + setState(1466); match(CypherParser::CSR); } @@ -8370,7 +8473,7 @@ size_t CypherParser::IC_SortedByItemContext::getRuleIndex() const { CypherParser::IC_SortedByItemContext* CypherParser::iC_SortedByItem() { IC_SortedByItemContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 128, CypherParser::RuleIC_SortedByItem); + enterRule(_localctx, 130, CypherParser::RuleIC_SortedByItem); size_t _la = 0; #if __cplusplus > 201703L @@ -8382,11 +8485,11 @@ CypherParser::IC_SortedByItemContext* CypherParser::iC_SortedByItem() { }); try { enterOuterAlt(_localctx, 1); - setState(1452); + setState(1469); oC_PropertyKeyName(); - setState(1453); + setState(1470); match(CypherParser::SP); - setState(1454); + setState(1471); _la = _input->LA(1); if (!(_la == CypherParser::ASC @@ -8438,7 +8541,7 @@ size_t CypherParser::IC_ColumnDefinitionsContext::getRuleIndex() const { CypherParser::IC_ColumnDefinitionsContext* CypherParser::iC_ColumnDefinitions() { IC_ColumnDefinitionsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 130, CypherParser::RuleIC_ColumnDefinitions); + enterRule(_localctx, 132, CypherParser::RuleIC_ColumnDefinitions); size_t _la = 0; #if __cplusplus > 201703L @@ -8451,37 +8554,37 @@ CypherParser::IC_ColumnDefinitionsContext* CypherParser::iC_ColumnDefinitions() try { size_t alt; enterOuterAlt(_localctx, 1); - setState(1456); + setState(1473); iC_ColumnDefinition(); - setState(1467); + setState(1484); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 186, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 189, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(1458); + setState(1475); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1457); + setState(1474); match(CypherParser::SP); } - setState(1460); + setState(1477); match(CypherParser::T__3); - setState(1462); + setState(1479); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1461); + setState(1478); match(CypherParser::SP); } - setState(1464); + setState(1481); iC_ColumnDefinition(); } - setState(1469); + setState(1486); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 186, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 189, _ctx); } } @@ -8520,7 +8623,7 @@ size_t CypherParser::IC_ColumnDefinitionContext::getRuleIndex() const { CypherParser::IC_ColumnDefinitionContext* CypherParser::iC_ColumnDefinition() { IC_ColumnDefinitionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 132, CypherParser::RuleIC_ColumnDefinition); + enterRule(_localctx, 134, CypherParser::RuleIC_ColumnDefinition); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -8531,11 +8634,11 @@ CypherParser::IC_ColumnDefinitionContext* CypherParser::iC_ColumnDefinition() { }); try { enterOuterAlt(_localctx, 1); - setState(1470); + setState(1487); oC_PropertyKeyName(); - setState(1471); + setState(1488); match(CypherParser::SP); - setState(1472); + setState(1489); iC_DataType(0); } @@ -8578,7 +8681,7 @@ size_t CypherParser::IC_PropertyDefinitionsContext::getRuleIndex() const { CypherParser::IC_PropertyDefinitionsContext* CypherParser::iC_PropertyDefinitions() { IC_PropertyDefinitionsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 134, CypherParser::RuleIC_PropertyDefinitions); + enterRule(_localctx, 136, CypherParser::RuleIC_PropertyDefinitions); size_t _la = 0; #if __cplusplus > 201703L @@ -8591,37 +8694,37 @@ CypherParser::IC_PropertyDefinitionsContext* CypherParser::iC_PropertyDefinition try { size_t alt; enterOuterAlt(_localctx, 1); - setState(1474); + setState(1491); iC_PropertyDefinition(); - setState(1485); + setState(1502); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 189, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 192, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(1476); + setState(1493); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1475); + setState(1492); match(CypherParser::SP); } - setState(1478); + setState(1495); match(CypherParser::T__3); - setState(1480); + setState(1497); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1479); + setState(1496); match(CypherParser::SP); } - setState(1482); + setState(1499); iC_PropertyDefinition(); } - setState(1487); + setState(1504); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 189, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 192, _ctx); } } @@ -8672,7 +8775,7 @@ size_t CypherParser::IC_PropertyDefinitionContext::getRuleIndex() const { CypherParser::IC_PropertyDefinitionContext* CypherParser::iC_PropertyDefinition() { IC_PropertyDefinitionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 136, CypherParser::RuleIC_PropertyDefinition); + enterRule(_localctx, 138, CypherParser::RuleIC_PropertyDefinition); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -8683,16 +8786,16 @@ CypherParser::IC_PropertyDefinitionContext* CypherParser::iC_PropertyDefinition( }); try { enterOuterAlt(_localctx, 1); - setState(1488); + setState(1505); iC_ColumnDefinition(); - setState(1491); + setState(1508); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 190, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 193, _ctx)) { case 1: { - setState(1489); + setState(1506); match(CypherParser::SP); - setState(1490); + setState(1507); iC_Default(); break; } @@ -8700,18 +8803,18 @@ CypherParser::IC_PropertyDefinitionContext* CypherParser::iC_PropertyDefinition( default: break; } - setState(1497); + setState(1514); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 191, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 194, _ctx)) { case 1: { - setState(1493); + setState(1510); match(CypherParser::SP); - setState(1494); + setState(1511); match(CypherParser::PRIMARY); - setState(1495); + setState(1512); match(CypherParser::SP); - setState(1496); + setState(1513); match(CypherParser::KEY); break; } @@ -8764,7 +8867,7 @@ size_t CypherParser::IC_CreateNodeConstraintContext::getRuleIndex() const { CypherParser::IC_CreateNodeConstraintContext* CypherParser::iC_CreateNodeConstraint() { IC_CreateNodeConstraintContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 138, CypherParser::RuleIC_CreateNodeConstraint); + enterRule(_localctx, 140, CypherParser::RuleIC_CreateNodeConstraint); size_t _la = 0; #if __cplusplus > 201703L @@ -8776,41 +8879,41 @@ CypherParser::IC_CreateNodeConstraintContext* CypherParser::iC_CreateNodeConstra }); try { enterOuterAlt(_localctx, 1); - setState(1499); + setState(1516); match(CypherParser::PRIMARY); - setState(1500); + setState(1517); match(CypherParser::SP); - setState(1501); + setState(1518); match(CypherParser::KEY); - setState(1503); + setState(1520); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1502); + setState(1519); match(CypherParser::SP); } - setState(1505); + setState(1522); match(CypherParser::T__1); - setState(1507); + setState(1524); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1506); + setState(1523); match(CypherParser::SP); } - setState(1509); + setState(1526); oC_PropertyKeyName(); - setState(1511); + setState(1528); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1510); + setState(1527); match(CypherParser::SP); } - setState(1513); + setState(1530); match(CypherParser::T__2); } @@ -8853,7 +8956,7 @@ size_t CypherParser::IC_UnionTypeContext::getRuleIndex() const { CypherParser::IC_UnionTypeContext* CypherParser::iC_UnionType() { IC_UnionTypeContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 140, CypherParser::RuleIC_UnionType); + enterRule(_localctx, 142, CypherParser::RuleIC_UnionType); size_t _la = 0; #if __cplusplus > 201703L @@ -8865,37 +8968,37 @@ CypherParser::IC_UnionTypeContext* CypherParser::iC_UnionType() { }); try { enterOuterAlt(_localctx, 1); - setState(1515); + setState(1532); match(CypherParser::UNION); - setState(1517); + setState(1534); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1516); + setState(1533); match(CypherParser::SP); } - setState(1519); + setState(1536); match(CypherParser::T__1); - setState(1521); + setState(1538); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1520); + setState(1537); match(CypherParser::SP); } - setState(1523); + setState(1540); iC_ColumnDefinitions(); - setState(1525); + setState(1542); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1524); + setState(1541); match(CypherParser::SP); } - setState(1527); + setState(1544); match(CypherParser::T__2); } @@ -8938,7 +9041,7 @@ size_t CypherParser::IC_StructTypeContext::getRuleIndex() const { CypherParser::IC_StructTypeContext* CypherParser::iC_StructType() { IC_StructTypeContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 142, CypherParser::RuleIC_StructType); + enterRule(_localctx, 144, CypherParser::RuleIC_StructType); size_t _la = 0; #if __cplusplus > 201703L @@ -8950,37 +9053,37 @@ CypherParser::IC_StructTypeContext* CypherParser::iC_StructType() { }); try { enterOuterAlt(_localctx, 1); - setState(1529); + setState(1546); match(CypherParser::STRUCT); - setState(1531); + setState(1548); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1530); + setState(1547); match(CypherParser::SP); } - setState(1533); + setState(1550); match(CypherParser::T__1); - setState(1535); + setState(1552); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1534); + setState(1551); match(CypherParser::SP); } - setState(1537); + setState(1554); iC_ColumnDefinitions(); - setState(1539); + setState(1556); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1538); + setState(1555); match(CypherParser::SP); } - setState(1541); + setState(1558); match(CypherParser::T__2); } @@ -9027,7 +9130,7 @@ size_t CypherParser::IC_MapTypeContext::getRuleIndex() const { CypherParser::IC_MapTypeContext* CypherParser::iC_MapType() { IC_MapTypeContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 144, CypherParser::RuleIC_MapType); + enterRule(_localctx, 146, CypherParser::RuleIC_MapType); size_t _la = 0; #if __cplusplus > 201703L @@ -9039,57 +9142,57 @@ CypherParser::IC_MapTypeContext* CypherParser::iC_MapType() { }); try { enterOuterAlt(_localctx, 1); - setState(1543); + setState(1560); match(CypherParser::MAP); - setState(1545); + setState(1562); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1544); + setState(1561); match(CypherParser::SP); } - setState(1547); + setState(1564); match(CypherParser::T__1); - setState(1549); + setState(1566); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1548); + setState(1565); match(CypherParser::SP); } - setState(1551); + setState(1568); iC_DataType(0); - setState(1553); + setState(1570); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1552); + setState(1569); match(CypherParser::SP); } - setState(1555); + setState(1572); match(CypherParser::T__3); - setState(1557); + setState(1574); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1556); + setState(1573); match(CypherParser::SP); } - setState(1559); + setState(1576); iC_DataType(0); - setState(1561); + setState(1578); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1560); + setState(1577); match(CypherParser::SP); } - setState(1563); + setState(1580); match(CypherParser::T__2); } @@ -9136,7 +9239,7 @@ size_t CypherParser::IC_DecimalTypeContext::getRuleIndex() const { CypherParser::IC_DecimalTypeContext* CypherParser::iC_DecimalType() { IC_DecimalTypeContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 146, CypherParser::RuleIC_DecimalType); + enterRule(_localctx, 148, CypherParser::RuleIC_DecimalType); size_t _la = 0; #if __cplusplus > 201703L @@ -9148,57 +9251,57 @@ CypherParser::IC_DecimalTypeContext* CypherParser::iC_DecimalType() { }); try { enterOuterAlt(_localctx, 1); - setState(1565); + setState(1582); match(CypherParser::DECIMAL); - setState(1567); + setState(1584); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1566); + setState(1583); match(CypherParser::SP); } - setState(1569); + setState(1586); match(CypherParser::T__1); - setState(1571); + setState(1588); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1570); + setState(1587); match(CypherParser::SP); } - setState(1573); + setState(1590); oC_IntegerLiteral(); - setState(1575); + setState(1592); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1574); + setState(1591); match(CypherParser::SP); } - setState(1577); + setState(1594); match(CypherParser::T__3); - setState(1579); + setState(1596); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1578); + setState(1595); match(CypherParser::SP); } - setState(1581); + setState(1598); oC_IntegerLiteral(); - setState(1583); + setState(1600); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1582); + setState(1599); match(CypherParser::SP); } - setState(1585); + setState(1602); match(CypherParser::T__2); } @@ -9262,8 +9365,8 @@ CypherParser::IC_DataTypeContext* CypherParser::iC_DataType(int precedence) { CypherParser::IC_DataTypeContext *_localctx = _tracker.createInstance(_ctx, parentState); CypherParser::IC_DataTypeContext *previousContext = _localctx; (void)previousContext; // Silence compiler, in case the context is not used by generated code. - size_t startState = 148; - enterRecursionRule(_localctx, 148, CypherParser::RuleIC_DataType, precedence); + size_t startState = 150; + enterRecursionRule(_localctx, 150, CypherParser::RuleIC_DataType, precedence); @@ -9277,35 +9380,35 @@ CypherParser::IC_DataTypeContext* CypherParser::iC_DataType(int precedence) { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(1593); + setState(1610); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 211, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 214, _ctx)) { case 1: { - setState(1588); + setState(1605); oC_SymbolicName(); break; } case 2: { - setState(1589); + setState(1606); iC_UnionType(); break; } case 3: { - setState(1590); + setState(1607); iC_StructType(); break; } case 4: { - setState(1591); + setState(1608); iC_MapType(); break; } case 5: { - setState(1592); + setState(1609); iC_DecimalType(); break; } @@ -9314,9 +9417,9 @@ CypherParser::IC_DataTypeContext* CypherParser::iC_DataType(int precedence) { break; } _ctx->stop = _input->LT(-1); - setState(1599); + setState(1616); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 212, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 215, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { if (!_parseListeners.empty()) @@ -9324,15 +9427,15 @@ CypherParser::IC_DataTypeContext* CypherParser::iC_DataType(int precedence) { previousContext = _localctx; _localctx = _tracker.createInstance(parentContext, parentState); pushNewRecursionContext(_localctx, startState, RuleIC_DataType); - setState(1595); + setState(1612); if (!(precpred(_ctx, 5))) throw FailedPredicateException(this, "precpred(_ctx, 5)"); - setState(1596); + setState(1613); iC_ListIdentifiers(); } - setState(1601); + setState(1618); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 212, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 215, _ctx); } } catch (RecognitionException &e) { @@ -9365,7 +9468,7 @@ size_t CypherParser::IC_ListIdentifiersContext::getRuleIndex() const { CypherParser::IC_ListIdentifiersContext* CypherParser::iC_ListIdentifiers() { IC_ListIdentifiersContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 150, CypherParser::RuleIC_ListIdentifiers); + enterRule(_localctx, 152, CypherParser::RuleIC_ListIdentifiers); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -9377,19 +9480,19 @@ CypherParser::IC_ListIdentifiersContext* CypherParser::iC_ListIdentifiers() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(1602); + setState(1619); iC_ListIdentifier(); - setState(1606); + setState(1623); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 213, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 216, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(1603); + setState(1620); iC_ListIdentifier(); } - setState(1608); + setState(1625); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 213, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 216, _ctx); } } @@ -9420,7 +9523,7 @@ size_t CypherParser::IC_ListIdentifierContext::getRuleIndex() const { CypherParser::IC_ListIdentifierContext* CypherParser::iC_ListIdentifier() { IC_ListIdentifierContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 152, CypherParser::RuleIC_ListIdentifier); + enterRule(_localctx, 154, CypherParser::RuleIC_ListIdentifier); size_t _la = 0; #if __cplusplus > 201703L @@ -9432,17 +9535,17 @@ CypherParser::IC_ListIdentifierContext* CypherParser::iC_ListIdentifier() { }); try { enterOuterAlt(_localctx, 1); - setState(1609); + setState(1626); match(CypherParser::T__6); - setState(1611); + setState(1628); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::DecimalInteger) { - setState(1610); + setState(1627); oC_IntegerLiteral(); } - setState(1613); + setState(1630); match(CypherParser::T__7); } @@ -9477,7 +9580,7 @@ size_t CypherParser::OC_AnyCypherOptionContext::getRuleIndex() const { CypherParser::OC_AnyCypherOptionContext* CypherParser::oC_AnyCypherOption() { OC_AnyCypherOptionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 154, CypherParser::RuleOC_AnyCypherOption); + enterRule(_localctx, 156, CypherParser::RuleOC_AnyCypherOption); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -9487,19 +9590,19 @@ CypherParser::OC_AnyCypherOptionContext* CypherParser::oC_AnyCypherOption() { exitRule(); }); try { - setState(1617); + setState(1634); _errHandler->sync(this); switch (_input->LA(1)) { case CypherParser::EXPLAIN: { enterOuterAlt(_localctx, 1); - setState(1615); + setState(1632); oC_Explain(); break; } case CypherParser::PROFILE: { enterOuterAlt(_localctx, 2); - setState(1616); + setState(1633); oC_Profile(); break; } @@ -9544,7 +9647,7 @@ size_t CypherParser::OC_ExplainContext::getRuleIndex() const { CypherParser::OC_ExplainContext* CypherParser::oC_Explain() { OC_ExplainContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 156, CypherParser::RuleOC_Explain); + enterRule(_localctx, 158, CypherParser::RuleOC_Explain); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -9555,16 +9658,16 @@ CypherParser::OC_ExplainContext* CypherParser::oC_Explain() { }); try { enterOuterAlt(_localctx, 1); - setState(1619); + setState(1636); match(CypherParser::EXPLAIN); - setState(1622); + setState(1639); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 216, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 219, _ctx)) { case 1: { - setState(1620); + setState(1637); match(CypherParser::SP); - setState(1621); + setState(1638); match(CypherParser::LOGICAL); break; } @@ -9601,7 +9704,7 @@ size_t CypherParser::OC_ProfileContext::getRuleIndex() const { CypherParser::OC_ProfileContext* CypherParser::oC_Profile() { OC_ProfileContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 158, CypherParser::RuleOC_Profile); + enterRule(_localctx, 160, CypherParser::RuleOC_Profile); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -9612,7 +9715,7 @@ CypherParser::OC_ProfileContext* CypherParser::oC_Profile() { }); try { enterOuterAlt(_localctx, 1); - setState(1624); + setState(1641); match(CypherParser::PROFILE); } @@ -9675,7 +9778,7 @@ size_t CypherParser::IC_TransactionContext::getRuleIndex() const { CypherParser::IC_TransactionContext* CypherParser::iC_Transaction() { IC_TransactionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 160, CypherParser::RuleIC_Transaction); + enterRule(_localctx, 162, CypherParser::RuleIC_Transaction); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -9685,56 +9788,56 @@ CypherParser::IC_TransactionContext* CypherParser::iC_Transaction() { exitRule(); }); try { - setState(1639); + setState(1656); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 217, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 220, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(1626); + setState(1643); match(CypherParser::BEGIN); - setState(1627); + setState(1644); match(CypherParser::SP); - setState(1628); + setState(1645); match(CypherParser::TRANSACTION); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(1629); + setState(1646); match(CypherParser::BEGIN); - setState(1630); + setState(1647); match(CypherParser::SP); - setState(1631); + setState(1648); match(CypherParser::TRANSACTION); - setState(1632); + setState(1649); match(CypherParser::SP); - setState(1633); + setState(1650); match(CypherParser::READ); - setState(1634); + setState(1651); match(CypherParser::SP); - setState(1635); + setState(1652); match(CypherParser::ONLY); break; } case 3: { enterOuterAlt(_localctx, 3); - setState(1636); + setState(1653); match(CypherParser::COMMIT); break; } case 4: { enterOuterAlt(_localctx, 4); - setState(1637); + setState(1654); match(CypherParser::ROLLBACK); break; } case 5: { enterOuterAlt(_localctx, 5); - setState(1638); + setState(1655); match(CypherParser::CHECKPOINT); break; } @@ -9783,7 +9886,7 @@ size_t CypherParser::IC_ExtensionContext::getRuleIndex() const { CypherParser::IC_ExtensionContext* CypherParser::iC_Extension() { IC_ExtensionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 162, CypherParser::RuleIC_Extension); + enterRule(_localctx, 164, CypherParser::RuleIC_Extension); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -9793,12 +9896,12 @@ CypherParser::IC_ExtensionContext* CypherParser::iC_Extension() { exitRule(); }); try { - setState(1645); + setState(1662); _errHandler->sync(this); switch (_input->LA(1)) { case CypherParser::LOAD: { enterOuterAlt(_localctx, 1); - setState(1641); + setState(1658); iC_LoadExtension(); break; } @@ -9806,21 +9909,21 @@ CypherParser::IC_ExtensionContext* CypherParser::iC_Extension() { case CypherParser::FORCE: case CypherParser::INSTALL: { enterOuterAlt(_localctx, 2); - setState(1642); + setState(1659); iC_InstallExtension(); break; } case CypherParser::UNINSTALL: { enterOuterAlt(_localctx, 3); - setState(1643); + setState(1660); iC_UninstallExtension(); break; } case CypherParser::UPDATE: { enterOuterAlt(_localctx, 4); - setState(1644); + setState(1661); iC_UpdateExtension(); break; } @@ -9877,7 +9980,7 @@ size_t CypherParser::IC_LoadExtensionContext::getRuleIndex() const { CypherParser::IC_LoadExtensionContext* CypherParser::iC_LoadExtension() { IC_LoadExtensionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 164, CypherParser::RuleIC_LoadExtension); + enterRule(_localctx, 166, CypherParser::RuleIC_LoadExtension); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -9888,18 +9991,18 @@ CypherParser::IC_LoadExtensionContext* CypherParser::iC_LoadExtension() { }); try { enterOuterAlt(_localctx, 1); - setState(1647); + setState(1664); match(CypherParser::LOAD); - setState(1648); + setState(1665); match(CypherParser::SP); - setState(1651); + setState(1668); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 219, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 222, _ctx)) { case 1: { - setState(1649); + setState(1666); match(CypherParser::EXTENSION); - setState(1650); + setState(1667); match(CypherParser::SP); break; } @@ -9907,11 +10010,11 @@ CypherParser::IC_LoadExtensionContext* CypherParser::iC_LoadExtension() { default: break; } - setState(1655); + setState(1672); _errHandler->sync(this); switch (_input->LA(1)) { case CypherParser::StringLiteral: { - setState(1653); + setState(1670); match(CypherParser::StringLiteral); break; } @@ -9948,6 +10051,7 @@ CypherParser::IC_LoadExtensionContext* CypherParser::iC_LoadExtension() { case CypherParser::IS: case CypherParser::KEY: case CypherParser::LIMIT: + case CypherParser::LIST: case CypherParser::LOAD: case CypherParser::LOGICAL: case CypherParser::MATCH: @@ -9986,7 +10090,7 @@ CypherParser::IC_LoadExtensionContext* CypherParser::iC_LoadExtension() { case CypherParser::HexLetter: case CypherParser::UnescapedSymbolicName: case CypherParser::EscapedSymbolicName: { - setState(1654); + setState(1671); oC_Variable(); break; } @@ -10047,7 +10151,7 @@ size_t CypherParser::IC_InstallExtensionContext::getRuleIndex() const { CypherParser::IC_InstallExtensionContext* CypherParser::iC_InstallExtension() { IC_InstallExtensionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 166, CypherParser::RuleIC_InstallExtension); + enterRule(_localctx, 168, CypherParser::RuleIC_InstallExtension); size_t _la = 0; #if __cplusplus > 201703L @@ -10059,34 +10163,34 @@ CypherParser::IC_InstallExtensionContext* CypherParser::iC_InstallExtension() { }); try { enterOuterAlt(_localctx, 1); - setState(1659); + setState(1676); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::FORCE) { - setState(1657); + setState(1674); match(CypherParser::FORCE); - setState(1658); + setState(1675); match(CypherParser::SP); } - setState(1661); + setState(1678); match(CypherParser::INSTALL); - setState(1662); + setState(1679); match(CypherParser::SP); - setState(1663); + setState(1680); oC_Variable(); - setState(1668); + setState(1685); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 222, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 225, _ctx)) { case 1: { - setState(1664); + setState(1681); match(CypherParser::SP); - setState(1665); + setState(1682); match(CypherParser::FROM); - setState(1666); + setState(1683); match(CypherParser::SP); - setState(1667); + setState(1684); match(CypherParser::StringLiteral); break; } @@ -10131,7 +10235,7 @@ size_t CypherParser::IC_UninstallExtensionContext::getRuleIndex() const { CypherParser::IC_UninstallExtensionContext* CypherParser::iC_UninstallExtension() { IC_UninstallExtensionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 168, CypherParser::RuleIC_UninstallExtension); + enterRule(_localctx, 170, CypherParser::RuleIC_UninstallExtension); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -10142,11 +10246,11 @@ CypherParser::IC_UninstallExtensionContext* CypherParser::iC_UninstallExtension( }); try { enterOuterAlt(_localctx, 1); - setState(1670); + setState(1687); match(CypherParser::UNINSTALL); - setState(1671); + setState(1688); match(CypherParser::SP); - setState(1672); + setState(1689); oC_Variable(); } @@ -10185,7 +10289,7 @@ size_t CypherParser::IC_UpdateExtensionContext::getRuleIndex() const { CypherParser::IC_UpdateExtensionContext* CypherParser::iC_UpdateExtension() { IC_UpdateExtensionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 170, CypherParser::RuleIC_UpdateExtension); + enterRule(_localctx, 172, CypherParser::RuleIC_UpdateExtension); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -10196,11 +10300,11 @@ CypherParser::IC_UpdateExtensionContext* CypherParser::iC_UpdateExtension() { }); try { enterOuterAlt(_localctx, 1); - setState(1674); + setState(1691); match(CypherParser::UPDATE); - setState(1675); + setState(1692); match(CypherParser::SP); - setState(1676); + setState(1693); oC_Variable(); } @@ -10231,7 +10335,7 @@ size_t CypherParser::OC_QueryContext::getRuleIndex() const { CypherParser::OC_QueryContext* CypherParser::oC_Query() { OC_QueryContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 172, CypherParser::RuleOC_Query); + enterRule(_localctx, 174, CypherParser::RuleOC_Query); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -10242,7 +10346,7 @@ CypherParser::OC_QueryContext* CypherParser::oC_Query() { }); try { enterOuterAlt(_localctx, 1); - setState(1678); + setState(1695); oC_RegularQuery(); } @@ -10297,7 +10401,7 @@ size_t CypherParser::OC_RegularQueryContext::getRuleIndex() const { CypherParser::OC_RegularQueryContext* CypherParser::oC_RegularQuery() { OC_RegularQueryContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 174, CypherParser::RuleOC_RegularQuery); + enterRule(_localctx, 176, CypherParser::RuleOC_RegularQuery); size_t _la = 0; #if __cplusplus > 201703L @@ -10309,52 +10413,52 @@ CypherParser::OC_RegularQueryContext* CypherParser::oC_RegularQuery() { }); try { size_t alt; - setState(1701); + setState(1718); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 227, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 230, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(1680); + setState(1697); oC_SingleQuery(); - setState(1687); + setState(1704); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 224, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 227, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(1682); + setState(1699); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1681); + setState(1698); match(CypherParser::SP); } - setState(1684); + setState(1701); oC_Union(); } - setState(1689); + setState(1706); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 224, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 227, _ctx); } break; } case 2: { enterOuterAlt(_localctx, 2); - setState(1694); + setState(1711); _errHandler->sync(this); alt = 1; do { switch (alt) { case 1: { - setState(1690); + setState(1707); oC_Return(); - setState(1692); + setState(1709); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1691); + setState(1708); match(CypherParser::SP); } break; @@ -10363,11 +10467,11 @@ CypherParser::OC_RegularQueryContext* CypherParser::oC_RegularQuery() { default: throw NoViableAltException(this); } - setState(1696); + setState(1713); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 226, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 229, _ctx); } while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER); - setState(1698); + setState(1715); oC_SingleQuery(); notifyReturnNotAtEnd(_localctx->start); break; @@ -10421,7 +10525,7 @@ size_t CypherParser::OC_UnionContext::getRuleIndex() const { CypherParser::OC_UnionContext* CypherParser::oC_Union() { OC_UnionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 176, CypherParser::RuleOC_Union); + enterRule(_localctx, 178, CypherParser::RuleOC_Union); size_t _la = 0; #if __cplusplus > 201703L @@ -10432,43 +10536,43 @@ CypherParser::OC_UnionContext* CypherParser::oC_Union() { exitRule(); }); try { - setState(1715); + setState(1732); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 230, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 233, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(1703); + setState(1720); match(CypherParser::UNION); - setState(1704); + setState(1721); match(CypherParser::SP); - setState(1705); + setState(1722); match(CypherParser::ALL); - setState(1707); + setState(1724); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1706); + setState(1723); match(CypherParser::SP); } - setState(1709); + setState(1726); oC_SingleQuery(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(1710); + setState(1727); match(CypherParser::UNION); - setState(1712); + setState(1729); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1711); + setState(1728); match(CypherParser::SP); } - setState(1714); + setState(1731); oC_SingleQuery(); break; } @@ -10509,7 +10613,7 @@ size_t CypherParser::OC_SingleQueryContext::getRuleIndex() const { CypherParser::OC_SingleQueryContext* CypherParser::oC_SingleQuery() { OC_SingleQueryContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 178, CypherParser::RuleOC_SingleQuery); + enterRule(_localctx, 180, CypherParser::RuleOC_SingleQuery); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -10519,19 +10623,19 @@ CypherParser::OC_SingleQueryContext* CypherParser::oC_SingleQuery() { exitRule(); }); try { - setState(1719); + setState(1736); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 231, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 234, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(1717); + setState(1734); oC_SinglePartQuery(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(1718); + setState(1735); oC_MultiPartQuery(); break; } @@ -10592,7 +10696,7 @@ size_t CypherParser::OC_SinglePartQueryContext::getRuleIndex() const { CypherParser::OC_SinglePartQueryContext* CypherParser::oC_SinglePartQuery() { OC_SinglePartQueryContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 180, CypherParser::RuleOC_SinglePartQuery); + enterRule(_localctx, 182, CypherParser::RuleOC_SinglePartQuery); size_t _la = 0; #if __cplusplus > 201703L @@ -10604,92 +10708,92 @@ CypherParser::OC_SinglePartQueryContext* CypherParser::oC_SinglePartQuery() { }); try { size_t alt; - setState(1756); + setState(1773); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 240, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 243, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(1727); + setState(1744); _errHandler->sync(this); _la = _input->LA(1); - while (_la == CypherParser::CALL || ((((_la - 108) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 108)) & 17592186109961) != 0)) { - setState(1721); + while (_la == CypherParser::CALL || ((((_la - 109) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 109)) & 17592186109961) != 0)) { + setState(1738); oC_ReadingClause(); - setState(1723); + setState(1740); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1722); + setState(1739); match(CypherParser::SP); } - setState(1729); + setState(1746); _errHandler->sync(this); _la = _input->LA(1); } - setState(1730); + setState(1747); oC_Return(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(1737); + setState(1754); _errHandler->sync(this); _la = _input->LA(1); - while (_la == CypherParser::CALL || ((((_la - 108) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 108)) & 17592186109961) != 0)) { - setState(1731); + while (_la == CypherParser::CALL || ((((_la - 109) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 109)) & 17592186109961) != 0)) { + setState(1748); oC_ReadingClause(); - setState(1733); + setState(1750); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1732); + setState(1749); match(CypherParser::SP); } - setState(1739); + setState(1756); _errHandler->sync(this); _la = _input->LA(1); } - setState(1740); + setState(1757); oC_UpdatingClause(); - setState(1747); + setState(1764); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 237, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 240, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(1742); + setState(1759); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1741); + setState(1758); match(CypherParser::SP); } - setState(1744); + setState(1761); oC_UpdatingClause(); } - setState(1749); + setState(1766); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 237, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 240, _ctx); } - setState(1754); + setState(1771); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 239, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 242, _ctx)) { case 1: { - setState(1751); + setState(1768); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1750); + setState(1767); match(CypherParser::SP); } - setState(1753); + setState(1770); oC_Return(); break; } @@ -10748,7 +10852,7 @@ size_t CypherParser::OC_MultiPartQueryContext::getRuleIndex() const { CypherParser::OC_MultiPartQueryContext* CypherParser::oC_MultiPartQuery() { OC_MultiPartQueryContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 182, CypherParser::RuleOC_MultiPartQuery); + enterRule(_localctx, 184, CypherParser::RuleOC_MultiPartQuery); size_t _la = 0; #if __cplusplus > 201703L @@ -10761,20 +10865,20 @@ CypherParser::OC_MultiPartQueryContext* CypherParser::oC_MultiPartQuery() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(1762); + setState(1779); _errHandler->sync(this); alt = 1; do { switch (alt) { case 1: { - setState(1758); + setState(1775); iC_QueryPart(); - setState(1760); + setState(1777); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1759); + setState(1776); match(CypherParser::SP); } break; @@ -10783,11 +10887,11 @@ CypherParser::OC_MultiPartQueryContext* CypherParser::oC_MultiPartQuery() { default: throw NoViableAltException(this); } - setState(1764); + setState(1781); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 242, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 245, _ctx); } while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER); - setState(1766); + setState(1783); oC_SinglePartQuery(); } @@ -10842,7 +10946,7 @@ size_t CypherParser::IC_QueryPartContext::getRuleIndex() const { CypherParser::IC_QueryPartContext* CypherParser::iC_QueryPart() { IC_QueryPartContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 184, CypherParser::RuleIC_QueryPart); + enterRule(_localctx, 186, CypherParser::RuleIC_QueryPart); size_t _la = 0; #if __cplusplus > 201703L @@ -10854,45 +10958,45 @@ CypherParser::IC_QueryPartContext* CypherParser::iC_QueryPart() { }); try { enterOuterAlt(_localctx, 1); - setState(1774); + setState(1791); _errHandler->sync(this); _la = _input->LA(1); - while (_la == CypherParser::CALL || ((((_la - 108) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 108)) & 17592186109961) != 0)) { - setState(1768); + while (_la == CypherParser::CALL || ((((_la - 109) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 109)) & 17592186109961) != 0)) { + setState(1785); oC_ReadingClause(); - setState(1770); + setState(1787); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1769); + setState(1786); match(CypherParser::SP); } - setState(1776); + setState(1793); _errHandler->sync(this); _la = _input->LA(1); } - setState(1783); + setState(1800); _errHandler->sync(this); _la = _input->LA(1); while (((((_la - 69) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 69)) & 17592186044993) != 0) || _la == CypherParser::SET) { - setState(1777); + ((1ULL << (_la - 69)) & 35184372089409) != 0) || _la == CypherParser::SET) { + setState(1794); oC_UpdatingClause(); - setState(1779); + setState(1796); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1778); + setState(1795); match(CypherParser::SP); } - setState(1785); + setState(1802); _errHandler->sync(this); _la = _input->LA(1); } - setState(1786); + setState(1803); oC_With(); } @@ -10935,7 +11039,7 @@ size_t CypherParser::OC_UpdatingClauseContext::getRuleIndex() const { CypherParser::OC_UpdatingClauseContext* CypherParser::oC_UpdatingClause() { OC_UpdatingClauseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 186, CypherParser::RuleOC_UpdatingClause); + enterRule(_localctx, 188, CypherParser::RuleOC_UpdatingClause); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -10945,26 +11049,26 @@ CypherParser::OC_UpdatingClauseContext* CypherParser::oC_UpdatingClause() { exitRule(); }); try { - setState(1792); + setState(1809); _errHandler->sync(this); switch (_input->LA(1)) { case CypherParser::CREATE: { enterOuterAlt(_localctx, 1); - setState(1788); + setState(1805); oC_Create(); break; } case CypherParser::MERGE: { enterOuterAlt(_localctx, 2); - setState(1789); + setState(1806); oC_Merge(); break; } case CypherParser::SET: { enterOuterAlt(_localctx, 3); - setState(1790); + setState(1807); oC_Set(); break; } @@ -10972,7 +11076,7 @@ CypherParser::OC_UpdatingClauseContext* CypherParser::oC_UpdatingClause() { case CypherParser::DELETE: case CypherParser::DETACH: { enterOuterAlt(_localctx, 4); - setState(1791); + setState(1808); oC_Delete(); break; } @@ -11021,7 +11125,7 @@ size_t CypherParser::OC_ReadingClauseContext::getRuleIndex() const { CypherParser::OC_ReadingClauseContext* CypherParser::oC_ReadingClause() { OC_ReadingClauseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 188, CypherParser::RuleOC_ReadingClause); + enterRule(_localctx, 190, CypherParser::RuleOC_ReadingClause); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -11031,34 +11135,34 @@ CypherParser::OC_ReadingClauseContext* CypherParser::oC_ReadingClause() { exitRule(); }); try { - setState(1798); + setState(1815); _errHandler->sync(this); switch (_input->LA(1)) { case CypherParser::MATCH: case CypherParser::OPTIONAL: { enterOuterAlt(_localctx, 1); - setState(1794); + setState(1811); oC_Match(); break; } case CypherParser::UNWIND: { enterOuterAlt(_localctx, 2); - setState(1795); + setState(1812); oC_Unwind(); break; } case CypherParser::CALL: { enterOuterAlt(_localctx, 3); - setState(1796); + setState(1813); iC_InQueryCall(); break; } case CypherParser::LOAD: { enterOuterAlt(_localctx, 4); - setState(1797); + setState(1814); iC_LoadFrom(); break; } @@ -11131,7 +11235,7 @@ size_t CypherParser::IC_LoadFromContext::getRuleIndex() const { CypherParser::IC_LoadFromContext* CypherParser::iC_LoadFrom() { IC_LoadFromContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 190, CypherParser::RuleIC_LoadFrom); + enterRule(_localctx, 192, CypherParser::RuleIC_LoadFrom); size_t _la = 0; #if __cplusplus > 201703L @@ -11143,50 +11247,50 @@ CypherParser::IC_LoadFromContext* CypherParser::iC_LoadFrom() { }); try { enterOuterAlt(_localctx, 1); - setState(1800); + setState(1817); match(CypherParser::LOAD); - setState(1818); + setState(1835); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 252, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 255, _ctx)) { case 1: { - setState(1801); + setState(1818); match(CypherParser::SP); - setState(1802); + setState(1819); match(CypherParser::WITH); - setState(1803); + setState(1820); match(CypherParser::SP); - setState(1804); + setState(1821); match(CypherParser::HEADERS); - setState(1806); + setState(1823); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1805); + setState(1822); match(CypherParser::SP); } - setState(1808); + setState(1825); match(CypherParser::T__1); - setState(1810); + setState(1827); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1809); + setState(1826); match(CypherParser::SP); } - setState(1812); + setState(1829); iC_ColumnDefinitions(); - setState(1814); + setState(1831); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1813); + setState(1830); match(CypherParser::SP); } - setState(1816); + setState(1833); match(CypherParser::T__2); break; } @@ -11194,48 +11298,48 @@ CypherParser::IC_LoadFromContext* CypherParser::iC_LoadFrom() { default: break; } - setState(1820); + setState(1837); match(CypherParser::SP); - setState(1821); + setState(1838); match(CypherParser::FROM); - setState(1822); + setState(1839); match(CypherParser::SP); - setState(1823); + setState(1840); iC_ScanSource(); - setState(1837); + setState(1854); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 256, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 259, _ctx)) { case 1: { - setState(1825); + setState(1842); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1824); + setState(1841); match(CypherParser::SP); } - setState(1827); + setState(1844); match(CypherParser::T__1); - setState(1829); + setState(1846); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1828); + setState(1845); match(CypherParser::SP); } - setState(1831); + setState(1848); iC_Options(); - setState(1833); + setState(1850); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1832); + setState(1849); match(CypherParser::SP); } - setState(1835); + setState(1852); match(CypherParser::T__2); break; } @@ -11243,20 +11347,20 @@ CypherParser::IC_LoadFromContext* CypherParser::iC_LoadFrom() { default: break; } - setState(1843); + setState(1860); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 258, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 261, _ctx)) { case 1: { - setState(1840); + setState(1857); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1839); + setState(1856); match(CypherParser::SP); } - setState(1842); + setState(1859); oC_Where(); break; } @@ -11309,7 +11413,7 @@ size_t CypherParser::OC_YieldItemContext::getRuleIndex() const { CypherParser::OC_YieldItemContext* CypherParser::oC_YieldItem() { OC_YieldItemContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 192, CypherParser::RuleOC_YieldItem); + enterRule(_localctx, 194, CypherParser::RuleOC_YieldItem); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -11320,18 +11424,18 @@ CypherParser::OC_YieldItemContext* CypherParser::oC_YieldItem() { }); try { enterOuterAlt(_localctx, 1); - setState(1850); + setState(1867); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 259, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 262, _ctx)) { case 1: { - setState(1845); + setState(1862); oC_Variable(); - setState(1846); + setState(1863); match(CypherParser::SP); - setState(1847); + setState(1864); match(CypherParser::AS); - setState(1848); + setState(1865); match(CypherParser::SP); break; } @@ -11339,7 +11443,7 @@ CypherParser::OC_YieldItemContext* CypherParser::oC_YieldItem() { default: break; } - setState(1852); + setState(1869); oC_Variable(); } @@ -11382,7 +11486,7 @@ size_t CypherParser::OC_YieldItemsContext::getRuleIndex() const { CypherParser::OC_YieldItemsContext* CypherParser::oC_YieldItems() { OC_YieldItemsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 194, CypherParser::RuleOC_YieldItems); + enterRule(_localctx, 196, CypherParser::RuleOC_YieldItems); size_t _la = 0; #if __cplusplus > 201703L @@ -11395,37 +11499,37 @@ CypherParser::OC_YieldItemsContext* CypherParser::oC_YieldItems() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(1854); + setState(1871); oC_YieldItem(); - setState(1865); + setState(1882); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 262, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 265, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(1856); + setState(1873); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1855); + setState(1872); match(CypherParser::SP); } - setState(1858); + setState(1875); match(CypherParser::T__3); - setState(1860); + setState(1877); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1859); + setState(1876); match(CypherParser::SP); } - setState(1862); + setState(1879); oC_YieldItem(); } - setState(1867); + setState(1884); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 262, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 265, _ctx); } } @@ -11480,7 +11584,7 @@ size_t CypherParser::IC_InQueryCallContext::getRuleIndex() const { CypherParser::IC_InQueryCallContext* CypherParser::iC_InQueryCall() { IC_InQueryCallContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 196, CypherParser::RuleIC_InQueryCall); + enterRule(_localctx, 198, CypherParser::RuleIC_InQueryCall); size_t _la = 0; #if __cplusplus > 201703L @@ -11492,26 +11596,26 @@ CypherParser::IC_InQueryCallContext* CypherParser::iC_InQueryCall() { }); try { enterOuterAlt(_localctx, 1); - setState(1868); + setState(1885); match(CypherParser::CALL); - setState(1869); + setState(1886); match(CypherParser::SP); - setState(1870); + setState(1887); oC_FunctionInvocation(); - setState(1875); + setState(1892); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 264, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 267, _ctx)) { case 1: { - setState(1872); + setState(1889); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1871); + setState(1888); match(CypherParser::SP); } - setState(1874); + setState(1891); oC_Where(); break; } @@ -11519,24 +11623,24 @@ CypherParser::IC_InQueryCallContext* CypherParser::iC_InQueryCall() { default: break; } - setState(1883); + setState(1900); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 266, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 269, _ctx)) { case 1: { - setState(1878); + setState(1895); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1877); + setState(1894); match(CypherParser::SP); } - setState(1880); + setState(1897); match(CypherParser::YIELD); - setState(1881); + setState(1898); match(CypherParser::SP); - setState(1882); + setState(1899); oC_YieldItems(); break; } @@ -11597,7 +11701,7 @@ size_t CypherParser::OC_MatchContext::getRuleIndex() const { CypherParser::OC_MatchContext* CypherParser::oC_Match() { OC_MatchContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 198, CypherParser::RuleOC_Match); + enterRule(_localctx, 200, CypherParser::RuleOC_Match); size_t _la = 0; #if __cplusplus > 201703L @@ -11609,36 +11713,36 @@ CypherParser::OC_MatchContext* CypherParser::oC_Match() { }); try { enterOuterAlt(_localctx, 1); - setState(1887); + setState(1904); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::OPTIONAL) { - setState(1885); + setState(1902); match(CypherParser::OPTIONAL); - setState(1886); + setState(1903); match(CypherParser::SP); } - setState(1889); + setState(1906); match(CypherParser::MATCH); - setState(1891); + setState(1908); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1890); + setState(1907); match(CypherParser::SP); } - setState(1893); + setState(1910); oC_Pattern(); - setState(1896); + setState(1913); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 269, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 272, _ctx)) { case 1: { - setState(1894); + setState(1911); match(CypherParser::SP); - setState(1895); + setState(1912); oC_Where(); break; } @@ -11646,14 +11750,14 @@ CypherParser::OC_MatchContext* CypherParser::oC_Match() { default: break; } - setState(1900); + setState(1917); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 270, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 273, _ctx)) { case 1: { - setState(1898); + setState(1915); match(CypherParser::SP); - setState(1899); + setState(1916); iC_Hint(); break; } @@ -11698,7 +11802,7 @@ size_t CypherParser::IC_HintContext::getRuleIndex() const { CypherParser::IC_HintContext* CypherParser::iC_Hint() { IC_HintContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 200, CypherParser::RuleIC_Hint); + enterRule(_localctx, 202, CypherParser::RuleIC_Hint); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -11709,11 +11813,11 @@ CypherParser::IC_HintContext* CypherParser::iC_Hint() { }); try { enterOuterAlt(_localctx, 1); - setState(1902); + setState(1919); match(CypherParser::HINT); - setState(1903); + setState(1920); match(CypherParser::SP); - setState(1904); + setState(1921); iC_JoinNode(0); } @@ -11785,8 +11889,8 @@ CypherParser::IC_JoinNodeContext* CypherParser::iC_JoinNode(int precedence) { CypherParser::IC_JoinNodeContext *_localctx = _tracker.createInstance(_ctx, parentState); CypherParser::IC_JoinNodeContext *previousContext = _localctx; (void)previousContext; // Silence compiler, in case the context is not used by generated code. - size_t startState = 202; - enterRecursionRule(_localctx, 202, CypherParser::RuleIC_JoinNode, precedence); + size_t startState = 204; + enterRecursionRule(_localctx, 204, CypherParser::RuleIC_JoinNode, precedence); size_t _la = 0; @@ -11800,31 +11904,31 @@ CypherParser::IC_JoinNodeContext* CypherParser::iC_JoinNode(int precedence) { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(1918); + setState(1935); _errHandler->sync(this); switch (_input->LA(1)) { case CypherParser::T__1: { - setState(1907); + setState(1924); match(CypherParser::T__1); - setState(1909); + setState(1926); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1908); + setState(1925); match(CypherParser::SP); } - setState(1911); + setState(1928); iC_JoinNode(0); - setState(1913); + setState(1930); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1912); + setState(1929); match(CypherParser::SP); } - setState(1915); + setState(1932); match(CypherParser::T__2); break; } @@ -11861,6 +11965,7 @@ CypherParser::IC_JoinNodeContext* CypherParser::iC_JoinNode(int precedence) { case CypherParser::IS: case CypherParser::KEY: case CypherParser::LIMIT: + case CypherParser::LIST: case CypherParser::LOAD: case CypherParser::LOGICAL: case CypherParser::MATCH: @@ -11899,7 +12004,7 @@ CypherParser::IC_JoinNodeContext* CypherParser::iC_JoinNode(int precedence) { case CypherParser::HexLetter: case CypherParser::UnescapedSymbolicName: case CypherParser::EscapedSymbolicName: { - setState(1917); + setState(1934); oC_SchemaName(); break; } @@ -11908,30 +12013,30 @@ CypherParser::IC_JoinNodeContext* CypherParser::iC_JoinNode(int precedence) { throw NoViableAltException(this); } _ctx->stop = _input->LT(-1); - setState(1936); + setState(1953); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 276, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 279, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { if (!_parseListeners.empty()) triggerExitRuleEvent(); previousContext = _localctx; - setState(1934); + setState(1951); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 275, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 278, _ctx)) { case 1: { _localctx = _tracker.createInstance(parentContext, parentState); pushNewRecursionContext(_localctx, startState, RuleIC_JoinNode); - setState(1920); + setState(1937); if (!(precpred(_ctx, 4))) throw FailedPredicateException(this, "precpred(_ctx, 4)"); - setState(1921); + setState(1938); match(CypherParser::SP); - setState(1922); + setState(1939); match(CypherParser::JOIN); - setState(1923); + setState(1940); match(CypherParser::SP); - setState(1924); + setState(1941); iC_JoinNode(5); break; } @@ -11939,22 +12044,22 @@ CypherParser::IC_JoinNodeContext* CypherParser::iC_JoinNode(int precedence) { case 2: { _localctx = _tracker.createInstance(parentContext, parentState); pushNewRecursionContext(_localctx, startState, RuleIC_JoinNode); - setState(1925); + setState(1942); if (!(precpred(_ctx, 3))) throw FailedPredicateException(this, "precpred(_ctx, 3)"); - setState(1930); + setState(1947); _errHandler->sync(this); alt = 1; do { switch (alt) { case 1: { - setState(1926); + setState(1943); match(CypherParser::SP); - setState(1927); + setState(1944); match(CypherParser::MULTI_JOIN); - setState(1928); + setState(1945); match(CypherParser::SP); - setState(1929); + setState(1946); oC_SchemaName(); break; } @@ -11962,9 +12067,9 @@ CypherParser::IC_JoinNodeContext* CypherParser::iC_JoinNode(int precedence) { default: throw NoViableAltException(this); } - setState(1932); + setState(1949); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 274, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 277, _ctx); } while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER); break; } @@ -11973,9 +12078,9 @@ CypherParser::IC_JoinNodeContext* CypherParser::iC_JoinNode(int precedence) { break; } } - setState(1938); + setState(1955); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 276, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 279, _ctx); } } catch (RecognitionException &e) { @@ -12024,7 +12129,7 @@ size_t CypherParser::OC_UnwindContext::getRuleIndex() const { CypherParser::OC_UnwindContext* CypherParser::oC_Unwind() { OC_UnwindContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 204, CypherParser::RuleOC_Unwind); + enterRule(_localctx, 206, CypherParser::RuleOC_Unwind); size_t _la = 0; #if __cplusplus > 201703L @@ -12036,25 +12141,25 @@ CypherParser::OC_UnwindContext* CypherParser::oC_Unwind() { }); try { enterOuterAlt(_localctx, 1); - setState(1939); + setState(1956); match(CypherParser::UNWIND); - setState(1941); + setState(1958); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1940); + setState(1957); match(CypherParser::SP); } - setState(1943); + setState(1960); oC_Expression(); - setState(1944); + setState(1961); match(CypherParser::SP); - setState(1945); + setState(1962); match(CypherParser::AS); - setState(1946); + setState(1963); match(CypherParser::SP); - setState(1947); + setState(1964); oC_Variable(); } @@ -12093,7 +12198,7 @@ size_t CypherParser::OC_CreateContext::getRuleIndex() const { CypherParser::OC_CreateContext* CypherParser::oC_Create() { OC_CreateContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 206, CypherParser::RuleOC_Create); + enterRule(_localctx, 208, CypherParser::RuleOC_Create); size_t _la = 0; #if __cplusplus > 201703L @@ -12105,17 +12210,17 @@ CypherParser::OC_CreateContext* CypherParser::oC_Create() { }); try { enterOuterAlt(_localctx, 1); - setState(1949); + setState(1966); match(CypherParser::CREATE); - setState(1951); + setState(1968); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1950); + setState(1967); match(CypherParser::SP); } - setState(1953); + setState(1970); oC_Pattern(); } @@ -12166,7 +12271,7 @@ size_t CypherParser::OC_MergeContext::getRuleIndex() const { CypherParser::OC_MergeContext* CypherParser::oC_Merge() { OC_MergeContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 208, CypherParser::RuleOC_Merge); + enterRule(_localctx, 210, CypherParser::RuleOC_Merge); size_t _la = 0; #if __cplusplus > 201703L @@ -12179,31 +12284,31 @@ CypherParser::OC_MergeContext* CypherParser::oC_Merge() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(1955); + setState(1972); match(CypherParser::MERGE); - setState(1957); + setState(1974); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1956); + setState(1973); match(CypherParser::SP); } - setState(1959); + setState(1976); oC_Pattern(); - setState(1964); + setState(1981); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 280, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 283, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(1960); + setState(1977); match(CypherParser::SP); - setState(1961); + setState(1978); oC_MergeAction(); } - setState(1966); + setState(1983); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 280, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 283, _ctx); } } @@ -12254,7 +12359,7 @@ size_t CypherParser::OC_MergeActionContext::getRuleIndex() const { CypherParser::OC_MergeActionContext* CypherParser::oC_MergeAction() { OC_MergeActionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 210, CypherParser::RuleOC_MergeAction); + enterRule(_localctx, 212, CypherParser::RuleOC_MergeAction); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -12264,35 +12369,35 @@ CypherParser::OC_MergeActionContext* CypherParser::oC_MergeAction() { exitRule(); }); try { - setState(1977); + setState(1994); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 281, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 284, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(1967); + setState(1984); match(CypherParser::ON); - setState(1968); + setState(1985); match(CypherParser::SP); - setState(1969); + setState(1986); match(CypherParser::MATCH); - setState(1970); + setState(1987); match(CypherParser::SP); - setState(1971); + setState(1988); oC_Set(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(1972); + setState(1989); match(CypherParser::ON); - setState(1973); + setState(1990); match(CypherParser::SP); - setState(1974); + setState(1991); match(CypherParser::CREATE); - setState(1975); + setState(1992); match(CypherParser::SP); - setState(1976); + setState(1993); oC_Set(); break; } @@ -12353,7 +12458,7 @@ size_t CypherParser::OC_SetContext::getRuleIndex() const { CypherParser::OC_SetContext* CypherParser::oC_Set() { OC_SetContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 212, CypherParser::RuleOC_Set); + enterRule(_localctx, 214, CypherParser::RuleOC_Set); size_t _la = 0; #if __cplusplus > 201703L @@ -12365,89 +12470,89 @@ CypherParser::OC_SetContext* CypherParser::oC_Set() { }); try { size_t alt; - setState(2011); + setState(2028); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 289, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 292, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(1979); + setState(1996); match(CypherParser::SET); - setState(1981); + setState(1998); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1980); + setState(1997); match(CypherParser::SP); } - setState(1983); + setState(2000); oC_SetItem(); - setState(1994); + setState(2011); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 285, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 288, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(1985); + setState(2002); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1984); + setState(2001); match(CypherParser::SP); } - setState(1987); + setState(2004); match(CypherParser::T__3); - setState(1989); + setState(2006); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1988); + setState(2005); match(CypherParser::SP); } - setState(1991); + setState(2008); oC_SetItem(); } - setState(1996); + setState(2013); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 285, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 288, _ctx); } break; } case 2: { enterOuterAlt(_localctx, 2); - setState(1997); + setState(2014); match(CypherParser::SET); - setState(1999); + setState(2016); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(1998); + setState(2015); match(CypherParser::SP); } - setState(2001); + setState(2018); oC_Atom(); - setState(2003); + setState(2020); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2002); + setState(2019); match(CypherParser::SP); } - setState(2005); + setState(2022); match(CypherParser::T__5); - setState(2007); + setState(2024); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2006); + setState(2023); match(CypherParser::SP); } - setState(2009); + setState(2026); iC_Properties(); break; } @@ -12496,7 +12601,7 @@ size_t CypherParser::OC_SetItemContext::getRuleIndex() const { CypherParser::OC_SetItemContext* CypherParser::oC_SetItem() { OC_SetItemContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 214, CypherParser::RuleOC_SetItem); + enterRule(_localctx, 216, CypherParser::RuleOC_SetItem); size_t _la = 0; #if __cplusplus > 201703L @@ -12508,27 +12613,27 @@ CypherParser::OC_SetItemContext* CypherParser::oC_SetItem() { }); try { enterOuterAlt(_localctx, 1); - setState(2013); + setState(2030); oC_PropertyExpression(); - setState(2015); + setState(2032); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2014); + setState(2031); match(CypherParser::SP); } - setState(2017); + setState(2034); match(CypherParser::T__5); - setState(2019); + setState(2036); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2018); + setState(2035); match(CypherParser::SP); } - setState(2021); + setState(2038); oC_Expression(); } @@ -12579,7 +12684,7 @@ size_t CypherParser::OC_DeleteContext::getRuleIndex() const { CypherParser::OC_DeleteContext* CypherParser::oC_Delete() { OC_DeleteContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 216, CypherParser::RuleOC_Delete); + enterRule(_localctx, 218, CypherParser::RuleOC_Delete); size_t _la = 0; #if __cplusplus > 201703L @@ -12592,57 +12697,57 @@ CypherParser::OC_DeleteContext* CypherParser::oC_Delete() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(2025); + setState(2042); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::DETACH) { - setState(2023); + setState(2040); match(CypherParser::DETACH); - setState(2024); + setState(2041); match(CypherParser::SP); } - setState(2027); + setState(2044); match(CypherParser::DELETE); - setState(2029); + setState(2046); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2028); + setState(2045); match(CypherParser::SP); } - setState(2031); + setState(2048); oC_Expression(); - setState(2042); + setState(2059); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 296, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 299, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(2033); + setState(2050); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2032); + setState(2049); match(CypherParser::SP); } - setState(2035); + setState(2052); match(CypherParser::T__3); - setState(2037); + setState(2054); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2036); + setState(2053); match(CypherParser::SP); } - setState(2039); + setState(2056); oC_Expression(); } - setState(2044); + setState(2061); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 296, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 299, _ctx); } } @@ -12685,7 +12790,7 @@ size_t CypherParser::OC_WithContext::getRuleIndex() const { CypherParser::OC_WithContext* CypherParser::oC_With() { OC_WithContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 218, CypherParser::RuleOC_With); + enterRule(_localctx, 220, CypherParser::RuleOC_With); size_t _la = 0; #if __cplusplus > 201703L @@ -12697,24 +12802,24 @@ CypherParser::OC_WithContext* CypherParser::oC_With() { }); try { enterOuterAlt(_localctx, 1); - setState(2045); + setState(2062); match(CypherParser::WITH); - setState(2046); + setState(2063); oC_ProjectionBody(); - setState(2051); + setState(2068); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 298, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 301, _ctx)) { case 1: { - setState(2048); + setState(2065); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2047); + setState(2064); match(CypherParser::SP); } - setState(2050); + setState(2067); oC_Where(); break; } @@ -12755,7 +12860,7 @@ size_t CypherParser::OC_ReturnContext::getRuleIndex() const { CypherParser::OC_ReturnContext* CypherParser::oC_Return() { OC_ReturnContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 220, CypherParser::RuleOC_Return); + enterRule(_localctx, 222, CypherParser::RuleOC_Return); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -12766,9 +12871,9 @@ CypherParser::OC_ReturnContext* CypherParser::oC_Return() { }); try { enterOuterAlt(_localctx, 1); - setState(2053); + setState(2070); match(CypherParser::RETURN); - setState(2054); + setState(2071); oC_ProjectionBody(); } @@ -12823,7 +12928,7 @@ size_t CypherParser::OC_ProjectionBodyContext::getRuleIndex() const { CypherParser::OC_ProjectionBodyContext* CypherParser::oC_ProjectionBody() { OC_ProjectionBodyContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 222, CypherParser::RuleOC_ProjectionBody); + enterRule(_localctx, 224, CypherParser::RuleOC_ProjectionBody); size_t _la = 0; #if __cplusplus > 201703L @@ -12835,20 +12940,20 @@ CypherParser::OC_ProjectionBodyContext* CypherParser::oC_ProjectionBody() { }); try { enterOuterAlt(_localctx, 1); - setState(2060); + setState(2077); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 300, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 303, _ctx)) { case 1: { - setState(2057); + setState(2074); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2056); + setState(2073); match(CypherParser::SP); } - setState(2059); + setState(2076); match(CypherParser::DISTINCT); break; } @@ -12856,18 +12961,18 @@ CypherParser::OC_ProjectionBodyContext* CypherParser::oC_ProjectionBody() { default: break; } - setState(2062); + setState(2079); match(CypherParser::SP); - setState(2063); + setState(2080); oC_ProjectionItems(); - setState(2066); + setState(2083); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 301, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 304, _ctx)) { case 1: { - setState(2064); + setState(2081); match(CypherParser::SP); - setState(2065); + setState(2082); oC_Order(); break; } @@ -12875,14 +12980,14 @@ CypherParser::OC_ProjectionBodyContext* CypherParser::oC_ProjectionBody() { default: break; } - setState(2070); + setState(2087); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 302, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 305, _ctx)) { case 1: { - setState(2068); + setState(2085); match(CypherParser::SP); - setState(2069); + setState(2086); oC_Skip(); break; } @@ -12890,14 +12995,14 @@ CypherParser::OC_ProjectionBodyContext* CypherParser::oC_ProjectionBody() { default: break; } - setState(2074); + setState(2091); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 303, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 306, _ctx)) { case 1: { - setState(2072); + setState(2089); match(CypherParser::SP); - setState(2073); + setState(2090); oC_Limit(); break; } @@ -12950,7 +13055,7 @@ size_t CypherParser::OC_ProjectionItemsContext::getRuleIndex() const { CypherParser::OC_ProjectionItemsContext* CypherParser::oC_ProjectionItems() { OC_ProjectionItemsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 224, CypherParser::RuleOC_ProjectionItems); + enterRule(_localctx, 226, CypherParser::RuleOC_ProjectionItems); size_t _la = 0; #if __cplusplus > 201703L @@ -12962,42 +13067,42 @@ CypherParser::OC_ProjectionItemsContext* CypherParser::oC_ProjectionItems() { }); try { size_t alt; - setState(2104); + setState(2121); _errHandler->sync(this); switch (_input->LA(1)) { case CypherParser::STAR: { enterOuterAlt(_localctx, 1); - setState(2076); + setState(2093); match(CypherParser::STAR); - setState(2087); + setState(2104); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 306, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 309, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(2078); + setState(2095); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2077); + setState(2094); match(CypherParser::SP); } - setState(2080); + setState(2097); match(CypherParser::T__3); - setState(2082); + setState(2099); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2081); + setState(2098); match(CypherParser::SP); } - setState(2084); + setState(2101); oC_ProjectionItem(); } - setState(2089); + setState(2106); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 306, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 309, _ctx); } break; } @@ -13044,6 +13149,7 @@ CypherParser::OC_ProjectionItemsContext* CypherParser::oC_ProjectionItems() { case CypherParser::IS: case CypherParser::KEY: case CypherParser::LIMIT: + case CypherParser::LIST: case CypherParser::LOAD: case CypherParser::LOGICAL: case CypherParser::MATCH: @@ -13093,37 +13199,37 @@ CypherParser::OC_ProjectionItemsContext* CypherParser::oC_ProjectionItems() { case CypherParser::UnescapedSymbolicName: case CypherParser::EscapedSymbolicName: { enterOuterAlt(_localctx, 2); - setState(2090); + setState(2107); oC_ProjectionItem(); - setState(2101); + setState(2118); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 309, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 312, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(2092); + setState(2109); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2091); + setState(2108); match(CypherParser::SP); } - setState(2094); + setState(2111); match(CypherParser::T__3); - setState(2096); + setState(2113); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2095); + setState(2112); match(CypherParser::SP); } - setState(2098); + setState(2115); oC_ProjectionItem(); } - setState(2103); + setState(2120); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 309, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 312, _ctx); } break; } @@ -13176,7 +13282,7 @@ size_t CypherParser::OC_ProjectionItemContext::getRuleIndex() const { CypherParser::OC_ProjectionItemContext* CypherParser::oC_ProjectionItem() { OC_ProjectionItemContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 226, CypherParser::RuleOC_ProjectionItem); + enterRule(_localctx, 228, CypherParser::RuleOC_ProjectionItem); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -13186,27 +13292,27 @@ CypherParser::OC_ProjectionItemContext* CypherParser::oC_ProjectionItem() { exitRule(); }); try { - setState(2113); + setState(2130); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 311, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 314, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(2106); + setState(2123); oC_Expression(); - setState(2107); + setState(2124); match(CypherParser::SP); - setState(2108); + setState(2125); match(CypherParser::AS); - setState(2109); + setState(2126); match(CypherParser::SP); - setState(2110); + setState(2127); oC_Variable(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(2112); + setState(2129); oC_Expression(); break; } @@ -13263,7 +13369,7 @@ size_t CypherParser::OC_OrderContext::getRuleIndex() const { CypherParser::OC_OrderContext* CypherParser::oC_Order() { OC_OrderContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 228, CypherParser::RuleOC_Order); + enterRule(_localctx, 230, CypherParser::RuleOC_Order); size_t _la = 0; #if __cplusplus > 201703L @@ -13275,33 +13381,33 @@ CypherParser::OC_OrderContext* CypherParser::oC_Order() { }); try { enterOuterAlt(_localctx, 1); - setState(2115); + setState(2132); match(CypherParser::ORDER); - setState(2116); + setState(2133); match(CypherParser::SP); - setState(2117); + setState(2134); match(CypherParser::BY); - setState(2118); + setState(2135); match(CypherParser::SP); - setState(2119); + setState(2136); oC_SortItem(); - setState(2127); + setState(2144); _errHandler->sync(this); _la = _input->LA(1); while (_la == CypherParser::T__3) { - setState(2120); + setState(2137); match(CypherParser::T__3); - setState(2122); + setState(2139); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2121); + setState(2138); match(CypherParser::SP); } - setState(2124); + setState(2141); oC_SortItem(); - setState(2129); + setState(2146); _errHandler->sync(this); _la = _input->LA(1); } @@ -13342,7 +13448,7 @@ size_t CypherParser::OC_SkipContext::getRuleIndex() const { CypherParser::OC_SkipContext* CypherParser::oC_Skip() { OC_SkipContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 230, CypherParser::RuleOC_Skip); + enterRule(_localctx, 232, CypherParser::RuleOC_Skip); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -13353,11 +13459,11 @@ CypherParser::OC_SkipContext* CypherParser::oC_Skip() { }); try { enterOuterAlt(_localctx, 1); - setState(2130); + setState(2147); match(CypherParser::L_SKIP); - setState(2131); + setState(2148); match(CypherParser::SP); - setState(2132); + setState(2149); oC_Expression(); } @@ -13396,7 +13502,7 @@ size_t CypherParser::OC_LimitContext::getRuleIndex() const { CypherParser::OC_LimitContext* CypherParser::oC_Limit() { OC_LimitContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 232, CypherParser::RuleOC_Limit); + enterRule(_localctx, 234, CypherParser::RuleOC_Limit); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -13407,11 +13513,11 @@ CypherParser::OC_LimitContext* CypherParser::oC_Limit() { }); try { enterOuterAlt(_localctx, 1); - setState(2134); + setState(2151); match(CypherParser::LIMIT); - setState(2135); + setState(2152); match(CypherParser::SP); - setState(2136); + setState(2153); oC_Expression(); } @@ -13462,7 +13568,7 @@ size_t CypherParser::OC_SortItemContext::getRuleIndex() const { CypherParser::OC_SortItemContext* CypherParser::oC_SortItem() { OC_SortItemContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 234, CypherParser::RuleOC_SortItem); + enterRule(_localctx, 236, CypherParser::RuleOC_SortItem); size_t _la = 0; #if __cplusplus > 201703L @@ -13474,22 +13580,22 @@ CypherParser::OC_SortItemContext* CypherParser::oC_SortItem() { }); try { enterOuterAlt(_localctx, 1); - setState(2138); + setState(2155); oC_Expression(); - setState(2143); + setState(2160); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 315, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 318, _ctx)) { case 1: { - setState(2140); + setState(2157); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2139); + setState(2156); match(CypherParser::SP); } - setState(2142); + setState(2159); _la = _input->LA(1); if (!(((((_la - 53) & ~ 0x3fULL) == 0) && ((1ULL << (_la - 53)) & 25165827) != 0))) { @@ -13542,7 +13648,7 @@ size_t CypherParser::OC_WhereContext::getRuleIndex() const { CypherParser::OC_WhereContext* CypherParser::oC_Where() { OC_WhereContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 236, CypherParser::RuleOC_Where); + enterRule(_localctx, 238, CypherParser::RuleOC_Where); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -13553,11 +13659,11 @@ CypherParser::OC_WhereContext* CypherParser::oC_Where() { }); try { enterOuterAlt(_localctx, 1); - setState(2145); + setState(2162); match(CypherParser::WHERE); - setState(2146); + setState(2163); match(CypherParser::SP); - setState(2147); + setState(2164); oC_Expression(); } @@ -13600,7 +13706,7 @@ size_t CypherParser::OC_PatternContext::getRuleIndex() const { CypherParser::OC_PatternContext* CypherParser::oC_Pattern() { OC_PatternContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 238, CypherParser::RuleOC_Pattern); + enterRule(_localctx, 240, CypherParser::RuleOC_Pattern); size_t _la = 0; #if __cplusplus > 201703L @@ -13613,37 +13719,37 @@ CypherParser::OC_PatternContext* CypherParser::oC_Pattern() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(2149); + setState(2166); oC_PatternPart(); - setState(2160); + setState(2177); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 318, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 321, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(2151); + setState(2168); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2150); + setState(2167); match(CypherParser::SP); } - setState(2153); + setState(2170); match(CypherParser::T__3); - setState(2155); + setState(2172); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2154); + setState(2171); match(CypherParser::SP); } - setState(2157); + setState(2174); oC_PatternPart(); } - setState(2162); + setState(2179); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 318, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 321, _ctx); } } @@ -13686,7 +13792,7 @@ size_t CypherParser::OC_PatternPartContext::getRuleIndex() const { CypherParser::OC_PatternPartContext* CypherParser::oC_PatternPart() { OC_PatternPartContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 240, CypherParser::RuleOC_PatternPart); + enterRule(_localctx, 242, CypherParser::RuleOC_PatternPart); size_t _la = 0; #if __cplusplus > 201703L @@ -13697,7 +13803,7 @@ CypherParser::OC_PatternPartContext* CypherParser::oC_PatternPart() { exitRule(); }); try { - setState(2174); + setState(2191); _errHandler->sync(this); switch (_input->LA(1)) { case CypherParser::ADD: @@ -13732,6 +13838,7 @@ CypherParser::OC_PatternPartContext* CypherParser::oC_PatternPart() { case CypherParser::IS: case CypherParser::KEY: case CypherParser::LIMIT: + case CypherParser::LIST: case CypherParser::LOAD: case CypherParser::LOGICAL: case CypherParser::MATCH: @@ -13771,34 +13878,34 @@ CypherParser::OC_PatternPartContext* CypherParser::oC_PatternPart() { case CypherParser::UnescapedSymbolicName: case CypherParser::EscapedSymbolicName: { enterOuterAlt(_localctx, 1); - setState(2163); + setState(2180); oC_Variable(); - setState(2165); + setState(2182); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2164); + setState(2181); match(CypherParser::SP); } - setState(2167); + setState(2184); match(CypherParser::T__5); - setState(2169); + setState(2186); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2168); + setState(2185); match(CypherParser::SP); } - setState(2171); + setState(2188); oC_AnonymousPatternPart(); break; } case CypherParser::T__1: { enterOuterAlt(_localctx, 2); - setState(2173); + setState(2190); oC_AnonymousPatternPart(); break; } @@ -13835,7 +13942,7 @@ size_t CypherParser::OC_AnonymousPatternPartContext::getRuleIndex() const { CypherParser::OC_AnonymousPatternPartContext* CypherParser::oC_AnonymousPatternPart() { OC_AnonymousPatternPartContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 242, CypherParser::RuleOC_AnonymousPatternPart); + enterRule(_localctx, 244, CypherParser::RuleOC_AnonymousPatternPart); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -13846,7 +13953,7 @@ CypherParser::OC_AnonymousPatternPartContext* CypherParser::oC_AnonymousPatternP }); try { enterOuterAlt(_localctx, 1); - setState(2176); + setState(2193); oC_PatternElement(); } @@ -13897,7 +14004,7 @@ size_t CypherParser::OC_PatternElementContext::getRuleIndex() const { CypherParser::OC_PatternElementContext* CypherParser::oC_PatternElement() { OC_PatternElementContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 244, CypherParser::RuleOC_PatternElement); + enterRule(_localctx, 246, CypherParser::RuleOC_PatternElement); size_t _la = 0; #if __cplusplus > 201703L @@ -13909,43 +14016,43 @@ CypherParser::OC_PatternElementContext* CypherParser::oC_PatternElement() { }); try { size_t alt; - setState(2192); + setState(2209); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 324, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 327, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(2178); + setState(2195); oC_NodePattern(); - setState(2185); + setState(2202); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 323, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 326, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(2180); + setState(2197); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2179); + setState(2196); match(CypherParser::SP); } - setState(2182); + setState(2199); oC_PatternElementChain(); } - setState(2187); + setState(2204); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 323, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 326, _ctx); } break; } case 2: { enterOuterAlt(_localctx, 2); - setState(2188); + setState(2205); match(CypherParser::T__1); - setState(2189); + setState(2206); oC_PatternElement(); - setState(2190); + setState(2207); match(CypherParser::T__2); break; } @@ -13998,7 +14105,7 @@ size_t CypherParser::OC_NodePatternContext::getRuleIndex() const { CypherParser::OC_NodePatternContext* CypherParser::oC_NodePattern() { OC_NodePatternContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 246, CypherParser::RuleOC_NodePattern); + enterRule(_localctx, 248, CypherParser::RuleOC_NodePattern); size_t _la = 0; #if __cplusplus > 201703L @@ -14010,68 +14117,68 @@ CypherParser::OC_NodePatternContext* CypherParser::oC_NodePattern() { }); try { enterOuterAlt(_localctx, 1); - setState(2194); + setState(2211); match(CypherParser::T__1); - setState(2196); + setState(2213); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2195); + setState(2212); match(CypherParser::SP); } - setState(2202); + setState(2219); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & -6370763885380632576) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 15689294993770909) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 129)) & -8065933754466937985) != 0)) { - setState(2198); + ((1ULL << (_la - 64)) & 31381524945389981) != 0) || ((((_la - 130) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 130)) & -8065933754466937985) != 0)) { + setState(2215); oC_Variable(); - setState(2200); + setState(2217); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2199); + setState(2216); match(CypherParser::SP); } } - setState(2208); + setState(2225); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::COLON) { - setState(2204); + setState(2221); oC_NodeLabels(); - setState(2206); + setState(2223); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2205); + setState(2222); match(CypherParser::SP); } } - setState(2214); + setState(2231); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::T__8) { - setState(2210); + setState(2227); iC_Properties(); - setState(2212); + setState(2229); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2211); + setState(2228); match(CypherParser::SP); } } - setState(2216); + setState(2233); match(CypherParser::T__2); } @@ -14110,7 +14217,7 @@ size_t CypherParser::OC_PatternElementChainContext::getRuleIndex() const { CypherParser::OC_PatternElementChainContext* CypherParser::oC_PatternElementChain() { OC_PatternElementChainContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 248, CypherParser::RuleOC_PatternElementChain); + enterRule(_localctx, 250, CypherParser::RuleOC_PatternElementChain); size_t _la = 0; #if __cplusplus > 201703L @@ -14122,17 +14229,17 @@ CypherParser::OC_PatternElementChainContext* CypherParser::oC_PatternElementChai }); try { enterOuterAlt(_localctx, 1); - setState(2218); + setState(2235); oC_RelationshipPattern(); - setState(2220); + setState(2237); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2219); + setState(2236); match(CypherParser::SP); } - setState(2222); + setState(2239); oC_NodePattern(); } @@ -14187,7 +14294,7 @@ size_t CypherParser::OC_RelationshipPatternContext::getRuleIndex() const { CypherParser::OC_RelationshipPatternContext* CypherParser::oC_RelationshipPattern() { OC_RelationshipPatternContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 250, CypherParser::RuleOC_RelationshipPattern); + enterRule(_localctx, 252, CypherParser::RuleOC_RelationshipPattern); size_t _la = 0; #if __cplusplus > 201703L @@ -14198,29 +14305,29 @@ CypherParser::OC_RelationshipPatternContext* CypherParser::oC_RelationshipPatter exitRule(); }); try { - setState(2268); + setState(2285); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 344, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 347, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(2224); + setState(2241); oC_LeftArrowHead(); - setState(2226); + setState(2243); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2225); + setState(2242); match(CypherParser::SP); } - setState(2228); + setState(2245); oC_Dash(); - setState(2230); + setState(2247); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 334, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 337, _ctx)) { case 1: { - setState(2229); + setState(2246); match(CypherParser::SP); break; } @@ -14228,37 +14335,37 @@ CypherParser::OC_RelationshipPatternContext* CypherParser::oC_RelationshipPatter default: break; } - setState(2233); + setState(2250); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::T__6) { - setState(2232); + setState(2249); oC_RelationshipDetail(); } - setState(2236); + setState(2253); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2235); + setState(2252); match(CypherParser::SP); } - setState(2238); + setState(2255); oC_Dash(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(2240); + setState(2257); oC_Dash(); - setState(2242); + setState(2259); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 337, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 340, _ctx)) { case 1: { - setState(2241); + setState(2258); match(CypherParser::SP); break; } @@ -14266,47 +14373,47 @@ CypherParser::OC_RelationshipPatternContext* CypherParser::oC_RelationshipPatter default: break; } - setState(2245); + setState(2262); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::T__6) { - setState(2244); + setState(2261); oC_RelationshipDetail(); } - setState(2248); + setState(2265); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2247); + setState(2264); match(CypherParser::SP); } - setState(2250); + setState(2267); oC_Dash(); - setState(2252); + setState(2269); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2251); + setState(2268); match(CypherParser::SP); } - setState(2254); + setState(2271); oC_RightArrowHead(); break; } case 3: { enterOuterAlt(_localctx, 3); - setState(2256); + setState(2273); oC_Dash(); - setState(2258); + setState(2275); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 341, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 344, _ctx)) { case 1: { - setState(2257); + setState(2274); match(CypherParser::SP); break; } @@ -14314,23 +14421,23 @@ CypherParser::OC_RelationshipPatternContext* CypherParser::oC_RelationshipPatter default: break; } - setState(2261); + setState(2278); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::T__6) { - setState(2260); + setState(2277); oC_RelationshipDetail(); } - setState(2264); + setState(2281); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2263); + setState(2280); match(CypherParser::SP); } - setState(2266); + setState(2283); oC_Dash(); break; } @@ -14387,7 +14494,7 @@ size_t CypherParser::OC_RelationshipDetailContext::getRuleIndex() const { CypherParser::OC_RelationshipDetailContext* CypherParser::oC_RelationshipDetail() { OC_RelationshipDetailContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 252, CypherParser::RuleOC_RelationshipDetail); + enterRule(_localctx, 254, CypherParser::RuleOC_RelationshipDetail); size_t _la = 0; #if __cplusplus > 201703L @@ -14399,84 +14506,84 @@ CypherParser::OC_RelationshipDetailContext* CypherParser::oC_RelationshipDetail( }); try { enterOuterAlt(_localctx, 1); - setState(2270); + setState(2287); match(CypherParser::T__6); - setState(2272); + setState(2289); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2271); + setState(2288); match(CypherParser::SP); } - setState(2278); + setState(2295); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & -6370763885380632576) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 15689294993770909) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 129)) & -8065933754466937985) != 0)) { - setState(2274); + ((1ULL << (_la - 64)) & 31381524945389981) != 0) || ((((_la - 130) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 130)) & -8065933754466937985) != 0)) { + setState(2291); oC_Variable(); - setState(2276); + setState(2293); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2275); + setState(2292); match(CypherParser::SP); } } - setState(2284); + setState(2301); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::COLON) { - setState(2280); + setState(2297); oC_RelationshipTypes(); - setState(2282); + setState(2299); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2281); + setState(2298); match(CypherParser::SP); } } - setState(2290); + setState(2307); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::STAR) { - setState(2286); + setState(2303); iC_RecursiveDetail(); - setState(2288); + setState(2305); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2287); + setState(2304); match(CypherParser::SP); } } - setState(2296); + setState(2313); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::T__8) { - setState(2292); + setState(2309); iC_Properties(); - setState(2294); + setState(2311); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2293); + setState(2310); match(CypherParser::SP); } } - setState(2298); + setState(2315); match(CypherParser::T__7); } @@ -14535,7 +14642,7 @@ size_t CypherParser::IC_PropertiesContext::getRuleIndex() const { CypherParser::IC_PropertiesContext* CypherParser::iC_Properties() { IC_PropertiesContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 254, CypherParser::RuleIC_Properties); + enterRule(_localctx, 256, CypherParser::RuleIC_Properties); size_t _la = 0; #if __cplusplus > 201703L @@ -14547,104 +14654,104 @@ CypherParser::IC_PropertiesContext* CypherParser::iC_Properties() { }); try { enterOuterAlt(_localctx, 1); - setState(2300); + setState(2317); match(CypherParser::T__8); - setState(2302); + setState(2319); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2301); + setState(2318); match(CypherParser::SP); } - setState(2337); + setState(2354); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & -6370763885380632576) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 15689294993770909) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 129)) & -8065933754466937985) != 0)) { - setState(2304); + ((1ULL << (_la - 64)) & 31381524945389981) != 0) || ((((_la - 130) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 130)) & -8065933754466937985) != 0)) { + setState(2321); oC_PropertyKeyName(); - setState(2306); + setState(2323); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2305); + setState(2322); match(CypherParser::SP); } - setState(2308); + setState(2325); match(CypherParser::COLON); - setState(2310); + setState(2327); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2309); + setState(2326); match(CypherParser::SP); } - setState(2312); + setState(2329); oC_Expression(); - setState(2314); + setState(2331); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2313); + setState(2330); match(CypherParser::SP); } - setState(2334); + setState(2351); _errHandler->sync(this); _la = _input->LA(1); while (_la == CypherParser::T__3) { - setState(2316); + setState(2333); match(CypherParser::T__3); - setState(2318); + setState(2335); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2317); + setState(2334); match(CypherParser::SP); } - setState(2320); + setState(2337); oC_PropertyKeyName(); - setState(2322); + setState(2339); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2321); + setState(2338); match(CypherParser::SP); } - setState(2324); + setState(2341); match(CypherParser::COLON); - setState(2326); + setState(2343); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2325); + setState(2342); match(CypherParser::SP); } - setState(2328); + setState(2345); oC_Expression(); - setState(2330); + setState(2347); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2329); + setState(2346); match(CypherParser::SP); } - setState(2336); + setState(2353); _errHandler->sync(this); _la = _input->LA(1); } } - setState(2339); + setState(2356); match(CypherParser::T__9); } @@ -14695,7 +14802,7 @@ size_t CypherParser::OC_RelationshipTypesContext::getRuleIndex() const { CypherParser::OC_RelationshipTypesContext* CypherParser::oC_RelationshipTypes() { OC_RelationshipTypesContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 256, CypherParser::RuleOC_RelationshipTypes); + enterRule(_localctx, 258, CypherParser::RuleOC_RelationshipTypes); size_t _la = 0; #if __cplusplus > 201703L @@ -14708,55 +14815,55 @@ CypherParser::OC_RelationshipTypesContext* CypherParser::oC_RelationshipTypes() try { size_t alt; enterOuterAlt(_localctx, 1); - setState(2341); + setState(2358); match(CypherParser::COLON); - setState(2343); + setState(2360); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2342); + setState(2359); match(CypherParser::SP); } - setState(2345); + setState(2362); oC_RelTypeName(); - setState(2359); + setState(2376); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 368, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 371, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(2347); + setState(2364); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2346); + setState(2363); match(CypherParser::SP); } - setState(2349); + setState(2366); match(CypherParser::T__10); - setState(2351); + setState(2368); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::COLON) { - setState(2350); + setState(2367); match(CypherParser::COLON); } - setState(2354); + setState(2371); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2353); + setState(2370); match(CypherParser::SP); } - setState(2356); + setState(2373); oC_RelTypeName(); } - setState(2361); + setState(2378); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 368, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 371, _ctx); } } @@ -14807,7 +14914,7 @@ size_t CypherParser::OC_NodeLabelsContext::getRuleIndex() const { CypherParser::OC_NodeLabelsContext* CypherParser::oC_NodeLabels() { OC_NodeLabelsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 258, CypherParser::RuleOC_NodeLabels); + enterRule(_localctx, 260, CypherParser::RuleOC_NodeLabels); size_t _la = 0; #if __cplusplus > 201703L @@ -14820,50 +14927,50 @@ CypherParser::OC_NodeLabelsContext* CypherParser::oC_NodeLabels() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(2362); + setState(2379); match(CypherParser::COLON); - setState(2364); + setState(2381); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2363); + setState(2380); match(CypherParser::SP); } - setState(2366); - oC_LabelName(); setState(2383); + oC_LabelName(); + setState(2400); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 374, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 377, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(2368); + setState(2385); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2367); + setState(2384); match(CypherParser::SP); } - setState(2375); + setState(2392); _errHandler->sync(this); switch (_input->LA(1)) { case CypherParser::T__10: { - setState(2370); + setState(2387); match(CypherParser::T__10); - setState(2372); + setState(2389); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::COLON) { - setState(2371); + setState(2388); match(CypherParser::COLON); } break; } case CypherParser::COLON: { - setState(2374); + setState(2391); match(CypherParser::COLON); break; } @@ -14871,20 +14978,20 @@ CypherParser::OC_NodeLabelsContext* CypherParser::oC_NodeLabels() { default: throw NoViableAltException(this); } - setState(2378); + setState(2395); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2377); + setState(2394); match(CypherParser::SP); } - setState(2380); + setState(2397); oC_LabelName(); } - setState(2385); + setState(2402); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 374, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 377, _ctx); } } @@ -14935,7 +15042,7 @@ size_t CypherParser::IC_RecursiveDetailContext::getRuleIndex() const { CypherParser::IC_RecursiveDetailContext* CypherParser::iC_RecursiveDetail() { IC_RecursiveDetailContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 260, CypherParser::RuleIC_RecursiveDetail); + enterRule(_localctx, 262, CypherParser::RuleIC_RecursiveDetail); size_t _la = 0; #if __cplusplus > 201703L @@ -14947,22 +15054,22 @@ CypherParser::IC_RecursiveDetailContext* CypherParser::iC_RecursiveDetail() { }); try { enterOuterAlt(_localctx, 1); - setState(2386); + setState(2403); match(CypherParser::STAR); - setState(2391); + setState(2408); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 376, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 379, _ctx)) { case 1: { - setState(2388); + setState(2405); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2387); + setState(2404); match(CypherParser::SP); } - setState(2390); + setState(2407); iC_RecursiveType(); break; } @@ -14970,17 +15077,17 @@ CypherParser::IC_RecursiveDetailContext* CypherParser::iC_RecursiveDetail() { default: break; } - setState(2397); + setState(2414); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 378, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 381, _ctx)) { case 1: { - setState(2394); + setState(2411); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 377, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 380, _ctx)) { case 1: { - setState(2393); + setState(2410); match(CypherParser::SP); break; } @@ -14988,7 +15095,7 @@ CypherParser::IC_RecursiveDetailContext* CypherParser::iC_RecursiveDetail() { default: break; } - setState(2396); + setState(2413); oC_RangeLiteral(); break; } @@ -14996,20 +15103,20 @@ CypherParser::IC_RecursiveDetailContext* CypherParser::iC_RecursiveDetail() { default: break; } - setState(2403); + setState(2420); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 380, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 383, _ctx)) { case 1: { - setState(2400); + setState(2417); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2399); + setState(2416); match(CypherParser::SP); } - setState(2402); + setState(2419); iC_RecursiveComprehension(); break; } @@ -15074,7 +15181,7 @@ size_t CypherParser::IC_RecursiveTypeContext::getRuleIndex() const { CypherParser::IC_RecursiveTypeContext* CypherParser::iC_RecursiveType() { IC_RecursiveTypeContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 262, CypherParser::RuleIC_RecursiveType); + enterRule(_localctx, 264, CypherParser::RuleIC_RecursiveType); size_t _la = 0; #if __cplusplus > 201703L @@ -15085,84 +15192,84 @@ CypherParser::IC_RecursiveTypeContext* CypherParser::iC_RecursiveType() { exitRule(); }); try { - setState(2429); + setState(2446); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 385, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 388, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(2407); + setState(2424); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::ALL) { - setState(2405); + setState(2422); match(CypherParser::ALL); - setState(2406); + setState(2423); match(CypherParser::SP); } - setState(2409); + setState(2426); match(CypherParser::WSHORTEST); - setState(2411); + setState(2428); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2410); + setState(2427); match(CypherParser::SP); } - setState(2413); + setState(2430); match(CypherParser::T__1); - setState(2415); + setState(2432); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2414); + setState(2431); match(CypherParser::SP); } - setState(2417); + setState(2434); oC_PropertyKeyName(); - setState(2419); + setState(2436); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2418); + setState(2435); match(CypherParser::SP); } - setState(2421); + setState(2438); match(CypherParser::T__2); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(2423); + setState(2440); match(CypherParser::SHORTEST); break; } case 3: { enterOuterAlt(_localctx, 3); - setState(2424); + setState(2441); match(CypherParser::ALL); - setState(2425); + setState(2442); match(CypherParser::SP); - setState(2426); + setState(2443); match(CypherParser::SHORTEST); break; } case 4: { enterOuterAlt(_localctx, 4); - setState(2427); + setState(2444); match(CypherParser::TRAIL); break; } case 5: { enterOuterAlt(_localctx, 5); - setState(2428); + setState(2445); match(CypherParser::ACYCLIC); break; } @@ -15219,7 +15326,7 @@ size_t CypherParser::OC_RangeLiteralContext::getRuleIndex() const { CypherParser::OC_RangeLiteralContext* CypherParser::oC_RangeLiteral() { OC_RangeLiteralContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 264, CypherParser::RuleOC_RangeLiteral); + enterRule(_localctx, 266, CypherParser::RuleOC_RangeLiteral); size_t _la = 0; #if __cplusplus > 201703L @@ -15230,35 +15337,35 @@ CypherParser::OC_RangeLiteralContext* CypherParser::oC_RangeLiteral() { exitRule(); }); try { - setState(2445); + setState(2462); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 390, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 393, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(2432); + setState(2449); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::DecimalInteger) { - setState(2431); + setState(2448); oC_LowerBound(); } - setState(2435); + setState(2452); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2434); + setState(2451); match(CypherParser::SP); } - setState(2437); + setState(2454); match(CypherParser::DOTDOT); - setState(2439); + setState(2456); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 388, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 391, _ctx)) { case 1: { - setState(2438); + setState(2455); match(CypherParser::SP); break; } @@ -15266,12 +15373,12 @@ CypherParser::OC_RangeLiteralContext* CypherParser::oC_RangeLiteral() { default: break; } - setState(2442); + setState(2459); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::DecimalInteger) { - setState(2441); + setState(2458); oC_UpperBound(); } break; @@ -15279,7 +15386,7 @@ CypherParser::OC_RangeLiteralContext* CypherParser::oC_RangeLiteral() { case 2: { enterOuterAlt(_localctx, 2); - setState(2444); + setState(2461); oC_IntegerLiteral(); break; } @@ -15340,7 +15447,7 @@ size_t CypherParser::IC_RecursiveComprehensionContext::getRuleIndex() const { CypherParser::IC_RecursiveComprehensionContext* CypherParser::iC_RecursiveComprehension() { IC_RecursiveComprehensionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 266, CypherParser::RuleIC_RecursiveComprehension); + enterRule(_localctx, 268, CypherParser::RuleIC_RecursiveComprehension); size_t _la = 0; #if __cplusplus > 201703L @@ -15352,69 +15459,69 @@ CypherParser::IC_RecursiveComprehensionContext* CypherParser::iC_RecursiveCompre }); try { enterOuterAlt(_localctx, 1); - setState(2447); + setState(2464); match(CypherParser::T__1); - setState(2449); + setState(2466); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2448); + setState(2465); match(CypherParser::SP); } - setState(2451); + setState(2468); oC_Variable(); - setState(2453); + setState(2470); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2452); + setState(2469); match(CypherParser::SP); } - setState(2455); + setState(2472); match(CypherParser::T__3); - setState(2457); + setState(2474); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2456); + setState(2473); match(CypherParser::SP); } - setState(2459); + setState(2476); oC_Variable(); - setState(2471); + setState(2488); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 397, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 400, _ctx)) { case 1: { - setState(2461); + setState(2478); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2460); + setState(2477); match(CypherParser::SP); } - setState(2463); + setState(2480); match(CypherParser::T__10); - setState(2465); + setState(2482); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2464); + setState(2481); match(CypherParser::SP); } - setState(2467); + setState(2484); oC_Where(); - setState(2469); + setState(2486); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 396, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 399, _ctx)) { case 1: { - setState(2468); + setState(2485); match(CypherParser::SP); break; } @@ -15428,61 +15535,61 @@ CypherParser::IC_RecursiveComprehensionContext* CypherParser::iC_RecursiveCompre default: break; } - setState(2492); + setState(2509); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::T__10 || _la == CypherParser::SP) { - setState(2474); + setState(2491); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2473); + setState(2490); match(CypherParser::SP); } - setState(2476); + setState(2493); match(CypherParser::T__10); - setState(2478); + setState(2495); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2477); + setState(2494); match(CypherParser::SP); } - setState(2480); + setState(2497); iC_RecursiveProjectionItems(); - setState(2482); + setState(2499); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2481); + setState(2498); match(CypherParser::SP); } - setState(2484); + setState(2501); match(CypherParser::T__3); - setState(2486); + setState(2503); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2485); + setState(2502); match(CypherParser::SP); } - setState(2488); + setState(2505); iC_RecursiveProjectionItems(); - setState(2490); + setState(2507); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2489); + setState(2506); match(CypherParser::SP); } } - setState(2494); + setState(2511); match(CypherParser::T__2); } @@ -15521,7 +15628,7 @@ size_t CypherParser::IC_RecursiveProjectionItemsContext::getRuleIndex() const { CypherParser::IC_RecursiveProjectionItemsContext* CypherParser::iC_RecursiveProjectionItems() { IC_RecursiveProjectionItemsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 268, CypherParser::RuleIC_RecursiveProjectionItems); + enterRule(_localctx, 270, CypherParser::RuleIC_RecursiveProjectionItems); size_t _la = 0; #if __cplusplus > 201703L @@ -15533,14 +15640,14 @@ CypherParser::IC_RecursiveProjectionItemsContext* CypherParser::iC_RecursiveProj }); try { enterOuterAlt(_localctx, 1); - setState(2496); + setState(2513); match(CypherParser::T__8); - setState(2498); + setState(2515); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 404, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 407, _ctx)) { case 1: { - setState(2497); + setState(2514); match(CypherParser::SP); break; } @@ -15548,26 +15655,26 @@ CypherParser::IC_RecursiveProjectionItemsContext* CypherParser::iC_RecursiveProj default: break; } - setState(2501); + setState(2518); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & -4641029784715918716) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 141790084577970589) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 129)) & -7198282732118846593) != 0)) { - setState(2500); + ((1ULL << (_la - 64)) & 283583104095963549) != 0) || ((((_la - 130) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 130)) & -7198282732118846593) != 0)) { + setState(2517); oC_ProjectionItems(); } - setState(2504); + setState(2521); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2503); + setState(2520); match(CypherParser::SP); } - setState(2506); + setState(2523); match(CypherParser::T__9); } @@ -15598,7 +15705,7 @@ size_t CypherParser::OC_LowerBoundContext::getRuleIndex() const { CypherParser::OC_LowerBoundContext* CypherParser::oC_LowerBound() { OC_LowerBoundContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 270, CypherParser::RuleOC_LowerBound); + enterRule(_localctx, 272, CypherParser::RuleOC_LowerBound); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -15609,7 +15716,7 @@ CypherParser::OC_LowerBoundContext* CypherParser::oC_LowerBound() { }); try { enterOuterAlt(_localctx, 1); - setState(2508); + setState(2525); match(CypherParser::DecimalInteger); } @@ -15640,7 +15747,7 @@ size_t CypherParser::OC_UpperBoundContext::getRuleIndex() const { CypherParser::OC_UpperBoundContext* CypherParser::oC_UpperBound() { OC_UpperBoundContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 272, CypherParser::RuleOC_UpperBound); + enterRule(_localctx, 274, CypherParser::RuleOC_UpperBound); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -15651,7 +15758,7 @@ CypherParser::OC_UpperBoundContext* CypherParser::oC_UpperBound() { }); try { enterOuterAlt(_localctx, 1); - setState(2510); + setState(2527); match(CypherParser::DecimalInteger); } @@ -15686,7 +15793,7 @@ size_t CypherParser::OC_LabelNameContext::getRuleIndex() const { CypherParser::OC_LabelNameContext* CypherParser::oC_LabelName() { OC_LabelNameContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 274, CypherParser::RuleOC_LabelName); + enterRule(_localctx, 276, CypherParser::RuleOC_LabelName); size_t _la = 0; #if __cplusplus > 201703L @@ -15698,16 +15805,16 @@ CypherParser::OC_LabelNameContext* CypherParser::oC_LabelName() { }); try { enterOuterAlt(_localctx, 1); - setState(2512); + setState(2529); oC_SchemaName(); - setState(2515); + setState(2532); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::T__4) { - setState(2513); + setState(2530); match(CypherParser::T__4); - setState(2514); + setState(2531); oC_SchemaName(); } @@ -15739,7 +15846,7 @@ size_t CypherParser::OC_RelTypeNameContext::getRuleIndex() const { CypherParser::OC_RelTypeNameContext* CypherParser::oC_RelTypeName() { OC_RelTypeNameContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 276, CypherParser::RuleOC_RelTypeName); + enterRule(_localctx, 278, CypherParser::RuleOC_RelTypeName); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -15750,7 +15857,7 @@ CypherParser::OC_RelTypeNameContext* CypherParser::oC_RelTypeName() { }); try { enterOuterAlt(_localctx, 1); - setState(2517); + setState(2534); oC_SchemaName(); } @@ -15781,7 +15888,7 @@ size_t CypherParser::OC_ExpressionContext::getRuleIndex() const { CypherParser::OC_ExpressionContext* CypherParser::oC_Expression() { OC_ExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 278, CypherParser::RuleOC_Expression); + enterRule(_localctx, 280, CypherParser::RuleOC_Expression); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -15792,7 +15899,7 @@ CypherParser::OC_ExpressionContext* CypherParser::oC_Expression() { }); try { enterOuterAlt(_localctx, 1); - setState(2519); + setState(2536); oC_OrExpression(); } @@ -15843,7 +15950,7 @@ size_t CypherParser::OC_OrExpressionContext::getRuleIndex() const { CypherParser::OC_OrExpressionContext* CypherParser::oC_OrExpression() { OC_OrExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 280, CypherParser::RuleOC_OrExpression); + enterRule(_localctx, 282, CypherParser::RuleOC_OrExpression); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -15855,25 +15962,25 @@ CypherParser::OC_OrExpressionContext* CypherParser::oC_OrExpression() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(2521); + setState(2538); oC_XorExpression(); - setState(2528); + setState(2545); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 408, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 411, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(2522); + setState(2539); match(CypherParser::SP); - setState(2523); + setState(2540); match(CypherParser::OR); - setState(2524); + setState(2541); match(CypherParser::SP); - setState(2525); + setState(2542); oC_XorExpression(); } - setState(2530); + setState(2547); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 408, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 411, _ctx); } } @@ -15924,7 +16031,7 @@ size_t CypherParser::OC_XorExpressionContext::getRuleIndex() const { CypherParser::OC_XorExpressionContext* CypherParser::oC_XorExpression() { OC_XorExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 282, CypherParser::RuleOC_XorExpression); + enterRule(_localctx, 284, CypherParser::RuleOC_XorExpression); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -15936,25 +16043,25 @@ CypherParser::OC_XorExpressionContext* CypherParser::oC_XorExpression() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(2531); + setState(2548); oC_AndExpression(); - setState(2538); + setState(2555); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 409, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 412, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(2532); + setState(2549); match(CypherParser::SP); - setState(2533); + setState(2550); match(CypherParser::XOR); - setState(2534); + setState(2551); match(CypherParser::SP); - setState(2535); + setState(2552); oC_AndExpression(); } - setState(2540); + setState(2557); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 409, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 412, _ctx); } } @@ -16005,7 +16112,7 @@ size_t CypherParser::OC_AndExpressionContext::getRuleIndex() const { CypherParser::OC_AndExpressionContext* CypherParser::oC_AndExpression() { OC_AndExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 284, CypherParser::RuleOC_AndExpression); + enterRule(_localctx, 286, CypherParser::RuleOC_AndExpression); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -16017,25 +16124,25 @@ CypherParser::OC_AndExpressionContext* CypherParser::oC_AndExpression() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(2541); + setState(2558); oC_NotExpression(); - setState(2548); + setState(2565); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 410, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 413, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(2542); + setState(2559); match(CypherParser::SP); - setState(2543); + setState(2560); match(CypherParser::AND); - setState(2544); + setState(2561); match(CypherParser::SP); - setState(2545); + setState(2562); oC_NotExpression(); } - setState(2550); + setState(2567); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 410, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 413, _ctx); } } @@ -16082,7 +16189,7 @@ size_t CypherParser::OC_NotExpressionContext::getRuleIndex() const { CypherParser::OC_NotExpressionContext* CypherParser::oC_NotExpression() { OC_NotExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 286, CypherParser::RuleOC_NotExpression); + enterRule(_localctx, 288, CypherParser::RuleOC_NotExpression); size_t _la = 0; #if __cplusplus > 201703L @@ -16094,25 +16201,25 @@ CypherParser::OC_NotExpressionContext* CypherParser::oC_NotExpression() { }); try { enterOuterAlt(_localctx, 1); - setState(2557); + setState(2574); _errHandler->sync(this); _la = _input->LA(1); while (_la == CypherParser::NOT) { - setState(2551); + setState(2568); match(CypherParser::NOT); - setState(2553); + setState(2570); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2552); + setState(2569); match(CypherParser::SP); } - setState(2559); + setState(2576); _errHandler->sync(this); _la = _input->LA(1); } - setState(2560); + setState(2577); oC_ComparisonExpression(); } @@ -16167,7 +16274,7 @@ size_t CypherParser::OC_ComparisonExpressionContext::getRuleIndex() const { CypherParser::OC_ComparisonExpressionContext* CypherParser::oC_ComparisonExpression() { OC_ComparisonExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 288, CypherParser::RuleOC_ComparisonExpression); + enterRule(_localctx, 290, CypherParser::RuleOC_ComparisonExpression); size_t _la = 0; #if __cplusplus > 201703L @@ -16179,37 +16286,37 @@ CypherParser::OC_ComparisonExpressionContext* CypherParser::oC_ComparisonExpress }); try { size_t alt; - setState(2610); + setState(2627); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 423, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 426, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(2562); + setState(2579); iC_BitwiseOrOperatorExpression(); - setState(2572); + setState(2589); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 415, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 418, _ctx)) { case 1: { - setState(2564); + setState(2581); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2563); + setState(2580); match(CypherParser::SP); } - setState(2566); + setState(2583); iC_ComparisonOperator(); - setState(2568); + setState(2585); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2567); + setState(2584); match(CypherParser::SP); } - setState(2570); + setState(2587); iC_BitwiseOrOperatorExpression(); break; } @@ -16222,28 +16329,28 @@ CypherParser::OC_ComparisonExpressionContext* CypherParser::oC_ComparisonExpress case 2: { enterOuterAlt(_localctx, 2); - setState(2574); + setState(2591); iC_BitwiseOrOperatorExpression(); - setState(2576); + setState(2593); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2575); + setState(2592); match(CypherParser::SP); } - setState(2578); + setState(2595); antlrcpp::downCast(_localctx)->invalid_not_equalToken = match(CypherParser::INVALID_NOT_EQUAL); - setState(2580); + setState(2597); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2579); + setState(2596); match(CypherParser::SP); } - setState(2582); + setState(2599); iC_BitwiseOrOperatorExpression(); notifyInvalidNotEqualOperator(antlrcpp::downCast(_localctx)->invalid_not_equalToken); break; @@ -16251,53 +16358,53 @@ CypherParser::OC_ComparisonExpressionContext* CypherParser::oC_ComparisonExpress case 3: { enterOuterAlt(_localctx, 3); - setState(2586); + setState(2603); iC_BitwiseOrOperatorExpression(); - setState(2588); + setState(2605); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2587); + setState(2604); match(CypherParser::SP); } - setState(2590); + setState(2607); iC_ComparisonOperator(); - setState(2592); + setState(2609); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2591); + setState(2608); match(CypherParser::SP); } - setState(2594); + setState(2611); iC_BitwiseOrOperatorExpression(); - setState(2604); + setState(2621); _errHandler->sync(this); alt = 1; do { switch (alt) { case 1: { - setState(2596); + setState(2613); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2595); + setState(2612); match(CypherParser::SP); } - setState(2598); + setState(2615); iC_ComparisonOperator(); - setState(2600); + setState(2617); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2599); + setState(2616); match(CypherParser::SP); } - setState(2602); + setState(2619); iC_BitwiseOrOperatorExpression(); break; } @@ -16305,9 +16412,9 @@ CypherParser::OC_ComparisonExpressionContext* CypherParser::oC_ComparisonExpress default: throw NoViableAltException(this); } - setState(2606); + setState(2623); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 422, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 425, _ctx); } while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER); notifyNonBinaryComparison(_localctx->start); break; @@ -16341,7 +16448,7 @@ size_t CypherParser::IC_ComparisonOperatorContext::getRuleIndex() const { CypherParser::IC_ComparisonOperatorContext* CypherParser::iC_ComparisonOperator() { IC_ComparisonOperatorContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 290, CypherParser::RuleIC_ComparisonOperator); + enterRule(_localctx, 292, CypherParser::RuleIC_ComparisonOperator); size_t _la = 0; #if __cplusplus > 201703L @@ -16353,7 +16460,7 @@ CypherParser::IC_ComparisonOperatorContext* CypherParser::iC_ComparisonOperator( }); try { enterOuterAlt(_localctx, 1); - setState(2612); + setState(2629); _la = _input->LA(1); if (!((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & 127040) != 0))) { @@ -16404,7 +16511,7 @@ size_t CypherParser::IC_BitwiseOrOperatorExpressionContext::getRuleIndex() const CypherParser::IC_BitwiseOrOperatorExpressionContext* CypherParser::iC_BitwiseOrOperatorExpression() { IC_BitwiseOrOperatorExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 292, CypherParser::RuleIC_BitwiseOrOperatorExpression); + enterRule(_localctx, 294, CypherParser::RuleIC_BitwiseOrOperatorExpression); size_t _la = 0; #if __cplusplus > 201703L @@ -16417,37 +16524,37 @@ CypherParser::IC_BitwiseOrOperatorExpressionContext* CypherParser::iC_BitwiseOrO try { size_t alt; enterOuterAlt(_localctx, 1); - setState(2614); + setState(2631); iC_BitwiseAndOperatorExpression(); - setState(2625); + setState(2642); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 426, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 429, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(2616); + setState(2633); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2615); + setState(2632); match(CypherParser::SP); } - setState(2618); + setState(2635); match(CypherParser::T__10); - setState(2620); + setState(2637); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2619); + setState(2636); match(CypherParser::SP); } - setState(2622); + setState(2639); iC_BitwiseAndOperatorExpression(); } - setState(2627); + setState(2644); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 426, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 429, _ctx); } } @@ -16490,7 +16597,7 @@ size_t CypherParser::IC_BitwiseAndOperatorExpressionContext::getRuleIndex() cons CypherParser::IC_BitwiseAndOperatorExpressionContext* CypherParser::iC_BitwiseAndOperatorExpression() { IC_BitwiseAndOperatorExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 294, CypherParser::RuleIC_BitwiseAndOperatorExpression); + enterRule(_localctx, 296, CypherParser::RuleIC_BitwiseAndOperatorExpression); size_t _la = 0; #if __cplusplus > 201703L @@ -16503,37 +16610,37 @@ CypherParser::IC_BitwiseAndOperatorExpressionContext* CypherParser::iC_BitwiseAn try { size_t alt; enterOuterAlt(_localctx, 1); - setState(2628); + setState(2645); iC_BitShiftOperatorExpression(); - setState(2639); + setState(2656); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 429, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 432, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(2630); + setState(2647); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2629); + setState(2646); match(CypherParser::SP); } - setState(2632); + setState(2649); match(CypherParser::T__16); - setState(2634); + setState(2651); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2633); + setState(2650); match(CypherParser::SP); } - setState(2636); + setState(2653); iC_BitShiftOperatorExpression(); } - setState(2641); + setState(2658); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 429, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 432, _ctx); } } @@ -16584,7 +16691,7 @@ size_t CypherParser::IC_BitShiftOperatorExpressionContext::getRuleIndex() const CypherParser::IC_BitShiftOperatorExpressionContext* CypherParser::iC_BitShiftOperatorExpression() { IC_BitShiftOperatorExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 296, CypherParser::RuleIC_BitShiftOperatorExpression); + enterRule(_localctx, 298, CypherParser::RuleIC_BitShiftOperatorExpression); size_t _la = 0; #if __cplusplus > 201703L @@ -16597,37 +16704,37 @@ CypherParser::IC_BitShiftOperatorExpressionContext* CypherParser::iC_BitShiftOpe try { size_t alt; enterOuterAlt(_localctx, 1); - setState(2642); + setState(2659); oC_AddOrSubtractExpression(); - setState(2654); + setState(2671); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 432, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 435, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(2644); + setState(2661); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2643); + setState(2660); match(CypherParser::SP); } - setState(2646); + setState(2663); iC_BitShiftOperator(); - setState(2648); + setState(2665); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2647); + setState(2664); match(CypherParser::SP); } - setState(2650); + setState(2667); oC_AddOrSubtractExpression(); } - setState(2656); + setState(2673); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 432, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 435, _ctx); } } @@ -16654,7 +16761,7 @@ size_t CypherParser::IC_BitShiftOperatorContext::getRuleIndex() const { CypherParser::IC_BitShiftOperatorContext* CypherParser::iC_BitShiftOperator() { IC_BitShiftOperatorContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 298, CypherParser::RuleIC_BitShiftOperator); + enterRule(_localctx, 300, CypherParser::RuleIC_BitShiftOperator); size_t _la = 0; #if __cplusplus > 201703L @@ -16666,7 +16773,7 @@ CypherParser::IC_BitShiftOperatorContext* CypherParser::iC_BitShiftOperator() { }); try { enterOuterAlt(_localctx, 1); - setState(2657); + setState(2674); _la = _input->LA(1); if (!(_la == CypherParser::T__17 @@ -16726,7 +16833,7 @@ size_t CypherParser::OC_AddOrSubtractExpressionContext::getRuleIndex() const { CypherParser::OC_AddOrSubtractExpressionContext* CypherParser::oC_AddOrSubtractExpression() { OC_AddOrSubtractExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 300, CypherParser::RuleOC_AddOrSubtractExpression); + enterRule(_localctx, 302, CypherParser::RuleOC_AddOrSubtractExpression); size_t _la = 0; #if __cplusplus > 201703L @@ -16739,37 +16846,37 @@ CypherParser::OC_AddOrSubtractExpressionContext* CypherParser::oC_AddOrSubtractE try { size_t alt; enterOuterAlt(_localctx, 1); - setState(2659); + setState(2676); oC_MultiplyDivideModuloExpression(); - setState(2671); + setState(2688); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 435, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 438, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(2661); + setState(2678); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2660); + setState(2677); match(CypherParser::SP); } - setState(2663); + setState(2680); iC_AddOrSubtractOperator(); - setState(2665); + setState(2682); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2664); + setState(2681); match(CypherParser::SP); } - setState(2667); + setState(2684); oC_MultiplyDivideModuloExpression(); } - setState(2673); + setState(2690); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 435, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 438, _ctx); } } @@ -16800,7 +16907,7 @@ size_t CypherParser::IC_AddOrSubtractOperatorContext::getRuleIndex() const { CypherParser::IC_AddOrSubtractOperatorContext* CypherParser::iC_AddOrSubtractOperator() { IC_AddOrSubtractOperatorContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 302, CypherParser::RuleIC_AddOrSubtractOperator); + enterRule(_localctx, 304, CypherParser::RuleIC_AddOrSubtractOperator); size_t _la = 0; #if __cplusplus > 201703L @@ -16812,7 +16919,7 @@ CypherParser::IC_AddOrSubtractOperatorContext* CypherParser::iC_AddOrSubtractOpe }); try { enterOuterAlt(_localctx, 1); - setState(2674); + setState(2691); _la = _input->LA(1); if (!(_la == CypherParser::T__19 || _la == CypherParser::MINUS)) { _errHandler->recoverInline(this); @@ -16870,7 +16977,7 @@ size_t CypherParser::OC_MultiplyDivideModuloExpressionContext::getRuleIndex() co CypherParser::OC_MultiplyDivideModuloExpressionContext* CypherParser::oC_MultiplyDivideModuloExpression() { OC_MultiplyDivideModuloExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 304, CypherParser::RuleOC_MultiplyDivideModuloExpression); + enterRule(_localctx, 306, CypherParser::RuleOC_MultiplyDivideModuloExpression); size_t _la = 0; #if __cplusplus > 201703L @@ -16883,37 +16990,37 @@ CypherParser::OC_MultiplyDivideModuloExpressionContext* CypherParser::oC_Multipl try { size_t alt; enterOuterAlt(_localctx, 1); - setState(2676); + setState(2693); oC_PowerOfExpression(); - setState(2688); + setState(2705); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 438, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 441, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(2678); + setState(2695); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2677); + setState(2694); match(CypherParser::SP); } - setState(2680); + setState(2697); iC_MultiplyDivideModuloOperator(); - setState(2682); + setState(2699); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2681); + setState(2698); match(CypherParser::SP); } - setState(2684); + setState(2701); oC_PowerOfExpression(); } - setState(2690); + setState(2707); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 438, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 441, _ctx); } } @@ -16944,7 +17051,7 @@ size_t CypherParser::IC_MultiplyDivideModuloOperatorContext::getRuleIndex() cons CypherParser::IC_MultiplyDivideModuloOperatorContext* CypherParser::iC_MultiplyDivideModuloOperator() { IC_MultiplyDivideModuloOperatorContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 306, CypherParser::RuleIC_MultiplyDivideModuloOperator); + enterRule(_localctx, 308, CypherParser::RuleIC_MultiplyDivideModuloOperator); size_t _la = 0; #if __cplusplus > 201703L @@ -16956,7 +17063,7 @@ CypherParser::IC_MultiplyDivideModuloOperatorContext* CypherParser::iC_MultiplyD }); try { enterOuterAlt(_localctx, 1); - setState(2691); + setState(2708); _la = _input->LA(1); if (!(_la == CypherParser::T__20 @@ -17008,7 +17115,7 @@ size_t CypherParser::OC_PowerOfExpressionContext::getRuleIndex() const { CypherParser::OC_PowerOfExpressionContext* CypherParser::oC_PowerOfExpression() { OC_PowerOfExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 308, CypherParser::RuleOC_PowerOfExpression); + enterRule(_localctx, 310, CypherParser::RuleOC_PowerOfExpression); size_t _la = 0; #if __cplusplus > 201703L @@ -17021,37 +17128,37 @@ CypherParser::OC_PowerOfExpressionContext* CypherParser::oC_PowerOfExpression() try { size_t alt; enterOuterAlt(_localctx, 1); - setState(2693); + setState(2710); oC_StringListNullOperatorExpression(); - setState(2704); + setState(2721); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 441, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 444, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(2695); + setState(2712); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2694); + setState(2711); match(CypherParser::SP); } - setState(2697); + setState(2714); match(CypherParser::T__22); - setState(2699); + setState(2716); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2698); + setState(2715); match(CypherParser::SP); } - setState(2701); + setState(2718); oC_StringListNullOperatorExpression(); } - setState(2706); + setState(2723); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 441, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 444, _ctx); } } @@ -17098,7 +17205,7 @@ size_t CypherParser::OC_StringListNullOperatorExpressionContext::getRuleIndex() CypherParser::OC_StringListNullOperatorExpressionContext* CypherParser::oC_StringListNullOperatorExpression() { OC_StringListNullOperatorExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 310, CypherParser::RuleOC_StringListNullOperatorExpression); + enterRule(_localctx, 312, CypherParser::RuleOC_StringListNullOperatorExpression); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -17110,26 +17217,26 @@ CypherParser::OC_StringListNullOperatorExpressionContext* CypherParser::oC_Strin try { size_t alt; enterOuterAlt(_localctx, 1); - setState(2707); + setState(2724); oC_UnaryAddSubtractOrFactorialExpression(); - setState(2715); + setState(2732); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 443, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 446, _ctx)) { case 1: { - setState(2708); + setState(2725); oC_StringOperatorExpression(); break; } case 2: { - setState(2710); + setState(2727); _errHandler->sync(this); alt = 1; do { switch (alt) { case 1: { - setState(2709); + setState(2726); oC_ListOperatorExpression(); break; } @@ -17137,15 +17244,15 @@ CypherParser::OC_StringListNullOperatorExpressionContext* CypherParser::oC_Strin default: throw NoViableAltException(this); } - setState(2712); + setState(2729); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 442, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 445, _ctx); } while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER); break; } case 3: { - setState(2714); + setState(2731); oC_NullOperatorExpression(); break; } @@ -17210,7 +17317,7 @@ size_t CypherParser::OC_ListOperatorExpressionContext::getRuleIndex() const { CypherParser::OC_ListOperatorExpressionContext* CypherParser::oC_ListOperatorExpression() { OC_ListOperatorExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 312, CypherParser::RuleOC_ListOperatorExpression); + enterRule(_localctx, 314, CypherParser::RuleOC_ListOperatorExpression); size_t _la = 0; #if __cplusplus > 201703L @@ -17221,55 +17328,55 @@ CypherParser::OC_ListOperatorExpressionContext* CypherParser::oC_ListOperatorExp exitRule(); }); try { - setState(2736); + setState(2753); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 447, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 450, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(2717); + setState(2734); match(CypherParser::SP); - setState(2718); + setState(2735); match(CypherParser::IN); - setState(2720); + setState(2737); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2719); + setState(2736); match(CypherParser::SP); } - setState(2722); + setState(2739); oC_PropertyOrLabelsExpression(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(2723); + setState(2740); match(CypherParser::T__6); - setState(2724); + setState(2741); oC_Expression(); - setState(2725); + setState(2742); match(CypherParser::T__7); break; } case 3: { enterOuterAlt(_localctx, 3); - setState(2727); + setState(2744); match(CypherParser::T__6); - setState(2729); + setState(2746); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & -4641029784715918716) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 141790084577970589) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 129)) & -7198287130165357697) != 0)) { - setState(2728); + ((1ULL << (_la - 64)) & 283583104095963549) != 0) || ((((_la - 130) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 130)) & -7198287130165357697) != 0)) { + setState(2745); oC_Expression(); } - setState(2731); + setState(2748); _la = _input->LA(1); if (!(_la == CypherParser::COLON @@ -17280,18 +17387,18 @@ CypherParser::OC_ListOperatorExpressionContext* CypherParser::oC_ListOperatorExp _errHandler->reportMatch(this); consume(); } - setState(2733); + setState(2750); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & -4641029784715918716) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 141790084577970589) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 129)) & -7198287130165357697) != 0)) { - setState(2732); + ((1ULL << (_la - 64)) & 283583104095963549) != 0) || ((((_la - 130) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 130)) & -7198287130165357697) != 0)) { + setState(2749); oC_Expression(); } - setState(2735); + setState(2752); match(CypherParser::T__7); break; } @@ -17356,7 +17463,7 @@ size_t CypherParser::OC_StringOperatorExpressionContext::getRuleIndex() const { CypherParser::OC_StringOperatorExpressionContext* CypherParser::oC_StringOperatorExpression() { OC_StringOperatorExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 314, CypherParser::RuleOC_StringOperatorExpression); + enterRule(_localctx, 316, CypherParser::RuleOC_StringOperatorExpression); size_t _la = 0; #if __cplusplus > 201703L @@ -17368,43 +17475,43 @@ CypherParser::OC_StringOperatorExpressionContext* CypherParser::oC_StringOperato }); try { enterOuterAlt(_localctx, 1); - setState(2749); + setState(2766); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 448, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 451, _ctx)) { case 1: { - setState(2738); + setState(2755); oC_RegularExpression(); break; } case 2: { - setState(2739); + setState(2756); match(CypherParser::SP); - setState(2740); + setState(2757); match(CypherParser::STARTS); - setState(2741); + setState(2758); match(CypherParser::SP); - setState(2742); + setState(2759); match(CypherParser::WITH); break; } case 3: { - setState(2743); + setState(2760); match(CypherParser::SP); - setState(2744); + setState(2761); match(CypherParser::ENDS); - setState(2745); + setState(2762); match(CypherParser::SP); - setState(2746); + setState(2763); match(CypherParser::WITH); break; } case 4: { - setState(2747); + setState(2764); match(CypherParser::SP); - setState(2748); + setState(2765); match(CypherParser::CONTAINS); break; } @@ -17412,15 +17519,15 @@ CypherParser::OC_StringOperatorExpressionContext* CypherParser::oC_StringOperato default: break; } - setState(2752); + setState(2769); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2751); + setState(2768); match(CypherParser::SP); } - setState(2754); + setState(2771); oC_PropertyOrLabelsExpression(); } @@ -17451,7 +17558,7 @@ size_t CypherParser::OC_RegularExpressionContext::getRuleIndex() const { CypherParser::OC_RegularExpressionContext* CypherParser::oC_RegularExpression() { OC_RegularExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 316, CypherParser::RuleOC_RegularExpression); + enterRule(_localctx, 318, CypherParser::RuleOC_RegularExpression); size_t _la = 0; #if __cplusplus > 201703L @@ -17463,15 +17570,15 @@ CypherParser::OC_RegularExpressionContext* CypherParser::oC_RegularExpression() }); try { enterOuterAlt(_localctx, 1); - setState(2757); + setState(2774); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2756); + setState(2773); match(CypherParser::SP); } - setState(2759); + setState(2776); match(CypherParser::T__23); } @@ -17518,7 +17625,7 @@ size_t CypherParser::OC_NullOperatorExpressionContext::getRuleIndex() const { CypherParser::OC_NullOperatorExpressionContext* CypherParser::oC_NullOperatorExpression() { OC_NullOperatorExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 318, CypherParser::RuleOC_NullOperatorExpression); + enterRule(_localctx, 320, CypherParser::RuleOC_NullOperatorExpression); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -17528,35 +17635,35 @@ CypherParser::OC_NullOperatorExpressionContext* CypherParser::oC_NullOperatorExp exitRule(); }); try { - setState(2771); + setState(2788); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 451, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 454, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(2761); + setState(2778); match(CypherParser::SP); - setState(2762); + setState(2779); match(CypherParser::IS); - setState(2763); + setState(2780); match(CypherParser::SP); - setState(2764); + setState(2781); match(CypherParser::NULL_); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(2765); + setState(2782); match(CypherParser::SP); - setState(2766); + setState(2783); match(CypherParser::IS); - setState(2767); + setState(2784); match(CypherParser::SP); - setState(2768); + setState(2785); match(CypherParser::NOT); - setState(2769); + setState(2786); match(CypherParser::SP); - setState(2770); + setState(2787); match(CypherParser::NULL_); break; } @@ -17613,7 +17720,7 @@ size_t CypherParser::OC_UnaryAddSubtractOrFactorialExpressionContext::getRuleInd CypherParser::OC_UnaryAddSubtractOrFactorialExpressionContext* CypherParser::oC_UnaryAddSubtractOrFactorialExpression() { OC_UnaryAddSubtractOrFactorialExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 320, CypherParser::RuleOC_UnaryAddSubtractOrFactorialExpression); + enterRule(_localctx, 322, CypherParser::RuleOC_UnaryAddSubtractOrFactorialExpression); size_t _la = 0; #if __cplusplus > 201703L @@ -17625,40 +17732,40 @@ CypherParser::OC_UnaryAddSubtractOrFactorialExpressionContext* CypherParser::oC_ }); try { enterOuterAlt(_localctx, 1); - setState(2779); + setState(2796); _errHandler->sync(this); _la = _input->LA(1); while (_la == CypherParser::MINUS) { - setState(2773); + setState(2790); match(CypherParser::MINUS); - setState(2775); + setState(2792); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2774); + setState(2791); match(CypherParser::SP); } - setState(2781); + setState(2798); _errHandler->sync(this); _la = _input->LA(1); } - setState(2782); + setState(2799); oC_PropertyOrLabelsExpression(); - setState(2787); + setState(2804); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 455, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 458, _ctx)) { case 1: { - setState(2784); + setState(2801); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2783); + setState(2800); match(CypherParser::SP); } - setState(2786); + setState(2803); match(CypherParser::FACTORIAL); break; } @@ -17711,7 +17818,7 @@ size_t CypherParser::OC_PropertyOrLabelsExpressionContext::getRuleIndex() const CypherParser::OC_PropertyOrLabelsExpressionContext* CypherParser::oC_PropertyOrLabelsExpression() { OC_PropertyOrLabelsExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 322, CypherParser::RuleOC_PropertyOrLabelsExpression); + enterRule(_localctx, 324, CypherParser::RuleOC_PropertyOrLabelsExpression); size_t _la = 0; #if __cplusplus > 201703L @@ -17724,27 +17831,27 @@ CypherParser::OC_PropertyOrLabelsExpressionContext* CypherParser::oC_PropertyOrL try { size_t alt; enterOuterAlt(_localctx, 1); - setState(2789); + setState(2806); oC_Atom(); - setState(2796); + setState(2813); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 457, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 460, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(2791); + setState(2808); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2790); + setState(2807); match(CypherParser::SP); } - setState(2793); + setState(2810); oC_PropertyLookup(); } - setState(2798); + setState(2815); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 457, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 460, _ctx); } } @@ -17807,7 +17914,7 @@ size_t CypherParser::OC_AtomContext::getRuleIndex() const { CypherParser::OC_AtomContext* CypherParser::oC_Atom() { OC_AtomContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 324, CypherParser::RuleOC_Atom); + enterRule(_localctx, 326, CypherParser::RuleOC_Atom); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -17817,68 +17924,68 @@ CypherParser::OC_AtomContext* CypherParser::oC_Atom() { exitRule(); }); try { - setState(2808); + setState(2825); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 458, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 461, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(2799); + setState(2816); oC_Literal(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(2800); + setState(2817); oC_Parameter(); break; } case 3: { enterOuterAlt(_localctx, 3); - setState(2801); + setState(2818); oC_CaseExpression(); break; } case 4: { enterOuterAlt(_localctx, 4); - setState(2802); + setState(2819); oC_ParenthesizedExpression(); break; } case 5: { enterOuterAlt(_localctx, 5); - setState(2803); + setState(2820); oC_FunctionInvocation(); break; } case 6: { enterOuterAlt(_localctx, 6); - setState(2804); + setState(2821); oC_PathPatterns(); break; } case 7: { enterOuterAlt(_localctx, 7); - setState(2805); + setState(2822); oC_ExistCountSubquery(); break; } case 8: { enterOuterAlt(_localctx, 8); - setState(2806); + setState(2823); oC_Variable(); break; } case 9: { enterOuterAlt(_localctx, 9); - setState(2807); + setState(2824); oC_Quantifier(); break; } @@ -17939,7 +18046,7 @@ size_t CypherParser::OC_QuantifierContext::getRuleIndex() const { CypherParser::OC_QuantifierContext* CypherParser::oC_Quantifier() { OC_QuantifierContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 326, CypherParser::RuleOC_Quantifier); + enterRule(_localctx, 328, CypherParser::RuleOC_Quantifier); size_t _la = 0; #if __cplusplus > 201703L @@ -17950,153 +18057,153 @@ CypherParser::OC_QuantifierContext* CypherParser::oC_Quantifier() { exitRule(); }); try { - setState(2866); + setState(2883); _errHandler->sync(this); switch (_input->LA(1)) { case CypherParser::ALL: { enterOuterAlt(_localctx, 1); - setState(2810); + setState(2827); match(CypherParser::ALL); - setState(2812); + setState(2829); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2811); + setState(2828); match(CypherParser::SP); } - setState(2814); + setState(2831); match(CypherParser::T__1); - setState(2816); + setState(2833); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2815); + setState(2832); match(CypherParser::SP); } - setState(2818); + setState(2835); oC_FilterExpression(); - setState(2820); + setState(2837); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2819); + setState(2836); match(CypherParser::SP); } - setState(2822); + setState(2839); match(CypherParser::T__2); break; } case CypherParser::ANY: { enterOuterAlt(_localctx, 2); - setState(2824); + setState(2841); match(CypherParser::ANY); - setState(2826); + setState(2843); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2825); + setState(2842); match(CypherParser::SP); } - setState(2828); + setState(2845); match(CypherParser::T__1); - setState(2830); + setState(2847); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2829); + setState(2846); match(CypherParser::SP); } - setState(2832); + setState(2849); oC_FilterExpression(); - setState(2834); + setState(2851); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2833); + setState(2850); match(CypherParser::SP); } - setState(2836); + setState(2853); match(CypherParser::T__2); break; } case CypherParser::NONE: { enterOuterAlt(_localctx, 3); - setState(2838); + setState(2855); match(CypherParser::NONE); - setState(2840); + setState(2857); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2839); + setState(2856); match(CypherParser::SP); } - setState(2842); + setState(2859); match(CypherParser::T__1); - setState(2844); + setState(2861); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2843); + setState(2860); match(CypherParser::SP); } - setState(2846); + setState(2863); oC_FilterExpression(); - setState(2848); + setState(2865); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2847); + setState(2864); match(CypherParser::SP); } - setState(2850); + setState(2867); match(CypherParser::T__2); break; } case CypherParser::SINGLE: { enterOuterAlt(_localctx, 4); - setState(2852); + setState(2869); match(CypherParser::SINGLE); - setState(2854); + setState(2871); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2853); + setState(2870); match(CypherParser::SP); } - setState(2856); + setState(2873); match(CypherParser::T__1); - setState(2858); + setState(2875); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2857); + setState(2874); match(CypherParser::SP); } - setState(2860); + setState(2877); oC_FilterExpression(); - setState(2862); + setState(2879); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2861); + setState(2878); match(CypherParser::SP); } - setState(2864); + setState(2881); match(CypherParser::T__2); break; } @@ -18141,7 +18248,7 @@ size_t CypherParser::OC_FilterExpressionContext::getRuleIndex() const { CypherParser::OC_FilterExpressionContext* CypherParser::oC_FilterExpression() { OC_FilterExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 328, CypherParser::RuleOC_FilterExpression); + enterRule(_localctx, 330, CypherParser::RuleOC_FilterExpression); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -18152,11 +18259,11 @@ CypherParser::OC_FilterExpressionContext* CypherParser::oC_FilterExpression() { }); try { enterOuterAlt(_localctx, 1); - setState(2868); + setState(2885); oC_IdInColl(); - setState(2869); + setState(2886); match(CypherParser::SP); - setState(2870); + setState(2887); oC_Where(); } @@ -18203,7 +18310,7 @@ size_t CypherParser::OC_IdInCollContext::getRuleIndex() const { CypherParser::OC_IdInCollContext* CypherParser::oC_IdInColl() { OC_IdInCollContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 330, CypherParser::RuleOC_IdInColl); + enterRule(_localctx, 332, CypherParser::RuleOC_IdInColl); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -18214,15 +18321,15 @@ CypherParser::OC_IdInCollContext* CypherParser::oC_IdInColl() { }); try { enterOuterAlt(_localctx, 1); - setState(2872); + setState(2889); oC_Variable(); - setState(2873); + setState(2890); match(CypherParser::SP); - setState(2874); + setState(2891); match(CypherParser::IN); - setState(2875); + setState(2892); match(CypherParser::SP); - setState(2876); + setState(2893); oC_Expression(); } @@ -18273,7 +18380,7 @@ size_t CypherParser::OC_LiteralContext::getRuleIndex() const { CypherParser::OC_LiteralContext* CypherParser::oC_Literal() { OC_LiteralContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 332, CypherParser::RuleOC_Literal); + enterRule(_localctx, 334, CypherParser::RuleOC_Literal); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -18283,21 +18390,21 @@ CypherParser::OC_LiteralContext* CypherParser::oC_Literal() { exitRule(); }); try { - setState(2884); + setState(2901); _errHandler->sync(this); switch (_input->LA(1)) { case CypherParser::DecimalInteger: case CypherParser::ExponentDecimalReal: case CypherParser::RegularDecimalReal: { enterOuterAlt(_localctx, 1); - setState(2878); + setState(2895); oC_NumberLiteral(); break; } case CypherParser::StringLiteral: { enterOuterAlt(_localctx, 2); - setState(2879); + setState(2896); match(CypherParser::StringLiteral); break; } @@ -18305,28 +18412,28 @@ CypherParser::OC_LiteralContext* CypherParser::oC_Literal() { case CypherParser::FALSE: case CypherParser::TRUE: { enterOuterAlt(_localctx, 3); - setState(2880); + setState(2897); oC_BooleanLiteral(); break; } case CypherParser::NULL_: { enterOuterAlt(_localctx, 4); - setState(2881); + setState(2898); match(CypherParser::NULL_); break; } case CypherParser::T__6: { enterOuterAlt(_localctx, 5); - setState(2882); + setState(2899); oC_ListLiteral(); break; } case CypherParser::T__8: { enterOuterAlt(_localctx, 6); - setState(2883); + setState(2900); iC_StructLiteral(); break; } @@ -18367,7 +18474,7 @@ size_t CypherParser::OC_BooleanLiteralContext::getRuleIndex() const { CypherParser::OC_BooleanLiteralContext* CypherParser::oC_BooleanLiteral() { OC_BooleanLiteralContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 334, CypherParser::RuleOC_BooleanLiteral); + enterRule(_localctx, 336, CypherParser::RuleOC_BooleanLiteral); size_t _la = 0; #if __cplusplus > 201703L @@ -18379,7 +18486,7 @@ CypherParser::OC_BooleanLiteralContext* CypherParser::oC_BooleanLiteral() { }); try { enterOuterAlt(_localctx, 1); - setState(2886); + setState(2903); _la = _input->LA(1); if (!(_la == CypherParser::FALSE @@ -18435,7 +18542,7 @@ size_t CypherParser::OC_ListLiteralContext::getRuleIndex() const { CypherParser::OC_ListLiteralContext* CypherParser::oC_ListLiteral() { OC_ListLiteralContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 336, CypherParser::RuleOC_ListLiteral); + enterRule(_localctx, 338, CypherParser::RuleOC_ListLiteral); size_t _la = 0; #if __cplusplus > 201703L @@ -18447,54 +18554,54 @@ CypherParser::OC_ListLiteralContext* CypherParser::oC_ListLiteral() { }); try { enterOuterAlt(_localctx, 1); - setState(2888); + setState(2905); match(CypherParser::T__6); - setState(2890); + setState(2907); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2889); + setState(2906); match(CypherParser::SP); } - setState(2905); + setState(2922); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & -4641029784715918716) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 141790084577970589) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 129)) & -7198287130165357697) != 0)) { - setState(2892); + ((1ULL << (_la - 64)) & 283583104095963549) != 0) || ((((_la - 130) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 130)) & -7198287130165357697) != 0)) { + setState(2909); oC_Expression(); - setState(2894); + setState(2911); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2893); + setState(2910); match(CypherParser::SP); } - setState(2902); + setState(2919); _errHandler->sync(this); _la = _input->LA(1); while (_la == CypherParser::T__3) { - setState(2896); + setState(2913); iC_ListEntry(); - setState(2898); + setState(2915); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2897); + setState(2914); match(CypherParser::SP); } - setState(2904); + setState(2921); _errHandler->sync(this); _la = _input->LA(1); } } - setState(2907); + setState(2924); match(CypherParser::T__7); } @@ -18529,7 +18636,7 @@ size_t CypherParser::IC_ListEntryContext::getRuleIndex() const { CypherParser::IC_ListEntryContext* CypherParser::iC_ListEntry() { IC_ListEntryContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 338, CypherParser::RuleIC_ListEntry); + enterRule(_localctx, 340, CypherParser::RuleIC_ListEntry); size_t _la = 0; #if __cplusplus > 201703L @@ -18541,14 +18648,14 @@ CypherParser::IC_ListEntryContext* CypherParser::iC_ListEntry() { }); try { enterOuterAlt(_localctx, 1); - setState(2909); + setState(2926); match(CypherParser::T__3); - setState(2911); + setState(2928); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 478, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 481, _ctx)) { case 1: { - setState(2910); + setState(2927); match(CypherParser::SP); break; } @@ -18556,15 +18663,15 @@ CypherParser::IC_ListEntryContext* CypherParser::iC_ListEntry() { default: break; } - setState(2914); + setState(2931); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & -4641029784715918716) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 141790084577970589) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 129)) & -7198287130165357697) != 0)) { - setState(2913); + ((1ULL << (_la - 64)) & 283583104095963549) != 0) || ((((_la - 130) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 130)) & -7198287130165357697) != 0)) { + setState(2930); oC_Expression(); } @@ -18608,7 +18715,7 @@ size_t CypherParser::IC_StructLiteralContext::getRuleIndex() const { CypherParser::IC_StructLiteralContext* CypherParser::iC_StructLiteral() { IC_StructLiteralContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 340, CypherParser::RuleIC_StructLiteral); + enterRule(_localctx, 342, CypherParser::RuleIC_StructLiteral); size_t _la = 0; #if __cplusplus > 201703L @@ -18620,55 +18727,55 @@ CypherParser::IC_StructLiteralContext* CypherParser::iC_StructLiteral() { }); try { enterOuterAlt(_localctx, 1); - setState(2916); + setState(2933); match(CypherParser::T__8); - setState(2918); + setState(2935); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2917); + setState(2934); match(CypherParser::SP); } - setState(2920); + setState(2937); iC_StructField(); - setState(2922); + setState(2939); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2921); + setState(2938); match(CypherParser::SP); } - setState(2934); + setState(2951); _errHandler->sync(this); _la = _input->LA(1); while (_la == CypherParser::T__3) { - setState(2924); + setState(2941); match(CypherParser::T__3); - setState(2926); + setState(2943); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2925); + setState(2942); match(CypherParser::SP); } - setState(2928); + setState(2945); iC_StructField(); - setState(2930); + setState(2947); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2929); + setState(2946); match(CypherParser::SP); } - setState(2936); + setState(2953); _errHandler->sync(this); _la = _input->LA(1); } - setState(2937); + setState(2954); match(CypherParser::T__9); } @@ -18719,7 +18826,7 @@ size_t CypherParser::IC_StructFieldContext::getRuleIndex() const { CypherParser::IC_StructFieldContext* CypherParser::iC_StructField() { IC_StructFieldContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 342, CypherParser::RuleIC_StructField); + enterRule(_localctx, 344, CypherParser::RuleIC_StructField); size_t _la = 0; #if __cplusplus > 201703L @@ -18731,7 +18838,7 @@ CypherParser::IC_StructFieldContext* CypherParser::iC_StructField() { }); try { enterOuterAlt(_localctx, 1); - setState(2941); + setState(2958); _errHandler->sync(this); switch (_input->LA(1)) { case CypherParser::ADD: @@ -18766,6 +18873,7 @@ CypherParser::IC_StructFieldContext* CypherParser::iC_StructField() { case CypherParser::IS: case CypherParser::KEY: case CypherParser::LIMIT: + case CypherParser::LIST: case CypherParser::LOAD: case CypherParser::LOGICAL: case CypherParser::MATCH: @@ -18804,13 +18912,13 @@ CypherParser::IC_StructFieldContext* CypherParser::iC_StructField() { case CypherParser::HexLetter: case CypherParser::UnescapedSymbolicName: case CypherParser::EscapedSymbolicName: { - setState(2939); + setState(2956); oC_SymbolicName(); break; } case CypherParser::StringLiteral: { - setState(2940); + setState(2957); match(CypherParser::StringLiteral); break; } @@ -18818,25 +18926,25 @@ CypherParser::IC_StructFieldContext* CypherParser::iC_StructField() { default: throw NoViableAltException(this); } - setState(2944); + setState(2961); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2943); + setState(2960); match(CypherParser::SP); } - setState(2946); + setState(2963); match(CypherParser::COLON); - setState(2948); + setState(2965); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2947); + setState(2964); match(CypherParser::SP); } - setState(2950); + setState(2967); oC_Expression(); } @@ -18875,7 +18983,7 @@ size_t CypherParser::OC_ParenthesizedExpressionContext::getRuleIndex() const { CypherParser::OC_ParenthesizedExpressionContext* CypherParser::oC_ParenthesizedExpression() { OC_ParenthesizedExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 344, CypherParser::RuleOC_ParenthesizedExpression); + enterRule(_localctx, 346, CypherParser::RuleOC_ParenthesizedExpression); size_t _la = 0; #if __cplusplus > 201703L @@ -18887,27 +18995,27 @@ CypherParser::OC_ParenthesizedExpressionContext* CypherParser::oC_ParenthesizedE }); try { enterOuterAlt(_localctx, 1); - setState(2952); + setState(2969); match(CypherParser::T__1); - setState(2954); + setState(2971); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2953); + setState(2970); match(CypherParser::SP); } - setState(2956); + setState(2973); oC_Expression(); - setState(2958); + setState(2975); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2957); + setState(2974); match(CypherParser::SP); } - setState(2960); + setState(2977); match(CypherParser::T__2); } @@ -18978,7 +19086,7 @@ size_t CypherParser::OC_FunctionInvocationContext::getRuleIndex() const { CypherParser::OC_FunctionInvocationContext* CypherParser::oC_FunctionInvocation() { OC_FunctionInvocationContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 346, CypherParser::RuleOC_FunctionInvocation); + enterRule(_localctx, 348, CypherParser::RuleOC_FunctionInvocation); size_t _la = 0; #if __cplusplus > 201703L @@ -18989,109 +19097,109 @@ CypherParser::OC_FunctionInvocationContext* CypherParser::oC_FunctionInvocation( exitRule(); }); try { - setState(3039); + setState(3056); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 509, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 512, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(2962); + setState(2979); match(CypherParser::COUNT); - setState(2964); + setState(2981); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2963); + setState(2980); match(CypherParser::SP); } - setState(2966); + setState(2983); match(CypherParser::T__1); - setState(2968); + setState(2985); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2967); + setState(2984); match(CypherParser::SP); } - setState(2970); + setState(2987); match(CypherParser::STAR); - setState(2972); + setState(2989); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2971); + setState(2988); match(CypherParser::SP); } - setState(2974); + setState(2991); match(CypherParser::T__2); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(2975); + setState(2992); match(CypherParser::CAST); - setState(2977); + setState(2994); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2976); + setState(2993); match(CypherParser::SP); } - setState(2979); + setState(2996); match(CypherParser::T__1); - setState(2981); + setState(2998); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2980); + setState(2997); match(CypherParser::SP); } - setState(2983); + setState(3000); iC_FunctionParameter(); - setState(2985); + setState(3002); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2984); + setState(3001); match(CypherParser::SP); } - setState(2997); + setState(3014); _errHandler->sync(this); switch (_input->LA(1)) { case CypherParser::AS: { - setState(2987); + setState(3004); match(CypherParser::AS); - setState(2989); + setState(3006); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2988); + setState(3005); match(CypherParser::SP); } - setState(2991); + setState(3008); iC_DataType(0); break; } case CypherParser::T__3: { - setState(2992); + setState(3009); match(CypherParser::T__3); - setState(2994); + setState(3011); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2993); + setState(3010); match(CypherParser::SP); } - setState(2996); + setState(3013); iC_FunctionParameter(); break; } @@ -19099,105 +19207,105 @@ CypherParser::OC_FunctionInvocationContext* CypherParser::oC_FunctionInvocation( default: throw NoViableAltException(this); } - setState(3000); + setState(3017); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(2999); + setState(3016); match(CypherParser::SP); } - setState(3002); + setState(3019); match(CypherParser::T__2); break; } case 3: { enterOuterAlt(_localctx, 3); - setState(3004); + setState(3021); oC_FunctionName(); - setState(3006); + setState(3023); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3005); + setState(3022); match(CypherParser::SP); } - setState(3008); + setState(3025); match(CypherParser::T__1); - setState(3010); + setState(3027); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3009); + setState(3026); match(CypherParser::SP); } - setState(3016); + setState(3033); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::DISTINCT) { - setState(3012); + setState(3029); match(CypherParser::DISTINCT); - setState(3014); + setState(3031); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3013); + setState(3030); match(CypherParser::SP); } } - setState(3035); + setState(3052); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & -4641029784715918716) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 141790084577970589) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 129)) & -7198287130165357697) != 0)) { - setState(3018); + ((1ULL << (_la - 64)) & 283583104095963549) != 0) || ((((_la - 130) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 130)) & -7198287130165357697) != 0)) { + setState(3035); iC_FunctionParameter(); - setState(3020); + setState(3037); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3019); + setState(3036); match(CypherParser::SP); } - setState(3032); + setState(3049); _errHandler->sync(this); _la = _input->LA(1); while (_la == CypherParser::T__3) { - setState(3022); + setState(3039); match(CypherParser::T__3); - setState(3024); + setState(3041); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3023); + setState(3040); match(CypherParser::SP); } - setState(3026); + setState(3043); iC_FunctionParameter(); - setState(3028); + setState(3045); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3027); + setState(3044); match(CypherParser::SP); } - setState(3034); + setState(3051); _errHandler->sync(this); _la = _input->LA(1); } } - setState(3037); + setState(3054); match(CypherParser::T__2); break; } @@ -19234,7 +19342,7 @@ size_t CypherParser::OC_FunctionNameContext::getRuleIndex() const { CypherParser::OC_FunctionNameContext* CypherParser::oC_FunctionName() { OC_FunctionNameContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 348, CypherParser::RuleOC_FunctionName); + enterRule(_localctx, 350, CypherParser::RuleOC_FunctionName); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -19245,7 +19353,7 @@ CypherParser::OC_FunctionNameContext* CypherParser::oC_FunctionName() { }); try { enterOuterAlt(_localctx, 1); - setState(3041); + setState(3058); oC_SymbolicName(); } @@ -19296,7 +19404,7 @@ size_t CypherParser::IC_FunctionParameterContext::getRuleIndex() const { CypherParser::IC_FunctionParameterContext* CypherParser::iC_FunctionParameter() { IC_FunctionParameterContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 350, CypherParser::RuleIC_FunctionParameter); + enterRule(_localctx, 352, CypherParser::RuleIC_FunctionParameter); size_t _la = 0; #if __cplusplus > 201703L @@ -19307,36 +19415,36 @@ CypherParser::IC_FunctionParameterContext* CypherParser::iC_FunctionParameter() exitRule(); }); try { - setState(3056); + setState(3073); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 513, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 516, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(3052); + setState(3069); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 512, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 515, _ctx)) { case 1: { - setState(3043); + setState(3060); oC_SymbolicName(); - setState(3045); + setState(3062); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3044); + setState(3061); match(CypherParser::SP); } - setState(3047); + setState(3064); match(CypherParser::COLON); - setState(3048); + setState(3065); match(CypherParser::T__5); - setState(3050); + setState(3067); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3049); + setState(3066); match(CypherParser::SP); } break; @@ -19345,14 +19453,14 @@ CypherParser::IC_FunctionParameterContext* CypherParser::iC_FunctionParameter() default: break; } - setState(3054); + setState(3071); oC_Expression(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(3055); + setState(3072); iC_LambdaParameter(); break; } @@ -19405,7 +19513,7 @@ size_t CypherParser::IC_LambdaParameterContext::getRuleIndex() const { CypherParser::IC_LambdaParameterContext* CypherParser::iC_LambdaParameter() { IC_LambdaParameterContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 352, CypherParser::RuleIC_LambdaParameter); + enterRule(_localctx, 354, CypherParser::RuleIC_LambdaParameter); size_t _la = 0; #if __cplusplus > 201703L @@ -19417,36 +19525,36 @@ CypherParser::IC_LambdaParameterContext* CypherParser::iC_LambdaParameter() { }); try { enterOuterAlt(_localctx, 1); - setState(3058); + setState(3075); iC_LambdaVars(); - setState(3060); + setState(3077); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3059); + setState(3076); match(CypherParser::SP); } - setState(3062); + setState(3079); match(CypherParser::MINUS); - setState(3063); + setState(3080); match(CypherParser::T__14); - setState(3065); + setState(3082); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3064); + setState(3081); match(CypherParser::SP); } - setState(3067); + setState(3084); oC_Expression(); - setState(3069); + setState(3086); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 516, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 519, _ctx)) { case 1: { - setState(3068); + setState(3085); match(CypherParser::SP); break; } @@ -19495,7 +19603,7 @@ size_t CypherParser::IC_LambdaVarsContext::getRuleIndex() const { CypherParser::IC_LambdaVarsContext* CypherParser::iC_LambdaVars() { IC_LambdaVarsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 354, CypherParser::RuleIC_LambdaVars); + enterRule(_localctx, 356, CypherParser::RuleIC_LambdaVars); size_t _la = 0; #if __cplusplus > 201703L @@ -19506,7 +19614,7 @@ CypherParser::IC_LambdaVarsContext* CypherParser::iC_LambdaVars() { exitRule(); }); try { - setState(3095); + setState(3112); _errHandler->sync(this); switch (_input->LA(1)) { case CypherParser::ADD: @@ -19541,6 +19649,7 @@ CypherParser::IC_LambdaVarsContext* CypherParser::iC_LambdaVars() { case CypherParser::IS: case CypherParser::KEY: case CypherParser::LIMIT: + case CypherParser::LIST: case CypherParser::LOAD: case CypherParser::LOGICAL: case CypherParser::MATCH: @@ -19580,62 +19689,62 @@ CypherParser::IC_LambdaVarsContext* CypherParser::iC_LambdaVars() { case CypherParser::UnescapedSymbolicName: case CypherParser::EscapedSymbolicName: { enterOuterAlt(_localctx, 1); - setState(3071); + setState(3088); oC_SymbolicName(); break; } case CypherParser::T__1: { enterOuterAlt(_localctx, 2); - setState(3072); + setState(3089); match(CypherParser::T__1); - setState(3074); + setState(3091); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3073); + setState(3090); match(CypherParser::SP); } - setState(3076); + setState(3093); oC_SymbolicName(); - setState(3078); + setState(3095); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3077); + setState(3094); match(CypherParser::SP); } - setState(3090); + setState(3107); _errHandler->sync(this); _la = _input->LA(1); while (_la == CypherParser::T__3) { - setState(3080); + setState(3097); match(CypherParser::T__3); - setState(3082); + setState(3099); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3081); + setState(3098); match(CypherParser::SP); } - setState(3084); + setState(3101); oC_SymbolicName(); - setState(3086); + setState(3103); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3085); + setState(3102); match(CypherParser::SP); } - setState(3092); + setState(3109); _errHandler->sync(this); _la = _input->LA(1); } - setState(3093); + setState(3110); match(CypherParser::T__2); break; } @@ -19688,7 +19797,7 @@ size_t CypherParser::OC_PathPatternsContext::getRuleIndex() const { CypherParser::OC_PathPatternsContext* CypherParser::oC_PathPatterns() { OC_PathPatternsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 356, CypherParser::RuleOC_PathPatterns); + enterRule(_localctx, 358, CypherParser::RuleOC_PathPatterns); size_t _la = 0; #if __cplusplus > 201703L @@ -19701,23 +19810,23 @@ CypherParser::OC_PathPatternsContext* CypherParser::oC_PathPatterns() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(3097); + setState(3114); oC_NodePattern(); - setState(3102); + setState(3119); _errHandler->sync(this); alt = 1; do { switch (alt) { case 1: { - setState(3099); + setState(3116); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3098); + setState(3115); match(CypherParser::SP); } - setState(3101); + setState(3118); oC_PatternElementChain(); break; } @@ -19725,9 +19834,9 @@ CypherParser::OC_PathPatternsContext* CypherParser::oC_PathPatterns() { default: throw NoViableAltException(this); } - setState(3104); + setState(3121); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 524, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 527, _ctx); } while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER); } @@ -19786,7 +19895,7 @@ size_t CypherParser::OC_ExistCountSubqueryContext::getRuleIndex() const { CypherParser::OC_ExistCountSubqueryContext* CypherParser::oC_ExistCountSubquery() { OC_ExistCountSubqueryContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 358, CypherParser::RuleOC_ExistCountSubquery); + enterRule(_localctx, 360, CypherParser::RuleOC_ExistCountSubquery); size_t _la = 0; #if __cplusplus > 201703L @@ -19798,7 +19907,7 @@ CypherParser::OC_ExistCountSubqueryContext* CypherParser::oC_ExistCountSubquery( }); try { enterOuterAlt(_localctx, 1); - setState(3106); + setState(3123); _la = _input->LA(1); if (!(_la == CypherParser::COUNT @@ -19809,50 +19918,50 @@ CypherParser::OC_ExistCountSubqueryContext* CypherParser::oC_ExistCountSubquery( _errHandler->reportMatch(this); consume(); } - setState(3108); + setState(3125); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3107); + setState(3124); match(CypherParser::SP); } - setState(3110); + setState(3127); match(CypherParser::T__8); - setState(3112); + setState(3129); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3111); + setState(3128); match(CypherParser::SP); } - setState(3114); + setState(3131); match(CypherParser::MATCH); - setState(3116); + setState(3133); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3115); + setState(3132); match(CypherParser::SP); } - setState(3118); + setState(3135); oC_Pattern(); - setState(3123); + setState(3140); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 529, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 532, _ctx)) { case 1: { - setState(3120); + setState(3137); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3119); + setState(3136); match(CypherParser::SP); } - setState(3122); + setState(3139); oC_Where(); break; } @@ -19860,20 +19969,20 @@ CypherParser::OC_ExistCountSubqueryContext* CypherParser::oC_ExistCountSubquery( default: break; } - setState(3129); + setState(3146); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 531, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 534, _ctx)) { case 1: { - setState(3126); + setState(3143); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3125); + setState(3142); match(CypherParser::SP); } - setState(3128); + setState(3145); iC_Hint(); break; } @@ -19881,15 +19990,15 @@ CypherParser::OC_ExistCountSubqueryContext* CypherParser::oC_ExistCountSubquery( default: break; } - setState(3132); + setState(3149); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3131); + setState(3148); match(CypherParser::SP); } - setState(3134); + setState(3151); match(CypherParser::T__9); } @@ -19928,7 +20037,7 @@ size_t CypherParser::OC_PropertyLookupContext::getRuleIndex() const { CypherParser::OC_PropertyLookupContext* CypherParser::oC_PropertyLookup() { OC_PropertyLookupContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 360, CypherParser::RuleOC_PropertyLookup); + enterRule(_localctx, 362, CypherParser::RuleOC_PropertyLookup); size_t _la = 0; #if __cplusplus > 201703L @@ -19940,17 +20049,17 @@ CypherParser::OC_PropertyLookupContext* CypherParser::oC_PropertyLookup() { }); try { enterOuterAlt(_localctx, 1); - setState(3136); + setState(3153); match(CypherParser::T__4); - setState(3138); + setState(3155); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3137); + setState(3154); match(CypherParser::SP); } - setState(3142); + setState(3159); _errHandler->sync(this); switch (_input->LA(1)) { case CypherParser::ADD: @@ -19985,6 +20094,7 @@ CypherParser::OC_PropertyLookupContext* CypherParser::oC_PropertyLookup() { case CypherParser::IS: case CypherParser::KEY: case CypherParser::LIMIT: + case CypherParser::LIST: case CypherParser::LOAD: case CypherParser::LOGICAL: case CypherParser::MATCH: @@ -20023,13 +20133,13 @@ CypherParser::OC_PropertyLookupContext* CypherParser::oC_PropertyLookup() { case CypherParser::HexLetter: case CypherParser::UnescapedSymbolicName: case CypherParser::EscapedSymbolicName: { - setState(3140); + setState(3157); oC_PropertyKeyName(); break; } case CypherParser::STAR: { - setState(3141); + setState(3158); match(CypherParser::STAR); break; } @@ -20098,7 +20208,7 @@ size_t CypherParser::OC_CaseExpressionContext::getRuleIndex() const { CypherParser::OC_CaseExpressionContext* CypherParser::oC_CaseExpression() { OC_CaseExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 362, CypherParser::RuleOC_CaseExpression); + enterRule(_localctx, 364, CypherParser::RuleOC_CaseExpression); size_t _la = 0; #if __cplusplus > 201703L @@ -20111,27 +20221,27 @@ CypherParser::OC_CaseExpressionContext* CypherParser::oC_CaseExpression() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(3166); + setState(3183); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 540, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 543, _ctx)) { case 1: { - setState(3144); + setState(3161); match(CypherParser::CASE); - setState(3149); + setState(3166); _errHandler->sync(this); alt = 1; do { switch (alt) { case 1: { - setState(3146); + setState(3163); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3145); + setState(3162); match(CypherParser::SP); } - setState(3148); + setState(3165); oC_CaseAlternative(); break; } @@ -20139,41 +20249,41 @@ CypherParser::OC_CaseExpressionContext* CypherParser::oC_CaseExpression() { default: throw NoViableAltException(this); } - setState(3151); + setState(3168); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 536, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 539, _ctx); } while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER); break; } case 2: { - setState(3153); + setState(3170); match(CypherParser::CASE); - setState(3155); + setState(3172); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3154); + setState(3171); match(CypherParser::SP); } - setState(3157); + setState(3174); oC_Expression(); - setState(3162); + setState(3179); _errHandler->sync(this); alt = 1; do { switch (alt) { case 1: { - setState(3159); + setState(3176); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3158); + setState(3175); match(CypherParser::SP); } - setState(3161); + setState(3178); oC_CaseAlternative(); break; } @@ -20181,9 +20291,9 @@ CypherParser::OC_CaseExpressionContext* CypherParser::oC_CaseExpression() { default: throw NoViableAltException(this); } - setState(3164); + setState(3181); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 539, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 542, _ctx); } while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER); break; } @@ -20191,30 +20301,30 @@ CypherParser::OC_CaseExpressionContext* CypherParser::oC_CaseExpression() { default: break; } - setState(3176); + setState(3193); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 543, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 546, _ctx)) { case 1: { - setState(3169); + setState(3186); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3168); + setState(3185); match(CypherParser::SP); } - setState(3171); + setState(3188); match(CypherParser::ELSE); - setState(3173); + setState(3190); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3172); + setState(3189); match(CypherParser::SP); } - setState(3175); + setState(3192); oC_Expression(); break; } @@ -20222,15 +20332,15 @@ CypherParser::OC_CaseExpressionContext* CypherParser::oC_CaseExpression() { default: break; } - setState(3179); + setState(3196); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3178); + setState(3195); match(CypherParser::SP); } - setState(3181); + setState(3198); match(CypherParser::END); } @@ -20281,7 +20391,7 @@ size_t CypherParser::OC_CaseAlternativeContext::getRuleIndex() const { CypherParser::OC_CaseAlternativeContext* CypherParser::oC_CaseAlternative() { OC_CaseAlternativeContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 364, CypherParser::RuleOC_CaseAlternative); + enterRule(_localctx, 366, CypherParser::RuleOC_CaseAlternative); size_t _la = 0; #if __cplusplus > 201703L @@ -20293,37 +20403,37 @@ CypherParser::OC_CaseAlternativeContext* CypherParser::oC_CaseAlternative() { }); try { enterOuterAlt(_localctx, 1); - setState(3183); + setState(3200); match(CypherParser::WHEN); - setState(3185); + setState(3202); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3184); + setState(3201); match(CypherParser::SP); } - setState(3187); + setState(3204); oC_Expression(); - setState(3189); + setState(3206); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3188); + setState(3205); match(CypherParser::SP); } - setState(3191); + setState(3208); match(CypherParser::THEN); - setState(3193); + setState(3210); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3192); + setState(3209); match(CypherParser::SP); } - setState(3195); + setState(3212); oC_Expression(); } @@ -20354,7 +20464,7 @@ size_t CypherParser::OC_VariableContext::getRuleIndex() const { CypherParser::OC_VariableContext* CypherParser::oC_Variable() { OC_VariableContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 366, CypherParser::RuleOC_Variable); + enterRule(_localctx, 368, CypherParser::RuleOC_Variable); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -20365,7 +20475,7 @@ CypherParser::OC_VariableContext* CypherParser::oC_Variable() { }); try { enterOuterAlt(_localctx, 1); - setState(3197); + setState(3214); oC_SymbolicName(); } @@ -20400,7 +20510,7 @@ size_t CypherParser::OC_NumberLiteralContext::getRuleIndex() const { CypherParser::OC_NumberLiteralContext* CypherParser::oC_NumberLiteral() { OC_NumberLiteralContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 368, CypherParser::RuleOC_NumberLiteral); + enterRule(_localctx, 370, CypherParser::RuleOC_NumberLiteral); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -20410,20 +20520,20 @@ CypherParser::OC_NumberLiteralContext* CypherParser::oC_NumberLiteral() { exitRule(); }); try { - setState(3201); + setState(3218); _errHandler->sync(this); switch (_input->LA(1)) { case CypherParser::ExponentDecimalReal: case CypherParser::RegularDecimalReal: { enterOuterAlt(_localctx, 1); - setState(3199); + setState(3216); oC_DoubleLiteral(); break; } case CypherParser::DecimalInteger: { enterOuterAlt(_localctx, 2); - setState(3200); + setState(3217); oC_IntegerLiteral(); break; } @@ -20464,7 +20574,7 @@ size_t CypherParser::OC_ParameterContext::getRuleIndex() const { CypherParser::OC_ParameterContext* CypherParser::oC_Parameter() { OC_ParameterContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 370, CypherParser::RuleOC_Parameter); + enterRule(_localctx, 372, CypherParser::RuleOC_Parameter); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -20475,9 +20585,9 @@ CypherParser::OC_ParameterContext* CypherParser::oC_Parameter() { }); try { enterOuterAlt(_localctx, 1); - setState(3203); + setState(3220); match(CypherParser::T__24); - setState(3206); + setState(3223); _errHandler->sync(this); switch (_input->LA(1)) { case CypherParser::ADD: @@ -20512,6 +20622,7 @@ CypherParser::OC_ParameterContext* CypherParser::oC_Parameter() { case CypherParser::IS: case CypherParser::KEY: case CypherParser::LIMIT: + case CypherParser::LIST: case CypherParser::LOAD: case CypherParser::LOGICAL: case CypherParser::MATCH: @@ -20550,13 +20661,13 @@ CypherParser::OC_ParameterContext* CypherParser::oC_Parameter() { case CypherParser::HexLetter: case CypherParser::UnescapedSymbolicName: case CypherParser::EscapedSymbolicName: { - setState(3204); + setState(3221); oC_SymbolicName(); break; } case CypherParser::DecimalInteger: { - setState(3205); + setState(3222); match(CypherParser::DecimalInteger); break; } @@ -20601,7 +20712,7 @@ size_t CypherParser::OC_PropertyExpressionContext::getRuleIndex() const { CypherParser::OC_PropertyExpressionContext* CypherParser::oC_PropertyExpression() { OC_PropertyExpressionContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 372, CypherParser::RuleOC_PropertyExpression); + enterRule(_localctx, 374, CypherParser::RuleOC_PropertyExpression); size_t _la = 0; #if __cplusplus > 201703L @@ -20613,17 +20724,17 @@ CypherParser::OC_PropertyExpressionContext* CypherParser::oC_PropertyExpression( }); try { enterOuterAlt(_localctx, 1); - setState(3208); + setState(3225); oC_Atom(); - setState(3210); + setState(3227); _errHandler->sync(this); _la = _input->LA(1); if (_la == CypherParser::SP) { - setState(3209); + setState(3226); match(CypherParser::SP); } - setState(3212); + setState(3229); oC_PropertyLookup(); } @@ -20654,7 +20765,7 @@ size_t CypherParser::OC_PropertyKeyNameContext::getRuleIndex() const { CypherParser::OC_PropertyKeyNameContext* CypherParser::oC_PropertyKeyName() { OC_PropertyKeyNameContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 374, CypherParser::RuleOC_PropertyKeyName); + enterRule(_localctx, 376, CypherParser::RuleOC_PropertyKeyName); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -20665,7 +20776,7 @@ CypherParser::OC_PropertyKeyNameContext* CypherParser::oC_PropertyKeyName() { }); try { enterOuterAlt(_localctx, 1); - setState(3214); + setState(3231); oC_SymbolicName(); } @@ -20696,7 +20807,7 @@ size_t CypherParser::OC_IntegerLiteralContext::getRuleIndex() const { CypherParser::OC_IntegerLiteralContext* CypherParser::oC_IntegerLiteral() { OC_IntegerLiteralContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 376, CypherParser::RuleOC_IntegerLiteral); + enterRule(_localctx, 378, CypherParser::RuleOC_IntegerLiteral); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -20707,7 +20818,7 @@ CypherParser::OC_IntegerLiteralContext* CypherParser::oC_IntegerLiteral() { }); try { enterOuterAlt(_localctx, 1); - setState(3216); + setState(3233); match(CypherParser::DecimalInteger); } @@ -20742,7 +20853,7 @@ size_t CypherParser::OC_DoubleLiteralContext::getRuleIndex() const { CypherParser::OC_DoubleLiteralContext* CypherParser::oC_DoubleLiteral() { OC_DoubleLiteralContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 378, CypherParser::RuleOC_DoubleLiteral); + enterRule(_localctx, 380, CypherParser::RuleOC_DoubleLiteral); size_t _la = 0; #if __cplusplus > 201703L @@ -20754,7 +20865,7 @@ CypherParser::OC_DoubleLiteralContext* CypherParser::oC_DoubleLiteral() { }); try { enterOuterAlt(_localctx, 1); - setState(3218); + setState(3235); _la = _input->LA(1); if (!(_la == CypherParser::ExponentDecimalReal @@ -20798,7 +20909,7 @@ size_t CypherParser::OC_SchemaNameContext::getRuleIndex() const { CypherParser::OC_SchemaNameContext* CypherParser::oC_SchemaName() { OC_SchemaNameContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 380, CypherParser::RuleOC_SchemaName); + enterRule(_localctx, 382, CypherParser::RuleOC_SchemaName); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -20809,16 +20920,16 @@ CypherParser::OC_SchemaNameContext* CypherParser::oC_SchemaName() { }); try { enterOuterAlt(_localctx, 1); - setState(3220); + setState(3237); oC_SymbolicName(); - setState(3223); + setState(3240); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 551, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 554, _ctx)) { case 1: { - setState(3221); + setState(3238); match(CypherParser::T__4); - setState(3222); + setState(3239); oC_SymbolicName(); break; } @@ -20867,7 +20978,7 @@ size_t CypherParser::OC_SymbolicNameContext::getRuleIndex() const { CypherParser::OC_SymbolicNameContext* CypherParser::oC_SymbolicName() { OC_SymbolicNameContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 382, CypherParser::RuleOC_SymbolicName); + enterRule(_localctx, 384, CypherParser::RuleOC_SymbolicName); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -20877,19 +20988,19 @@ CypherParser::OC_SymbolicNameContext* CypherParser::oC_SymbolicName() { exitRule(); }); try { - setState(3230); + setState(3247); _errHandler->sync(this); switch (_input->LA(1)) { case CypherParser::UnescapedSymbolicName: { enterOuterAlt(_localctx, 1); - setState(3225); + setState(3242); match(CypherParser::UnescapedSymbolicName); break; } case CypherParser::EscapedSymbolicName: { enterOuterAlt(_localctx, 2); - setState(3226); + setState(3243); antlrcpp::downCast(_localctx)->escapedsymbolicnameToken = match(CypherParser::EscapedSymbolicName); if ((antlrcpp::downCast(_localctx)->escapedsymbolicnameToken != nullptr ? antlrcpp::downCast(_localctx)->escapedsymbolicnameToken->getText() : "") == "``") { notifyEmptyToken(antlrcpp::downCast(_localctx)->escapedsymbolicnameToken); } break; @@ -20897,7 +21008,7 @@ CypherParser::OC_SymbolicNameContext* CypherParser::oC_SymbolicName() { case CypherParser::HexLetter: { enterOuterAlt(_localctx, 3); - setState(3228); + setState(3245); match(CypherParser::HexLetter); break; } @@ -20934,6 +21045,7 @@ CypherParser::OC_SymbolicNameContext* CypherParser::oC_SymbolicName() { case CypherParser::IS: case CypherParser::KEY: case CypherParser::LIMIT: + case CypherParser::LIST: case CypherParser::LOAD: case CypherParser::LOGICAL: case CypherParser::MATCH: @@ -20970,7 +21082,7 @@ CypherParser::OC_SymbolicNameContext* CypherParser::oC_SymbolicName() { case CypherParser::DECIMAL: case CypherParser::L_SKIP: { enterOuterAlt(_localctx, 4); - setState(3229); + setState(3246); iC_NonReservedKeywords(); break; } @@ -21207,6 +21319,10 @@ tree::TerminalNode* CypherParser::IC_NonReservedKeywordsContext::LIMIT() { return getToken(CypherParser::LIMIT, 0); } +tree::TerminalNode* CypherParser::IC_NonReservedKeywordsContext::LIST() { + return getToken(CypherParser::LIST, 0); +} + tree::TerminalNode* CypherParser::IC_NonReservedKeywordsContext::TRANSACTION() { return getToken(CypherParser::TRANSACTION, 0); } @@ -21271,7 +21387,7 @@ size_t CypherParser::IC_NonReservedKeywordsContext::getRuleIndex() const { CypherParser::IC_NonReservedKeywordsContext* CypherParser::iC_NonReservedKeywords() { IC_NonReservedKeywordsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 384, CypherParser::RuleIC_NonReservedKeywords); + enterRule(_localctx, 386, CypherParser::RuleIC_NonReservedKeywords); size_t _la = 0; #if __cplusplus > 201703L @@ -21283,11 +21399,11 @@ CypherParser::IC_NonReservedKeywordsContext* CypherParser::iC_NonReservedKeyword }); try { enterOuterAlt(_localctx, 1); - setState(3232); + setState(3249); _la = _input->LA(1); if (!(((((_la - 47) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 47)) & 8838681241780440877) != 0) || ((((_la - 111) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 111)) & 3454573902653292655) != 0))) { + ((1ULL << (_la - 47)) & -384690795074334931) != 0) || ((((_la - 112) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 112)) & 3454573902653292655) != 0))) { _errHandler->recoverInline(this); } else { @@ -21319,7 +21435,7 @@ size_t CypherParser::OC_LeftArrowHeadContext::getRuleIndex() const { CypherParser::OC_LeftArrowHeadContext* CypherParser::oC_LeftArrowHead() { OC_LeftArrowHeadContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 386, CypherParser::RuleOC_LeftArrowHead); + enterRule(_localctx, 388, CypherParser::RuleOC_LeftArrowHead); size_t _la = 0; #if __cplusplus > 201703L @@ -21331,7 +21447,7 @@ CypherParser::OC_LeftArrowHeadContext* CypherParser::oC_LeftArrowHead() { }); try { enterOuterAlt(_localctx, 1); - setState(3234); + setState(3251); _la = _input->LA(1); if (!((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & 1006641152) != 0))) { @@ -21366,7 +21482,7 @@ size_t CypherParser::OC_RightArrowHeadContext::getRuleIndex() const { CypherParser::OC_RightArrowHeadContext* CypherParser::oC_RightArrowHead() { OC_RightArrowHeadContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 388, CypherParser::RuleOC_RightArrowHead); + enterRule(_localctx, 390, CypherParser::RuleOC_RightArrowHead); size_t _la = 0; #if __cplusplus > 201703L @@ -21378,7 +21494,7 @@ CypherParser::OC_RightArrowHeadContext* CypherParser::oC_RightArrowHead() { }); try { enterOuterAlt(_localctx, 1); - setState(3236); + setState(3253); _la = _input->LA(1); if (!((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & 16106160128) != 0))) { @@ -21417,7 +21533,7 @@ size_t CypherParser::OC_DashContext::getRuleIndex() const { CypherParser::OC_DashContext* CypherParser::oC_Dash() { OC_DashContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 390, CypherParser::RuleOC_Dash); + enterRule(_localctx, 392, CypherParser::RuleOC_Dash); size_t _la = 0; #if __cplusplus > 201703L @@ -21429,7 +21545,7 @@ CypherParser::OC_DashContext* CypherParser::oC_Dash() { }); try { enterOuterAlt(_localctx, 1); - setState(3238); + setState(3255); _la = _input->LA(1); if (!((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & 35167192219648) != 0) || _la == CypherParser::MINUS)) { @@ -21452,8 +21568,8 @@ CypherParser::OC_DashContext* CypherParser::oC_Dash() { bool CypherParser::sempred(RuleContext *context, size_t ruleIndex, size_t predicateIndex) { switch (ruleIndex) { - case 74: return iC_DataTypeSempred(antlrcpp::downCast(context), predicateIndex); - case 101: return iC_JoinNodeSempred(antlrcpp::downCast(context), predicateIndex); + case 75: return iC_DataTypeSempred(antlrcpp::downCast(context), predicateIndex); + case 102: return iC_JoinNodeSempred(antlrcpp::downCast(context), predicateIndex); default: break; diff --git a/third_party/antlr4_cypher/include/cypher_lexer.h b/third_party/antlr4_cypher/include/cypher_lexer.h index a4560bad96..17ac46a1c5 100644 --- a/third_party/antlr4_cypher/include/cypher_lexer.h +++ b/third_party/antlr4_cypher/include/cypher_lexer.h @@ -30,25 +30,25 @@ class CypherLexer : public antlr4::Lexer { FROM = 89, FORCE = 90, FOR = 91, GLOB = 92, GRAPH = 93, GROUP = 94, HASH = 95, HEADERS = 96, HINT = 97, IMPORT = 98, INDEX = 99, IF = 100, IN = 101, INCREMENT = 102, INSTALL = 103, IS = 104, JOIN = 105, KEY = 106, - LIMIT = 107, LOAD = 108, LOGICAL = 109, MACRO = 110, MATCH = 111, MAXVALUE = 112, - MERGE = 113, MINVALUE = 114, MULTI_JOIN = 115, NO = 116, NODE = 117, - NOT = 118, NONE = 119, NULL_ = 120, ON = 121, ONLY = 122, OPTIONS = 123, - OPTIONAL = 124, OR = 125, ORDER = 126, PRIMARY = 127, PROFILE = 128, - PROJECT = 129, RANGE = 130, READ = 131, REL = 132, RENAME = 133, RETURN = 134, - ROLLBACK = 135, ROLLBACK_SKIP_CHECKPOINT = 136, SEQUENCE = 137, SET = 138, - SORTED = 139, SHORTEST = 140, START = 141, STARTS = 142, STRUCT = 143, - TABLE = 144, THEN = 145, TO = 146, TRAIL = 147, TRANSACTION = 148, TRUE = 149, - TYPE = 150, UNION = 151, UNWIND = 152, UNINSTALL = 153, UPDATE = 154, - USE = 155, WHEN = 156, WHERE = 157, WITH = 158, WRITE = 159, WSHORTEST = 160, - XOR = 161, SINGLE = 162, YIELD = 163, USER = 164, PARTITION = 165, PARTITIONS = 166, - PASSWORD = 167, ROLE = 168, MAP = 169, DECIMAL = 170, STAR = 171, L_SKIP = 172, - INVALID_NOT_EQUAL = 173, COLON = 174, DOTDOT = 175, MINUS = 176, FACTORIAL = 177, - StringLiteral = 178, EscapedChar = 179, DecimalInteger = 180, HexLetter = 181, - HexDigit = 182, Digit = 183, NonZeroDigit = 184, NonZeroOctDigit = 185, - ZeroDigit = 186, ExponentDecimalReal = 187, RegularDecimalReal = 188, - UnescapedSymbolicName = 189, IdentifierStart = 190, IdentifierPart = 191, - EscapedSymbolicName = 192, SP = 193, WHITESPACE = 194, CypherComment = 195, - Unknown = 196 + LIMIT = 107, LIST = 108, LOAD = 109, LOGICAL = 110, MACRO = 111, MATCH = 112, + MAXVALUE = 113, MERGE = 114, MINVALUE = 115, MULTI_JOIN = 116, NO = 117, + NODE = 118, NOT = 119, NONE = 120, NULL_ = 121, ON = 122, ONLY = 123, + OPTIONS = 124, OPTIONAL = 125, OR = 126, ORDER = 127, PRIMARY = 128, + PROFILE = 129, PROJECT = 130, RANGE = 131, READ = 132, REL = 133, RENAME = 134, + RETURN = 135, ROLLBACK = 136, ROLLBACK_SKIP_CHECKPOINT = 137, SEQUENCE = 138, + SET = 139, SORTED = 140, SHORTEST = 141, START = 142, STARTS = 143, + STRUCT = 144, TABLE = 145, THEN = 146, TO = 147, TRAIL = 148, TRANSACTION = 149, + TRUE = 150, TYPE = 151, UNION = 152, UNWIND = 153, UNINSTALL = 154, + UPDATE = 155, USE = 156, WHEN = 157, WHERE = 158, WITH = 159, WRITE = 160, + WSHORTEST = 161, XOR = 162, SINGLE = 163, YIELD = 164, USER = 165, PARTITION = 166, + PARTITIONS = 167, PASSWORD = 168, ROLE = 169, MAP = 170, DECIMAL = 171, + STAR = 172, L_SKIP = 173, INVALID_NOT_EQUAL = 174, COLON = 175, DOTDOT = 176, + MINUS = 177, FACTORIAL = 178, StringLiteral = 179, EscapedChar = 180, + DecimalInteger = 181, HexLetter = 182, HexDigit = 183, Digit = 184, + NonZeroDigit = 185, NonZeroOctDigit = 186, ZeroDigit = 187, ExponentDecimalReal = 188, + RegularDecimalReal = 189, UnescapedSymbolicName = 190, IdentifierStart = 191, + IdentifierPart = 192, EscapedSymbolicName = 193, SP = 194, WHITESPACE = 195, + CypherComment = 196, Unknown = 197 }; explicit CypherLexer(antlr4::CharStream *input); diff --git a/third_party/antlr4_cypher/include/cypher_parser.h b/third_party/antlr4_cypher/include/cypher_parser.h index f4916b3941..b3e2025baa 100644 --- a/third_party/antlr4_cypher/include/cypher_parser.h +++ b/third_party/antlr4_cypher/include/cypher_parser.h @@ -30,25 +30,25 @@ class CypherParser : public antlr4::Parser { FROM = 89, FORCE = 90, FOR = 91, GLOB = 92, GRAPH = 93, GROUP = 94, HASH = 95, HEADERS = 96, HINT = 97, IMPORT = 98, INDEX = 99, IF = 100, IN = 101, INCREMENT = 102, INSTALL = 103, IS = 104, JOIN = 105, KEY = 106, - LIMIT = 107, LOAD = 108, LOGICAL = 109, MACRO = 110, MATCH = 111, MAXVALUE = 112, - MERGE = 113, MINVALUE = 114, MULTI_JOIN = 115, NO = 116, NODE = 117, - NOT = 118, NONE = 119, NULL_ = 120, ON = 121, ONLY = 122, OPTIONS = 123, - OPTIONAL = 124, OR = 125, ORDER = 126, PRIMARY = 127, PROFILE = 128, - PROJECT = 129, RANGE = 130, READ = 131, REL = 132, RENAME = 133, RETURN = 134, - ROLLBACK = 135, ROLLBACK_SKIP_CHECKPOINT = 136, SEQUENCE = 137, SET = 138, - SORTED = 139, SHORTEST = 140, START = 141, STARTS = 142, STRUCT = 143, - TABLE = 144, THEN = 145, TO = 146, TRAIL = 147, TRANSACTION = 148, TRUE = 149, - TYPE = 150, UNION = 151, UNWIND = 152, UNINSTALL = 153, UPDATE = 154, - USE = 155, WHEN = 156, WHERE = 157, WITH = 158, WRITE = 159, WSHORTEST = 160, - XOR = 161, SINGLE = 162, YIELD = 163, USER = 164, PARTITION = 165, PARTITIONS = 166, - PASSWORD = 167, ROLE = 168, MAP = 169, DECIMAL = 170, STAR = 171, L_SKIP = 172, - INVALID_NOT_EQUAL = 173, COLON = 174, DOTDOT = 175, MINUS = 176, FACTORIAL = 177, - StringLiteral = 178, EscapedChar = 179, DecimalInteger = 180, HexLetter = 181, - HexDigit = 182, Digit = 183, NonZeroDigit = 184, NonZeroOctDigit = 185, - ZeroDigit = 186, ExponentDecimalReal = 187, RegularDecimalReal = 188, - UnescapedSymbolicName = 189, IdentifierStart = 190, IdentifierPart = 191, - EscapedSymbolicName = 192, SP = 193, WHITESPACE = 194, CypherComment = 195, - Unknown = 196 + LIMIT = 107, LIST = 108, LOAD = 109, LOGICAL = 110, MACRO = 111, MATCH = 112, + MAXVALUE = 113, MERGE = 114, MINVALUE = 115, MULTI_JOIN = 116, NO = 117, + NODE = 118, NOT = 119, NONE = 120, NULL_ = 121, ON = 122, ONLY = 123, + OPTIONS = 124, OPTIONAL = 125, OR = 126, ORDER = 127, PRIMARY = 128, + PROFILE = 129, PROJECT = 130, RANGE = 131, READ = 132, REL = 133, RENAME = 134, + RETURN = 135, ROLLBACK = 136, ROLLBACK_SKIP_CHECKPOINT = 137, SEQUENCE = 138, + SET = 139, SORTED = 140, SHORTEST = 141, START = 142, STARTS = 143, + STRUCT = 144, TABLE = 145, THEN = 146, TO = 147, TRAIL = 148, TRANSACTION = 149, + TRUE = 150, TYPE = 151, UNION = 152, UNWIND = 153, UNINSTALL = 154, + UPDATE = 155, USE = 156, WHEN = 157, WHERE = 158, WITH = 159, WRITE = 160, + WSHORTEST = 161, XOR = 162, SINGLE = 163, YIELD = 164, USER = 165, PARTITION = 166, + PARTITIONS = 167, PASSWORD = 168, ROLE = 169, MAP = 170, DECIMAL = 171, + STAR = 172, L_SKIP = 173, INVALID_NOT_EQUAL = 174, COLON = 175, DOTDOT = 176, + MINUS = 177, FACTORIAL = 178, StringLiteral = 179, EscapedChar = 180, + DecimalInteger = 181, HexLetter = 182, HexDigit = 183, Digit = 184, + NonZeroDigit = 185, NonZeroOctDigit = 186, ZeroDigit = 187, ExponentDecimalReal = 188, + RegularDecimalReal = 189, UnescapedSymbolicName = 190, IdentifierStart = 191, + IdentifierPart = 192, EscapedSymbolicName = 193, SP = 194, WHITESPACE = 195, + CypherComment = 196, Unknown = 197 }; enum { @@ -61,64 +61,65 @@ class CypherParser : public antlr4::Parser { RuleIC_StandaloneCall = 19, RuleIC_CommentOn = 20, RuleIC_CreateMacro = 21, RuleIC_PositionalArgs = 22, RuleIC_DefaultArg = 23, RuleIC_FilePaths = 24, RuleIC_IfNotExists = 25, RuleIC_CreateNodeTable = 26, RuleIC_PartitionBy = 27, - RuleIC_PartitionHash = 28, RuleIC_PartitionRange = 29, RuleIC_CreateRelTable = 30, - RuleIC_CreateIndex = 31, RuleIC_IndexPattern = 32, RuleIC_IndexNodePattern = 33, - RuleIC_IndexRelationshipPattern = 34, RuleIC_IndexPropertyPattern = 35, - RuleIC_CreateFromToConnections = 36, RuleIC_CreateFromToConnection = 37, - RuleIC_FromToConnections = 38, RuleIC_FromToConnection = 39, RuleIC_CreateSequence = 40, - RuleIC_CreateType = 41, RuleIC_SequenceOptions = 42, RuleIC_WithPasswd = 43, - RuleIC_CreateUser = 44, RuleIC_CreateRole = 45, RuleIC_IncrementBy = 46, - RuleIC_MinValue = 47, RuleIC_MaxValue = 48, RuleIC_StartWith = 49, RuleIC_Cycle = 50, - RuleIC_IfExists = 51, RuleIC_Drop = 52, RuleIC_DropIndexName = 53, RuleIC_AlterTable = 54, - RuleIC_AlterOptions = 55, RuleIC_AddProperty = 56, RuleIC_Default = 57, - RuleIC_DropProperty = 58, RuleIC_RenameTable = 59, RuleIC_RenameProperty = 60, - RuleIC_AddFromToConnection = 61, RuleIC_DropFromToConnection = 62, RuleIC_SetSortedBy = 63, - RuleIC_SortedByItem = 64, RuleIC_ColumnDefinitions = 65, RuleIC_ColumnDefinition = 66, - RuleIC_PropertyDefinitions = 67, RuleIC_PropertyDefinition = 68, RuleIC_CreateNodeConstraint = 69, - RuleIC_UnionType = 70, RuleIC_StructType = 71, RuleIC_MapType = 72, - RuleIC_DecimalType = 73, RuleIC_DataType = 74, RuleIC_ListIdentifiers = 75, - RuleIC_ListIdentifier = 76, RuleOC_AnyCypherOption = 77, RuleOC_Explain = 78, - RuleOC_Profile = 79, RuleIC_Transaction = 80, RuleIC_Extension = 81, - RuleIC_LoadExtension = 82, RuleIC_InstallExtension = 83, RuleIC_UninstallExtension = 84, - RuleIC_UpdateExtension = 85, RuleOC_Query = 86, RuleOC_RegularQuery = 87, - RuleOC_Union = 88, RuleOC_SingleQuery = 89, RuleOC_SinglePartQuery = 90, - RuleOC_MultiPartQuery = 91, RuleIC_QueryPart = 92, RuleOC_UpdatingClause = 93, - RuleOC_ReadingClause = 94, RuleIC_LoadFrom = 95, RuleOC_YieldItem = 96, - RuleOC_YieldItems = 97, RuleIC_InQueryCall = 98, RuleOC_Match = 99, - RuleIC_Hint = 100, RuleIC_JoinNode = 101, RuleOC_Unwind = 102, RuleOC_Create = 103, - RuleOC_Merge = 104, RuleOC_MergeAction = 105, RuleOC_Set = 106, RuleOC_SetItem = 107, - RuleOC_Delete = 108, RuleOC_With = 109, RuleOC_Return = 110, RuleOC_ProjectionBody = 111, - RuleOC_ProjectionItems = 112, RuleOC_ProjectionItem = 113, RuleOC_Order = 114, - RuleOC_Skip = 115, RuleOC_Limit = 116, RuleOC_SortItem = 117, RuleOC_Where = 118, - RuleOC_Pattern = 119, RuleOC_PatternPart = 120, RuleOC_AnonymousPatternPart = 121, - RuleOC_PatternElement = 122, RuleOC_NodePattern = 123, RuleOC_PatternElementChain = 124, - RuleOC_RelationshipPattern = 125, RuleOC_RelationshipDetail = 126, RuleIC_Properties = 127, - RuleOC_RelationshipTypes = 128, RuleOC_NodeLabels = 129, RuleIC_RecursiveDetail = 130, - RuleIC_RecursiveType = 131, RuleOC_RangeLiteral = 132, RuleIC_RecursiveComprehension = 133, - RuleIC_RecursiveProjectionItems = 134, RuleOC_LowerBound = 135, RuleOC_UpperBound = 136, - RuleOC_LabelName = 137, RuleOC_RelTypeName = 138, RuleOC_Expression = 139, - RuleOC_OrExpression = 140, RuleOC_XorExpression = 141, RuleOC_AndExpression = 142, - RuleOC_NotExpression = 143, RuleOC_ComparisonExpression = 144, RuleIC_ComparisonOperator = 145, - RuleIC_BitwiseOrOperatorExpression = 146, RuleIC_BitwiseAndOperatorExpression = 147, - RuleIC_BitShiftOperatorExpression = 148, RuleIC_BitShiftOperator = 149, - RuleOC_AddOrSubtractExpression = 150, RuleIC_AddOrSubtractOperator = 151, - RuleOC_MultiplyDivideModuloExpression = 152, RuleIC_MultiplyDivideModuloOperator = 153, - RuleOC_PowerOfExpression = 154, RuleOC_StringListNullOperatorExpression = 155, - RuleOC_ListOperatorExpression = 156, RuleOC_StringOperatorExpression = 157, - RuleOC_RegularExpression = 158, RuleOC_NullOperatorExpression = 159, - RuleOC_UnaryAddSubtractOrFactorialExpression = 160, RuleOC_PropertyOrLabelsExpression = 161, - RuleOC_Atom = 162, RuleOC_Quantifier = 163, RuleOC_FilterExpression = 164, - RuleOC_IdInColl = 165, RuleOC_Literal = 166, RuleOC_BooleanLiteral = 167, - RuleOC_ListLiteral = 168, RuleIC_ListEntry = 169, RuleIC_StructLiteral = 170, - RuleIC_StructField = 171, RuleOC_ParenthesizedExpression = 172, RuleOC_FunctionInvocation = 173, - RuleOC_FunctionName = 174, RuleIC_FunctionParameter = 175, RuleIC_LambdaParameter = 176, - RuleIC_LambdaVars = 177, RuleOC_PathPatterns = 178, RuleOC_ExistCountSubquery = 179, - RuleOC_PropertyLookup = 180, RuleOC_CaseExpression = 181, RuleOC_CaseAlternative = 182, - RuleOC_Variable = 183, RuleOC_NumberLiteral = 184, RuleOC_Parameter = 185, - RuleOC_PropertyExpression = 186, RuleOC_PropertyKeyName = 187, RuleOC_IntegerLiteral = 188, - RuleOC_DoubleLiteral = 189, RuleOC_SchemaName = 190, RuleOC_SymbolicName = 191, - RuleIC_NonReservedKeywords = 192, RuleOC_LeftArrowHead = 193, RuleOC_RightArrowHead = 194, - RuleOC_Dash = 195 + RuleIC_PartitionHash = 28, RuleIC_PartitionRange = 29, RuleIC_PartitionList = 30, + RuleIC_CreateRelTable = 31, RuleIC_CreateIndex = 32, RuleIC_IndexPattern = 33, + RuleIC_IndexNodePattern = 34, RuleIC_IndexRelationshipPattern = 35, + RuleIC_IndexPropertyPattern = 36, RuleIC_CreateFromToConnections = 37, + RuleIC_CreateFromToConnection = 38, RuleIC_FromToConnections = 39, RuleIC_FromToConnection = 40, + RuleIC_CreateSequence = 41, RuleIC_CreateType = 42, RuleIC_SequenceOptions = 43, + RuleIC_WithPasswd = 44, RuleIC_CreateUser = 45, RuleIC_CreateRole = 46, + RuleIC_IncrementBy = 47, RuleIC_MinValue = 48, RuleIC_MaxValue = 49, + RuleIC_StartWith = 50, RuleIC_Cycle = 51, RuleIC_IfExists = 52, RuleIC_Drop = 53, + RuleIC_DropIndexName = 54, RuleIC_AlterTable = 55, RuleIC_AlterOptions = 56, + RuleIC_AddProperty = 57, RuleIC_Default = 58, RuleIC_DropProperty = 59, + RuleIC_RenameTable = 60, RuleIC_RenameProperty = 61, RuleIC_AddFromToConnection = 62, + RuleIC_DropFromToConnection = 63, RuleIC_SetSortedBy = 64, RuleIC_SortedByItem = 65, + RuleIC_ColumnDefinitions = 66, RuleIC_ColumnDefinition = 67, RuleIC_PropertyDefinitions = 68, + RuleIC_PropertyDefinition = 69, RuleIC_CreateNodeConstraint = 70, RuleIC_UnionType = 71, + RuleIC_StructType = 72, RuleIC_MapType = 73, RuleIC_DecimalType = 74, + RuleIC_DataType = 75, RuleIC_ListIdentifiers = 76, RuleIC_ListIdentifier = 77, + RuleOC_AnyCypherOption = 78, RuleOC_Explain = 79, RuleOC_Profile = 80, + RuleIC_Transaction = 81, RuleIC_Extension = 82, RuleIC_LoadExtension = 83, + RuleIC_InstallExtension = 84, RuleIC_UninstallExtension = 85, RuleIC_UpdateExtension = 86, + RuleOC_Query = 87, RuleOC_RegularQuery = 88, RuleOC_Union = 89, RuleOC_SingleQuery = 90, + RuleOC_SinglePartQuery = 91, RuleOC_MultiPartQuery = 92, RuleIC_QueryPart = 93, + RuleOC_UpdatingClause = 94, RuleOC_ReadingClause = 95, RuleIC_LoadFrom = 96, + RuleOC_YieldItem = 97, RuleOC_YieldItems = 98, RuleIC_InQueryCall = 99, + RuleOC_Match = 100, RuleIC_Hint = 101, RuleIC_JoinNode = 102, RuleOC_Unwind = 103, + RuleOC_Create = 104, RuleOC_Merge = 105, RuleOC_MergeAction = 106, RuleOC_Set = 107, + RuleOC_SetItem = 108, RuleOC_Delete = 109, RuleOC_With = 110, RuleOC_Return = 111, + RuleOC_ProjectionBody = 112, RuleOC_ProjectionItems = 113, RuleOC_ProjectionItem = 114, + RuleOC_Order = 115, RuleOC_Skip = 116, RuleOC_Limit = 117, RuleOC_SortItem = 118, + RuleOC_Where = 119, RuleOC_Pattern = 120, RuleOC_PatternPart = 121, + RuleOC_AnonymousPatternPart = 122, RuleOC_PatternElement = 123, RuleOC_NodePattern = 124, + RuleOC_PatternElementChain = 125, RuleOC_RelationshipPattern = 126, + RuleOC_RelationshipDetail = 127, RuleIC_Properties = 128, RuleOC_RelationshipTypes = 129, + RuleOC_NodeLabels = 130, RuleIC_RecursiveDetail = 131, RuleIC_RecursiveType = 132, + RuleOC_RangeLiteral = 133, RuleIC_RecursiveComprehension = 134, RuleIC_RecursiveProjectionItems = 135, + RuleOC_LowerBound = 136, RuleOC_UpperBound = 137, RuleOC_LabelName = 138, + RuleOC_RelTypeName = 139, RuleOC_Expression = 140, RuleOC_OrExpression = 141, + RuleOC_XorExpression = 142, RuleOC_AndExpression = 143, RuleOC_NotExpression = 144, + RuleOC_ComparisonExpression = 145, RuleIC_ComparisonOperator = 146, + RuleIC_BitwiseOrOperatorExpression = 147, RuleIC_BitwiseAndOperatorExpression = 148, + RuleIC_BitShiftOperatorExpression = 149, RuleIC_BitShiftOperator = 150, + RuleOC_AddOrSubtractExpression = 151, RuleIC_AddOrSubtractOperator = 152, + RuleOC_MultiplyDivideModuloExpression = 153, RuleIC_MultiplyDivideModuloOperator = 154, + RuleOC_PowerOfExpression = 155, RuleOC_StringListNullOperatorExpression = 156, + RuleOC_ListOperatorExpression = 157, RuleOC_StringOperatorExpression = 158, + RuleOC_RegularExpression = 159, RuleOC_NullOperatorExpression = 160, + RuleOC_UnaryAddSubtractOrFactorialExpression = 161, RuleOC_PropertyOrLabelsExpression = 162, + RuleOC_Atom = 163, RuleOC_Quantifier = 164, RuleOC_FilterExpression = 165, + RuleOC_IdInColl = 166, RuleOC_Literal = 167, RuleOC_BooleanLiteral = 168, + RuleOC_ListLiteral = 169, RuleIC_ListEntry = 170, RuleIC_StructLiteral = 171, + RuleIC_StructField = 172, RuleOC_ParenthesizedExpression = 173, RuleOC_FunctionInvocation = 174, + RuleOC_FunctionName = 175, RuleIC_FunctionParameter = 176, RuleIC_LambdaParameter = 177, + RuleIC_LambdaVars = 178, RuleOC_PathPatterns = 179, RuleOC_ExistCountSubquery = 180, + RuleOC_PropertyLookup = 181, RuleOC_CaseExpression = 182, RuleOC_CaseAlternative = 183, + RuleOC_Variable = 184, RuleOC_NumberLiteral = 185, RuleOC_Parameter = 186, + RuleOC_PropertyExpression = 187, RuleOC_PropertyKeyName = 188, RuleOC_IntegerLiteral = 189, + RuleOC_DoubleLiteral = 190, RuleOC_SchemaName = 191, RuleOC_SymbolicName = 192, + RuleIC_NonReservedKeywords = 193, RuleOC_LeftArrowHead = 194, RuleOC_RightArrowHead = 195, + RuleOC_Dash = 196 }; explicit CypherParser(antlr4::TokenStream *input); @@ -168,6 +169,7 @@ class CypherParser : public antlr4::Parser { class IC_PartitionByContext; class IC_PartitionHashContext; class IC_PartitionRangeContext; + class IC_PartitionListContext; class IC_CreateRelTableContext; class IC_CreateIndexContext; class IC_IndexPatternContext; @@ -795,6 +797,7 @@ class CypherParser : public antlr4::Parser { antlr4::tree::TerminalNode *BY(); IC_PartitionRangeContext *iC_PartitionRange(); IC_PartitionHashContext *iC_PartitionHash(); + IC_PartitionListContext *iC_PartitionList(); }; @@ -833,6 +836,20 @@ class CypherParser : public antlr4::Parser { IC_PartitionRangeContext* iC_PartitionRange(); + class IC_PartitionListContext : public antlr4::ParserRuleContext { + public: + IC_PartitionListContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *LIST(); + OC_PropertyKeyNameContext *oC_PropertyKeyName(); + std::vector SP(); + antlr4::tree::TerminalNode* SP(size_t i); + + + }; + + IC_PartitionListContext* iC_PartitionList(); + class IC_CreateRelTableContext : public antlr4::ParserRuleContext { public: IC_CreateRelTableContext(antlr4::ParserRuleContext *parent, size_t invokingState); @@ -3294,6 +3311,7 @@ class CypherParser : public antlr4::Parser { antlr4::tree::TerminalNode *STRUCT(); antlr4::tree::TerminalNode *L_SKIP(); antlr4::tree::TerminalNode *LIMIT(); + antlr4::tree::TerminalNode *LIST(); antlr4::tree::TerminalNode *TRANSACTION(); antlr4::tree::TerminalNode *TYPE(); antlr4::tree::TerminalNode *USE(); diff --git a/third_party/mbedtls/include/mbedtls/aes.h b/third_party/mbedtls/include/mbedtls/aes.h index 49bf0c97cb..c17475f3e6 100644 --- a/third_party/mbedtls/include/mbedtls/aes.h +++ b/third_party/mbedtls/include/mbedtls/aes.h @@ -64,9 +64,6 @@ #define inline __inline #endif -#ifdef __cplusplus -extern "C" { -#endif #if !defined(MBEDTLS_AES_ALT) // Regular implementation @@ -75,6 +72,7 @@ extern "C" { /** * \brief The AES context-type definition. */ +namespace lbug_mbedtls { typedef struct mbedtls_aes_context { int MBEDTLS_PRIVATE(nr); /*!< The number of rounds. */ uint32_t* MBEDTLS_PRIVATE(rk); /*!< AES round keys. */ @@ -88,16 +86,19 @@ typedef struct mbedtls_aes_context { */ } mbedtls_aes_context; +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_XTS) /** * \brief The AES XTS context-type definition. */ +namespace lbug_mbedtls { typedef struct mbedtls_aes_xts_context { mbedtls_aes_context MBEDTLS_PRIVATE(crypt); /*!< The AES context to use for AES block encryption or decryption. */ mbedtls_aes_context MBEDTLS_PRIVATE(tweak); /*!< The AES context used for tweak computation. */ } mbedtls_aes_xts_context; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_XTS */ #else /* MBEDTLS_AES_ALT */ @@ -112,6 +113,7 @@ typedef struct mbedtls_aes_xts_context { * * \param ctx The AES context to initialize. This must not be \c NULL. */ +namespace lbug_mbedtls { void mbedtls_aes_init(mbedtls_aes_context* ctx); /** @@ -123,6 +125,7 @@ void mbedtls_aes_init(mbedtls_aes_context* ctx); */ void mbedtls_aes_free(mbedtls_aes_context* ctx); +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_XTS) /** * \brief This function initializes the specified AES XTS context. @@ -132,6 +135,7 @@ void mbedtls_aes_free(mbedtls_aes_context* ctx); * * \param ctx The AES XTS context to initialize. This must not be \c NULL. */ +namespace lbug_mbedtls { void mbedtls_aes_xts_init(mbedtls_aes_xts_context* ctx); /** @@ -142,6 +146,7 @@ void mbedtls_aes_xts_init(mbedtls_aes_xts_context* ctx); * Otherwise, the context must have been at least initialized. */ void mbedtls_aes_xts_free(mbedtls_aes_xts_context* ctx); +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_XTS */ /** @@ -159,6 +164,7 @@ void mbedtls_aes_xts_free(mbedtls_aes_xts_context* ctx); * \return \c 0 on success. * \return #MBEDTLS_ERR_AES_INVALID_KEY_LENGTH on failure. */ +namespace lbug_mbedtls { MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_aes_setkey_enc(mbedtls_aes_context* ctx, const unsigned char* key, unsigned int keybits); @@ -182,6 +188,7 @@ MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_aes_setkey_dec(mbedtls_aes_context* ctx, const unsigned char* key, unsigned int keybits); +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_XTS) /** * \brief This function prepares an XTS context for encryption and @@ -199,6 +206,7 @@ int mbedtls_aes_setkey_dec(mbedtls_aes_context* ctx, const unsigned char* key, * \return \c 0 on success. * \return #MBEDTLS_ERR_AES_INVALID_KEY_LENGTH on failure. */ +namespace lbug_mbedtls { MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_aes_xts_setkey_enc(mbedtls_aes_xts_context* ctx, const unsigned char* key, unsigned int keybits); @@ -222,6 +230,7 @@ int mbedtls_aes_xts_setkey_enc(mbedtls_aes_xts_context* ctx, const unsigned char MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_aes_xts_setkey_dec(mbedtls_aes_xts_context* ctx, const unsigned char* key, unsigned int keybits); +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_XTS */ /** @@ -247,10 +256,12 @@ int mbedtls_aes_xts_setkey_dec(mbedtls_aes_xts_context* ctx, const unsigned char * \return \c 0 on success. */ +namespace lbug_mbedtls { MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_aes_crypt_ecb(mbedtls_aes_context* ctx, int mode, const unsigned char input[16], unsigned char output[16]); +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_CBC) /** * \brief This function performs an AES-CBC encryption or decryption operation @@ -293,9 +304,11 @@ int mbedtls_aes_crypt_ecb(mbedtls_aes_context* ctx, int mode, const unsigned cha * \return #MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH * on failure. */ +namespace lbug_mbedtls { MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_aes_crypt_cbc(mbedtls_aes_context* ctx, int mode, size_t length, unsigned char iv[16], const unsigned char* input, unsigned char* output); +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CBC */ #if defined(MBEDTLS_CIPHER_MODE_XTS) @@ -334,9 +347,11 @@ int mbedtls_aes_crypt_cbc(mbedtls_aes_context* ctx, int mode, size_t length, uns * smaller than an AES block in size (16 Bytes) or if \p * length is larger than 2^20 blocks (16 MiB). */ +namespace lbug_mbedtls { MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_aes_crypt_xts(mbedtls_aes_xts_context* ctx, int mode, size_t length, const unsigned char data_unit[16], const unsigned char* input, unsigned char* output); +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_XTS */ #if defined(MBEDTLS_CIPHER_MODE_CFB) @@ -379,6 +394,7 @@ int mbedtls_aes_crypt_xts(mbedtls_aes_xts_context* ctx, int mode, size_t length, * * \return \c 0 on success. */ +namespace lbug_mbedtls { MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_aes_crypt_cfb128(mbedtls_aes_context* ctx, int mode, size_t length, size_t* iv_off, unsigned char iv[16], const unsigned char* input, unsigned char* output); @@ -422,6 +438,7 @@ int mbedtls_aes_crypt_cfb128(mbedtls_aes_context* ctx, int mode, size_t length, MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_aes_crypt_cfb8(mbedtls_aes_context* ctx, int mode, size_t length, unsigned char iv[16], const unsigned char* input, unsigned char* output); +} // namespace lbug_mbedtls #endif /*MBEDTLS_CIPHER_MODE_CFB */ #if defined(MBEDTLS_CIPHER_MODE_OFB) @@ -470,10 +487,12 @@ int mbedtls_aes_crypt_cfb8(mbedtls_aes_context* ctx, int mode, size_t length, un * * \return \c 0 on success. */ +namespace lbug_mbedtls { MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_aes_crypt_ofb(mbedtls_aes_context* ctx, size_t length, size_t* iv_off, unsigned char iv[16], const unsigned char* input, unsigned char* output); +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_OFB */ #if defined(MBEDTLS_CIPHER_MODE_CTR) @@ -549,10 +568,12 @@ int mbedtls_aes_crypt_ofb(mbedtls_aes_context* ctx, size_t length, size_t* iv_of * * \return \c 0 on success. */ +namespace lbug_mbedtls { MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_aes_crypt_ctr(mbedtls_aes_context* ctx, size_t length, size_t* nc_off, unsigned char nonce_counter[16], unsigned char stream_block[16], const unsigned char* input, unsigned char* output); +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CTR */ /** @@ -566,6 +587,7 @@ int mbedtls_aes_crypt_ctr(mbedtls_aes_context* ctx, size_t length, size_t* nc_of * * \return \c 0 on success. */ +namespace lbug_mbedtls { MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_internal_aes_encrypt(mbedtls_aes_context* ctx, const unsigned char input[16], unsigned char output[16]); @@ -585,6 +607,7 @@ MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_internal_aes_decrypt(mbedtls_aes_context* ctx, const unsigned char input[16], unsigned char output[16]); +} // namespace lbug_mbedtls #if defined(MBEDTLS_SELF_TEST) /** * \brief Checkup routine. @@ -592,13 +615,14 @@ int mbedtls_internal_aes_decrypt(mbedtls_aes_context* ctx, const unsigned char i * \return \c 0 on success. * \return \c 1 on failure. */ +namespace lbug_mbedtls { MBEDTLS_CHECK_RETURN_CRITICAL int mbedtls_aes_self_test(int verbose); +} // namespace lbug_mbedtls #endif /* MBEDTLS_SELF_TEST */ -#ifdef __cplusplus -} -#endif #endif /* aes.h */ + +using namespace lbug_mbedtls; // keep unqualified names for in-tree consumers diff --git a/third_party/mbedtls/include/mbedtls/aria.h b/third_party/mbedtls/include/mbedtls/aria.h index 93b62ab30e..ff0d0f5f2e 100644 --- a/third_party/mbedtls/include/mbedtls/aria.h +++ b/third_party/mbedtls/include/mbedtls/aria.h @@ -48,9 +48,6 @@ /** Invalid data input length. */ #define MBEDTLS_ERR_ARIA_INVALID_INPUT_LENGTH -0x005E -#ifdef __cplusplus -extern "C" { -#endif #if !defined(MBEDTLS_ARIA_ALT) // Regular implementation @@ -59,12 +56,14 @@ extern "C" { /** * \brief The ARIA context-type definition. */ +namespace lbug_mbedtls { typedef struct mbedtls_aria_context { unsigned char MBEDTLS_PRIVATE(nr); /*!< The number of rounds (12, 14 or 16) */ /*! The ARIA round keys. */ uint32_t MBEDTLS_PRIVATE(rk)[MBEDTLS_ARIA_MAX_ROUNDS + 1][MBEDTLS_ARIA_BLOCKSIZE / 4]; } mbedtls_aria_context; +} // namespace lbug_mbedtls #else /* MBEDTLS_ARIA_ALT */ #include "mbedtls/aria_alt.h" #endif /* MBEDTLS_ARIA_ALT */ @@ -77,6 +76,7 @@ typedef struct mbedtls_aria_context { * * \param ctx The ARIA context to initialize. This must not be \c NULL. */ +namespace lbug_mbedtls { void mbedtls_aria_init(mbedtls_aria_context* ctx); /** @@ -148,6 +148,7 @@ int mbedtls_aria_crypt_ecb(mbedtls_aria_context* ctx, const unsigned char input[MBEDTLS_ARIA_BLOCKSIZE], unsigned char output[MBEDTLS_ARIA_BLOCKSIZE]); +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_CBC) /** * \brief This function performs an ARIA-CBC encryption or decryption operation @@ -190,8 +191,10 @@ int mbedtls_aria_crypt_ecb(mbedtls_aria_context* ctx, * \return \c 0 on success. * \return A negative error code on failure. */ +namespace lbug_mbedtls { int mbedtls_aria_crypt_cbc(mbedtls_aria_context* ctx, int mode, size_t length, unsigned char iv[MBEDTLS_ARIA_BLOCKSIZE], const unsigned char* input, unsigned char* output); +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CBC */ #if defined(MBEDTLS_CIPHER_MODE_CFB) @@ -236,8 +239,10 @@ int mbedtls_aria_crypt_cbc(mbedtls_aria_context* ctx, int mode, size_t length, * \return \c 0 on success. * \return A negative error code on failure. */ +namespace lbug_mbedtls { int mbedtls_aria_crypt_cfb128(mbedtls_aria_context* ctx, int mode, size_t length, size_t* iv_off, unsigned char iv[MBEDTLS_ARIA_BLOCKSIZE], const unsigned char* input, unsigned char* output); +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CFB */ #if defined(MBEDTLS_CIPHER_MODE_CTR) @@ -318,10 +323,12 @@ int mbedtls_aria_crypt_cfb128(mbedtls_aria_context* ctx, int mode, size_t length * \return \c 0 on success. * \return A negative error code on failure. */ +namespace lbug_mbedtls { int mbedtls_aria_crypt_ctr(mbedtls_aria_context* ctx, size_t length, size_t* nc_off, unsigned char nonce_counter[MBEDTLS_ARIA_BLOCKSIZE], unsigned char stream_block[MBEDTLS_ARIA_BLOCKSIZE], const unsigned char* input, unsigned char* output); +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CTR */ #if defined(MBEDTLS_SELF_TEST) @@ -330,11 +337,12 @@ int mbedtls_aria_crypt_ctr(mbedtls_aria_context* ctx, size_t length, size_t* nc_ * * \return \c 0 on success, or \c 1 on failure. */ +namespace lbug_mbedtls { int mbedtls_aria_self_test(int verbose); +} // namespace lbug_mbedtls #endif /* MBEDTLS_SELF_TEST */ -#ifdef __cplusplus -} -#endif #endif /* aria.h */ + +using namespace lbug_mbedtls; // keep unqualified names for in-tree consumers diff --git a/third_party/mbedtls/include/mbedtls/asn1.h b/third_party/mbedtls/include/mbedtls/asn1.h index 69f0c0cc2b..288f7001f5 100644 --- a/third_party/mbedtls/include/mbedtls/asn1.h +++ b/third_party/mbedtls/include/mbedtls/asn1.h @@ -135,9 +135,6 @@ ((MBEDTLS_OID_SIZE(oid_str) != (oid_buf_len)) || \ memcmp((oid_str), (oid_buf), (oid_buf_len)) != 0) -#ifdef __cplusplus -extern "C" { -#endif /** * \name Functions to parse ASN.1 data structures @@ -147,6 +144,7 @@ extern "C" { /** * Type-length-value structure that allows for ASN1 using DER. */ +namespace lbug_mbedtls { typedef struct mbedtls_asn1_buf { int tag; /**< ASN1 type, e.g. MBEDTLS_ASN1_UTF8_STRING. */ size_t len; /**< ASN1 length, in octets. */ @@ -502,6 +500,7 @@ int mbedtls_asn1_traverse_sequence_of(unsigned char** p, const unsigned char* en unsigned char tag_may_val, int (*cb)(void* ctx, int tag, unsigned char* start, size_t len), void* ctx); +} // namespace lbug_mbedtls #if defined(MBEDTLS_BIGNUM_C) /** * \brief Retrieve an integer ASN.1 tag and its value. @@ -521,7 +520,9 @@ int mbedtls_asn1_traverse_sequence_of(unsigned char** p, const unsigned char* en * not fit in an \c int. * \return An MPI error code if the parsed value is too large. */ +namespace lbug_mbedtls { int mbedtls_asn1_get_mpi(unsigned char** p, const unsigned char* end, mbedtls_mpi* X); +} // namespace lbug_mbedtls #endif /* MBEDTLS_BIGNUM_C */ /** @@ -540,6 +541,7 @@ int mbedtls_asn1_get_mpi(unsigned char** p, const unsigned char* end, mbedtls_mp * * \return 0 if successful or a specific ASN.1 or MPI error code. */ +namespace lbug_mbedtls { int mbedtls_asn1_get_alg(unsigned char** p, const unsigned char* end, mbedtls_asn1_buf* alg, mbedtls_asn1_buf* params); @@ -592,8 +594,8 @@ void mbedtls_asn1_free_named_data(mbedtls_asn1_named_data* entry); */ void mbedtls_asn1_free_named_data_list(mbedtls_asn1_named_data** head); -#ifdef __cplusplus -} -#endif +} // namespace lbug_mbedtls #endif /* asn1.h */ + +using namespace lbug_mbedtls; // keep unqualified names for in-tree consumers diff --git a/third_party/mbedtls/include/mbedtls/base64.h b/third_party/mbedtls/include/mbedtls/base64.h index 89c5ff2552..21931588f4 100644 --- a/third_party/mbedtls/include/mbedtls/base64.h +++ b/third_party/mbedtls/include/mbedtls/base64.h @@ -31,9 +31,6 @@ /** Invalid character in input. */ #define MBEDTLS_ERR_BASE64_INVALID_CHARACTER -0x002C -#ifdef __cplusplus -extern "C" { -#endif /** * \brief Encode a buffer into base64 format @@ -54,6 +51,7 @@ extern "C" { * \note Call this function with dlen = 0 to obtain the * required buffer size in *olen */ +namespace lbug_mbedtls { int mbedtls_base64_encode(unsigned char* dst, size_t dlen, size_t* olen, const unsigned char* src, size_t slen); @@ -77,18 +75,20 @@ int mbedtls_base64_encode(unsigned char* dst, size_t dlen, size_t* olen, const u int mbedtls_base64_decode(unsigned char* dst, size_t dlen, size_t* olen, const unsigned char* src, size_t slen); +} // namespace lbug_mbedtls #if defined(MBEDTLS_SELF_TEST) /** * \brief Checkup routine * * \return 0 if successful, or 1 if the test failed */ +namespace lbug_mbedtls { int mbedtls_base64_self_test(int verbose); +} // namespace lbug_mbedtls #endif /* MBEDTLS_SELF_TEST */ -#ifdef __cplusplus -} -#endif #endif /* base64.h */ + +using namespace lbug_mbedtls; // keep unqualified names for in-tree consumers diff --git a/third_party/mbedtls/include/mbedtls/bignum.h b/third_party/mbedtls/include/mbedtls/bignum.h index 8c87780e17..0784824d36 100644 --- a/third_party/mbedtls/include/mbedtls/bignum.h +++ b/third_party/mbedtls/include/mbedtls/bignum.h @@ -127,8 +127,10 @@ #if !defined(MBEDTLS_HAVE_INT64) #define MBEDTLS_HAVE_INT64 #endif /* !MBEDTLS_HAVE_INT64 */ +namespace lbug_mbedtls { typedef int64_t mbedtls_mpi_sint; typedef uint64_t mbedtls_mpi_uint; +} // namespace lbug_mbedtls #elif defined(__GNUC__) && \ (defined(__amd64__) || defined(__x86_64__) || defined(__ppc64__) || defined(__powerpc64__) || \ defined(__ia64__) || defined(__alpha__) || (defined(__sparc__) && defined(__arch64__)) || \ @@ -136,12 +138,16 @@ typedef uint64_t mbedtls_mpi_uint; #if !defined(MBEDTLS_HAVE_INT64) #define MBEDTLS_HAVE_INT64 #endif /* MBEDTLS_HAVE_INT64 */ +namespace lbug_mbedtls { typedef int64_t mbedtls_mpi_sint; typedef uint64_t mbedtls_mpi_uint; +} // namespace lbug_mbedtls #if !defined(MBEDTLS_NO_UDBL_DIVISION) /* mbedtls_t_udbl defined as 128-bit unsigned int */ +namespace lbug_mbedtls { typedef unsigned int mbedtls_t_udbl __attribute__((mode(TI))); #define MBEDTLS_HAVE_UDBL +} // namespace lbug_mbedtls #endif /* !MBEDTLS_NO_UDBL_DIVISION */ #elif defined(__ARMCC_VERSION) && defined(__aarch64__) /* @@ -151,17 +157,23 @@ typedef unsigned int mbedtls_t_udbl __attribute__((mode(TI))); #if !defined(MBEDTLS_HAVE_INT64) #define MBEDTLS_HAVE_INT64 #endif /* !MBEDTLS_HAVE_INT64 */ +namespace lbug_mbedtls { typedef int64_t mbedtls_mpi_sint; typedef uint64_t mbedtls_mpi_uint; +} // namespace lbug_mbedtls #if !defined(MBEDTLS_NO_UDBL_DIVISION) /* mbedtls_t_udbl defined as 128-bit unsigned int */ +namespace lbug_mbedtls { typedef __uint128_t mbedtls_t_udbl; #define MBEDTLS_HAVE_UDBL +} // namespace lbug_mbedtls #endif /* !MBEDTLS_NO_UDBL_DIVISION */ #elif defined(MBEDTLS_HAVE_INT64) /* Force 64-bit integers with unknown compiler */ +namespace lbug_mbedtls { typedef int64_t mbedtls_mpi_sint; typedef uint64_t mbedtls_mpi_uint; +} // namespace lbug_mbedtls #endif #endif /* !MBEDTLS_HAVE_INT32 */ @@ -170,21 +182,23 @@ typedef uint64_t mbedtls_mpi_uint; #if !defined(MBEDTLS_HAVE_INT32) #define MBEDTLS_HAVE_INT32 #endif /* !MBEDTLS_HAVE_INT32 */ +namespace lbug_mbedtls { typedef int32_t mbedtls_mpi_sint; typedef uint32_t mbedtls_mpi_uint; +} // namespace lbug_mbedtls #if !defined(MBEDTLS_NO_UDBL_DIVISION) +namespace lbug_mbedtls { typedef uint64_t mbedtls_t_udbl; #define MBEDTLS_HAVE_UDBL +} // namespace lbug_mbedtls #endif /* !MBEDTLS_NO_UDBL_DIVISION */ #endif /* !MBEDTLS_HAVE_INT64 */ -#ifdef __cplusplus -extern "C" { -#endif /** * \brief MPI structure */ +namespace lbug_mbedtls { typedef struct mbedtls_mpi { int MBEDTLS_PRIVATE(s); /*!< Sign: -1 if the mpi is negative, 1 otherwise */ size_t MBEDTLS_PRIVATE(n); /*!< total # of limbs */ @@ -437,6 +451,7 @@ int mbedtls_mpi_read_string(mbedtls_mpi* X, int radix, const char* s); int mbedtls_mpi_write_string(const mbedtls_mpi* X, int radix, char* buf, size_t buflen, size_t* olen); +} // namespace lbug_mbedtls #if defined(MBEDTLS_FS_IO) /** * \brief Read an MPI from a line in an opened file. @@ -459,6 +474,7 @@ int mbedtls_mpi_write_string(const mbedtls_mpi* X, int radix, char* buf, size_t * is too small. * \return Another negative error code on failure. */ +namespace lbug_mbedtls { int mbedtls_mpi_read_file(mbedtls_mpi* X, int radix, FILE* fin); /** @@ -477,6 +493,7 @@ int mbedtls_mpi_read_file(mbedtls_mpi* X, int radix, FILE* fin); * \return A negative error code on failure. */ int mbedtls_mpi_write_file(const char* p, const mbedtls_mpi* X, int radix, FILE* fout); +} // namespace lbug_mbedtls #endif /* MBEDTLS_FS_IO */ /** @@ -491,6 +508,7 @@ int mbedtls_mpi_write_file(const char* p, const mbedtls_mpi* X, int radix, FILE* * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed. * \return Another negative error code on different kinds of failure. */ +namespace lbug_mbedtls { int mbedtls_mpi_read_binary(mbedtls_mpi* X, const unsigned char* buf, size_t buflen); /** @@ -982,6 +1000,7 @@ typedef enum { int mbedtls_mpi_gen_prime(mbedtls_mpi* X, size_t nbits, int flags, int (*f_rng)(void*, unsigned char*, size_t), void* p_rng); +} // namespace lbug_mbedtls #if defined(MBEDTLS_SELF_TEST) /** @@ -989,12 +1008,13 @@ int mbedtls_mpi_gen_prime(mbedtls_mpi* X, size_t nbits, int flags, * * \return 0 if successful, or 1 if the test failed */ +namespace lbug_mbedtls { int mbedtls_mpi_self_test(int verbose); +} // namespace lbug_mbedtls #endif /* MBEDTLS_SELF_TEST */ -#ifdef __cplusplus -} -#endif #endif /* bignum.h */ + +using namespace lbug_mbedtls; // keep unqualified names for in-tree consumers diff --git a/third_party/mbedtls/include/mbedtls/camellia.h b/third_party/mbedtls/include/mbedtls/camellia.h index f409c12374..33e9a677b5 100644 --- a/third_party/mbedtls/include/mbedtls/camellia.h +++ b/third_party/mbedtls/include/mbedtls/camellia.h @@ -37,9 +37,6 @@ /** Invalid data input length. */ #define MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH -0x0026 -#ifdef __cplusplus -extern "C" { -#endif #if !defined(MBEDTLS_CAMELLIA_ALT) // Regular implementation @@ -48,11 +45,13 @@ extern "C" { /** * \brief CAMELLIA context structure */ +namespace lbug_mbedtls { typedef struct mbedtls_camellia_context { int MBEDTLS_PRIVATE(nr); /*!< number of rounds */ uint32_t MBEDTLS_PRIVATE(rk)[68]; /*!< CAMELLIA round keys */ } mbedtls_camellia_context; +} // namespace lbug_mbedtls #else /* MBEDTLS_CAMELLIA_ALT */ #include "mbedtls/camellia_alt.h" #endif /* MBEDTLS_CAMELLIA_ALT */ @@ -63,6 +62,7 @@ typedef struct mbedtls_camellia_context { * \param ctx The CAMELLIA context to be initialized. * This must not be \c NULL. */ +namespace lbug_mbedtls { void mbedtls_camellia_init(mbedtls_camellia_context* ctx); /** @@ -122,6 +122,7 @@ int mbedtls_camellia_setkey_dec(mbedtls_camellia_context* ctx, const unsigned ch int mbedtls_camellia_crypt_ecb(mbedtls_camellia_context* ctx, int mode, const unsigned char input[16], unsigned char output[16]); +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_CBC) /** * \brief Perform a CAMELLIA-CBC buffer encryption/decryption operation. @@ -151,8 +152,10 @@ int mbedtls_camellia_crypt_ecb(mbedtls_camellia_context* ctx, int mode, * \return \c 0 if successful. * \return A negative error code on failure. */ +namespace lbug_mbedtls { int mbedtls_camellia_crypt_cbc(mbedtls_camellia_context* ctx, int mode, size_t length, unsigned char iv[16], const unsigned char* input, unsigned char* output); +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CBC */ #if defined(MBEDTLS_CIPHER_MODE_CFB) @@ -193,8 +196,10 @@ int mbedtls_camellia_crypt_cbc(mbedtls_camellia_context* ctx, int mode, size_t l * \return \c 0 if successful. * \return A negative error code on failure. */ +namespace lbug_mbedtls { int mbedtls_camellia_crypt_cfb128(mbedtls_camellia_context* ctx, int mode, size_t length, size_t* iv_off, unsigned char iv[16], const unsigned char* input, unsigned char* output); +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CFB */ #if defined(MBEDTLS_CIPHER_MODE_CTR) @@ -272,9 +277,11 @@ int mbedtls_camellia_crypt_cfb128(mbedtls_camellia_context* ctx, int mode, size_ * \return \c 0 if successful. * \return A negative error code on failure. */ +namespace lbug_mbedtls { int mbedtls_camellia_crypt_ctr(mbedtls_camellia_context* ctx, size_t length, size_t* nc_off, unsigned char nonce_counter[16], unsigned char stream_block[16], const unsigned char* input, unsigned char* output); +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CTR */ #if defined(MBEDTLS_SELF_TEST) @@ -284,12 +291,13 @@ int mbedtls_camellia_crypt_ctr(mbedtls_camellia_context* ctx, size_t length, siz * * \return 0 if successful, or 1 if the test failed */ +namespace lbug_mbedtls { int mbedtls_camellia_self_test(int verbose); +} // namespace lbug_mbedtls #endif /* MBEDTLS_SELF_TEST */ -#ifdef __cplusplus -} -#endif #endif /* camellia.h */ + +using namespace lbug_mbedtls; // keep unqualified names for in-tree consumers diff --git a/third_party/mbedtls/include/mbedtls/ccm.h b/third_party/mbedtls/include/mbedtls/ccm.h index c8880f6883..9e6cb962be 100644 --- a/third_party/mbedtls/include/mbedtls/ccm.h +++ b/third_party/mbedtls/include/mbedtls/ccm.h @@ -60,9 +60,6 @@ /** Authenticated decryption failed. */ #define MBEDTLS_ERR_CCM_AUTH_FAILED -0x000F -#ifdef __cplusplus -extern "C" { -#endif #if !defined(MBEDTLS_CCM_ALT) // Regular implementation @@ -72,6 +69,7 @@ extern "C" { * \brief The CCM context-type definition. The CCM context is passed * to the APIs called. */ +namespace lbug_mbedtls { typedef struct mbedtls_ccm_context { unsigned char MBEDTLS_PRIVATE(y)[16]; /*!< The Y working buffer */ unsigned char MBEDTLS_PRIVATE(ctr)[16]; /*!< The counter buffer */ @@ -96,6 +94,7 @@ typedef struct mbedtls_ccm_context { input */ } mbedtls_ccm_context; +} // namespace lbug_mbedtls #else /* MBEDTLS_CCM_ALT */ #include "mbedtls/ccm_alt.h" #endif /* MBEDTLS_CCM_ALT */ @@ -107,6 +106,7 @@ typedef struct mbedtls_ccm_context { * * \param ctx The CCM context to initialize. This must not be \c NULL. */ +namespace lbug_mbedtls { void mbedtls_ccm_init(mbedtls_ccm_context* ctx); /** @@ -491,6 +491,7 @@ int mbedtls_ccm_update(mbedtls_ccm_context* ctx, const unsigned char* input, siz */ int mbedtls_ccm_finish(mbedtls_ccm_context* ctx, unsigned char* tag, size_t tag_len); +} // namespace lbug_mbedtls #if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_AES_C) /** * \brief The CCM checkup routine. @@ -498,11 +499,12 @@ int mbedtls_ccm_finish(mbedtls_ccm_context* ctx, unsigned char* tag, size_t tag_ * \return \c 0 on success. * \return \c 1 on failure. */ +namespace lbug_mbedtls { int mbedtls_ccm_self_test(int verbose); +} // namespace lbug_mbedtls #endif /* MBEDTLS_SELF_TEST && MBEDTLS_AES_C */ -#ifdef __cplusplus -} -#endif #endif /* MBEDTLS_CCM_H */ + +using namespace lbug_mbedtls; // keep unqualified names for in-tree consumers diff --git a/third_party/mbedtls/include/mbedtls/cipher.h b/third_party/mbedtls/include/mbedtls/cipher.h index 27bbd307a8..071198390d 100644 --- a/third_party/mbedtls/include/mbedtls/cipher.h +++ b/third_party/mbedtls/include/mbedtls/cipher.h @@ -66,9 +66,6 @@ #define MBEDTLS_CIPHER_VARIABLE_IV_LEN 0x01 /**< Cipher accepts IVs of variable length. */ #define MBEDTLS_CIPHER_VARIABLE_KEY_LEN 0x02 /**< Cipher accepts keys of variable length. */ -#ifdef __cplusplus -extern "C" { -#endif /** * \brief Supported cipher types. @@ -77,6 +74,7 @@ extern "C" { * constitutes a security risk. Arm recommends considering stronger * ciphers instead. */ +namespace lbug_mbedtls { typedef enum { MBEDTLS_CIPHER_ID_NONE = 0, /**< Placeholder to mark the end of cipher ID lists. */ MBEDTLS_CIPHER_ID_NULL, /**< The identity cipher, treated as a stream cipher. */ @@ -252,6 +250,7 @@ enum { * This should be kept in sync with MBEDTLS_SSL_MAX_BLOCK_LENGTH defined * in library/ssl_misc.h, which however deliberately ignores the case of XTS * since the latter isn't used in SSL/TLS. */ +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_XTS) #define MBEDTLS_MAX_KEY_LENGTH 64 #else @@ -261,6 +260,7 @@ enum { /** * Base cipher information (opaque struct). */ +namespace lbug_mbedtls { typedef struct mbedtls_cipher_base_t mbedtls_cipher_base_t; /** @@ -627,6 +627,7 @@ void mbedtls_cipher_free(mbedtls_cipher_context_t* ctx); */ int mbedtls_cipher_setup(mbedtls_cipher_context_t* ctx, const mbedtls_cipher_info_t* cipher_info); +} // namespace lbug_mbedtls #if defined(MBEDTLS_USE_PSA_CRYPTO) /** * \brief This function initializes a cipher context for @@ -649,8 +650,10 @@ int mbedtls_cipher_setup(mbedtls_cipher_context_t* ctx, const mbedtls_cipher_inf * \return #MBEDTLS_ERR_CIPHER_ALLOC_FAILED if allocation of the * cipher-specific context fails. */ +namespace lbug_mbedtls { int mbedtls_cipher_setup_psa(mbedtls_cipher_context_t* ctx, const mbedtls_cipher_info_t* cipher_info, size_t taglen); +} // namespace lbug_mbedtls #endif /* MBEDTLS_USE_PSA_CRYPTO */ /** @@ -663,6 +666,7 @@ int mbedtls_cipher_setup_psa(mbedtls_cipher_context_t* ctx, * \return \c 1 if the cipher is a stream cipher. * \return \c 0 if \p ctx has not been initialized. */ +namespace lbug_mbedtls { static inline unsigned int mbedtls_cipher_get_block_size(const mbedtls_cipher_context_t* ctx) { MBEDTLS_INTERNAL_VALIDATE_RET(ctx != NULL, 0); if (ctx->MBEDTLS_PRIVATE(cipher_info) == NULL) @@ -809,6 +813,7 @@ static inline unsigned int mbedtls_cipher_get_block_size(const mbedtls_cipher_co int mbedtls_cipher_setkey(mbedtls_cipher_context_t* ctx, const unsigned char* key, int key_bitlen, const mbedtls_operation_t operation); +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_WITH_PADDING) /** * \brief This function sets the padding mode, for cipher modes @@ -826,7 +831,9 @@ int mbedtls_cipher_setkey(mbedtls_cipher_context_t* ctx, const unsigned char* ke * \return #MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA if the cipher mode * does not support padding. */ +namespace lbug_mbedtls { int mbedtls_cipher_set_padding_mode(mbedtls_cipher_context_t* ctx, mbedtls_cipher_padding_t mode); +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_WITH_PADDING */ /** @@ -847,6 +854,7 @@ int mbedtls_cipher_set_padding_mode(mbedtls_cipher_context_t* ctx, mbedtls_ciphe * \return #MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA on * parameter-verification failure. */ +namespace lbug_mbedtls { int mbedtls_cipher_set_iv(mbedtls_cipher_context_t* ctx, const unsigned char* iv, size_t iv_len); /** @@ -883,6 +891,7 @@ int mbedtls_cipher_set_iv(mbedtls_cipher_context_t* ctx, const unsigned char* iv */ int mbedtls_cipher_reset(mbedtls_cipher_context_t* ctx); +} // namespace lbug_mbedtls #if defined(MBEDTLS_GCM_C) || defined(MBEDTLS_CHACHAPOLY_C) /** * \brief This function adds additional data for AEAD ciphers. @@ -896,7 +905,9 @@ int mbedtls_cipher_reset(mbedtls_cipher_context_t* ctx); * \return \c 0 on success. * \return A specific error code on failure. */ +namespace lbug_mbedtls { int mbedtls_cipher_update_ad(mbedtls_cipher_context_t* ctx, const unsigned char* ad, size_t ad_len); +} // namespace lbug_mbedtls #endif /* MBEDTLS_GCM_C || MBEDTLS_CHACHAPOLY_C */ /** @@ -928,6 +939,7 @@ int mbedtls_cipher_update_ad(mbedtls_cipher_context_t* ctx, const unsigned char* * unsupported mode for a cipher. * \return A cipher-specific error code on failure. */ +namespace lbug_mbedtls { int mbedtls_cipher_update(mbedtls_cipher_context_t* ctx, const unsigned char* input, size_t ilen, unsigned char* output, size_t* olen); @@ -955,6 +967,7 @@ int mbedtls_cipher_update(mbedtls_cipher_context_t* ctx, const unsigned char* in */ int mbedtls_cipher_finish(mbedtls_cipher_context_t* ctx, unsigned char* output, size_t* olen); +} // namespace lbug_mbedtls #if defined(MBEDTLS_GCM_C) || defined(MBEDTLS_CHACHAPOLY_C) /** * \brief This function writes a tag for AEAD ciphers. @@ -972,6 +985,7 @@ int mbedtls_cipher_finish(mbedtls_cipher_context_t* ctx, unsigned char* output, * \return \c 0 on success. * \return A specific error code on failure. */ +namespace lbug_mbedtls { int mbedtls_cipher_write_tag(mbedtls_cipher_context_t* ctx, unsigned char* tag, size_t tag_len); /** @@ -989,6 +1003,7 @@ int mbedtls_cipher_write_tag(mbedtls_cipher_context_t* ctx, unsigned char* tag, */ int mbedtls_cipher_check_tag(mbedtls_cipher_context_t* ctx, const unsigned char* tag, size_t tag_len); +} // namespace lbug_mbedtls #endif /* MBEDTLS_GCM_C || MBEDTLS_CHACHAPOLY_C */ /** @@ -1024,9 +1039,11 @@ int mbedtls_cipher_check_tag(mbedtls_cipher_context_t* ctx, const unsigned char* * while decrypting. * \return A cipher-specific error code on failure. */ +namespace lbug_mbedtls { int mbedtls_cipher_crypt(mbedtls_cipher_context_t* ctx, const unsigned char* iv, size_t iv_len, const unsigned char* input, size_t ilen, unsigned char* output, size_t* olen); +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_AEAD) || defined(MBEDTLS_NIST_KW_C) /** * \brief The authenticated encryption (AEAD/NIST_KW) function. @@ -1072,6 +1089,7 @@ int mbedtls_cipher_crypt(mbedtls_cipher_context_t* ctx, const unsigned char* iv, * parameter-verification failure. * \return A cipher-specific error code on failure. */ +namespace lbug_mbedtls { int mbedtls_cipher_auth_encrypt_ext(mbedtls_cipher_context_t* ctx, const unsigned char* iv, size_t iv_len, const unsigned char* ad, size_t ad_len, const unsigned char* input, size_t ilen, unsigned char* output, size_t output_len, size_t* olen, size_t tag_len); @@ -1128,9 +1146,9 @@ int mbedtls_cipher_auth_encrypt_ext(mbedtls_cipher_context_t* ctx, const unsigne int mbedtls_cipher_auth_decrypt_ext(mbedtls_cipher_context_t* ctx, const unsigned char* iv, size_t iv_len, const unsigned char* ad, size_t ad_len, const unsigned char* input, size_t ilen, unsigned char* output, size_t output_len, size_t* olen, size_t tag_len); +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_AEAD || MBEDTLS_NIST_KW_C */ -#ifdef __cplusplus -} -#endif #endif /* MBEDTLS_CIPHER_H */ + +using namespace lbug_mbedtls; // keep unqualified names for in-tree consumers diff --git a/third_party/mbedtls/include/mbedtls/constant_time.h b/third_party/mbedtls/include/mbedtls/constant_time.h index c5b2334dad..962968e12c 100644 --- a/third_party/mbedtls/include/mbedtls/constant_time.h +++ b/third_party/mbedtls/include/mbedtls/constant_time.h @@ -37,6 +37,10 @@ * \return Zero if the content of the two buffer is the same, * otherwise non-zero. */ +namespace lbug_mbedtls { int mbedtls_ct_memcmp(const void* a, const void* b, size_t n); +} // namespace lbug_mbedtls #endif /* MBEDTLS_CONSTANT_TIME_H */ + +using namespace lbug_mbedtls; // keep unqualified names for in-tree consumers diff --git a/third_party/mbedtls/include/mbedtls/des.h b/third_party/mbedtls/include/mbedtls/des.h index 656af738ba..93f54d2824 100644 --- a/third_party/mbedtls/include/mbedtls/des.h +++ b/third_party/mbedtls/include/mbedtls/des.h @@ -41,9 +41,6 @@ #define MBEDTLS_DES_KEY_SIZE 8 -#ifdef __cplusplus -extern "C" { -#endif #if !defined(MBEDTLS_DES_ALT) // Regular implementation @@ -56,6 +53,7 @@ extern "C" { * security risk. We recommend considering stronger ciphers * instead. */ +namespace lbug_mbedtls { typedef struct mbedtls_des_context { uint32_t MBEDTLS_PRIVATE(sk)[32]; /*!< DES subkeys */ } mbedtls_des_context; @@ -67,6 +65,7 @@ typedef struct mbedtls_des3_context { uint32_t MBEDTLS_PRIVATE(sk)[96]; /*!< 3DES subkeys */ } mbedtls_des3_context; +} // namespace lbug_mbedtls #else /* MBEDTLS_DES_ALT */ #include "des_alt.h" #endif /* MBEDTLS_DES_ALT */ @@ -80,6 +79,7 @@ typedef struct mbedtls_des3_context { * security risk. We recommend considering stronger ciphers * instead. */ +namespace lbug_mbedtls { void mbedtls_des_init(mbedtls_des_context* ctx); /** @@ -247,6 +247,7 @@ MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_des_crypt_ecb(mbedtls_des_context* ctx, const unsigned char input[8], unsigned char output[8]); +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_CBC) /** * \brief DES-CBC buffer encryption/decryption @@ -270,9 +271,11 @@ int mbedtls_des_crypt_ecb(mbedtls_des_context* ctx, const unsigned char input[8] * security risk. We recommend considering stronger ciphers * instead. */ +namespace lbug_mbedtls { MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_des_crypt_cbc(mbedtls_des_context* ctx, int mode, size_t length, unsigned char iv[8], const unsigned char* input, unsigned char* output); +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CBC */ /** @@ -284,10 +287,12 @@ int mbedtls_des_crypt_cbc(mbedtls_des_context* ctx, int mode, size_t length, uns * * \return 0 if successful */ +namespace lbug_mbedtls { MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_des3_crypt_ecb(mbedtls_des3_context* ctx, const unsigned char input[8], unsigned char output[8]); +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_CBC) /** * \brief 3DES-CBC buffer encryption/decryption @@ -309,9 +314,11 @@ int mbedtls_des3_crypt_ecb(mbedtls_des3_context* ctx, const unsigned char input[ * * \return 0 if successful, or MBEDTLS_ERR_DES_INVALID_INPUT_LENGTH */ +namespace lbug_mbedtls { MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_des3_crypt_cbc(mbedtls_des3_context* ctx, int mode, size_t length, unsigned char iv[8], const unsigned char* input, unsigned char* output); +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CBC */ /** @@ -326,8 +333,10 @@ int mbedtls_des3_crypt_cbc(mbedtls_des3_context* ctx, int mode, size_t length, u * security risk. We recommend considering stronger ciphers * instead. */ +namespace lbug_mbedtls { void mbedtls_des_setkey(uint32_t SK[32], const unsigned char key[MBEDTLS_DES_KEY_SIZE]); +} // namespace lbug_mbedtls #if defined(MBEDTLS_SELF_TEST) /** @@ -335,13 +344,14 @@ void mbedtls_des_setkey(uint32_t SK[32], const unsigned char key[MBEDTLS_DES_KEY * * \return 0 if successful, or 1 if the test failed */ +namespace lbug_mbedtls { MBEDTLS_CHECK_RETURN_CRITICAL int mbedtls_des_self_test(int verbose); +} // namespace lbug_mbedtls #endif /* MBEDTLS_SELF_TEST */ -#ifdef __cplusplus -} -#endif #endif /* des.h */ + +using namespace lbug_mbedtls; // keep unqualified names for in-tree consumers diff --git a/third_party/mbedtls/include/mbedtls/entropy.h b/third_party/mbedtls/include/mbedtls/entropy.h index a1cc701fd6..a52f72a210 100644 --- a/third_party/mbedtls/include/mbedtls/entropy.h +++ b/third_party/mbedtls/include/mbedtls/entropy.h @@ -81,9 +81,6 @@ #define MBEDTLS_ENTROPY_SOURCE_STRONG 1 /**< Entropy source is strong */ #define MBEDTLS_ENTROPY_SOURCE_WEAK 0 /**< Entropy source is weak */ -#ifdef __cplusplus -extern "C" { -#endif /** * \brief Entropy poll callback pointer @@ -96,6 +93,7 @@ extern "C" { * \return 0 if no critical failures occurred, * MBEDTLS_ERR_ENTROPY_SOURCE_FAILED otherwise */ +namespace lbug_mbedtls { typedef int ( *mbedtls_entropy_f_source_ptr)(void* data, unsigned char* output, size_t len, size_t* olen); @@ -132,11 +130,14 @@ typedef struct mbedtls_entropy_context { #endif } mbedtls_entropy_context; +} // namespace lbug_mbedtls #if !defined(MBEDTLS_NO_PLATFORM_ENTROPY) /** * \brief Platform-specific entropy poll callback */ +namespace lbug_mbedtls { int mbedtls_platform_entropy_poll(void* data, unsigned char* output, size_t len, size_t* olen); +} // namespace lbug_mbedtls #endif /** @@ -144,6 +145,7 @@ int mbedtls_platform_entropy_poll(void* data, unsigned char* output, size_t len, * * \param ctx Entropy context to initialize */ +namespace lbug_mbedtls { void mbedtls_entropy_init(mbedtls_entropy_context* ctx); /** @@ -209,6 +211,7 @@ int mbedtls_entropy_func(void* data, unsigned char* output, size_t len); int mbedtls_entropy_update_manual(mbedtls_entropy_context* ctx, const unsigned char* data, size_t len); +} // namespace lbug_mbedtls #if defined(MBEDTLS_ENTROPY_NV_SEED) /** * \brief Trigger an update of the seed file in NV by using the @@ -218,7 +221,9 @@ int mbedtls_entropy_update_manual(mbedtls_entropy_context* ctx, const unsigned c * * \return 0 if successful */ +namespace lbug_mbedtls { int mbedtls_entropy_update_nv_seed(mbedtls_entropy_context* ctx); +} // namespace lbug_mbedtls #endif /* MBEDTLS_ENTROPY_NV_SEED */ #if defined(MBEDTLS_FS_IO) @@ -232,6 +237,7 @@ int mbedtls_entropy_update_nv_seed(mbedtls_entropy_context* ctx); * MBEDTLS_ERR_ENTROPY_FILE_IO_ERROR on file error, or * MBEDTLS_ERR_ENTROPY_SOURCE_FAILED */ +namespace lbug_mbedtls { int mbedtls_entropy_write_seed_file(mbedtls_entropy_context* ctx, const char* path); /** @@ -247,6 +253,7 @@ int mbedtls_entropy_write_seed_file(mbedtls_entropy_context* ctx, const char* pa * MBEDTLS_ERR_ENTROPY_SOURCE_FAILED */ int mbedtls_entropy_update_seed_file(mbedtls_entropy_context* ctx, const char* path); +} // namespace lbug_mbedtls #endif /* MBEDTLS_FS_IO */ #if defined(MBEDTLS_SELF_TEST) @@ -258,8 +265,10 @@ int mbedtls_entropy_update_seed_file(mbedtls_entropy_context* ctx, const char* p * * \return 0 if successful, or 1 if a test failed */ +namespace lbug_mbedtls { int mbedtls_entropy_self_test(int verbose); +} // namespace lbug_mbedtls #if defined(MBEDTLS_ENTROPY_HARDWARE_ALT) /** * \brief Checkup routine @@ -274,12 +283,13 @@ int mbedtls_entropy_self_test(int verbose); * * \return 0 if successful, or 1 if a test failed */ +namespace lbug_mbedtls { int mbedtls_entropy_source_self_test(int verbose); +} // namespace lbug_mbedtls #endif /* MBEDTLS_ENTROPY_HARDWARE_ALT */ #endif /* MBEDTLS_SELF_TEST */ -#ifdef __cplusplus -} -#endif #endif /* entropy.h */ + +using namespace lbug_mbedtls; // keep unqualified names for in-tree consumers diff --git a/third_party/mbedtls/include/mbedtls/error.h b/third_party/mbedtls/include/mbedtls/error.h index 4673c489ae..edc1de420b 100644 --- a/third_party/mbedtls/include/mbedtls/error.h +++ b/third_party/mbedtls/include/mbedtls/error.h @@ -103,9 +103,6 @@ * Module dependent error code (5 bits 0x.00.-0x.F8.) */ -#ifdef __cplusplus -extern "C" { -#endif /** Generic error */ #define MBEDTLS_ERR_ERROR_GENERIC_ERROR -0x0001 @@ -130,7 +127,9 @@ extern "C" { * \brief Testing hook called before adding/combining two error codes together. * Only used when invasive testing is enabled via MBEDTLS_TEST_HOOKS. */ +namespace lbug_mbedtls { extern void (*mbedtls_test_hook_error_add)(int, int, const char*, int); +} // namespace lbug_mbedtls #endif /** @@ -151,6 +150,7 @@ extern void (*mbedtls_test_hook_error_add)(int, int, const char*, int); * \param file file where this error code addition occurred. * \param line line where this error code addition occurred. */ +namespace lbug_mbedtls { static inline int mbedtls_error_add(int high, int low, const char* file, int line) { #if defined(MBEDTLS_TEST_HOOKS) if (*mbedtls_test_hook_error_add != NULL) @@ -203,8 +203,8 @@ const char* mbedtls_high_level_strerr(int error_code); */ const char* mbedtls_low_level_strerr(int error_code); -#ifdef __cplusplus -} -#endif +} // namespace lbug_mbedtls #endif /* error.h */ + +using namespace lbug_mbedtls; // keep unqualified names for in-tree consumers diff --git a/third_party/mbedtls/include/mbedtls/gcm.h b/third_party/mbedtls/include/mbedtls/gcm.h index 544c7ba12a..7c19e3656c 100644 --- a/third_party/mbedtls/include/mbedtls/gcm.h +++ b/third_party/mbedtls/include/mbedtls/gcm.h @@ -46,15 +46,13 @@ /** An output buffer is too small. */ #define MBEDTLS_ERR_GCM_BUFFER_TOO_SMALL -0x0016 -#ifdef __cplusplus -extern "C" { -#endif #if !defined(MBEDTLS_GCM_ALT) /** * \brief The GCM context structure. */ +namespace lbug_mbedtls { typedef struct mbedtls_gcm_context { mbedtls_cipher_context_t MBEDTLS_PRIVATE(cipher_ctx); /*!< The cipher context used. */ uint64_t MBEDTLS_PRIVATE(HL)[16]; /*!< Precalculated HTable low. */ @@ -69,6 +67,7 @@ typedef struct mbedtls_gcm_context { #MBEDTLS_GCM_DECRYPT. */ } mbedtls_gcm_context; +} // namespace lbug_mbedtls #else /* !MBEDTLS_GCM_ALT */ #include "mbedtls/gcm_alt.h" #endif /* !MBEDTLS_GCM_ALT */ @@ -84,6 +83,7 @@ typedef struct mbedtls_gcm_context { * * \param ctx The GCM context to initialize. This must not be \c NULL. */ +namespace lbug_mbedtls { void mbedtls_gcm_init(mbedtls_gcm_context* ctx); /** @@ -333,6 +333,7 @@ int mbedtls_gcm_finish(mbedtls_gcm_context* ctx, unsigned char* output, size_t o */ void mbedtls_gcm_free(mbedtls_gcm_context* ctx); +} // namespace lbug_mbedtls #if defined(MBEDTLS_SELF_TEST) /** @@ -341,12 +342,13 @@ void mbedtls_gcm_free(mbedtls_gcm_context* ctx); * \return \c 0 on success. * \return \c 1 on failure. */ +namespace lbug_mbedtls { int mbedtls_gcm_self_test(int verbose); +} // namespace lbug_mbedtls #endif /* MBEDTLS_SELF_TEST */ -#ifdef __cplusplus -} -#endif #endif /* gcm.h */ + +using namespace lbug_mbedtls; // keep unqualified names for in-tree consumers diff --git a/third_party/mbedtls/include/mbedtls/md.h b/third_party/mbedtls/include/mbedtls/md.h index 79c7b5fe49..60315ff2b2 100644 --- a/third_party/mbedtls/include/mbedtls/md.h +++ b/third_party/mbedtls/include/mbedtls/md.h @@ -39,9 +39,6 @@ /** Opening or reading of file failed. */ #define MBEDTLS_ERR_MD_FILE_IO_ERROR -0x5200 -#ifdef __cplusplus -extern "C" { -#endif /** * \brief Supported message digests. @@ -51,6 +48,7 @@ extern "C" { * stronger message digests instead. * */ +namespace lbug_mbedtls { typedef enum { MBEDTLS_MD_NONE = 0, /**< None. */ MBEDTLS_MD_MD5, /**< The MD5 message digest. */ @@ -62,6 +60,7 @@ typedef enum { MBEDTLS_MD_RIPEMD160, /**< The RIPEMD-160 message digest. */ } mbedtls_md_type_t; +} // namespace lbug_mbedtls #if defined(MBEDTLS_SHA512_C) #define MBEDTLS_MD_MAX_SIZE 64 /* longest known is SHA512 */ #else @@ -84,6 +83,7 @@ typedef enum { * #mbedtls_md_get_type and #mbedtls_md_get_name. */ /* Defined internally in library/md_wrap.h. */ +namespace lbug_mbedtls { typedef struct mbedtls_md_info_t mbedtls_md_info_t; /** @@ -315,6 +315,7 @@ MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_md(const mbedtls_md_info_t* md_info, const unsigned char* input, size_t ilen, unsigned char* output); +} // namespace lbug_mbedtls #if defined(MBEDTLS_FS_IO) /** * \brief This function calculates the message-digest checksum @@ -333,8 +334,10 @@ int mbedtls_md(const mbedtls_md_info_t* md_info, const unsigned char* input, siz * the file pointed by \p path. * \return #MBEDTLS_ERR_MD_BAD_INPUT_DATA if \p md_info was NULL. */ +namespace lbug_mbedtls { MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_md_file(const mbedtls_md_info_t* md_info, const char* path, unsigned char* output); +} // namespace lbug_mbedtls #endif /* MBEDTLS_FS_IO */ /** @@ -355,6 +358,7 @@ int mbedtls_md_file(const mbedtls_md_info_t* md_info, const char* path, unsigned * \return #MBEDTLS_ERR_MD_BAD_INPUT_DATA on parameter-verification * failure. */ +namespace lbug_mbedtls { MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_md_hmac_starts(mbedtls_md_context_t* ctx, const unsigned char* key, size_t keylen); @@ -449,8 +453,8 @@ int mbedtls_md_hmac(const mbedtls_md_info_t* md_info, const unsigned char* key, MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_md_process(mbedtls_md_context_t* ctx, const unsigned char* data); -#ifdef __cplusplus -} -#endif +} // namespace lbug_mbedtls #endif /* MBEDTLS_MD_H */ + +using namespace lbug_mbedtls; // keep unqualified names for in-tree consumers diff --git a/third_party/mbedtls/include/mbedtls/memory_buffer_alloc.h b/third_party/mbedtls/include/mbedtls/memory_buffer_alloc.h index 7eba8199c2..e8115f075d 100644 --- a/third_party/mbedtls/include/mbedtls/memory_buffer_alloc.h +++ b/third_party/mbedtls/include/mbedtls/memory_buffer_alloc.h @@ -45,9 +45,6 @@ #define MBEDTLS_MEMORY_VERIFY_FREE (1 << 1) #define MBEDTLS_MEMORY_VERIFY_ALWAYS (MBEDTLS_MEMORY_VERIFY_ALLOC | MBEDTLS_MEMORY_VERIFY_FREE) -#ifdef __cplusplus -extern "C" { -#endif /** * \brief Initialize use of stack-based memory allocator. @@ -64,6 +61,7 @@ extern "C" { * \param buf buffer to use as heap * \param len size of the buffer */ +namespace lbug_mbedtls { void mbedtls_memory_buffer_alloc_init(unsigned char* buf, size_t len); /** @@ -81,6 +79,7 @@ void mbedtls_memory_buffer_alloc_free(void); */ void mbedtls_memory_buffer_set_verify(int verify); +} // namespace lbug_mbedtls #if defined(MBEDTLS_MEMORY_DEBUG) /** * \brief Print out the status of the allocated memory (primarily for use @@ -88,6 +87,7 @@ void mbedtls_memory_buffer_set_verify(int verify); * Prints out a list of 'still allocated' blocks and their stack * trace if MBEDTLS_MEMORY_BACKTRACE is defined. */ +namespace lbug_mbedtls { void mbedtls_memory_buffer_alloc_status(void); /** @@ -114,6 +114,7 @@ void mbedtls_memory_buffer_alloc_max_reset(void); * \param cur_blocks Current number of blocks in use, including free and used */ void mbedtls_memory_buffer_alloc_cur_get(size_t* cur_used, size_t* cur_blocks); +} // namespace lbug_mbedtls #endif /* MBEDTLS_MEMORY_DEBUG */ /** @@ -127,19 +128,22 @@ void mbedtls_memory_buffer_alloc_cur_get(size_t* cur_used, size_t* cur_blocks); * * \return 0 if verified, 1 otherwise */ +namespace lbug_mbedtls { int mbedtls_memory_buffer_alloc_verify(void); +} // namespace lbug_mbedtls #if defined(MBEDTLS_SELF_TEST) /** * \brief Checkup routine * * \return 0 if successful, or 1 if a test failed */ +namespace lbug_mbedtls { int mbedtls_memory_buffer_alloc_self_test(int verbose); +} // namespace lbug_mbedtls #endif -#ifdef __cplusplus -} -#endif #endif /* memory_buffer_alloc.h */ + +using namespace lbug_mbedtls; // keep unqualified names for in-tree consumers diff --git a/third_party/mbedtls/include/mbedtls/oid.h b/third_party/mbedtls/include/mbedtls/oid.h index de20988a15..b1ab239d72 100644 --- a/third_party/mbedtls/include/mbedtls/oid.h +++ b/third_party/mbedtls/include/mbedtls/oid.h @@ -573,13 +573,11 @@ * ecdsa-with-SHA2(3) 4 } */ #define MBEDTLS_OID_ECDSA_SHA512 MBEDTLS_OID_ANSI_X9_62_SIG_SHA2 "\x04" -#ifdef __cplusplus -extern "C" { -#endif /** * \brief Base OID descriptor structure */ +namespace lbug_mbedtls { typedef struct mbedtls_oid_descriptor_t { const char* MBEDTLS_PRIVATE(asn1); /*!< OID ASN.1 representation */ size_t MBEDTLS_PRIVATE(asn1_len); /*!< length of asn1 */ @@ -644,6 +642,7 @@ int mbedtls_oid_get_pk_alg(const mbedtls_asn1_buf* oid, mbedtls_pk_type_t* pk_al */ int mbedtls_oid_get_oid_by_pk_alg(mbedtls_pk_type_t pk_alg, const char** oid, size_t* olen); +} // namespace lbug_mbedtls #if defined(MBEDTLS_ECP_C) /** * \brief Translate NamedCurve OID into an EC group identifier @@ -653,6 +652,7 @@ int mbedtls_oid_get_oid_by_pk_alg(mbedtls_pk_type_t pk_alg, const char** oid, si * * \return 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND */ +namespace lbug_mbedtls { int mbedtls_oid_get_ec_grp(const mbedtls_asn1_buf* oid, mbedtls_ecp_group_id* grp_id); /** @@ -665,6 +665,7 @@ int mbedtls_oid_get_ec_grp(const mbedtls_asn1_buf* oid, mbedtls_ecp_group_id* gr * \return 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND */ int mbedtls_oid_get_oid_by_ec_grp(mbedtls_ecp_group_id grp_id, const char** oid, size_t* olen); +} // namespace lbug_mbedtls #endif /* MBEDTLS_ECP_C */ #if defined(MBEDTLS_MD_C) @@ -677,6 +678,7 @@ int mbedtls_oid_get_oid_by_ec_grp(mbedtls_ecp_group_id grp_id, const char** oid, * * \return 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND */ +namespace lbug_mbedtls { int mbedtls_oid_get_sig_alg(const mbedtls_asn1_buf* oid, mbedtls_md_type_t* md_alg, mbedtls_pk_type_t* pk_alg); @@ -722,6 +724,7 @@ int mbedtls_oid_get_md_alg(const mbedtls_asn1_buf* oid, mbedtls_md_type_t* md_al * \return 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND */ int mbedtls_oid_get_md_hmac(const mbedtls_asn1_buf* oid, mbedtls_md_type_t* md_hmac); +} // namespace lbug_mbedtls #endif /* MBEDTLS_MD_C */ #if !defined(MBEDTLS_X509_REMOVE_INFO) @@ -733,7 +736,9 @@ int mbedtls_oid_get_md_hmac(const mbedtls_asn1_buf* oid, mbedtls_md_type_t* md_h * * \return 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND */ +namespace lbug_mbedtls { int mbedtls_oid_get_extended_key_usage(const mbedtls_asn1_buf* oid, const char** desc); +} // namespace lbug_mbedtls #endif /** @@ -744,6 +749,7 @@ int mbedtls_oid_get_extended_key_usage(const mbedtls_asn1_buf* oid, const char** * * \return 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND */ +namespace lbug_mbedtls { int mbedtls_oid_get_certificate_policies(const mbedtls_asn1_buf* oid, const char** desc); /** @@ -757,6 +763,7 @@ int mbedtls_oid_get_certificate_policies(const mbedtls_asn1_buf* oid, const char */ int mbedtls_oid_get_oid_by_md(mbedtls_md_type_t md_alg, const char** oid, size_t* olen); +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_C) /** * \brief Translate encryption algorithm OID into cipher_type @@ -766,7 +773,9 @@ int mbedtls_oid_get_oid_by_md(mbedtls_md_type_t md_alg, const char** oid, size_t * * \return 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND */ +namespace lbug_mbedtls { int mbedtls_oid_get_cipher_alg(const mbedtls_asn1_buf* oid, mbedtls_cipher_type_t* cipher_alg); +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_C */ #if defined(MBEDTLS_PKCS12_C) @@ -780,12 +789,13 @@ int mbedtls_oid_get_cipher_alg(const mbedtls_asn1_buf* oid, mbedtls_cipher_type_ * * \return 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND */ +namespace lbug_mbedtls { int mbedtls_oid_get_pkcs12_pbe_alg(const mbedtls_asn1_buf* oid, mbedtls_md_type_t* md_alg, mbedtls_cipher_type_t* cipher_alg); +} // namespace lbug_mbedtls #endif /* MBEDTLS_PKCS12_C */ -#ifdef __cplusplus -} -#endif #endif /* oid.h */ + +using namespace lbug_mbedtls; // keep unqualified names for in-tree consumers diff --git a/third_party/mbedtls/include/mbedtls/pem.h b/third_party/mbedtls/include/mbedtls/pem.h index d9aeb5a895..98d6baf858 100644 --- a/third_party/mbedtls/include/mbedtls/pem.h +++ b/third_party/mbedtls/include/mbedtls/pem.h @@ -52,14 +52,12 @@ #define MBEDTLS_ERR_PEM_BAD_INPUT_DATA -0x1480 /* \} name */ -#ifdef __cplusplus -extern "C" { -#endif #if defined(MBEDTLS_PEM_PARSE_C) /** * \brief PEM context structure */ +namespace lbug_mbedtls { typedef struct mbedtls_pem_context { unsigned char* MBEDTLS_PRIVATE(buf); /*!< buffer for decoded data */ size_t MBEDTLS_PRIVATE(buflen); /*!< length of the buffer */ @@ -104,6 +102,7 @@ int mbedtls_pem_read_buffer(mbedtls_pem_context* ctx, const char* header, const * \param ctx context to be freed */ void mbedtls_pem_free(mbedtls_pem_context* ctx); +} // namespace lbug_mbedtls #endif /* MBEDTLS_PEM_PARSE_C */ #if defined(MBEDTLS_PEM_WRITE_C) @@ -133,12 +132,13 @@ void mbedtls_pem_free(mbedtls_pem_context* ctx); * the required minimum size of \p buf. * \return Another PEM or BASE64 error code on other kinds of failure. */ +namespace lbug_mbedtls { int mbedtls_pem_write_buffer(const char* header, const char* footer, const unsigned char* der_data, size_t der_len, unsigned char* buf, size_t buf_len, size_t* olen); +} // namespace lbug_mbedtls #endif /* MBEDTLS_PEM_WRITE_C */ -#ifdef __cplusplus -} -#endif #endif /* pem.h */ + +using namespace lbug_mbedtls; // keep unqualified names for in-tree consumers diff --git a/third_party/mbedtls/include/mbedtls/pk.h b/third_party/mbedtls/include/mbedtls/pk.h index ad2981bcf7..27d0b89269 100644 --- a/third_party/mbedtls/include/mbedtls/pk.h +++ b/third_party/mbedtls/include/mbedtls/pk.h @@ -77,13 +77,11 @@ /** The output buffer is too small. */ #define MBEDTLS_ERR_PK_BUFFER_TOO_SMALL -0x3880 -#ifdef __cplusplus -extern "C" { -#endif /** * \brief Public key types */ +namespace lbug_mbedtls { typedef enum { MBEDTLS_PK_NONE = 0, MBEDTLS_PK_RSA, @@ -119,6 +117,7 @@ typedef struct mbedtls_pk_rsassa_pss_options { */ #define MBEDTLS_PK_SIGNATURE_MAX_SIZE 0 +} // namespace lbug_mbedtls #if (defined(MBEDTLS_RSA_C) || defined(MBEDTLS_PK_RSA_ALT_SUPPORT)) && \ MBEDTLS_MPI_MAX_SIZE > MBEDTLS_PK_SIGNATURE_MAX_SIZE /* For RSA, the signature can be as large as the bignum module allows. @@ -159,6 +158,7 @@ typedef struct mbedtls_pk_rsassa_pss_options { /** * \brief Types for interfacing with the debug module */ +namespace lbug_mbedtls { typedef enum { MBEDTLS_PK_DEBUG_NONE = 0, MBEDTLS_PK_DEBUG_MPI, @@ -194,17 +194,22 @@ typedef struct mbedtls_pk_context { void* MBEDTLS_PRIVATE(pk_ctx); /**< Underlying public key context */ } mbedtls_pk_context; +} // namespace lbug_mbedtls #if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE) /** * \brief Context for resuming operations */ +namespace lbug_mbedtls { typedef struct { const mbedtls_pk_info_t* MBEDTLS_PRIVATE(pk_info); /**< Public key information */ void* MBEDTLS_PRIVATE(rs_ctx); /**< Underlying restart context */ } mbedtls_pk_restart_ctx; +} // namespace lbug_mbedtls #else /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */ /* Now we can declare functions that take a pointer to that */ +namespace lbug_mbedtls { typedef void mbedtls_pk_restart_ctx; +} // namespace lbug_mbedtls #endif /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */ #if defined(MBEDTLS_RSA_C) @@ -214,9 +219,11 @@ typedef void mbedtls_pk_restart_ctx; * \warning You must make sure the PK context actually holds an RSA context * before using this function! */ +namespace lbug_mbedtls { static inline mbedtls_rsa_context* mbedtls_pk_rsa(const mbedtls_pk_context pk) { return ((mbedtls_rsa_context*)(pk).MBEDTLS_PRIVATE(pk_ctx)); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_RSA_C */ #if defined(MBEDTLS_ECP_C) @@ -226,21 +233,25 @@ static inline mbedtls_rsa_context* mbedtls_pk_rsa(const mbedtls_pk_context pk) { * \warning You must make sure the PK context actually holds an EC context * before using this function! */ +namespace lbug_mbedtls { static inline mbedtls_ecp_keypair* mbedtls_pk_ec(const mbedtls_pk_context pk) { return ((mbedtls_ecp_keypair*)(pk).MBEDTLS_PRIVATE(pk_ctx)); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_ECP_C */ #if defined(MBEDTLS_PK_RSA_ALT_SUPPORT) /** * \brief Types for RSA-alt abstraction */ +namespace lbug_mbedtls { typedef int (*mbedtls_pk_rsa_alt_decrypt_func)(void* ctx, size_t* olen, const unsigned char* input, unsigned char* output, size_t output_max_len); typedef int (*mbedtls_pk_rsa_alt_sign_func)(void* ctx, int (*f_rng)(void*, unsigned char*, size_t), void* p_rng, mbedtls_md_type_t md_alg, unsigned int hashlen, const unsigned char* hash, unsigned char* sig); typedef size_t (*mbedtls_pk_rsa_alt_key_len_func)(void* ctx); +} // namespace lbug_mbedtls #endif /* MBEDTLS_PK_RSA_ALT_SUPPORT */ /** @@ -250,6 +261,7 @@ typedef size_t (*mbedtls_pk_rsa_alt_key_len_func)(void* ctx); * * \return The PK info associated with the type or NULL if not found. */ +namespace lbug_mbedtls { const mbedtls_pk_info_t* mbedtls_pk_info_from_type(mbedtls_pk_type_t pk_type); /** @@ -273,6 +285,7 @@ void mbedtls_pk_init(mbedtls_pk_context* ctx); */ void mbedtls_pk_free(mbedtls_pk_context* ctx); +} // namespace lbug_mbedtls #if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE) /** * \brief Initialize a restart context @@ -280,6 +293,7 @@ void mbedtls_pk_free(mbedtls_pk_context* ctx); * \param ctx The context to initialize. * This must not be \c NULL. */ +namespace lbug_mbedtls { void mbedtls_pk_restart_init(mbedtls_pk_restart_ctx* ctx); /** @@ -289,6 +303,7 @@ void mbedtls_pk_restart_init(mbedtls_pk_restart_ctx* ctx); * If this is \c NULL, this function does nothing. */ void mbedtls_pk_restart_free(mbedtls_pk_restart_ctx* ctx); +} // namespace lbug_mbedtls #endif /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */ /** @@ -306,8 +321,10 @@ void mbedtls_pk_restart_free(mbedtls_pk_restart_ctx* ctx); * \note For contexts holding an RSA-alt key, use * \c mbedtls_pk_setup_rsa_alt() instead. */ +namespace lbug_mbedtls { int mbedtls_pk_setup(mbedtls_pk_context* ctx, const mbedtls_pk_info_t* info); +} // namespace lbug_mbedtls #if defined(MBEDTLS_USE_PSA_CRYPTO) /** * \brief Initialize a PK context to wrap a PSA key. @@ -337,7 +354,9 @@ int mbedtls_pk_setup(mbedtls_pk_context* ctx, const mbedtls_pk_info_t* info); * ECC key pair. * \return #MBEDTLS_ERR_PK_ALLOC_FAILED on allocation failure. */ +namespace lbug_mbedtls { int mbedtls_pk_setup_opaque(mbedtls_pk_context* ctx, const psa_key_id_t key); +} // namespace lbug_mbedtls #endif /* MBEDTLS_USE_PSA_CRYPTO */ #if defined(MBEDTLS_PK_RSA_ALT_SUPPORT) @@ -356,9 +375,11 @@ int mbedtls_pk_setup_opaque(mbedtls_pk_context* ctx, const psa_key_id_t key); * * \note This function replaces \c mbedtls_pk_setup() for RSA-alt. */ +namespace lbug_mbedtls { int mbedtls_pk_setup_rsa_alt(mbedtls_pk_context* ctx, void* key, mbedtls_pk_rsa_alt_decrypt_func decrypt_func, mbedtls_pk_rsa_alt_sign_func sign_func, mbedtls_pk_rsa_alt_key_len_func key_len_func); +} // namespace lbug_mbedtls #endif /* MBEDTLS_PK_RSA_ALT_SUPPORT */ /** @@ -368,6 +389,7 @@ int mbedtls_pk_setup_rsa_alt(mbedtls_pk_context* ctx, void* key, * * \return Key size in bits, or 0 on error */ +namespace lbug_mbedtls { size_t mbedtls_pk_get_bitlen(const mbedtls_pk_context* ctx); ///** @@ -638,6 +660,7 @@ const char* mbedtls_pk_get_name(const mbedtls_pk_context* ctx); */ mbedtls_pk_type_t mbedtls_pk_get_type(const mbedtls_pk_context* ctx); +} // namespace lbug_mbedtls #if defined(MBEDTLS_PK_PARSE_C) /** \ingroup pk_module */ /** @@ -670,6 +693,7 @@ mbedtls_pk_type_t mbedtls_pk_get_type(const mbedtls_pk_context* ctx); * * \return 0 if successful, or a specific PK or PEM error code */ +namespace lbug_mbedtls { int mbedtls_pk_parse_key(mbedtls_pk_context* ctx, const unsigned char* key, size_t keylen, const unsigned char* pwd, size_t pwdlen, int (*f_rng)(void*, unsigned char*, size_t), void* p_rng); @@ -698,6 +722,7 @@ int mbedtls_pk_parse_key(mbedtls_pk_context* ctx, const unsigned char* key, size */ int mbedtls_pk_parse_public_key(mbedtls_pk_context* ctx, const unsigned char* key, size_t keylen); +} // namespace lbug_mbedtls #if defined(MBEDTLS_FS_IO) /** \ingroup pk_module */ /** @@ -722,6 +747,7 @@ int mbedtls_pk_parse_public_key(mbedtls_pk_context* ctx, const unsigned char* ke * * \return 0 if successful, or a specific PK or PEM error code */ +namespace lbug_mbedtls { int mbedtls_pk_parse_keyfile(mbedtls_pk_context* ctx, const char* path, const char* password, int (*f_rng)(void*, unsigned char*, size_t), void* p_rng); @@ -743,6 +769,7 @@ int mbedtls_pk_parse_keyfile(mbedtls_pk_context* ctx, const char* path, const ch * \return 0 if successful, or a specific PK or PEM error code */ int mbedtls_pk_parse_public_keyfile(mbedtls_pk_context* ctx, const char* path); +} // namespace lbug_mbedtls #endif /* MBEDTLS_FS_IO */ #endif /* MBEDTLS_PK_PARSE_C */ @@ -760,6 +787,7 @@ int mbedtls_pk_parse_public_keyfile(mbedtls_pk_context* ctx, const char* path); * \return length of data written if successful, or a specific * error code */ +namespace lbug_mbedtls { int mbedtls_pk_write_key_der(const mbedtls_pk_context* ctx, unsigned char* buf, size_t size); /** @@ -777,6 +805,7 @@ int mbedtls_pk_write_key_der(const mbedtls_pk_context* ctx, unsigned char* buf, */ int mbedtls_pk_write_pubkey_der(const mbedtls_pk_context* ctx, unsigned char* buf, size_t size); +} // namespace lbug_mbedtls #if defined(MBEDTLS_PEM_WRITE_C) /** * \brief Write a public key to a PEM string @@ -788,6 +817,7 @@ int mbedtls_pk_write_pubkey_der(const mbedtls_pk_context* ctx, unsigned char* bu * * \return 0 if successful, or a specific error code */ +namespace lbug_mbedtls { int mbedtls_pk_write_pubkey_pem(const mbedtls_pk_context* ctx, unsigned char* buf, size_t size); /** @@ -801,6 +831,7 @@ int mbedtls_pk_write_pubkey_pem(const mbedtls_pk_context* ctx, unsigned char* bu * \return 0 if successful, or a specific error code */ int mbedtls_pk_write_key_pem(const mbedtls_pk_context* ctx, unsigned char* buf, size_t size); +} // namespace lbug_mbedtls #endif /* MBEDTLS_PEM_WRITE_C */ #endif /* MBEDTLS_PK_WRITE_C */ @@ -820,7 +851,9 @@ int mbedtls_pk_write_key_pem(const mbedtls_pk_context* ctx, unsigned char* buf, * * \return 0 if successful, or a specific PK error code */ +namespace lbug_mbedtls { int mbedtls_pk_parse_subpubkey(unsigned char** p, const unsigned char* end, mbedtls_pk_context* pk); +} // namespace lbug_mbedtls #endif /* MBEDTLS_PK_PARSE_C */ #if defined(MBEDTLS_PK_WRITE_C) @@ -834,7 +867,9 @@ int mbedtls_pk_parse_subpubkey(unsigned char** p, const unsigned char* end, mbed * * \return the length written or a negative error code */ +namespace lbug_mbedtls { int mbedtls_pk_write_pubkey(unsigned char** p, unsigned char* start, const mbedtls_pk_context* key); +} // namespace lbug_mbedtls #endif /* MBEDTLS_PK_WRITE_C */ /* @@ -842,7 +877,9 @@ int mbedtls_pk_write_pubkey(unsigned char** p, unsigned char* start, const mbedt * know you do. */ #if defined(MBEDTLS_FS_IO) +namespace lbug_mbedtls { int mbedtls_pk_load_file(const char* path, unsigned char** buf, size_t* n); +} // namespace lbug_mbedtls #endif #if defined(MBEDTLS_USE_PSA_CRYPTO) @@ -866,11 +903,12 @@ int mbedtls_pk_load_file(const char* path, unsigned char** buf, size_t* n); * \return \c 0 if successful. * \return An Mbed TLS error code otherwise. */ +namespace lbug_mbedtls { int mbedtls_pk_wrap_as_opaque(mbedtls_pk_context* pk, psa_key_id_t* key, psa_algorithm_t hash_alg); +} // namespace lbug_mbedtls #endif /* MBEDTLS_USE_PSA_CRYPTO */ -#ifdef __cplusplus -} -#endif #endif /* MBEDTLS_PK_H */ + +using namespace lbug_mbedtls; // keep unqualified names for in-tree consumers diff --git a/third_party/mbedtls/include/mbedtls/platform.h b/third_party/mbedtls/include/mbedtls/platform.h index 3f4a5650b5..2eb27cae1d 100644 --- a/third_party/mbedtls/include/mbedtls/platform.h +++ b/third_party/mbedtls/include/mbedtls/platform.h @@ -37,9 +37,6 @@ #include "mbedtls/platform_time.h" #endif -#ifdef __cplusplus -extern "C" { -#endif /** * \name SECTION: Module settings @@ -131,6 +128,7 @@ extern "C" { #else /* For size_t */ #include +namespace lbug_mbedtls { extern void* mbedtls_calloc(size_t n, size_t size); extern void mbedtls_free(void* ptr); @@ -145,6 +143,7 @@ extern void mbedtls_free(void* ptr); */ int mbedtls_platform_set_calloc_free(void* (*calloc_func)(size_t, size_t), void (*free_func)(void*)); +} // namespace lbug_mbedtls #endif /* MBEDTLS_PLATFORM_FREE_MACRO && MBEDTLS_PLATFORM_CALLOC_MACRO */ #else /* !MBEDTLS_PLATFORM_MEMORY */ #define mbedtls_free free @@ -157,6 +156,7 @@ int mbedtls_platform_set_calloc_free(void* (*calloc_func)(size_t, size_t), #if defined(MBEDTLS_PLATFORM_FPRINTF_ALT) /* We need FILE * */ #include +namespace lbug_mbedtls { extern int (*mbedtls_fprintf)(FILE* stream, const char* format, ...); /** @@ -169,6 +169,7 @@ extern int (*mbedtls_fprintf)(FILE* stream, const char* format, ...); * \return \c 0. */ int mbedtls_platform_set_fprintf(int (*fprintf_func)(FILE* stream, const char*, ...)); +} // namespace lbug_mbedtls #else #if defined(MBEDTLS_PLATFORM_FPRINTF_MACRO) #define mbedtls_fprintf MBEDTLS_PLATFORM_FPRINTF_MACRO @@ -181,6 +182,7 @@ int mbedtls_platform_set_fprintf(int (*fprintf_func)(FILE* stream, const char*, * The function pointers for printf */ #if defined(MBEDTLS_PLATFORM_PRINTF_ALT) +namespace lbug_mbedtls { extern int (*mbedtls_printf)(const char* format, ...); /** @@ -193,6 +195,7 @@ extern int (*mbedtls_printf)(const char* format, ...); * \return \c 0 on success. */ int mbedtls_platform_set_printf(int (*printf_func)(const char*, ...)); +} // namespace lbug_mbedtls #else /* !MBEDTLS_PLATFORM_PRINTF_ALT */ #if defined(MBEDTLS_PLATFORM_PRINTF_MACRO) #define mbedtls_printf MBEDTLS_PLATFORM_PRINTF_MACRO @@ -212,10 +215,13 @@ int mbedtls_platform_set_printf(int (*printf_func)(const char*, ...)); */ #if defined(MBEDTLS_PLATFORM_HAS_NON_CONFORMING_SNPRINTF) /* For Windows (inc. MSYS2), we provide our own fixed implementation */ +namespace lbug_mbedtls { int mbedtls_platform_win32_snprintf(char* s, size_t n, const char* fmt, ...); +} // namespace lbug_mbedtls #endif #if defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) +namespace lbug_mbedtls { extern int (*mbedtls_snprintf)(char* s, size_t n, const char* format, ...); /** @@ -227,6 +233,7 @@ extern int (*mbedtls_snprintf)(char* s, size_t n, const char* format, ...); * \return \c 0 on success. */ int mbedtls_platform_set_snprintf(int (*snprintf_func)(char* s, size_t n, const char* format, ...)); +} // namespace lbug_mbedtls #else /* MBEDTLS_PLATFORM_SNPRINTF_ALT */ #if defined(MBEDTLS_PLATFORM_SNPRINTF_MACRO) #define mbedtls_snprintf MBEDTLS_PLATFORM_SNPRINTF_MACRO @@ -247,11 +254,14 @@ int mbedtls_platform_set_snprintf(int (*snprintf_func)(char* s, size_t n, const #if defined(MBEDTLS_PLATFORM_HAS_NON_CONFORMING_VSNPRINTF) #include /* For Older Windows (inc. MSYS2), we provide our own fixed implementation */ +namespace lbug_mbedtls { int mbedtls_platform_win32_vsnprintf(char* s, size_t n, const char* fmt, va_list arg); +} // namespace lbug_mbedtls #endif #if defined(MBEDTLS_PLATFORM_VSNPRINTF_ALT) #include +namespace lbug_mbedtls { extern int (*mbedtls_vsnprintf)(char* s, size_t n, const char* format, va_list arg); /** @@ -263,6 +273,7 @@ extern int (*mbedtls_vsnprintf)(char* s, size_t n, const char* format, va_list a */ int mbedtls_platform_set_vsnprintf( int (*vsnprintf_func)(char* s, size_t n, const char* format, va_list arg)); +} // namespace lbug_mbedtls #else /* MBEDTLS_PLATFORM_VSNPRINTF_ALT */ #if defined(MBEDTLS_PLATFORM_VSNPRINTF_MACRO) #define mbedtls_vsnprintf MBEDTLS_PLATFORM_VSNPRINTF_MACRO @@ -275,6 +286,7 @@ int mbedtls_platform_set_vsnprintf( * The function pointers for exit */ #if defined(MBEDTLS_PLATFORM_EXIT_ALT) +namespace lbug_mbedtls { extern void (*mbedtls_exit)(int status); /** @@ -287,6 +299,7 @@ extern void (*mbedtls_exit)(int status); * \return \c 0 on success. */ int mbedtls_platform_set_exit(void (*exit_func)(int status)); +} // namespace lbug_mbedtls #else #if defined(MBEDTLS_PLATFORM_EXIT_MACRO) #define mbedtls_exit MBEDTLS_PLATFORM_EXIT_MACRO @@ -318,11 +331,14 @@ int mbedtls_platform_set_exit(void (*exit_func)(int status)); #if defined(MBEDTLS_ENTROPY_NV_SEED) #if !defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS) && defined(MBEDTLS_FS_IO) /* Internal standard platform definitions */ +namespace lbug_mbedtls { int mbedtls_platform_std_nv_seed_read(unsigned char* buf, size_t buf_len); int mbedtls_platform_std_nv_seed_write(unsigned char* buf, size_t buf_len); +} // namespace lbug_mbedtls #endif #if defined(MBEDTLS_PLATFORM_NV_SEED_ALT) +namespace lbug_mbedtls { extern int (*mbedtls_nv_seed_read)(unsigned char* buf, size_t buf_len); extern int (*mbedtls_nv_seed_write)(unsigned char* buf, size_t buf_len); @@ -337,6 +353,7 @@ extern int (*mbedtls_nv_seed_write)(unsigned char* buf, size_t buf_len); */ int mbedtls_platform_set_nv_seed(int (*nv_seed_read_func)(unsigned char* buf, size_t buf_len), int (*nv_seed_write_func)(unsigned char* buf, size_t buf_len)); +} // namespace lbug_mbedtls #else #if defined(MBEDTLS_PLATFORM_NV_SEED_READ_MACRO) && defined(MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO) #define mbedtls_nv_seed_read MBEDTLS_PLATFORM_NV_SEED_READ_MACRO @@ -356,10 +373,12 @@ int mbedtls_platform_set_nv_seed(int (*nv_seed_read_func)(unsigned char* buf, si * \note This structure may be used to assist platform-specific * setup or teardown operations. */ +namespace lbug_mbedtls { typedef struct mbedtls_platform_context { char MBEDTLS_PRIVATE(dummy); /**< A placeholder member, as empty structs are not portable. */ } mbedtls_platform_context; +} // namespace lbug_mbedtls #else #include "platform_alt.h" #endif /* !MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT */ @@ -379,6 +398,7 @@ typedef struct mbedtls_platform_context { * * \return \c 0 on success. */ +namespace lbug_mbedtls { int mbedtls_platform_setup(mbedtls_platform_context* ctx); /** * \brief This function performs any platform teardown operations. @@ -396,8 +416,8 @@ int mbedtls_platform_setup(mbedtls_platform_context* ctx); */ void mbedtls_platform_teardown(mbedtls_platform_context* ctx); -#ifdef __cplusplus -} -#endif +} // namespace lbug_mbedtls #endif /* platform.h */ + +using namespace lbug_mbedtls; // keep unqualified names for in-tree consumers diff --git a/third_party/mbedtls/include/mbedtls/platform_time.h b/third_party/mbedtls/include/mbedtls/platform_time.h index 5f70e57f26..f0614c58b9 100644 --- a/third_party/mbedtls/include/mbedtls/platform_time.h +++ b/third_party/mbedtls/include/mbedtls/platform_time.h @@ -24,9 +24,6 @@ #include "mbedtls/build_info.h" -#ifdef __cplusplus -extern "C" { -#endif /** * \name SECTION: Module settings @@ -40,17 +37,22 @@ extern "C" { * The time_t datatype */ #if defined(MBEDTLS_PLATFORM_TIME_TYPE_MACRO) +namespace lbug_mbedtls { typedef MBEDTLS_PLATFORM_TIME_TYPE_MACRO mbedtls_time_t; +} // namespace lbug_mbedtls #else /* For time_t */ #include +namespace lbug_mbedtls { typedef time_t mbedtls_time_t; +} // namespace lbug_mbedtls #endif /* MBEDTLS_PLATFORM_TIME_TYPE_MACRO */ /* * The function pointers for time */ #if defined(MBEDTLS_PLATFORM_TIME_ALT) +namespace lbug_mbedtls { extern mbedtls_time_t (*mbedtls_time)(mbedtls_time_t* time); /** @@ -61,6 +63,7 @@ extern mbedtls_time_t (*mbedtls_time)(mbedtls_time_t* time); * \return 0 */ int mbedtls_platform_set_time(mbedtls_time_t (*time_func)(mbedtls_time_t* time)); +} // namespace lbug_mbedtls #else #if defined(MBEDTLS_PLATFORM_TIME_MACRO) #define mbedtls_time MBEDTLS_PLATFORM_TIME_MACRO @@ -69,8 +72,7 @@ int mbedtls_platform_set_time(mbedtls_time_t (*time_func)(mbedtls_time_t* time)) #endif /* MBEDTLS_PLATFORM_TIME_MACRO */ #endif /* MBEDTLS_PLATFORM_TIME_ALT */ -#ifdef __cplusplus -} -#endif #endif /* platform_time.h */ + +using namespace lbug_mbedtls; // keep unqualified names for in-tree consumers diff --git a/third_party/mbedtls/include/mbedtls/platform_util.h b/third_party/mbedtls/include/mbedtls/platform_util.h index 60598148bf..13d03f186a 100644 --- a/third_party/mbedtls/include/mbedtls/platform_util.h +++ b/third_party/mbedtls/include/mbedtls/platform_util.h @@ -32,9 +32,6 @@ #include "mbedtls/platform_time.h" #endif /* MBEDTLS_HAVE_TIME_DATE */ -#ifdef __cplusplus -extern "C" { -#endif /* Internal macros meant to be called only from within the library. */ #define MBEDTLS_INTERNAL_VALIDATE_RET(cond, ret) \ @@ -48,10 +45,12 @@ extern "C" { #if !defined(MBEDTLS_DEPRECATED_REMOVED) #if defined(MBEDTLS_DEPRECATED_WARNING) #define MBEDTLS_DEPRECATED __attribute__((deprecated)) +namespace lbug_mbedtls { MBEDTLS_DEPRECATED typedef char const* mbedtls_deprecated_string_constant_t; #define MBEDTLS_DEPRECATED_STRING_CONSTANT(VAL) ((mbedtls_deprecated_string_constant_t)(VAL)) MBEDTLS_DEPRECATED typedef int mbedtls_deprecated_numeric_constant_t; #define MBEDTLS_DEPRECATED_NUMERIC_CONSTANT(VAL) ((mbedtls_deprecated_numeric_constant_t)(VAL)) +} // namespace lbug_mbedtls #else /* MBEDTLS_DEPRECATED_WARNING */ #define MBEDTLS_DEPRECATED #define MBEDTLS_DEPRECATED_STRING_CONSTANT(VAL) VAL @@ -170,8 +169,10 @@ MBEDTLS_DEPRECATED typedef int mbedtls_deprecated_numeric_constant_t; * \param len Length of the buffer in bytes * */ +namespace lbug_mbedtls { void mbedtls_platform_zeroize(void* buf, size_t len); +} // namespace lbug_mbedtls #if defined(MBEDTLS_HAVE_TIME_DATE) /** * \brief Platform-specific implementation of gmtime_r() @@ -199,11 +200,12 @@ void mbedtls_platform_zeroize(void* buf, size_t len); * \return Pointer to an object of type struct tm on success, otherwise * NULL */ +namespace lbug_mbedtls { struct tm* mbedtls_platform_gmtime_r(const mbedtls_time_t* tt, struct tm* tm_buf); +} // namespace lbug_mbedtls #endif /* MBEDTLS_HAVE_TIME_DATE */ -#ifdef __cplusplus -} -#endif #endif /* MBEDTLS_PLATFORM_UTIL_H */ + +using namespace lbug_mbedtls; // keep unqualified names for in-tree consumers diff --git a/third_party/mbedtls/include/mbedtls/rsa.h b/third_party/mbedtls/include/mbedtls/rsa.h index e2fa3e7db7..62e35f91db 100644 --- a/third_party/mbedtls/include/mbedtls/rsa.h +++ b/third_party/mbedtls/include/mbedtls/rsa.h @@ -75,9 +75,6 @@ * eg for alternative (PKCS#11) RSA implemenations in the PK layers. */ -#ifdef __cplusplus -extern "C" { -#endif #if !defined(MBEDTLS_RSA_ALT) // Regular implementation @@ -86,6 +83,7 @@ extern "C" { /** * \brief The RSA context structure. */ +namespace lbug_mbedtls { typedef struct mbedtls_rsa_context { int MBEDTLS_PRIVATE(ver); /*!< Reserved for internal purposes. * Do not set this field in application @@ -125,6 +123,7 @@ typedef struct mbedtls_rsa_context { #endif } mbedtls_rsa_context; +} // namespace lbug_mbedtls #else /* MBEDTLS_RSA_ALT */ #include "rsa_alt.h" #endif /* MBEDTLS_RSA_ALT */ @@ -139,6 +138,7 @@ typedef struct mbedtls_rsa_context { * * \param ctx The RSA context to initialize. This must not be \c NULL. */ +namespace lbug_mbedtls { void mbedtls_rsa_init(mbedtls_rsa_context* ctx); /** @@ -1034,6 +1034,7 @@ int mbedtls_rsa_copy(mbedtls_rsa_context* dst, const mbedtls_rsa_context* src); */ void mbedtls_rsa_free(mbedtls_rsa_context* ctx); +} // namespace lbug_mbedtls #if defined(MBEDTLS_SELF_TEST) /** @@ -1042,12 +1043,13 @@ void mbedtls_rsa_free(mbedtls_rsa_context* ctx); * \return \c 0 on success. * \return \c 1 on failure. */ +namespace lbug_mbedtls { int mbedtls_rsa_self_test(int verbose); +} // namespace lbug_mbedtls #endif /* MBEDTLS_SELF_TEST */ -#ifdef __cplusplus -} -#endif #endif /* rsa.h */ + +using namespace lbug_mbedtls; // keep unqualified names for in-tree consumers diff --git a/third_party/mbedtls/include/mbedtls/sha1.h b/third_party/mbedtls/include/mbedtls/sha1.h index 7810959c2f..2b8385beff 100644 --- a/third_party/mbedtls/include/mbedtls/sha1.h +++ b/third_party/mbedtls/include/mbedtls/sha1.h @@ -37,9 +37,6 @@ /** SHA-1 input data was malformed. */ #define MBEDTLS_ERR_SHA1_BAD_INPUT_DATA -0x0073 -#ifdef __cplusplus -extern "C" { -#endif #if !defined(MBEDTLS_SHA1_ALT) // Regular implementation @@ -53,12 +50,14 @@ extern "C" { * stronger message digests instead. * */ +namespace lbug_mbedtls { typedef struct mbedtls_sha1_context { uint32_t MBEDTLS_PRIVATE(total)[2]; /*!< The number of Bytes processed. */ uint32_t MBEDTLS_PRIVATE(state)[5]; /*!< The intermediate digest state. */ unsigned char MBEDTLS_PRIVATE(buffer)[64]; /*!< The data block being processed. */ } mbedtls_sha1_context; +} // namespace lbug_mbedtls #else /* MBEDTLS_SHA1_ALT */ #include "sha1_alt.h" #endif /* MBEDTLS_SHA1_ALT */ @@ -74,6 +73,7 @@ typedef struct mbedtls_sha1_context { * This must not be \c NULL. * */ +namespace lbug_mbedtls { void mbedtls_sha1_init(mbedtls_sha1_context* ctx); /** @@ -198,6 +198,7 @@ int mbedtls_internal_sha1_process(mbedtls_sha1_context* ctx, const unsigned char */ int mbedtls_sha1(const unsigned char* input, size_t ilen, unsigned char output[20]); +} // namespace lbug_mbedtls #if defined(MBEDTLS_SELF_TEST) /** @@ -211,12 +212,13 @@ int mbedtls_sha1(const unsigned char* input, size_t ilen, unsigned char output[2 * \return \c 1 on failure. * */ +namespace lbug_mbedtls { int mbedtls_sha1_self_test(int verbose); +} // namespace lbug_mbedtls #endif /* MBEDTLS_SELF_TEST */ -#ifdef __cplusplus -} -#endif #endif /* mbedtls_sha1.h */ + +using namespace lbug_mbedtls; // keep unqualified names for in-tree consumers diff --git a/third_party/mbedtls/include/mbedtls/sha256.h b/third_party/mbedtls/include/mbedtls/sha256.h index 4b557d56ab..08c7e0b4b0 100644 --- a/third_party/mbedtls/include/mbedtls/sha256.h +++ b/third_party/mbedtls/include/mbedtls/sha256.h @@ -33,9 +33,6 @@ /** SHA-256 input data was malformed. */ #define MBEDTLS_ERR_SHA256_BAD_INPUT_DATA -0x0074 -#ifdef __cplusplus -extern "C" { -#endif #if !defined(MBEDTLS_SHA256_ALT) // Regular implementation @@ -48,6 +45,7 @@ extern "C" { * checksum calculations. The choice between these two is * made in the call to mbedtls_sha256_starts(). */ +namespace lbug_mbedtls { typedef struct mbedtls_sha256_context { uint32_t MBEDTLS_PRIVATE(total)[2]; /*!< The number of Bytes processed. */ uint32_t MBEDTLS_PRIVATE(state)[8]; /*!< The intermediate digest state. */ @@ -56,6 +54,7 @@ typedef struct mbedtls_sha256_context { 0: Use SHA-256, or 1: Use SHA-224. */ } mbedtls_sha256_context; +} // namespace lbug_mbedtls #else /* MBEDTLS_SHA256_ALT */ #include "sha256_alt.h" #endif /* MBEDTLS_SHA256_ALT */ @@ -65,6 +64,7 @@ typedef struct mbedtls_sha256_context { * * \param ctx The SHA-256 context to initialize. This must not be \c NULL. */ +namespace lbug_mbedtls { void mbedtls_sha256_init(mbedtls_sha256_context* ctx); /** @@ -165,6 +165,7 @@ int mbedtls_internal_sha256_process(mbedtls_sha256_context* ctx, const unsigned */ int mbedtls_sha256(const unsigned char* input, size_t ilen, unsigned char* output, int is224); +} // namespace lbug_mbedtls #if defined(MBEDTLS_SELF_TEST) /** @@ -173,12 +174,13 @@ int mbedtls_sha256(const unsigned char* input, size_t ilen, unsigned char* outpu * \return \c 0 on success. * \return \c 1 on failure. */ +namespace lbug_mbedtls { int mbedtls_sha256_self_test(int verbose); +} // namespace lbug_mbedtls #endif /* MBEDTLS_SELF_TEST */ -#ifdef __cplusplus -} -#endif #endif /* mbedtls_sha256.h */ + +using namespace lbug_mbedtls; // keep unqualified names for in-tree consumers diff --git a/third_party/mbedtls/include/mbedtls/sha512.h b/third_party/mbedtls/include/mbedtls/sha512.h index a637aa25a5..4e1d800478 100644 --- a/third_party/mbedtls/include/mbedtls/sha512.h +++ b/third_party/mbedtls/include/mbedtls/sha512.h @@ -32,9 +32,6 @@ /** SHA-512 input data was malformed. */ #define MBEDTLS_ERR_SHA512_BAD_INPUT_DATA -0x0075 -#ifdef __cplusplus -extern "C" { -#endif #if !defined(MBEDTLS_SHA512_ALT) // Regular implementation @@ -47,6 +44,7 @@ extern "C" { * checksum calculations. The choice between these two is * made in the call to mbedtls_sha512_starts(). */ +namespace lbug_mbedtls { typedef struct mbedtls_sha512_context { uint64_t MBEDTLS_PRIVATE(total)[2]; /*!< The number of Bytes processed. */ uint64_t MBEDTLS_PRIVATE(state)[8]; /*!< The intermediate digest state. */ @@ -57,6 +55,7 @@ typedef struct mbedtls_sha512_context { #endif } mbedtls_sha512_context; +} // namespace lbug_mbedtls #else /* MBEDTLS_SHA512_ALT */ #include "sha512_alt.h" #endif /* MBEDTLS_SHA512_ALT */ @@ -67,6 +66,7 @@ typedef struct mbedtls_sha512_context { * \param ctx The SHA-512 context to initialize. This must * not be \c NULL. */ +namespace lbug_mbedtls { void mbedtls_sha512_init(mbedtls_sha512_context* ctx); /** @@ -176,6 +176,7 @@ int mbedtls_internal_sha512_process(mbedtls_sha512_context* ctx, const unsigned */ int mbedtls_sha512(const unsigned char* input, size_t ilen, unsigned char* output, int is384); +} // namespace lbug_mbedtls #if defined(MBEDTLS_SELF_TEST) /** @@ -184,11 +185,12 @@ int mbedtls_sha512(const unsigned char* input, size_t ilen, unsigned char* outpu * \return \c 0 on success. * \return \c 1 on failure. */ +namespace lbug_mbedtls { int mbedtls_sha512_self_test(int verbose); +} // namespace lbug_mbedtls #endif /* MBEDTLS_SELF_TEST */ -#ifdef __cplusplus -} -#endif #endif /* mbedtls_sha512.h */ + +using namespace lbug_mbedtls; // keep unqualified names for in-tree consumers diff --git a/third_party/mbedtls/library/aes.cpp b/third_party/mbedtls/library/aes.cpp index f587949140..64410fde3a 100644 --- a/third_party/mbedtls/library/aes.cpp +++ b/third_party/mbedtls/library/aes.cpp @@ -56,13 +56,16 @@ #define AES_VALIDATE(cond) MBEDTLS_INTERNAL_VALIDATE(cond) #if defined(MBEDTLS_PADLOCK_C) && (defined(MBEDTLS_HAVE_X86) || defined(MBEDTLS_PADLOCK_ALIGN16)) +namespace lbug_mbedtls { static int aes_padlock_ace = -1; +} // namespace lbug_mbedtls #endif #if defined(MBEDTLS_AES_ROM_TABLES) /* * Forward S-box */ +namespace lbug_mbedtls { static const unsigned char AESFSb[256] = {0x63, 0x7C, 0x77, 0x7B, 0xF2, 0x6B, 0x6F, 0xC5, 0x30, 0x01, 0x67, 0x2B, 0xFE, 0xD7, 0xAB, 0x76, 0xCA, 0x82, 0xC9, 0x7D, 0xFA, 0x59, 0x47, 0xF0, 0xAD, 0xD4, 0xA2, 0xAF, 0x9C, 0xA4, 0x72, 0xC0, 0xB7, 0xFD, 0x93, 0x26, 0x36, 0x3F, 0xF7, 0xCC, 0x34, @@ -155,9 +158,11 @@ static const unsigned char AESFSb[256] = {0x63, 0x7C, 0x77, 0x7B, 0xF2, 0x6B, 0x static const uint32_t FT0[256] = {FT}; #undef V +} // namespace lbug_mbedtls #if !defined(MBEDTLS_AES_FEWER_TABLES) #define V(a, b, c, d) 0x##b##c##d##a +namespace lbug_mbedtls { static const uint32_t FT1[256] = {FT}; #undef V @@ -169,6 +174,7 @@ static const uint32_t FT2[256] = {FT}; static const uint32_t FT3[256] = {FT}; #undef V +} // namespace lbug_mbedtls #endif /* !MBEDTLS_AES_FEWER_TABLES */ #undef FT @@ -176,6 +182,7 @@ static const uint32_t FT3[256] = {FT}; /* * Reverse S-box */ +namespace lbug_mbedtls { static const unsigned char RSb[256] = {0x52, 0x09, 0x6A, 0xD5, 0x30, 0x36, 0xA5, 0x38, 0xBF, 0x40, 0xA3, 0x9E, 0x81, 0xF3, 0xD7, 0xFB, 0x7C, 0xE3, 0x39, 0x82, 0x9B, 0x2F, 0xFF, 0x87, 0x34, 0x8E, 0x43, 0x44, 0xC4, 0xDE, 0xE9, 0xCB, 0x54, 0x7B, 0x94, 0x32, 0xA6, 0xC2, 0x23, 0x3D, 0xEE, 0x4C, @@ -268,9 +275,11 @@ static const unsigned char RSb[256] = {0x52, 0x09, 0x6A, 0xD5, 0x30, 0x36, 0xA5, static const uint32_t RT0[256] = {RT}; #undef V +} // namespace lbug_mbedtls #if !defined(MBEDTLS_AES_FEWER_TABLES) #define V(a, b, c, d) 0x##b##c##d##a +namespace lbug_mbedtls { static const uint32_t RT1[256] = {RT}; #undef V @@ -282,6 +291,7 @@ static const uint32_t RT2[256] = {RT}; static const uint32_t RT3[256] = {RT}; #undef V +} // namespace lbug_mbedtls #endif /* !MBEDTLS_AES_FEWER_TABLES */ #undef RT @@ -289,36 +299,47 @@ static const uint32_t RT3[256] = {RT}; /* * Round constants */ +namespace lbug_mbedtls { static const uint32_t RCON[10] = {0x00000001, 0x00000002, 0x00000004, 0x00000008, 0x00000010, 0x00000020, 0x00000040, 0x00000080, 0x0000001B, 0x00000036}; +} // namespace lbug_mbedtls #else /* MBEDTLS_AES_ROM_TABLES */ /* * Forward S-box & tables */ +namespace lbug_mbedtls { static unsigned char AESFSb[256]; static uint32_t FT0[256]; +} // namespace lbug_mbedtls #if !defined(MBEDTLS_AES_FEWER_TABLES) +namespace lbug_mbedtls { static uint32_t FT1[256]; static uint32_t FT2[256]; static uint32_t FT3[256]; +} // namespace lbug_mbedtls #endif /* !MBEDTLS_AES_FEWER_TABLES */ /* * Reverse S-box & tables */ +namespace lbug_mbedtls { static unsigned char RSb[256]; static uint32_t RT0[256]; +} // namespace lbug_mbedtls #if !defined(MBEDTLS_AES_FEWER_TABLES) +namespace lbug_mbedtls { static uint32_t RT1[256]; static uint32_t RT2[256]; static uint32_t RT3[256]; +} // namespace lbug_mbedtls #endif /* !MBEDTLS_AES_FEWER_TABLES */ /* * Round constants */ +namespace lbug_mbedtls { static uint32_t RCON[10]; /* @@ -406,6 +427,7 @@ static void aes_gen_tables(void) { #undef ROTL8 +} // namespace lbug_mbedtls #endif /* MBEDTLS_AES_ROM_TABLES */ #if defined(MBEDTLS_AES_FEWER_TABLES) @@ -438,6 +460,7 @@ static void aes_gen_tables(void) { #endif /* MBEDTLS_AES_FEWER_TABLES */ +namespace lbug_mbedtls { void mbedtls_aes_init(mbedtls_aes_context* ctx) { AES_VALIDATE(ctx != NULL); @@ -451,7 +474,9 @@ void mbedtls_aes_free(mbedtls_aes_context* ctx) { mbedtls_platform_zeroize(ctx, sizeof(mbedtls_aes_context)); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_XTS) +namespace lbug_mbedtls { void mbedtls_aes_xts_init(mbedtls_aes_xts_context* ctx) { AES_VALIDATE(ctx != NULL); @@ -466,12 +491,14 @@ void mbedtls_aes_xts_free(mbedtls_aes_xts_context* ctx) { mbedtls_aes_free(&ctx->crypt); mbedtls_aes_free(&ctx->tweak); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_XTS */ /* * AES key schedule (encryption) */ #if !defined(MBEDTLS_AES_SETKEY_ENC_ALT) +namespace lbug_mbedtls { int mbedtls_aes_setkey_enc(mbedtls_aes_context* ctx, const unsigned char* key, unsigned int keybits) { unsigned int i; @@ -577,12 +604,14 @@ int mbedtls_aes_setkey_enc(mbedtls_aes_context* ctx, const unsigned char* key, return (0); } +} // namespace lbug_mbedtls #endif /* !MBEDTLS_AES_SETKEY_ENC_ALT */ /* * AES key schedule (decryption) */ #if !defined(MBEDTLS_AES_SETKEY_DEC_ALT) +namespace lbug_mbedtls { int mbedtls_aes_setkey_dec(mbedtls_aes_context* ctx, const unsigned char* key, unsigned int keybits) { int i, j, ret; @@ -642,9 +671,11 @@ int mbedtls_aes_setkey_dec(mbedtls_aes_context* ctx, const unsigned char* key, return (ret); } +} // namespace lbug_mbedtls #endif /* !MBEDTLS_AES_SETKEY_DEC_ALT */ #if defined(MBEDTLS_CIPHER_MODE_XTS) +namespace lbug_mbedtls { static int mbedtls_aes_xts_decode_keys(const unsigned char* key, unsigned int keybits, const unsigned char** key1, unsigned int* key1bits, const unsigned char** key2, unsigned int* key2bits) { @@ -711,6 +742,7 @@ int mbedtls_aes_xts_setkey_dec(mbedtls_aes_xts_context* ctx, const unsigned char /* Set crypt key for decryption. */ return mbedtls_aes_setkey_dec(&ctx->crypt, key1, key1bits); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_XTS */ #define AES_FROUND(X0, X1, X2, X3, Y0, Y1, Y2, Y3) \ @@ -747,6 +779,7 @@ int mbedtls_aes_xts_setkey_dec(mbedtls_aes_xts_context* ctx, const unsigned char * AES-ECB block encryption */ #if !defined(MBEDTLS_AES_ENCRYPT_ALT) +namespace lbug_mbedtls { int mbedtls_internal_aes_encrypt(mbedtls_aes_context* ctx, const unsigned char input[16], unsigned char output[16]) { int i; @@ -801,12 +834,14 @@ int mbedtls_internal_aes_encrypt(mbedtls_aes_context* ctx, const unsigned char i return (0); } +} // namespace lbug_mbedtls #endif /* !MBEDTLS_AES_ENCRYPT_ALT */ /* * AES-ECB block decryption */ #if !defined(MBEDTLS_AES_DECRYPT_ALT) +namespace lbug_mbedtls { int mbedtls_internal_aes_decrypt(mbedtls_aes_context* ctx, const unsigned char input[16], unsigned char output[16]) { int i; @@ -861,11 +896,13 @@ int mbedtls_internal_aes_decrypt(mbedtls_aes_context* ctx, const unsigned char i return (0); } +} // namespace lbug_mbedtls #endif /* !MBEDTLS_AES_DECRYPT_ALT */ /* * AES-ECB block encryption/decryption */ +namespace lbug_mbedtls { int mbedtls_aes_crypt_ecb(mbedtls_aes_context* ctx, int mode, const unsigned char input[16], unsigned char output[16]) { AES_VALIDATE_RET(ctx != NULL); @@ -895,10 +932,12 @@ int mbedtls_aes_crypt_ecb(mbedtls_aes_context* ctx, int mode, const unsigned cha return (mbedtls_internal_aes_decrypt(ctx, input, output)); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_CBC) /* * AES-CBC buffer encryption/decryption */ +namespace lbug_mbedtls { int mbedtls_aes_crypt_cbc(mbedtls_aes_context* ctx, int mode, size_t length, unsigned char iv[16], const unsigned char* input, unsigned char* output) { int i; @@ -961,10 +1000,12 @@ int mbedtls_aes_crypt_cbc(mbedtls_aes_context* ctx, int mode, size_t length, uns exit: return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CBC */ #if defined(MBEDTLS_CIPHER_MODE_XTS) +namespace lbug_mbedtls { typedef unsigned char mbedtls_be128[16]; /* @@ -1085,12 +1126,14 @@ int mbedtls_aes_crypt_xts(mbedtls_aes_xts_context* ctx, int mode, size_t length, return (0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_XTS */ #if defined(MBEDTLS_CIPHER_MODE_CFB) /* * AES-CFB128 buffer encryption/decryption */ +namespace lbug_mbedtls { int mbedtls_aes_crypt_cfb128(mbedtls_aes_context* ctx, int mode, size_t length, size_t* iv_off, unsigned char iv[16], const unsigned char* input, unsigned char* output) { int c; @@ -1179,12 +1222,14 @@ int mbedtls_aes_crypt_cfb8(mbedtls_aes_context* ctx, int mode, size_t length, un exit: return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CFB */ #if defined(MBEDTLS_CIPHER_MODE_OFB) /* * AES-OFB (Output Feedback Mode) buffer encryption/decryption */ +namespace lbug_mbedtls { int mbedtls_aes_crypt_ofb(mbedtls_aes_context* ctx, size_t length, size_t* iv_off, unsigned char iv[16], const unsigned char* input, unsigned char* output) { int ret = 0; @@ -1217,12 +1262,14 @@ int mbedtls_aes_crypt_ofb(mbedtls_aes_context* ctx, size_t length, size_t* iv_of exit: return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_OFB */ #if defined(MBEDTLS_CIPHER_MODE_CTR) /* * AES-CTR buffer encryption/decryption */ +namespace lbug_mbedtls { int mbedtls_aes_crypt_ctr(mbedtls_aes_context* ctx, size_t length, size_t* nc_off, unsigned char nonce_counter[16], unsigned char stream_block[16], const unsigned char* input, unsigned char* output) { @@ -1264,6 +1311,7 @@ int mbedtls_aes_crypt_ctr(mbedtls_aes_context* ctx, size_t length, size_t* nc_of exit: return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CTR */ #endif /* !MBEDTLS_AES_ALT */ @@ -1274,6 +1322,7 @@ int mbedtls_aes_crypt_ctr(mbedtls_aes_context* ctx, size_t length, size_t* nc_of * * http://csrc.nist.gov/archive/aes/rijndael/rijndael-vals.zip */ +namespace lbug_mbedtls { static const unsigned char aes_test_ecb_dec[3][16] = {{0x44, 0x41, 0x6A, 0xC2, 0xD1, 0xF5, 0x3C, 0x58, 0x33, 0x03, 0x91, 0x7E, 0x6B, 0xE9, 0xEB, 0xE0}, @@ -1290,7 +1339,9 @@ static const unsigned char aes_test_ecb_enc[3][16] = {{0xC3, 0x4C, 0x05, 0x2C, 0 {0x8B, 0x79, 0xEE, 0xCC, 0x93, 0xA0, 0xEE, 0x5D, 0xFF, 0x30, 0xB4, 0xEA, 0x21, 0x63, 0x6D, 0xA4}}; +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_CBC) +namespace lbug_mbedtls { static const unsigned char aes_test_cbc_dec[3][16] = {{0xFA, 0xCA, 0x37, 0xE0, 0xB0, 0xC8, 0x53, 0x73, 0xDF, 0x70, 0x6E, 0x73, 0xF7, 0xC9, 0xAF, 0x86}, @@ -1306,6 +1357,7 @@ static const unsigned char aes_test_cbc_enc[3][16] = {{0x8A, 0x05, 0xFC, 0x5E, 0 0x04}, {0xFE, 0x3C, 0x53, 0x65, 0x3E, 0x2F, 0x45, 0xB5, 0x6F, 0xCD, 0x88, 0xB2, 0xCC, 0x89, 0x8F, 0xF0}}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CBC */ #if defined(MBEDTLS_CIPHER_MODE_CFB) @@ -1314,6 +1366,7 @@ static const unsigned char aes_test_cbc_enc[3][16] = {{0x8A, 0x05, 0xFC, 0x5E, 0 * * http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf */ +namespace lbug_mbedtls { static const unsigned char aes_test_cfb128_key[3][32] = {{0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C}, @@ -1348,6 +1401,7 @@ static const unsigned char aes_test_cfb128_ct[3][64] = { 0x7B, 0xDF, 0x10, 0x13, 0x24, 0x15, 0xE5, 0x4B, 0x92, 0xA1, 0x3E, 0xD0, 0xA8, 0x26, 0x7A, 0xE2, 0xF9, 0x75, 0xA3, 0x85, 0x74, 0x1A, 0xB9, 0xCE, 0xF8, 0x20, 0x31, 0x62, 0x3D, 0x55, 0xB1, 0xE4, 0x71}}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CFB */ #if defined(MBEDTLS_CIPHER_MODE_OFB) @@ -1356,6 +1410,7 @@ static const unsigned char aes_test_cfb128_ct[3][64] = { * * https://csrc.nist.gov/publications/detail/sp/800-38a/final */ +namespace lbug_mbedtls { static const unsigned char aes_test_ofb_key[3][32] = {{0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C}, @@ -1390,6 +1445,7 @@ static const unsigned char aes_test_ofb_ct[3][64] = { 0x8d, 0x71, 0xab, 0x47, 0xa0, 0x86, 0xe8, 0x6e, 0xed, 0xf3, 0x9d, 0x1c, 0x5b, 0xba, 0x97, 0xc4, 0x08, 0x01, 0x26, 0x14, 0x1d, 0x67, 0xf3, 0x7b, 0xe8, 0x53, 0x8f, 0x5a, 0x8b, 0xe7, 0x40, 0xe4, 0x84}}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_OFB */ #if defined(MBEDTLS_CIPHER_MODE_CTR) @@ -1399,6 +1455,7 @@ static const unsigned char aes_test_ofb_ct[3][64] = { * http://www.faqs.org/rfcs/rfc3686.html */ +namespace lbug_mbedtls { static const unsigned char aes_test_ctr_key[3][16] = {{0xAE, 0x68, 0x52, 0xF8, 0x12, 0x10, 0x67, 0xCC, 0x4B, 0xF7, 0xA5, 0x76, 0x55, 0x77, 0xF3, 0x9E}, @@ -1438,6 +1495,7 @@ static const unsigned char aes_test_ctr_ct[3][48] = {{0xE4, 0x09, 0x5D, 0x4F, 0x 0x53, 0x25, 0xB2, 0x07, 0x2F}}; static const int aes_test_ctr_len[3] = {16, 32, 36}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CTR */ #if defined(MBEDTLS_CIPHER_MODE_XTS) @@ -1448,6 +1506,7 @@ static const int aes_test_ctr_len[3] = {16, 32, 36}; * https://web.archive.org/web/20150629024421/http://grouper.ieee.org/groups/1619/email/pdf00086.pdf * (Archived from original at http://grouper.ieee.org/groups/1619/email/pdf00086.pdf) */ +namespace lbug_mbedtls { static const unsigned char aes_test_xts_key[][32] = { {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1493,11 +1552,13 @@ static const unsigned char aes_test_xts_data_unit[][16] = { 0x00}, }; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_XTS */ /* * Checkup routine */ +namespace lbug_mbedtls { int mbedtls_aes_self_test(int verbose) { int ret = 0, i, j, u, mode; unsigned int keybits; @@ -1867,6 +1928,7 @@ int mbedtls_aes_self_test(int verbose) { return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_SELF_TEST */ #endif /* MBEDTLS_AES_C */ diff --git a/third_party/mbedtls/library/aria.cpp b/third_party/mbedtls/library/aria.cpp index 678c298516..d1d3497275 100644 --- a/third_party/mbedtls/library/aria.cpp +++ b/third_party/mbedtls/library/aria.cpp @@ -65,20 +65,24 @@ /* armcc5 --gnu defines __GNUC__ but doesn't support GNU's extended asm */ #if defined(__GNUC__) && (!defined(__ARMCC_VERSION) || __ARMCC_VERSION >= 6000000) && \ __ARM_ARCH >= 6 +namespace lbug_mbedtls { static inline uint32_t aria_p1(uint32_t x) { uint32_t r; __asm("rev16 %0, %1" : "=l"(r) : "l"(x)); return (r); } #define ARIA_P1 aria_p1 +} // namespace lbug_mbedtls #elif defined(__ARMCC_VERSION) && __ARMCC_VERSION < 6000000 && \ (__TARGET_ARCH_ARM >= 6 || __TARGET_ARCH_THUMB >= 3) +namespace lbug_mbedtls { static inline uint32_t aria_p1(uint32_t x) { uint32_t r; __asm("rev16 r, x"); return (r); } #define ARIA_P1 aria_p1 +} // namespace lbug_mbedtls #endif #endif /* arm */ #if defined(__GNUC__) && defined(__i386__) || defined(__amd64__) || defined(__x86_64__) @@ -112,28 +116,34 @@ static inline uint32_t aria_p1(uint32_t x) { /* armcc5 --gnu defines __GNUC__ but doesn't support GNU's extended asm */ #if defined(__GNUC__) && (!defined(__ARMCC_VERSION) || __ARMCC_VERSION >= 6000000) && \ __ARM_ARCH >= 6 +namespace lbug_mbedtls { static inline uint32_t aria_p3(uint32_t x) { uint32_t r; __asm("rev %0, %1" : "=l"(r) : "l"(x)); return (r); } #define ARIA_P3 aria_p3 +} // namespace lbug_mbedtls #elif defined(__ARMCC_VERSION) && __ARMCC_VERSION < 6000000 && \ (__TARGET_ARCH_ARM >= 6 || __TARGET_ARCH_THUMB >= 3) +namespace lbug_mbedtls { static inline uint32_t aria_p3(uint32_t x) { uint32_t r; __asm("rev r, x"); return (r); } #define ARIA_P3 aria_p3 +} // namespace lbug_mbedtls #endif #endif /* arm */ #if defined(__GNUC__) && defined(__i386__) || defined(__amd64__) || defined(__x86_64__) +namespace lbug_mbedtls { static inline uint32_t aria_p3(uint32_t x) { __asm("bswap %0" : "=r"(x) : "0"(x)); return (x); } #define ARIA_P3 aria_p3 +} // namespace lbug_mbedtls #endif /* x86 gnuc */ #endif /* MBEDTLS_HAVE_ASM && GNUC */ #if !defined(ARIA_P3) @@ -163,6 +173,7 @@ static inline uint32_t aria_p3(uint32_t x) { * half of App. B.1 in [1] in terms of 4-byte operators P1, P2, P3 and P4. * The implementation below uses only P1 and P2 as they are sufficient. */ +namespace lbug_mbedtls { static inline void aria_a(uint32_t* a, uint32_t* b, uint32_t* c, uint32_t* d) { uint32_t ta, tb, tc; ta = *b; // 4567 @@ -507,10 +518,12 @@ void mbedtls_aria_free(mbedtls_aria_context* ctx) { mbedtls_platform_zeroize(ctx, sizeof(mbedtls_aria_context)); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_CBC) /* * ARIA-CBC buffer encryption/decryption */ +namespace lbug_mbedtls { int mbedtls_aria_crypt_cbc(mbedtls_aria_context* ctx, int mode, size_t length, unsigned char iv[MBEDTLS_ARIA_BLOCKSIZE], const unsigned char* input, unsigned char* output) { int i; @@ -555,12 +568,14 @@ int mbedtls_aria_crypt_cbc(mbedtls_aria_context* ctx, int mode, size_t length, return (0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CBC */ #if defined(MBEDTLS_CIPHER_MODE_CFB) /* * ARIA-CFB128 buffer encryption/decryption */ +namespace lbug_mbedtls { int mbedtls_aria_crypt_cfb128(mbedtls_aria_context* ctx, int mode, size_t length, size_t* iv_off, unsigned char iv[MBEDTLS_ARIA_BLOCKSIZE], const unsigned char* input, unsigned char* output) { unsigned char c; @@ -607,12 +622,14 @@ int mbedtls_aria_crypt_cfb128(mbedtls_aria_context* ctx, int mode, size_t length return (0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CFB */ #if defined(MBEDTLS_CIPHER_MODE_CTR) /* * ARIA-CTR buffer encryption/decryption */ +namespace lbug_mbedtls { int mbedtls_aria_crypt_ctr(mbedtls_aria_context* ctx, size_t length, size_t* nc_off, unsigned char nonce_counter[MBEDTLS_ARIA_BLOCKSIZE], unsigned char stream_block[MBEDTLS_ARIA_BLOCKSIZE], const unsigned char* input, @@ -652,6 +669,7 @@ int mbedtls_aria_crypt_ctr(mbedtls_aria_context* ctx, size_t length, size_t* nc_ return (0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CTR */ #endif /* !MBEDTLS_ARIA_ALT */ @@ -660,6 +678,7 @@ int mbedtls_aria_crypt_ctr(mbedtls_aria_context* ctx, size_t length, size_t* nc_ /* * Basic ARIA ECB test vectors from RFC 5794 */ +namespace lbug_mbedtls { static const uint8_t aria_test1_ecb_key[32] = // test key { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // 128 bit @@ -686,8 +705,10 @@ static const uint8_t aria_test1_ecb_ct[3][MBEDTLS_ARIA_BLOCKSIZE] = // ciphertex * Mode tests from "Test Vectors for ARIA" Version 1.0 * http://210.104.33.10/ARIA/doc/ARIA-testvector-e.pdf */ +} // namespace lbug_mbedtls #if (defined(MBEDTLS_CIPHER_MODE_CBC) || defined(MBEDTLS_CIPHER_MODE_CFB) || \ defined(MBEDTLS_CIPHER_MODE_CTR)) +namespace lbug_mbedtls { static const uint8_t aria_test2_key[32] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, // 128 bit 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, @@ -745,16 +766,20 @@ static const uint8_t aria_test2_pt[48] = { 0xbb, 0xbb, }; +} // namespace lbug_mbedtls #endif #if (defined(MBEDTLS_CIPHER_MODE_CBC) || defined(MBEDTLS_CIPHER_MODE_CFB)) +namespace lbug_mbedtls { static const uint8_t aria_test2_iv[MBEDTLS_ARIA_BLOCKSIZE] = { 0x0f, 0x1e, 0x2d, 0x3c, 0x4b, 0x5a, 0x69, 0x78, // same for CBC, CFB 0x87, 0x96, 0xa5, 0xb4, 0xc3, 0xd2, 0xe1, 0xf0 // CTR has zero IV }; +} // namespace lbug_mbedtls #endif #if defined(MBEDTLS_CIPHER_MODE_CBC) +namespace lbug_mbedtls { static const uint8_t aria_test2_cbc_ct[3][48] = // CBC ciphertext {{0x49, 0xd6, 0x18, 0x60, 0xb1, 0x49, 0x09, 0x10, // 128-bit key 0x9c, 0xef, 0x0d, 0x22, 0xa9, 0x26, 0x81, 0x34, 0xfa, 0xdf, 0x9f, 0xb2, 0x31, 0x51, 0xe9, @@ -768,9 +793,11 @@ static const uint8_t aria_test2_cbc_ct[3][48] = // CBC ciphertext 0x55, 0xfd, 0xd2, 0x8d, 0xbc, 0x34, 0xe1, 0xab, 0x7b, 0x9b, 0x42, 0x43, 0x2a, 0xd8, 0xb2, 0xef, 0xb9, 0x6e, 0x23, 0xb1, 0x3f, 0x0a, 0x6e, 0x52, 0xf3, 0x61, 0x85, 0xd5, 0x0a, 0xd0, 0x02, 0xc5, 0xf6, 0x01, 0xbe, 0xe5, 0x49, 0x3f, 0x11, 0x8b}}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CBC */ #if defined(MBEDTLS_CIPHER_MODE_CFB) +namespace lbug_mbedtls { static const uint8_t aria_test2_cfb_ct[3][48] = // CFB ciphertext {{0x37, 0x20, 0xe5, 0x3b, 0xa7, 0xd6, 0x15, 0x38, // 128-bit key 0x34, 0x06, 0xb0, 0x9f, 0x0a, 0x05, 0xa2, 0x00, 0xc0, 0x7c, 0x21, 0xe6, 0x37, 0x0f, 0x41, @@ -784,9 +811,11 @@ static const uint8_t aria_test2_cfb_ct[3][48] = // CFB ciphertext 0x58, 0x8d, 0x4a, 0x7f, 0x09, 0x00, 0x96, 0x35, 0xf2, 0x8b, 0xb9, 0x3d, 0x8c, 0x31, 0xf8, 0x70, 0xec, 0x1e, 0x0b, 0xdb, 0x08, 0x2b, 0x66, 0xfa, 0x40, 0x2d, 0xd9, 0xc2, 0x02, 0xbe, 0x30, 0x0c, 0x45, 0x17, 0xd1, 0x96, 0xb1, 0x4d, 0x4c, 0xe1}}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CFB */ #if defined(MBEDTLS_CIPHER_MODE_CTR) +namespace lbug_mbedtls { static const uint8_t aria_test2_ctr_ct[3][48] = // CTR ciphertext {{0xac, 0x5d, 0x7d, 0xe8, 0x05, 0xa0, 0xbf, 0x1c, // 128-bit key 0x57, 0xc8, 0x54, 0x50, 0x1a, 0xf6, 0x0f, 0xa1, 0x14, 0x97, 0xe2, 0xa3, 0x45, 0x19, 0xde, @@ -800,6 +829,7 @@ static const uint8_t aria_test2_ctr_ct[3][48] = // CTR ciphertext 0x21, 0x17, 0x8b, 0x99, 0xc0, 0xa1, 0xf1, 0xb2, 0xf0, 0x69, 0x40, 0x25, 0x3f, 0x7b, 0x30, 0x89, 0xe2, 0xa3, 0x0e, 0xa8, 0x6a, 0xa3, 0xc8, 0x8f, 0x59, 0x40, 0xf0, 0x5a, 0xd7, 0xee, 0x41, 0xd7, 0x13, 0x47, 0xbb, 0x72, 0x61, 0xe3, 0x48, 0xf1}}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CFB */ #define ARIA_SELF_TEST_IF_FAIL \ @@ -816,6 +846,7 @@ static const uint8_t aria_test2_ctr_ct[3][48] = // CTR ciphertext /* * Checkup routine */ +namespace lbug_mbedtls { int mbedtls_aria_self_test(int verbose) { int i; uint8_t blk[MBEDTLS_ARIA_BLOCKSIZE]; @@ -950,6 +981,7 @@ int mbedtls_aria_self_test(int verbose) { return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_SELF_TEST */ #endif /* MBEDTLS_ARIA_C */ diff --git a/third_party/mbedtls/library/asn1parse.cpp b/third_party/mbedtls/library/asn1parse.cpp index f1d4af27c6..014a5fe379 100644 --- a/third_party/mbedtls/library/asn1parse.cpp +++ b/third_party/mbedtls/library/asn1parse.cpp @@ -42,6 +42,7 @@ /* * ASN.1 DER decoding routines */ +namespace lbug_mbedtls { int mbedtls_asn1_get_len(unsigned char** p, const unsigned char* end, size_t* len) { if ((end - *p) < 1) return (MBEDTLS_ERR_ASN1_OUT_OF_DATA); @@ -169,7 +170,9 @@ int mbedtls_asn1_get_enum(unsigned char** p, const unsigned char* end, int* val) return (asn1_get_tagged_int(p, end, MBEDTLS_ASN1_ENUMERATED, val)); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_BIGNUM_C) +namespace lbug_mbedtls { int mbedtls_asn1_get_mpi(unsigned char** p, const unsigned char* end, mbedtls_mpi* X) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; size_t len; @@ -183,8 +186,10 @@ int mbedtls_asn1_get_mpi(unsigned char** p, const unsigned char* end, mbedtls_mp return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_BIGNUM_C */ +namespace lbug_mbedtls { int mbedtls_asn1_get_bitstring(unsigned char** p, const unsigned char* end, mbedtls_asn1_bitstring* bs) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; @@ -412,4 +417,5 @@ const mbedtls_asn1_named_data* mbedtls_asn1_find_named_data(const mbedtls_asn1_n return (list); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_ASN1_PARSE_C */ diff --git a/third_party/mbedtls/library/base64.cpp b/third_party/mbedtls/library/base64.cpp index cea5cedebc..018b7651f5 100644 --- a/third_party/mbedtls/library/base64.cpp +++ b/third_party/mbedtls/library/base64.cpp @@ -41,6 +41,7 @@ /* * Encode a buffer into base64 format */ +namespace lbug_mbedtls { int mbedtls_base64_encode(unsigned char* dst, size_t dlen, size_t* olen, const unsigned char* src, size_t slen) { size_t i, n; @@ -194,8 +195,10 @@ int mbedtls_base64_decode(unsigned char* dst, size_t dlen, size_t* olen, const u return (0); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_SELF_TEST) +namespace lbug_mbedtls { static const unsigned char base64_test_dec[64] = {0x24, 0x48, 0x6E, 0x56, 0x87, 0x62, 0x5A, 0xBD, 0xBF, 0x17, 0xD9, 0xA2, 0xC4, 0x17, 0x1A, 0x01, 0x94, 0xED, 0x8F, 0x1E, 0x11, 0xB3, 0xD7, 0x09, 0x0C, 0xB6, 0xE9, 0x10, 0x6F, 0x22, 0xEE, 0x13, 0xCA, 0xB3, 0x07, 0x05, 0x76, 0xC9, 0xFA, 0x31, @@ -245,6 +248,7 @@ int mbedtls_base64_self_test(int verbose) { return (0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_SELF_TEST */ #endif /* MBEDTLS_BASE64_C */ diff --git a/third_party/mbedtls/library/bignum.cpp b/third_party/mbedtls/library/bignum.cpp index 39b733381d..8a20e4aac4 100644 --- a/third_party/mbedtls/library/bignum.cpp +++ b/third_party/mbedtls/library/bignum.cpp @@ -73,6 +73,7 @@ #define CHARS_TO_LIMBS(i) ((i) / ciL + ((i) % ciL != 0)) /* Implementation that should never be optimized out by the compiler */ +namespace lbug_mbedtls { static void mbedtls_mpi_zeroize(mbedtls_mpi_uint* v, size_t n) { mbedtls_platform_zeroize(v, ciL * n); } @@ -560,10 +561,12 @@ int mbedtls_mpi_write_string(const mbedtls_mpi* X, int radix, char* buf, size_t return (ret); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_FS_IO) /* * Read X from an opened file */ +namespace lbug_mbedtls { int mbedtls_mpi_read_file(mbedtls_mpi* X, int radix, FILE* fin) { mbedtls_mpi_uint d; size_t slen; @@ -643,11 +646,13 @@ int mbedtls_mpi_write_file(const char* p, const mbedtls_mpi* X, int radix, FILE* return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_FS_IO */ /* Convert a big-endian byte array aligned to the size of mbedtls_mpi_uint * into the storage form used by mbedtls_mpi. */ +namespace lbug_mbedtls { static mbedtls_mpi_uint mpi_uint_bigendian_to_host_c(mbedtls_mpi_uint x) { uint8_t i; unsigned char* x_ptr; @@ -2890,3 +2895,4 @@ int mbedtls_mpi_self_test(int verbose) { #endif /* MBEDTLS_SELF_TEST */ #endif /* MBEDTLS_BIGNUM_C */ +} // namespace lbug_mbedtls diff --git a/third_party/mbedtls/library/camellia.cpp b/third_party/mbedtls/library/camellia.cpp index 3827792d93..7c50fb388a 100644 --- a/third_party/mbedtls/library/camellia.cpp +++ b/third_party/mbedtls/library/camellia.cpp @@ -48,6 +48,7 @@ MBEDTLS_INTERNAL_VALIDATE_RET(cond, MBEDTLS_ERR_CAMELLIA_BAD_INPUT_DATA) #define CAMELLIA_VALIDATE(cond) MBEDTLS_INTERNAL_VALIDATE(cond) +namespace lbug_mbedtls { static const unsigned char SIGMA_CHARS[6][8] = {{0xa0, 0x9e, 0x66, 0x7f, 0x3b, 0xcc, 0x90, 0x8b}, {0xb6, 0x7a, 0xe8, 0x58, 0x4c, 0xaa, 0x73, 0xb2}, {0xc6, 0xef, 0x37, 0x2f, 0xe9, 0x4f, 0x82, 0xbe}, @@ -55,8 +56,10 @@ static const unsigned char SIGMA_CHARS[6][8] = {{0xa0, 0x9e, 0x66, 0x7f, 0x3b, 0 {0x10, 0xe5, 0x27, 0xfa, 0xde, 0x68, 0x2d, 0x1d}, {0xb0, 0x56, 0x88, 0xc2, 0xb3, 0xe6, 0xc1, 0xfd}}; +} // namespace lbug_mbedtls #if defined(MBEDTLS_CAMELLIA_SMALL_MEMORY) +namespace lbug_mbedtls { static const unsigned char FSb[256] = {112, 130, 44, 236, 179, 39, 192, 229, 228, 133, 87, 53, 234, 12, 174, 65, 35, 239, 107, 147, 69, 25, 165, 33, 237, 14, 79, 78, 29, 101, 146, 189, 134, 184, 175, 143, 124, 235, 31, 206, 62, 48, 220, 95, 94, 197, 11, 26, 166, 225, 57, 202, 213, 71, 93, @@ -76,8 +79,10 @@ static const unsigned char FSb[256] = {112, 130, 44, 236, 179, 39, 192, 229, 228 #define SBOX3(n) (unsigned char)((FSb[(n)] >> 1 ^ FSb[(n)] << 7) & 0xff) #define SBOX4(n) FSb[((n) << 1 ^ (n) >> 7) & 0xff] +} // namespace lbug_mbedtls #else /* MBEDTLS_CAMELLIA_SMALL_MEMORY */ +namespace lbug_mbedtls { static const unsigned char FSb[256] = {112, 130, 44, 236, 179, 39, 192, 229, 228, 133, 87, 53, 234, 12, 174, 65, 35, 239, 107, 147, 69, 25, 165, 33, 237, 14, 79, 78, 29, 101, 146, 189, 134, 184, 175, 143, 124, 235, 31, 206, 62, 48, 220, 95, 94, 197, 11, 26, 166, 225, 57, 202, 213, 71, 93, @@ -139,8 +144,10 @@ static const unsigned char FSb4[256] = {112, 44, 179, 192, 228, 87, 234, 174, 35 #define SBOX3(n) FSb3[(n)] #define SBOX4(n) FSb4[(n)] +} // namespace lbug_mbedtls #endif /* MBEDTLS_CAMELLIA_SMALL_MEMORY */ +namespace lbug_mbedtls { static const unsigned char shifts[2][4][4] = {{ {1, 1, 1, 1}, /* KL */ {0, 0, 0, 0}, /* KR */ @@ -469,10 +476,12 @@ int mbedtls_camellia_crypt_ecb(mbedtls_camellia_context* ctx, int mode, return (0); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_CBC) /* * Camellia-CBC buffer encryption/decryption */ +namespace lbug_mbedtls { int mbedtls_camellia_crypt_cbc(mbedtls_camellia_context* ctx, int mode, size_t length, unsigned char iv[16], const unsigned char* input, unsigned char* output) { int i; @@ -516,12 +525,14 @@ int mbedtls_camellia_crypt_cbc(mbedtls_camellia_context* ctx, int mode, size_t l return (0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CBC */ #if defined(MBEDTLS_CIPHER_MODE_CFB) /* * Camellia-CFB128 buffer encryption/decryption */ +namespace lbug_mbedtls { int mbedtls_camellia_crypt_cfb128(mbedtls_camellia_context* ctx, int mode, size_t length, size_t* iv_off, unsigned char iv[16], const unsigned char* input, unsigned char* output) { int c; @@ -563,12 +574,14 @@ int mbedtls_camellia_crypt_cfb128(mbedtls_camellia_context* ctx, int mode, size_ return (0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CFB */ #if defined(MBEDTLS_CIPHER_MODE_CTR) /* * Camellia-CTR buffer encryption/decryption */ +namespace lbug_mbedtls { int mbedtls_camellia_crypt_ctr(mbedtls_camellia_context* ctx, size_t length, size_t* nc_off, unsigned char nonce_counter[16], unsigned char stream_block[16], const unsigned char* input, unsigned char* output) { @@ -603,6 +616,7 @@ int mbedtls_camellia_crypt_ctr(mbedtls_camellia_context* ctx, size_t length, siz return (0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CTR */ #endif /* !MBEDTLS_CAMELLIA_ALT */ @@ -618,6 +632,7 @@ int mbedtls_camellia_crypt_ctr(mbedtls_camellia_context* ctx, size_t length, siz */ #define CAMELLIA_TESTS_ECB 2 +namespace lbug_mbedtls { static const unsigned char camellia_test_ecb_key[3][CAMELLIA_TESTS_ECB][32] = { {{0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10}, @@ -655,9 +670,11 @@ static const unsigned char camellia_test_ecb_cipher[3][CAMELLIA_TESTS_ECB][16] = {0x05, 0x03, 0xFB, 0x10, 0xAB, 0x24, 0x1E, 0x7C, 0xF4, 0x5D, 0x8C, 0xDE, 0xEE, 0x47, 0x43, 0x35}}}; +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_CBC) #define CAMELLIA_TESTS_CBC 3 +namespace lbug_mbedtls { static const unsigned char camellia_test_cbc_key[3][32] = {{0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C}, @@ -700,6 +717,7 @@ static const unsigned char camellia_test_cbc_cipher[3][CAMELLIA_TESTS_CBC][16] = 0x50}, {0xE3, 0x1A, 0x60, 0x55, 0x29, 0x7D, 0x96, 0xCA, 0x33, 0x30, 0xCD, 0xF1, 0xB1, 0x86, 0x0A, 0x83}}}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CBC */ #if defined(MBEDTLS_CIPHER_MODE_CTR) @@ -709,6 +727,7 @@ static const unsigned char camellia_test_cbc_cipher[3][CAMELLIA_TESTS_CBC][16] = * http://www.faqs.org/rfcs/rfc5528.html */ +namespace lbug_mbedtls { static const unsigned char camellia_test_ctr_key[3][16] = {{0xAE, 0x68, 0x52, 0xF8, 0x12, 0x10, 0x67, 0xCC, 0x4B, 0xF7, 0xA5, 0x76, 0x55, 0x77, 0xF3, 0x9E}, @@ -748,11 +767,13 @@ static const unsigned char camellia_test_ctr_ct[3][48] = {{0xD0, 0x9D, 0xC2, 0x9 0xCD, 0xDF, 0x50, 0x86, 0x96}}; static const int camellia_test_ctr_len[3] = {16, 32, 36}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CTR */ /* * Checkup routine */ +namespace lbug_mbedtls { int mbedtls_camellia_self_test(int verbose) { int i, j, u, v; unsigned char key[32]; @@ -919,6 +940,7 @@ int mbedtls_camellia_self_test(int verbose) { return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_SELF_TEST */ #endif /* MBEDTLS_CAMELLIA_C */ diff --git a/third_party/mbedtls/library/cipher.cpp b/third_party/mbedtls/library/cipher.cpp index 22a9b08c7f..0de3f4eb43 100644 --- a/third_party/mbedtls/library/cipher.cpp +++ b/third_party/mbedtls/library/cipher.cpp @@ -74,6 +74,7 @@ MBEDTLS_INTERNAL_VALIDATE_RET(cond, MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA) #define CIPHER_VALIDATE(cond) MBEDTLS_INTERNAL_VALIDATE(cond) +namespace lbug_mbedtls { static int supported_init = 0; const int* mbedtls_cipher_list(void) { @@ -199,7 +200,9 @@ int mbedtls_cipher_setup(mbedtls_cipher_context_t* ctx, const mbedtls_cipher_inf return (0); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_USE_PSA_CRYPTO) +namespace lbug_mbedtls { int mbedtls_cipher_setup_psa(mbedtls_cipher_context_t* ctx, const mbedtls_cipher_info_t* cipher_info, size_t taglen) { psa_algorithm_t alg; @@ -227,8 +230,10 @@ int mbedtls_cipher_setup_psa(mbedtls_cipher_context_t* ctx, ctx->psa_enabled = 1; return (0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_USE_PSA_CRYPTO */ +namespace lbug_mbedtls { int mbedtls_cipher_setkey(mbedtls_cipher_context_t* ctx, const unsigned char* key, int key_bitlen, const mbedtls_operation_t operation) { CIPHER_VALIDATE_RET(ctx != NULL); @@ -407,7 +412,9 @@ int mbedtls_cipher_reset(mbedtls_cipher_context_t* ctx) { return (0); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_GCM_C) || defined(MBEDTLS_CHACHAPOLY_C) +namespace lbug_mbedtls { int mbedtls_cipher_update_ad(mbedtls_cipher_context_t* ctx, const unsigned char* ad, size_t ad_len) { CIPHER_VALIDATE_RET(ctx != NULL); @@ -450,8 +457,10 @@ int mbedtls_cipher_update_ad(mbedtls_cipher_context_t* ctx, const unsigned char* return (0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_GCM_C || MBEDTLS_CHACHAPOLY_C */ +namespace lbug_mbedtls { int mbedtls_cipher_update(mbedtls_cipher_context_t* ctx, const unsigned char* input, size_t ilen, unsigned char* output, size_t* olen) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; @@ -667,11 +676,13 @@ int mbedtls_cipher_update(mbedtls_cipher_context_t* ctx, const unsigned char* in return (MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_WITH_PADDING) #if defined(MBEDTLS_CIPHER_PADDING_PKCS7) /* * PKCS7 (and PKCS5) padding: fill with ll bytes, with ll = padding_len */ +namespace lbug_mbedtls { static void add_pkcs_padding(unsigned char* output, size_t output_len, size_t data_len) { size_t padding_len = output_len - data_len; unsigned char i; @@ -702,12 +713,14 @@ static int get_pkcs_padding(unsigned char* input, size_t input_len, size_t* data return (MBEDTLS_ERR_CIPHER_INVALID_PADDING * (bad != 0)); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_PADDING_PKCS7 */ #if defined(MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS) /* * One and zeros padding: fill with 80 00 ... 00 */ +namespace lbug_mbedtls { static void add_one_and_zeros_padding(unsigned char* output, size_t output_len, size_t data_len) { size_t padding_len = output_len - data_len; unsigned char i = 0; @@ -735,12 +748,14 @@ static int get_one_and_zeros_padding(unsigned char* input, size_t input_len, siz return (MBEDTLS_ERR_CIPHER_INVALID_PADDING * (bad != 0)); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS */ #if defined(MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN) /* * Zeros and len padding: fill with 00 ... 00 ll, where ll is padding length */ +namespace lbug_mbedtls { static void add_zeros_and_len_padding(unsigned char* output, size_t output_len, size_t data_len) { size_t padding_len = output_len - data_len; unsigned char i = 0; @@ -771,12 +786,14 @@ static int get_zeros_and_len_padding(unsigned char* input, size_t input_len, siz return (MBEDTLS_ERR_CIPHER_INVALID_PADDING * (bad != 0)); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN */ #if defined(MBEDTLS_CIPHER_PADDING_ZEROS) /* * Zero padding: fill with 00 ... 00 */ +namespace lbug_mbedtls { static void add_zeros_padding(unsigned char* output, size_t output_len, size_t data_len) { size_t i; @@ -800,6 +817,7 @@ static int get_zeros_padding(unsigned char* input, size_t input_len, size_t* dat return (0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_PADDING_ZEROS */ /* @@ -808,6 +826,7 @@ static int get_zeros_padding(unsigned char* input, size_t input_len, size_t* dat * There is no add_padding function (check for NULL in mbedtls_cipher_finish) * but a trivial get_padding function */ +namespace lbug_mbedtls { static int get_no_padding(unsigned char* input, size_t input_len, size_t* data_len) { if (NULL == input || NULL == data_len) return (MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA); @@ -816,8 +835,10 @@ static int get_no_padding(unsigned char* input, size_t input_len, size_t* data_l return (0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_WITH_PADDING */ +namespace lbug_mbedtls { int mbedtls_cipher_finish(mbedtls_cipher_context_t* ctx, unsigned char* output, size_t* olen) { CIPHER_VALIDATE_RET(ctx != NULL); CIPHER_VALIDATE_RET(output != NULL); @@ -904,7 +925,9 @@ int mbedtls_cipher_finish(mbedtls_cipher_context_t* ctx, unsigned char* output, return (MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_WITH_PADDING) +namespace lbug_mbedtls { int mbedtls_cipher_set_padding_mode(mbedtls_cipher_context_t* ctx, mbedtls_cipher_padding_t mode) { CIPHER_VALIDATE_RET(ctx != NULL); @@ -960,9 +983,11 @@ int mbedtls_cipher_set_padding_mode(mbedtls_cipher_context_t* ctx, mbedtls_ciphe return (0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_WITH_PADDING */ #if defined(MBEDTLS_GCM_C) || defined(MBEDTLS_CHACHAPOLY_C) +namespace lbug_mbedtls { int mbedtls_cipher_write_tag(mbedtls_cipher_context_t* ctx, unsigned char* tag, size_t tag_len) { CIPHER_VALIDATE_RET(ctx != NULL); CIPHER_VALIDATE_RET(tag_len == 0 || tag != NULL); @@ -1078,11 +1103,13 @@ int mbedtls_cipher_check_tag(mbedtls_cipher_context_t* ctx, const unsigned char* mbedtls_platform_zeroize(check_tag, tag_len); return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_GCM_C || MBEDTLS_CHACHAPOLY_C */ /* * Packet-oriented wrapper for non-AEAD modes */ +namespace lbug_mbedtls { int mbedtls_cipher_crypt(mbedtls_cipher_context_t* ctx, const unsigned char* iv, size_t iv_len, const unsigned char* input, size_t ilen, unsigned char* output, size_t* olen) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; @@ -1157,11 +1184,13 @@ int mbedtls_cipher_crypt(mbedtls_cipher_context_t* ctx, const unsigned char* iv, return (0); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_AEAD) /* * Packet-oriented encryption for AEAD modes: internal function used by * mbedtls_cipher_auth_encrypt_ext(). */ +namespace lbug_mbedtls { static int mbedtls_cipher_aead_encrypt(mbedtls_cipher_context_t* ctx, const unsigned char* iv, size_t iv_len, const unsigned char* ad, size_t ad_len, const unsigned char* input, size_t ilen, unsigned char* output, size_t* olen, unsigned char* tag, size_t tag_len) { @@ -1305,12 +1334,14 @@ static int mbedtls_cipher_aead_decrypt(mbedtls_cipher_context_t* ctx, const unsi return (MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_AEAD */ #if defined(MBEDTLS_CIPHER_MODE_AEAD) || defined(MBEDTLS_NIST_KW_C) /* * Packet-oriented encryption for AEAD/NIST_KW: public function. */ +namespace lbug_mbedtls { int mbedtls_cipher_auth_encrypt_ext(mbedtls_cipher_context_t* ctx, const unsigned char* iv, size_t iv_len, const unsigned char* ad, size_t ad_len, const unsigned char* input, size_t ilen, unsigned char* output, size_t output_len, size_t* olen, size_t tag_len) { @@ -1402,6 +1433,7 @@ int mbedtls_cipher_auth_decrypt_ext(mbedtls_cipher_context_t* ctx, const unsigne return (MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE); #endif /* MBEDTLS_CIPHER_MODE_AEAD */ } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_AEAD || MBEDTLS_NIST_KW_C */ #endif /* MBEDTLS_CIPHER_C */ diff --git a/third_party/mbedtls/library/cipher_wrap.cpp b/third_party/mbedtls/library/cipher_wrap.cpp index 7de01cc3ac..c7fdea1b17 100644 --- a/third_party/mbedtls/library/cipher_wrap.cpp +++ b/third_party/mbedtls/library/cipher_wrap.cpp @@ -78,6 +78,7 @@ #if defined(MBEDTLS_GCM_C) /* shared by all GCM ciphers */ +namespace lbug_mbedtls { static void* gcm_ctx_alloc(void) { void* ctx = mbedtls_calloc(1, sizeof(mbedtls_gcm_context)); @@ -91,10 +92,12 @@ static void gcm_ctx_free(void* ctx) { mbedtls_gcm_free((mbedtls_gcm_context*)ctx); mbedtls_free(ctx); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_GCM_C */ #if defined(MBEDTLS_CCM_C) /* shared by all CCM ciphers */ +namespace lbug_mbedtls { static void* ccm_ctx_alloc(void) { void* ctx = mbedtls_calloc(1, sizeof(mbedtls_ccm_context)); @@ -108,47 +111,59 @@ static void ccm_ctx_free(void* ctx) { mbedtls_ccm_free(ctx); mbedtls_free(ctx); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CCM_C */ #if defined(MBEDTLS_AES_C) +namespace lbug_mbedtls { static int aes_crypt_ecb_wrap(void* ctx, mbedtls_operation_t operation, const unsigned char* input, unsigned char* output) { return mbedtls_aes_crypt_ecb((mbedtls_aes_context*)ctx, operation, input, output); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_CBC) +namespace lbug_mbedtls { static int aes_crypt_cbc_wrap(void* ctx, mbedtls_operation_t operation, size_t length, unsigned char* iv, const unsigned char* input, unsigned char* output) { return mbedtls_aes_crypt_cbc((mbedtls_aes_context*)ctx, operation, length, iv, input, output); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CBC */ #if defined(MBEDTLS_CIPHER_MODE_CFB) +namespace lbug_mbedtls { static int aes_crypt_cfb128_wrap(void* ctx, mbedtls_operation_t operation, size_t length, size_t* iv_off, unsigned char* iv, const unsigned char* input, unsigned char* output) { return mbedtls_aes_crypt_cfb128((mbedtls_aes_context*)ctx, operation, length, iv_off, iv, input, output); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CFB */ #if defined(MBEDTLS_CIPHER_MODE_OFB) +namespace lbug_mbedtls { static int aes_crypt_ofb_wrap(void* ctx, size_t length, size_t* iv_off, unsigned char* iv, const unsigned char* input, unsigned char* output) { return mbedtls_aes_crypt_ofb((mbedtls_aes_context*)ctx, length, iv_off, iv, input, output); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_OFB */ #if defined(MBEDTLS_CIPHER_MODE_CTR) +namespace lbug_mbedtls { static int aes_crypt_ctr_wrap(void* ctx, size_t length, size_t* nc_off, unsigned char* nonce_counter, unsigned char* stream_block, const unsigned char* input, unsigned char* output) { return mbedtls_aes_crypt_ctr((mbedtls_aes_context*)ctx, length, nc_off, nonce_counter, stream_block, input, output); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CTR */ #if defined(MBEDTLS_CIPHER_MODE_XTS) +namespace lbug_mbedtls { static int aes_crypt_xts_wrap(void* ctx, mbedtls_operation_t operation, size_t length, const unsigned char data_unit[16], const unsigned char* input, unsigned char* output) { mbedtls_aes_xts_context* xts_ctx = ctx; @@ -167,8 +182,10 @@ static int aes_crypt_xts_wrap(void* ctx, mbedtls_operation_t operation, size_t l return mbedtls_aes_crypt_xts(xts_ctx, mode, length, data_unit, input, output); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_XTS */ +namespace lbug_mbedtls { static int aes_setkey_dec_wrap(void* ctx, const unsigned char* key, unsigned int key_bitlen) { return mbedtls_aes_setkey_dec((mbedtls_aes_context*)ctx, key, key_bitlen); } @@ -223,7 +240,9 @@ static const mbedtls_cipher_info_t aes_192_ecb_info = {MBEDTLS_CIPHER_AES_192_EC static const mbedtls_cipher_info_t aes_256_ecb_info = {MBEDTLS_CIPHER_AES_256_ECB, MBEDTLS_MODE_ECB, 256, "AES-256-ECB", 0, 0, 16, &aes_info}; +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_CBC) +namespace lbug_mbedtls { static const mbedtls_cipher_info_t aes_128_cbc_info = {MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MODE_CBC, 128, "AES-128-CBC", 16, 0, 16, &aes_info}; @@ -232,9 +251,11 @@ static const mbedtls_cipher_info_t aes_192_cbc_info = {MBEDTLS_CIPHER_AES_192_CB static const mbedtls_cipher_info_t aes_256_cbc_info = {MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MODE_CBC, 256, "AES-256-CBC", 16, 0, 16, &aes_info}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CBC */ #if defined(MBEDTLS_CIPHER_MODE_CFB) +namespace lbug_mbedtls { static const mbedtls_cipher_info_t aes_128_cfb128_info = {MBEDTLS_CIPHER_AES_128_CFB128, MBEDTLS_MODE_CFB, 128, "AES-128-CFB128", 16, 0, 16, &aes_info}; @@ -243,9 +264,11 @@ static const mbedtls_cipher_info_t aes_192_cfb128_info = {MBEDTLS_CIPHER_AES_192 static const mbedtls_cipher_info_t aes_256_cfb128_info = {MBEDTLS_CIPHER_AES_256_CFB128, MBEDTLS_MODE_CFB, 256, "AES-256-CFB128", 16, 0, 16, &aes_info}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CFB */ #if defined(MBEDTLS_CIPHER_MODE_OFB) +namespace lbug_mbedtls { static const mbedtls_cipher_info_t aes_128_ofb_info = {MBEDTLS_CIPHER_AES_128_OFB, MBEDTLS_MODE_OFB, 128, "AES-128-OFB", 16, 0, 16, &aes_info}; @@ -254,9 +277,11 @@ static const mbedtls_cipher_info_t aes_192_ofb_info = {MBEDTLS_CIPHER_AES_192_OF static const mbedtls_cipher_info_t aes_256_ofb_info = {MBEDTLS_CIPHER_AES_256_OFB, MBEDTLS_MODE_OFB, 256, "AES-256-OFB", 16, 0, 16, &aes_info}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_OFB */ #if defined(MBEDTLS_CIPHER_MODE_CTR) +namespace lbug_mbedtls { static const mbedtls_cipher_info_t aes_128_ctr_info = {MBEDTLS_CIPHER_AES_128_CTR, MBEDTLS_MODE_CTR, 128, "AES-128-CTR", 16, 0, 16, &aes_info}; @@ -265,9 +290,11 @@ static const mbedtls_cipher_info_t aes_192_ctr_info = {MBEDTLS_CIPHER_AES_192_CT static const mbedtls_cipher_info_t aes_256_ctr_info = {MBEDTLS_CIPHER_AES_256_CTR, MBEDTLS_MODE_CTR, 256, "AES-256-CTR", 16, 0, 16, &aes_info}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CTR */ #if defined(MBEDTLS_CIPHER_MODE_XTS) +namespace lbug_mbedtls { static int xts_aes_setkey_enc_wrap(void* ctx, const unsigned char* key, unsigned int key_bitlen) { mbedtls_aes_xts_context* xts_ctx = ctx; return (mbedtls_aes_xts_setkey_enc(xts_ctx, key, key_bitlen)); @@ -323,9 +350,11 @@ static const mbedtls_cipher_info_t aes_128_xts_info = {MBEDTLS_CIPHER_AES_128_XT static const mbedtls_cipher_info_t aes_256_xts_info = {MBEDTLS_CIPHER_AES_256_XTS, MBEDTLS_MODE_XTS, 512, "AES-256-XTS", 16, 0, 16, &xts_aes_info}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_XTS */ #if defined(MBEDTLS_GCM_C) +namespace lbug_mbedtls { static int gcm_aes_setkey_wrap(void* ctx, const unsigned char* key, unsigned int key_bitlen) { return mbedtls_gcm_setkey((mbedtls_gcm_context*)ctx, MBEDTLS_CIPHER_ID_AES, key, key_bitlen); } @@ -365,9 +394,11 @@ static const mbedtls_cipher_info_t aes_192_gcm_info = {MBEDTLS_CIPHER_AES_192_GC static const mbedtls_cipher_info_t aes_256_gcm_info = {MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MODE_GCM, 256, "AES-256-GCM", 12, MBEDTLS_CIPHER_VARIABLE_IV_LEN, 16, &gcm_aes_info}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_GCM_C */ #if defined(MBEDTLS_CCM_C) +namespace lbug_mbedtls { static int ccm_aes_setkey_wrap(void* ctx, const unsigned char* key, unsigned int key_bitlen) { return mbedtls_ccm_setkey((mbedtls_ccm_context*)ctx, MBEDTLS_CIPHER_ID_AES, key, key_bitlen); } @@ -419,42 +450,52 @@ static const mbedtls_cipher_info_t aes_192_ccm_star_no_tag_info = { static const mbedtls_cipher_info_t aes_256_ccm_star_no_tag_info = { MBEDTLS_CIPHER_AES_256_CCM_STAR_NO_TAG, MBEDTLS_MODE_CCM_STAR_NO_TAG, 256, "AES-256-CCM*-NO-TAG", 12, MBEDTLS_CIPHER_VARIABLE_IV_LEN, 16, &ccm_aes_info}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CCM_C */ #endif /* MBEDTLS_AES_C */ #if defined(MBEDTLS_CAMELLIA_C) +namespace lbug_mbedtls { static int camellia_crypt_ecb_wrap(void* ctx, mbedtls_operation_t operation, const unsigned char* input, unsigned char* output) { return mbedtls_camellia_crypt_ecb((mbedtls_camellia_context*)ctx, operation, input, output); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_CBC) +namespace lbug_mbedtls { static int camellia_crypt_cbc_wrap(void* ctx, mbedtls_operation_t operation, size_t length, unsigned char* iv, const unsigned char* input, unsigned char* output) { return mbedtls_camellia_crypt_cbc((mbedtls_camellia_context*)ctx, operation, length, iv, input, output); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CBC */ #if defined(MBEDTLS_CIPHER_MODE_CFB) +namespace lbug_mbedtls { static int camellia_crypt_cfb128_wrap(void* ctx, mbedtls_operation_t operation, size_t length, size_t* iv_off, unsigned char* iv, const unsigned char* input, unsigned char* output) { return mbedtls_camellia_crypt_cfb128((mbedtls_camellia_context*)ctx, operation, length, iv_off, iv, input, output); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CFB */ #if defined(MBEDTLS_CIPHER_MODE_CTR) +namespace lbug_mbedtls { static int camellia_crypt_ctr_wrap(void* ctx, size_t length, size_t* nc_off, unsigned char* nonce_counter, unsigned char* stream_block, const unsigned char* input, unsigned char* output) { return mbedtls_camellia_crypt_ctr((mbedtls_camellia_context*)ctx, length, nc_off, nonce_counter, stream_block, input, output); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CTR */ +namespace lbug_mbedtls { static int camellia_setkey_dec_wrap(void* ctx, const unsigned char* key, unsigned int key_bitlen) { return mbedtls_camellia_setkey_dec((mbedtls_camellia_context*)ctx, key, key_bitlen); } @@ -511,7 +552,9 @@ static const mbedtls_cipher_info_t camellia_192_ecb_info = {MBEDTLS_CIPHER_CAMEL static const mbedtls_cipher_info_t camellia_256_ecb_info = {MBEDTLS_CIPHER_CAMELLIA_256_ECB, MBEDTLS_MODE_ECB, 256, "CAMELLIA-256-ECB", 0, 0, 16, &camellia_info}; +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_CBC) +namespace lbug_mbedtls { static const mbedtls_cipher_info_t camellia_128_cbc_info = {MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MODE_CBC, 128, "CAMELLIA-128-CBC", 16, 0, 16, &camellia_info}; @@ -520,9 +563,11 @@ static const mbedtls_cipher_info_t camellia_192_cbc_info = {MBEDTLS_CIPHER_CAMEL static const mbedtls_cipher_info_t camellia_256_cbc_info = {MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MODE_CBC, 256, "CAMELLIA-256-CBC", 16, 0, 16, &camellia_info}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CBC */ #if defined(MBEDTLS_CIPHER_MODE_CFB) +namespace lbug_mbedtls { static const mbedtls_cipher_info_t camellia_128_cfb128_info = {MBEDTLS_CIPHER_CAMELLIA_128_CFB128, MBEDTLS_MODE_CFB, 128, "CAMELLIA-128-CFB128", 16, 0, 16, &camellia_info}; @@ -531,9 +576,11 @@ static const mbedtls_cipher_info_t camellia_192_cfb128_info = {MBEDTLS_CIPHER_CA static const mbedtls_cipher_info_t camellia_256_cfb128_info = {MBEDTLS_CIPHER_CAMELLIA_256_CFB128, MBEDTLS_MODE_CFB, 256, "CAMELLIA-256-CFB128", 16, 0, 16, &camellia_info}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CFB */ #if defined(MBEDTLS_CIPHER_MODE_CTR) +namespace lbug_mbedtls { static const mbedtls_cipher_info_t camellia_128_ctr_info = {MBEDTLS_CIPHER_CAMELLIA_128_CTR, MBEDTLS_MODE_CTR, 128, "CAMELLIA-128-CTR", 16, 0, 16, &camellia_info}; @@ -542,9 +589,11 @@ static const mbedtls_cipher_info_t camellia_192_ctr_info = {MBEDTLS_CIPHER_CAMEL static const mbedtls_cipher_info_t camellia_256_ctr_info = {MBEDTLS_CIPHER_CAMELLIA_256_CTR, MBEDTLS_MODE_CTR, 256, "CAMELLIA-256-CTR", 16, 0, 16, &camellia_info}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CTR */ #if defined(MBEDTLS_GCM_C) +namespace lbug_mbedtls { static int gcm_camellia_setkey_wrap(void* ctx, const unsigned char* key, unsigned int key_bitlen) { return mbedtls_gcm_setkey((mbedtls_gcm_context*)ctx, MBEDTLS_CIPHER_ID_CAMELLIA, key, key_bitlen); @@ -588,9 +637,11 @@ static const mbedtls_cipher_info_t camellia_192_gcm_info = {MBEDTLS_CIPHER_CAMEL static const mbedtls_cipher_info_t camellia_256_gcm_info = {MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MODE_GCM, 256, "CAMELLIA-256-GCM", 12, MBEDTLS_CIPHER_VARIABLE_IV_LEN, 16, &gcm_camellia_info}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_GCM_C */ #if defined(MBEDTLS_CCM_C) +namespace lbug_mbedtls { static int ccm_camellia_setkey_wrap(void* ctx, const unsigned char* key, unsigned int key_bitlen) { return mbedtls_ccm_setkey((mbedtls_ccm_context*)ctx, MBEDTLS_CIPHER_ID_CAMELLIA, key, key_bitlen); @@ -646,42 +697,52 @@ static const mbedtls_cipher_info_t camellia_192_ccm_star_no_tag_info = { static const mbedtls_cipher_info_t camellia_256_ccm_star_no_tag_info = { MBEDTLS_CIPHER_CAMELLIA_256_CCM_STAR_NO_TAG, MBEDTLS_MODE_CCM_STAR_NO_TAG, 256, "CAMELLIA-256-CCM*-NO-TAG", 12, MBEDTLS_CIPHER_VARIABLE_IV_LEN, 16, &ccm_camellia_info}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CCM_C */ #endif /* MBEDTLS_CAMELLIA_C */ #if defined(MBEDTLS_ARIA_C) +namespace lbug_mbedtls { static int aria_crypt_ecb_wrap(void* ctx, mbedtls_operation_t operation, const unsigned char* input, unsigned char* output) { (void)operation; return mbedtls_aria_crypt_ecb((mbedtls_aria_context*)ctx, input, output); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_CBC) +namespace lbug_mbedtls { static int aria_crypt_cbc_wrap(void* ctx, mbedtls_operation_t operation, size_t length, unsigned char* iv, const unsigned char* input, unsigned char* output) { return mbedtls_aria_crypt_cbc((mbedtls_aria_context*)ctx, operation, length, iv, input, output); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CBC */ #if defined(MBEDTLS_CIPHER_MODE_CFB) +namespace lbug_mbedtls { static int aria_crypt_cfb128_wrap(void* ctx, mbedtls_operation_t operation, size_t length, size_t* iv_off, unsigned char* iv, const unsigned char* input, unsigned char* output) { return mbedtls_aria_crypt_cfb128((mbedtls_aria_context*)ctx, operation, length, iv_off, iv, input, output); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CFB */ #if defined(MBEDTLS_CIPHER_MODE_CTR) +namespace lbug_mbedtls { static int aria_crypt_ctr_wrap(void* ctx, size_t length, size_t* nc_off, unsigned char* nonce_counter, unsigned char* stream_block, const unsigned char* input, unsigned char* output) { return mbedtls_aria_crypt_ctr((mbedtls_aria_context*)ctx, length, nc_off, nonce_counter, stream_block, input, output); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CTR */ +namespace lbug_mbedtls { static int aria_setkey_dec_wrap(void* ctx, const unsigned char* key, unsigned int key_bitlen) { return mbedtls_aria_setkey_dec((mbedtls_aria_context*)ctx, key, key_bitlen); } @@ -737,7 +798,9 @@ static const mbedtls_cipher_info_t aria_192_ecb_info = {MBEDTLS_CIPHER_ARIA_192_ static const mbedtls_cipher_info_t aria_256_ecb_info = {MBEDTLS_CIPHER_ARIA_256_ECB, MBEDTLS_MODE_ECB, 256, "ARIA-256-ECB", 0, 0, 16, &aria_info}; +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_CBC) +namespace lbug_mbedtls { static const mbedtls_cipher_info_t aria_128_cbc_info = {MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MODE_CBC, 128, "ARIA-128-CBC", 16, 0, 16, &aria_info}; @@ -746,9 +809,11 @@ static const mbedtls_cipher_info_t aria_192_cbc_info = {MBEDTLS_CIPHER_ARIA_192_ static const mbedtls_cipher_info_t aria_256_cbc_info = {MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MODE_CBC, 256, "ARIA-256-CBC", 16, 0, 16, &aria_info}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CBC */ #if defined(MBEDTLS_CIPHER_MODE_CFB) +namespace lbug_mbedtls { static const mbedtls_cipher_info_t aria_128_cfb128_info = {MBEDTLS_CIPHER_ARIA_128_CFB128, MBEDTLS_MODE_CFB, 128, "ARIA-128-CFB128", 16, 0, 16, &aria_info}; @@ -757,9 +822,11 @@ static const mbedtls_cipher_info_t aria_192_cfb128_info = {MBEDTLS_CIPHER_ARIA_1 static const mbedtls_cipher_info_t aria_256_cfb128_info = {MBEDTLS_CIPHER_ARIA_256_CFB128, MBEDTLS_MODE_CFB, 256, "ARIA-256-CFB128", 16, 0, 16, &aria_info}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CFB */ #if defined(MBEDTLS_CIPHER_MODE_CTR) +namespace lbug_mbedtls { static const mbedtls_cipher_info_t aria_128_ctr_info = {MBEDTLS_CIPHER_ARIA_128_CTR, MBEDTLS_MODE_CTR, 128, "ARIA-128-CTR", 16, 0, 16, &aria_info}; @@ -768,9 +835,11 @@ static const mbedtls_cipher_info_t aria_192_ctr_info = {MBEDTLS_CIPHER_ARIA_192_ static const mbedtls_cipher_info_t aria_256_ctr_info = {MBEDTLS_CIPHER_ARIA_256_CTR, MBEDTLS_MODE_CTR, 256, "ARIA-256-CTR", 16, 0, 16, &aria_info}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CTR */ #if defined(MBEDTLS_GCM_C) +namespace lbug_mbedtls { static int gcm_aria_setkey_wrap(void* ctx, const unsigned char* key, unsigned int key_bitlen) { return mbedtls_gcm_setkey((mbedtls_gcm_context*)ctx, MBEDTLS_CIPHER_ID_ARIA, key, key_bitlen); } @@ -810,9 +879,11 @@ static const mbedtls_cipher_info_t aria_192_gcm_info = {MBEDTLS_CIPHER_ARIA_192_ static const mbedtls_cipher_info_t aria_256_gcm_info = {MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MODE_GCM, 256, "ARIA-256-GCM", 12, MBEDTLS_CIPHER_VARIABLE_IV_LEN, 16, &gcm_aria_info}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_GCM_C */ #if defined(MBEDTLS_CCM_C) +namespace lbug_mbedtls { static int ccm_aria_setkey_wrap(void* ctx, const unsigned char* key, unsigned int key_bitlen) { return mbedtls_ccm_setkey((mbedtls_ccm_context*)ctx, MBEDTLS_CIPHER_ID_ARIA, key, key_bitlen); } @@ -864,12 +935,14 @@ static const mbedtls_cipher_info_t aria_192_ccm_star_no_tag_info = { static const mbedtls_cipher_info_t aria_256_ccm_star_no_tag_info = { MBEDTLS_CIPHER_ARIA_256_CCM_STAR_NO_TAG, MBEDTLS_MODE_CCM_STAR_NO_TAG, 256, "ARIA-256-CCM*-NO-TAG", 12, MBEDTLS_CIPHER_VARIABLE_IV_LEN, 16, &ccm_aria_info}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CCM_C */ #endif /* MBEDTLS_ARIA_C */ #if defined(MBEDTLS_DES_C) +namespace lbug_mbedtls { static int des_crypt_ecb_wrap(void* ctx, mbedtls_operation_t operation, const unsigned char* input, unsigned char* output) { ((void)operation); @@ -882,20 +955,26 @@ static int des3_crypt_ecb_wrap(void* ctx, mbedtls_operation_t operation, const u return mbedtls_des3_crypt_ecb((mbedtls_des3_context*)ctx, input, output); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_CBC) +namespace lbug_mbedtls { static int des_crypt_cbc_wrap(void* ctx, mbedtls_operation_t operation, size_t length, unsigned char* iv, const unsigned char* input, unsigned char* output) { return mbedtls_des_crypt_cbc((mbedtls_des_context*)ctx, operation, length, iv, input, output); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CBC */ #if defined(MBEDTLS_CIPHER_MODE_CBC) +namespace lbug_mbedtls { static int des3_crypt_cbc_wrap(void* ctx, mbedtls_operation_t operation, size_t length, unsigned char* iv, const unsigned char* input, unsigned char* output) { return mbedtls_des3_crypt_cbc((mbedtls_des3_context*)ctx, operation, length, iv, input, output); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CBC */ +namespace lbug_mbedtls { static int des_setkey_dec_wrap(void* ctx, const unsigned char* key, unsigned int key_bitlen) { ((void)key_bitlen); @@ -989,11 +1068,15 @@ static const mbedtls_cipher_base_t des_info = {MBEDTLS_CIPHER_ID_DES, des_crypt_ static const mbedtls_cipher_info_t des_ecb_info = {MBEDTLS_CIPHER_DES_ECB, MBEDTLS_MODE_ECB, MBEDTLS_KEY_LENGTH_DES, "DES-ECB", 0, 0, 8, &des_info}; +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_CBC) +namespace lbug_mbedtls { static const mbedtls_cipher_info_t des_cbc_info = {MBEDTLS_CIPHER_DES_CBC, MBEDTLS_MODE_CBC, MBEDTLS_KEY_LENGTH_DES, "DES-CBC", 8, 0, 8, &des_info}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CBC */ +namespace lbug_mbedtls { static const mbedtls_cipher_base_t des_ede_info = {MBEDTLS_CIPHER_ID_DES, des3_crypt_ecb_wrap, #if defined(MBEDTLS_CIPHER_MODE_CBC) des3_crypt_cbc_wrap, @@ -1018,11 +1101,15 @@ static const mbedtls_cipher_base_t des_ede_info = {MBEDTLS_CIPHER_ID_DES, des3_c static const mbedtls_cipher_info_t des_ede_ecb_info = {MBEDTLS_CIPHER_DES_EDE_ECB, MBEDTLS_MODE_ECB, MBEDTLS_KEY_LENGTH_DES_EDE, "DES-EDE-ECB", 0, 0, 8, &des_ede_info}; +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_CBC) +namespace lbug_mbedtls { static const mbedtls_cipher_info_t des_ede_cbc_info = {MBEDTLS_CIPHER_DES_EDE_CBC, MBEDTLS_MODE_CBC, MBEDTLS_KEY_LENGTH_DES_EDE, "DES-EDE-CBC", 8, 0, 8, &des_ede_info}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CBC */ +namespace lbug_mbedtls { static const mbedtls_cipher_base_t des_ede3_info = {MBEDTLS_CIPHER_ID_3DES, des3_crypt_ecb_wrap, #if defined(MBEDTLS_CIPHER_MODE_CBC) des3_crypt_cbc_wrap, @@ -1046,14 +1133,18 @@ static const mbedtls_cipher_base_t des_ede3_info = {MBEDTLS_CIPHER_ID_3DES, des3 static const mbedtls_cipher_info_t des_ede3_ecb_info = {MBEDTLS_CIPHER_DES_EDE3_ECB, MBEDTLS_MODE_ECB, MBEDTLS_KEY_LENGTH_DES_EDE3, "DES-EDE3-ECB", 0, 0, 8, &des_ede3_info}; +} // namespace lbug_mbedtls #if defined(MBEDTLS_CIPHER_MODE_CBC) +namespace lbug_mbedtls { static const mbedtls_cipher_info_t des_ede3_cbc_info = {MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MODE_CBC, MBEDTLS_KEY_LENGTH_DES_EDE3, "DES-EDE3-CBC", 8, 0, 8, &des_ede3_info}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_MODE_CBC */ #endif /* MBEDTLS_DES_C */ #if defined(MBEDTLS_CHACHA20_C) +namespace lbug_mbedtls { static int chacha20_setkey_wrap(void* ctx, const unsigned char* key, unsigned int key_bitlen) { if (key_bitlen != 256U) return (MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA); @@ -1114,10 +1205,12 @@ static const mbedtls_cipher_base_t chacha20_base_info = {MBEDTLS_CIPHER_ID_CHACH chacha20_setkey_wrap, chacha20_setkey_wrap, chacha20_ctx_alloc, chacha20_ctx_free}; static const mbedtls_cipher_info_t chacha20_info = {MBEDTLS_CIPHER_CHACHA20, MBEDTLS_MODE_STREAM, 256, "CHACHA20", 12, 0, 1, &chacha20_base_info}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CHACHA20_C */ #if defined(MBEDTLS_CHACHAPOLY_C) +namespace lbug_mbedtls { static int chachapoly_setkey_wrap(void* ctx, const unsigned char* key, unsigned int key_bitlen) { if (key_bitlen != 256U) return (MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA); @@ -1167,9 +1260,11 @@ static const mbedtls_cipher_base_t chachapoly_base_info = {MBEDTLS_CIPHER_ID_CHA chachapoly_setkey_wrap, chachapoly_setkey_wrap, chachapoly_ctx_alloc, chachapoly_ctx_free}; static const mbedtls_cipher_info_t chachapoly_info = {MBEDTLS_CIPHER_CHACHA20_POLY1305, MBEDTLS_MODE_CHACHAPOLY, 256, "CHACHA20-POLY1305", 12, 0, 1, &chachapoly_base_info}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CHACHAPOLY_C */ #if defined(MBEDTLS_CIPHER_NULL_CIPHER) +namespace lbug_mbedtls { static int null_crypt_stream(void* ctx, size_t length, const unsigned char* input, unsigned char* output) { ((void)ctx); @@ -1216,9 +1311,11 @@ static const mbedtls_cipher_base_t null_base_info = {MBEDTLS_CIPHER_ID_NULL, NUL static const mbedtls_cipher_info_t null_cipher_info = {MBEDTLS_CIPHER_NULL, MBEDTLS_MODE_STREAM, 0, "NULL", 0, 0, 1, &null_base_info}; +} // namespace lbug_mbedtls #endif /* defined(MBEDTLS_CIPHER_NULL_CIPHER) */ #if defined(MBEDTLS_NIST_KW_C) +namespace lbug_mbedtls { static void* kw_ctx_alloc(void) { void* ctx = mbedtls_calloc(1, sizeof(mbedtls_nist_kw_context)); @@ -1287,8 +1384,10 @@ static const mbedtls_cipher_info_t aes_192_nist_kwp_info = {MBEDTLS_CIPHER_AES_1 static const mbedtls_cipher_info_t aes_256_nist_kwp_info = {MBEDTLS_CIPHER_AES_256_KWP, MBEDTLS_MODE_KWP, 256, "AES-256-KWP", 0, 0, 16, &kw_aes_info}; +} // namespace lbug_mbedtls #endif /* MBEDTLS_NIST_KW_C */ +namespace lbug_mbedtls { const mbedtls_cipher_definition_t mbedtls_cipher_definitions[] = { #if defined(MBEDTLS_AES_C) {MBEDTLS_CIPHER_AES_128_ECB, &aes_128_ecb_info}, @@ -1436,4 +1535,5 @@ const mbedtls_cipher_definition_t mbedtls_cipher_definitions[] = { #define NUM_CIPHERS (sizeof(mbedtls_cipher_definitions) / sizeof(mbedtls_cipher_definitions[0])) int mbedtls_cipher_supported[NUM_CIPHERS]; +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_C */ diff --git a/third_party/mbedtls/library/cipher_wrap.h b/third_party/mbedtls/library/cipher_wrap.h index 5da60eba5c..07f71ee8e0 100644 --- a/third_party/mbedtls/library/cipher_wrap.h +++ b/third_party/mbedtls/library/cipher_wrap.h @@ -31,13 +31,11 @@ #include "psa/crypto.h" #endif /* MBEDTLS_USE_PSA_CRYPTO */ -#ifdef __cplusplus -extern "C" { -#endif /** * Base cipher information. The non-mode specific functions and values. */ +namespace lbug_mbedtls { struct mbedtls_cipher_base_t { /** Base Cipher type (e.g. MBEDTLS_CIPHER_ID_AES) */ mbedtls_cipher_id_t cipher; @@ -99,7 +97,9 @@ typedef struct { const mbedtls_cipher_info_t* info; } mbedtls_cipher_definition_t; +} // namespace lbug_mbedtls #if defined(MBEDTLS_USE_PSA_CRYPTO) +namespace lbug_mbedtls { typedef enum { MBEDTLS_CIPHER_PSA_KEY_UNSET = 0, MBEDTLS_CIPHER_PSA_KEY_OWNED, /* Used for PSA-based cipher contexts which */ @@ -118,14 +118,14 @@ typedef struct { psa_key_id_t slot; mbedtls_cipher_psa_key_ownership slot_state; } mbedtls_cipher_context_psa; +} // namespace lbug_mbedtls #endif /* MBEDTLS_USE_PSA_CRYPTO */ +namespace lbug_mbedtls { extern const mbedtls_cipher_definition_t mbedtls_cipher_definitions[]; extern int mbedtls_cipher_supported[]; -#ifdef __cplusplus -} -#endif +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_WRAP_H */ diff --git a/third_party/mbedtls/library/common.h b/third_party/mbedtls/library/common.h index 1fe2fe6af0..54f78c02a1 100644 --- a/third_party/mbedtls/library/common.h +++ b/third_party/mbedtls/library/common.h @@ -49,6 +49,7 @@ #endif #if defined(MBEDTLS_TEST_HOOKS) +namespace lbug_mbedtls { extern void (*mbedtls_test_hook_test_fail)(const char* test, int line, const char* file); #define MBEDTLS_TEST_HOOK_TEST_ASSERT(TEST) \ do { \ @@ -56,6 +57,7 @@ extern void (*mbedtls_test_hook_test_fail)(const char* test, int line, const cha (*mbedtls_test_hook_test_fail)(#TEST, __LINE__, __FILE__); \ } \ } while (0) +} // namespace lbug_mbedtls #else #define MBEDTLS_TEST_HOOK_TEST_ASSERT(TEST) #endif /* defined(MBEDTLS_TEST_HOOKS) */ diff --git a/third_party/mbedtls/library/constant_time.cpp b/third_party/mbedtls/library/constant_time.cpp index a010995016..9ecc67c200 100644 --- a/third_party/mbedtls/library/constant_time.cpp +++ b/third_party/mbedtls/library/constant_time.cpp @@ -47,6 +47,7 @@ #include +namespace lbug_mbedtls { int mbedtls_ct_memcmp(const void* a, const void* b, size_t n) { size_t i; volatile const unsigned char* A = (volatile const unsigned char*)a; @@ -84,8 +85,10 @@ unsigned mbedtls_ct_uint_mask(unsigned value) { #endif } +} // namespace lbug_mbedtls #if defined(MBEDTLS_SSL_SOME_SUITES_USE_TLS_CBC) +namespace lbug_mbedtls { size_t mbedtls_ct_size_mask(size_t value) { /* MSVC has a warning about unary minus on unsigned integer types, * but this is well-defined and precisely what we want to do here. */ @@ -99,10 +102,12 @@ size_t mbedtls_ct_size_mask(size_t value) { #endif } +} // namespace lbug_mbedtls #endif /* MBEDTLS_SSL_SOME_SUITES_USE_TLS_CBC */ #if defined(MBEDTLS_BIGNUM_C) +namespace lbug_mbedtls { mbedtls_mpi_uint mbedtls_ct_mpi_uint_mask(mbedtls_mpi_uint value) { /* MSVC has a warning about unary minus on unsigned, but this is * well-defined and precisely what we want to do here */ @@ -116,6 +121,7 @@ mbedtls_mpi_uint mbedtls_ct_mpi_uint_mask(mbedtls_mpi_uint value) { #endif } +} // namespace lbug_mbedtls #endif /* MBEDTLS_BIGNUM_C */ #if defined(MBEDTLS_SSL_SOME_SUITES_USE_TLS_CBC) @@ -132,6 +138,7 @@ mbedtls_mpi_uint mbedtls_ct_mpi_uint_mask(mbedtls_mpi_uint value) { * * \return All-bits-one if \p x is less than \p y, otherwise zero. */ +namespace lbug_mbedtls { static size_t mbedtls_ct_size_mask_lt(size_t x, size_t y) { /* This has the most significant bit set if and only if x < y */ const size_t sub = x - y; @@ -149,6 +156,7 @@ size_t mbedtls_ct_size_mask_ge(size_t x, size_t y) { return (~mbedtls_ct_size_mask_lt(x, y)); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_SSL_SOME_SUITES_USE_TLS_CBC */ #if defined(MBEDTLS_BASE64_C) @@ -157,6 +165,7 @@ size_t mbedtls_ct_size_mask_ge(size_t x, size_t y) { * * Constant flow with respect to c. */ +namespace lbug_mbedtls { MBEDTLS_STATIC_TESTABLE unsigned char mbedtls_ct_uchar_mask_of_range(unsigned char low, unsigned char high, unsigned char c) { @@ -167,8 +176,10 @@ unsigned char mbedtls_ct_uchar_mask_of_range(unsigned char low, unsigned char hi return (~(low_mask | high_mask) & 0xff); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_BASE64_C */ +namespace lbug_mbedtls { unsigned mbedtls_ct_size_bool_eq(size_t x, size_t y) { /* diff = 0 if x == y, non-zero otherwise */ const size_t diff = x ^ y; @@ -193,6 +204,7 @@ unsigned mbedtls_ct_size_bool_eq(size_t x, size_t y) { return (1 ^ diff1); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_PKCS1_V15) && defined(MBEDTLS_RSA_C) && !defined(MBEDTLS_RSA_ALT) /** Constant-flow "greater than" comparison: @@ -206,15 +218,18 @@ unsigned mbedtls_ct_size_bool_eq(size_t x, size_t y) { * * \return 1 if \p x greater than \p y, otherwise 0. */ +namespace lbug_mbedtls { static unsigned mbedtls_ct_size_gt(size_t x, size_t y) { /* Return the sign bit (1 for negative) of (y - x). */ return ((y - x) >> (sizeof(size_t) * 8 - 1)); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_PKCS1_V15 && MBEDTLS_RSA_C && ! MBEDTLS_RSA_ALT */ #if defined(MBEDTLS_BIGNUM_C) +namespace lbug_mbedtls { unsigned mbedtls_ct_mpi_uint_lt(const mbedtls_mpi_uint x, const mbedtls_mpi_uint y) { mbedtls_mpi_uint ret; mbedtls_mpi_uint cond; @@ -240,13 +255,16 @@ unsigned mbedtls_ct_mpi_uint_lt(const mbedtls_mpi_uint x, const mbedtls_mpi_uint return (unsigned)ret; } +} // namespace lbug_mbedtls #endif /* MBEDTLS_BIGNUM_C */ +namespace lbug_mbedtls { unsigned mbedtls_ct_uint_if(unsigned condition, unsigned if1, unsigned if0) { unsigned mask = mbedtls_ct_uint_mask(condition); return ((mask & if1) | (~mask & if0)); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_BIGNUM_C) /** Select between two sign values without branches. @@ -263,6 +281,7 @@ unsigned mbedtls_ct_uint_if(unsigned condition, unsigned if1, unsigned if0) { * * \return \c if1 if \p condition is nonzero, otherwise \c if0. * */ +namespace lbug_mbedtls { static int mbedtls_ct_cond_select_sign(unsigned char condition, int if1, int if0) { /* In order to avoid questions about what we can reasonably assume about * the representations of signed integers, move everything to unsigned @@ -302,10 +321,12 @@ void mbedtls_ct_mpi_uint_cond_assign(size_t n, mbedtls_mpi_uint* dest, const mbe dest[i] = (src[i] & mask) | (dest[i] & ~mask); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_BIGNUM_C */ #if defined(MBEDTLS_BASE64_C) +namespace lbug_mbedtls { unsigned char mbedtls_ct_base64_enc_char(unsigned char value) { unsigned char digit = 0; /* For each range of values, if value is in that range, mask digit with @@ -335,6 +356,7 @@ signed char mbedtls_ct_base64_dec_value(unsigned char c) { return (val - 1); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_BASE64_C */ #if defined(MBEDTLS_PKCS1_V15) && defined(MBEDTLS_RSA_C) && !defined(MBEDTLS_RSA_ALT) @@ -355,6 +377,7 @@ signed char mbedtls_ct_base64_dec_value(unsigned char c) { * \param total Total size of the buffer. * \param offset Offset from which to copy \p total - \p offset bytes. */ +namespace lbug_mbedtls { static void mbedtls_ct_mem_move_to_left(void* start, size_t total, size_t offset) { volatile unsigned char* buf = (volatile unsigned char*)start; size_t i, n; @@ -374,10 +397,12 @@ static void mbedtls_ct_mem_move_to_left(void* start, size_t total, size_t offset } } +} // namespace lbug_mbedtls #endif /* MBEDTLS_PKCS1_V15 && MBEDTLS_RSA_C && ! MBEDTLS_RSA_ALT */ #if defined(MBEDTLS_SSL_SOME_SUITES_USE_TLS_CBC) +namespace lbug_mbedtls { void mbedtls_ct_memcpy_if_eq(unsigned char* dest, const unsigned char* src, size_t len, size_t c1, size_t c2) { /* mask = c1 == c2 ? 0xff : 0x00 */ @@ -474,6 +499,7 @@ int mbedtls_ct_hmac(mbedtls_md_context_t* ctx, const unsigned char* add_data, si return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_SSL_SOME_SUITES_USE_TLS_CBC */ #if defined(MBEDTLS_BIGNUM_C) @@ -485,6 +511,7 @@ int mbedtls_ct_hmac(mbedtls_md_context_t* ctx, const unsigned char* add_data, si * about whether the assignment was made or not. * (Leaking information about the respective sizes of X and Y is ok however.) */ +namespace lbug_mbedtls { int mbedtls_mpi_safe_cond_assign(mbedtls_mpi* X, const mbedtls_mpi* Y, unsigned char assign) { int ret = 0; size_t i; @@ -609,10 +636,12 @@ int mbedtls_mpi_lt_mpi_ct(const mbedtls_mpi* X, const mbedtls_mpi* Y, unsigned* return (0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_BIGNUM_C */ #if defined(MBEDTLS_PKCS1_V15) && defined(MBEDTLS_RSA_C) && !defined(MBEDTLS_RSA_ALT) +namespace lbug_mbedtls { int mbedtls_ct_rsaes_pkcs1_v15_unpadding(unsigned char* input, size_t ilen, unsigned char* output, size_t output_max_len, size_t* olen) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; @@ -724,4 +753,5 @@ int mbedtls_ct_rsaes_pkcs1_v15_unpadding(unsigned char* input, size_t ilen, unsi return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_PKCS1_V15 && MBEDTLS_RSA_C && ! MBEDTLS_RSA_ALT */ diff --git a/third_party/mbedtls/library/constant_time_internal.h b/third_party/mbedtls/library/constant_time_internal.h index 30eeccb6d1..a4e4b7a038 100644 --- a/third_party/mbedtls/library/constant_time_internal.h +++ b/third_party/mbedtls/library/constant_time_internal.h @@ -43,8 +43,10 @@ * * \return Zero if \p value is zero, otherwise all-bits-one. */ +namespace lbug_mbedtls { unsigned mbedtls_ct_uint_mask(unsigned value); +} // namespace lbug_mbedtls #if defined(MBEDTLS_SSL_SOME_SUITES_USE_TLS_CBC) /** Turn a value into a mask: @@ -58,8 +60,10 @@ unsigned mbedtls_ct_uint_mask(unsigned value); * * \return Zero if \p value is zero, otherwise all-bits-one. */ +namespace lbug_mbedtls { size_t mbedtls_ct_size_mask(size_t value); +} // namespace lbug_mbedtls #endif /* MBEDTLS_SSL_SOME_SUITES_USE_TLS_CBC */ #if defined(MBEDTLS_BIGNUM_C) @@ -75,8 +79,10 @@ size_t mbedtls_ct_size_mask(size_t value); * * \return Zero if \p value is zero, otherwise all-bits-one. */ +namespace lbug_mbedtls { mbedtls_mpi_uint mbedtls_ct_mpi_uint_mask(mbedtls_mpi_uint value); +} // namespace lbug_mbedtls #endif /* MBEDTLS_BIGNUM_C */ #if defined(MBEDTLS_SSL_SOME_SUITES_USE_TLS_CBC) @@ -94,8 +100,10 @@ mbedtls_mpi_uint mbedtls_ct_mpi_uint_mask(mbedtls_mpi_uint value); * \return All-bits-one if \p x is greater or equal than \p y, * otherwise zero. */ +namespace lbug_mbedtls { size_t mbedtls_ct_size_mask_ge(size_t x, size_t y); +} // namespace lbug_mbedtls #endif /* MBEDTLS_SSL_SOME_SUITES_USE_TLS_CBC */ /** Constant-flow boolean "equal" comparison: @@ -109,8 +117,10 @@ size_t mbedtls_ct_size_mask_ge(size_t x, size_t y); * * \return 1 if \p x equals to \p y, otherwise 0. */ +namespace lbug_mbedtls { unsigned mbedtls_ct_size_bool_eq(size_t x, size_t y); +} // namespace lbug_mbedtls #if defined(MBEDTLS_BIGNUM_C) /** Decide if an integer is less than the other, without branches. @@ -123,8 +133,10 @@ unsigned mbedtls_ct_size_bool_eq(size_t x, size_t y); * * \return 1 if \p x is less than \p y, otherwise 0. */ +namespace lbug_mbedtls { unsigned mbedtls_ct_mpi_uint_lt(const mbedtls_mpi_uint x, const mbedtls_mpi_uint y); +} // namespace lbug_mbedtls #endif /* MBEDTLS_BIGNUM_C */ /** Choose between two integer values without branches. @@ -138,8 +150,10 @@ unsigned mbedtls_ct_mpi_uint_lt(const mbedtls_mpi_uint x, const mbedtls_mpi_uint * * \return \c if1 if \p condition is nonzero, otherwise \c if0. */ +namespace lbug_mbedtls { unsigned mbedtls_ct_uint_if(unsigned condition, unsigned if1, unsigned if0); +} // namespace lbug_mbedtls #if defined(MBEDTLS_BIGNUM_C) /** Conditionally assign a value without branches. @@ -154,9 +168,11 @@ unsigned mbedtls_ct_uint_if(unsigned condition, unsigned if1, unsigned if0); * initialized MPI. * \param condition Condition to test, must be 0 or 1. */ +namespace lbug_mbedtls { void mbedtls_ct_mpi_uint_cond_assign(size_t n, mbedtls_mpi_uint* dest, const mbedtls_mpi_uint* src, unsigned char condition); +} // namespace lbug_mbedtls #endif /* MBEDTLS_BIGNUM_C */ #if defined(MBEDTLS_BASE64_C) @@ -170,6 +186,7 @@ void mbedtls_ct_mpi_uint_cond_assign(size_t n, mbedtls_mpi_uint* dest, const mbe * * \return A base64 digit converted from \p value. */ +namespace lbug_mbedtls { unsigned char mbedtls_ct_base64_enc_char(unsigned char value); /** Given a Base64 digit, return its value. @@ -186,6 +203,7 @@ unsigned char mbedtls_ct_base64_enc_char(unsigned char value); */ signed char mbedtls_ct_base64_dec_value(unsigned char c); +} // namespace lbug_mbedtls #endif /* MBEDTLS_BASE64_C */ #if defined(MBEDTLS_SSL_SOME_SUITES_USE_TLS_CBC) @@ -201,6 +219,7 @@ signed char mbedtls_ct_base64_dec_value(unsigned char c); * \param c1 The first value to analyze in the condition. * \param c2 The second value to analyze in the condition. */ +namespace lbug_mbedtls { void mbedtls_ct_memcpy_if_eq(unsigned char* dest, const unsigned char* src, size_t len, size_t c1, size_t c2); @@ -266,6 +285,7 @@ int mbedtls_ct_hmac(mbedtls_md_context_t* ctx, const unsigned char* add_data, si const unsigned char* data, size_t data_len_secret, size_t min_data_len, size_t max_data_len, unsigned char* output); +} // namespace lbug_mbedtls #endif /* MBEDTLS_SSL_SOME_SUITES_USE_TLS_CBC */ #if defined(MBEDTLS_PKCS1_V15) && defined(MBEDTLS_RSA_C) && !defined(MBEDTLS_RSA_ALT) @@ -296,9 +316,11 @@ int mbedtls_ct_hmac(mbedtls_md_context_t* ctx, const unsigned char* add_data, si * \return #MBEDTLS_ERR_RSA_INVALID_PADDING * The input doesn't contain properly formatted padding. */ +namespace lbug_mbedtls { int mbedtls_ct_rsaes_pkcs1_v15_unpadding(unsigned char* input, size_t ilen, unsigned char* output, size_t output_max_len, size_t* olen); +} // namespace lbug_mbedtls #endif /* MBEDTLS_PKCS1_V15 && MBEDTLS_RSA_C && ! MBEDTLS_RSA_ALT */ #endif /* MBEDTLS_CONSTANT_TIME_INTERNAL_H */ diff --git a/third_party/mbedtls/library/constant_time_invasive.h b/third_party/mbedtls/library/constant_time_invasive.h index 9dcd31bb45..54215a27d4 100644 --- a/third_party/mbedtls/library/constant_time_invasive.h +++ b/third_party/mbedtls/library/constant_time_invasive.h @@ -42,9 +42,11 @@ * * \return All-bits-one if \p low <= \p c <= \p high, otherwise zero. */ +namespace lbug_mbedtls { unsigned char mbedtls_ct_uchar_mask_of_range(unsigned char low, unsigned char high, unsigned char c); +} // namespace lbug_mbedtls #endif /* MBEDTLS_TEST_HOOKS */ #endif /* MBEDTLS_CONSTANT_TIME_INVASIVE_H */ diff --git a/third_party/mbedtls/library/entropy.cpp b/third_party/mbedtls/library/entropy.cpp index 533c293546..def24153d7 100644 --- a/third_party/mbedtls/library/entropy.cpp +++ b/third_party/mbedtls/library/entropy.cpp @@ -47,6 +47,7 @@ #define ENTROPY_MAX_LOOP 256 /**< Maximum amount to loop before error */ +namespace lbug_mbedtls { void mbedtls_entropy_init(mbedtls_entropy_context* ctx) { ctx->source_count = 0; memset(ctx->source, 0, sizeof(ctx->source)); @@ -387,7 +388,9 @@ int mbedtls_entropy_func(void* data, unsigned char* output, size_t len) { return (ret); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_ENTROPY_NV_SEED) +namespace lbug_mbedtls { int mbedtls_entropy_update_nv_seed(mbedtls_entropy_context* ctx) { int ret = MBEDTLS_ERR_ENTROPY_FILE_IO_ERROR; unsigned char buf[MBEDTLS_ENTROPY_BLOCK_SIZE]; @@ -405,9 +408,11 @@ int mbedtls_entropy_update_nv_seed(mbedtls_entropy_context* ctx) { return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_ENTROPY_NV_SEED */ #if defined(MBEDTLS_FS_IO) +namespace lbug_mbedtls { int mbedtls_entropy_write_seed_file(mbedtls_entropy_context* ctx, const char* path) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; FILE* f = NULL; @@ -469,12 +474,14 @@ int mbedtls_entropy_update_seed_file(mbedtls_entropy_context* ctx, const char* p return (mbedtls_entropy_write_seed_file(ctx, path)); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_FS_IO */ #if defined(MBEDTLS_SELF_TEST) /* * Dummy source function */ +namespace lbug_mbedtls { static int entropy_dummy_source(void* data, unsigned char* output, size_t len, size_t* olen) { ((void)data); @@ -484,8 +491,10 @@ static int entropy_dummy_source(void* data, unsigned char* output, size_t len, s return (0); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_ENTROPY_HARDWARE_ALT) +namespace lbug_mbedtls { static int mbedtls_entropy_source_self_test_gather(unsigned char* buf, size_t buf_len) { int ret = 0; size_t entropy_len = 0; @@ -571,6 +580,7 @@ int mbedtls_entropy_source_self_test(int verbose) { return (ret != 0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_ENTROPY_HARDWARE_ALT */ /* @@ -578,6 +588,7 @@ int mbedtls_entropy_source_self_test(int verbose) { * test that the functions don't cause errors and write the correct * amount of data to buffers. */ +namespace lbug_mbedtls { int mbedtls_entropy_self_test(int verbose) { int ret = 1; mbedtls_entropy_context ctx; @@ -644,6 +655,7 @@ int mbedtls_entropy_self_test(int verbose) { return (ret != 0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_SELF_TEST */ #endif /* MBEDTLS_ENTROPY_C */ diff --git a/third_party/mbedtls/library/entropy_poll.cpp b/third_party/mbedtls/library/entropy_poll.cpp index 9c51ccbae5..71e100299a 100644 --- a/third_party/mbedtls/library/entropy_poll.cpp +++ b/third_party/mbedtls/library/entropy_poll.cpp @@ -55,6 +55,7 @@ #include #include +namespace lbug_mbedtls { int mbedtls_platform_entropy_poll(void* data, unsigned char* output, size_t len, size_t* olen) { HCRYPTPROV provider; ((void)data); @@ -74,6 +75,7 @@ int mbedtls_platform_entropy_poll(void* data, unsigned char* output, size_t len, return (0); } +} // namespace lbug_mbedtls #else /* _WIN32 && !EFIX64 && !EFI32 */ /* @@ -89,6 +91,7 @@ int mbedtls_platform_entropy_poll(void* data, unsigned char* output, size_t len, #define HAVE_GETRANDOM #include +namespace lbug_mbedtls { static int getrandom_wrapper(void* buf, size_t buflen, unsigned int flags) { /* MemSan cannot understand that the syscall writes to the buffer */ #if defined(__has_feature) @@ -98,6 +101,7 @@ static int getrandom_wrapper(void* buf, size_t buflen, unsigned int flags) { #endif return (syscall(SYS_getrandom, buf, buflen, flags)); } +} // namespace lbug_mbedtls #endif /* SYS_getrandom */ #endif /* __linux__ || __midipix__ */ @@ -109,9 +113,11 @@ static int getrandom_wrapper(void* buf, size_t buflen, unsigned int flags) { #include #define HAVE_GETRANDOM +namespace lbug_mbedtls { static int getrandom_wrapper(void* buf, size_t buflen, unsigned int flags) { return getrandom(buf, buflen, flags); } +} // namespace lbug_mbedtls #endif /* (__FreeBSD__ && __FreeBSD_version >= 1200000) || \ (__DragonFly__ && __DragonFly_version >= 500700) */ #endif /* __FreeBSD__ || __DragonFly__ */ @@ -130,6 +136,7 @@ static int getrandom_wrapper(void* buf, size_t buflen, unsigned int flags) { #if defined(KERN_ARND) #define HAVE_SYSCTL_ARND +namespace lbug_mbedtls { static int sysctl_arnd_wrapper(unsigned char* buf, size_t buflen) { int name[2]; size_t len; @@ -146,11 +153,13 @@ static int sysctl_arnd_wrapper(unsigned char* buf, size_t buflen) { } return (0); } +} // namespace lbug_mbedtls #endif /* KERN_ARND */ #endif /* __FreeBSD__ || __NetBSD__ */ #include +namespace lbug_mbedtls { int mbedtls_platform_entropy_poll(void* data, unsigned char* output, size_t len, size_t* olen) { FILE* file; size_t read_len; @@ -196,10 +205,12 @@ int mbedtls_platform_entropy_poll(void* data, unsigned char* output, size_t len, return (0); #endif /* HAVE_SYSCTL_ARND */ } +} // namespace lbug_mbedtls #endif /* _WIN32 && !EFIX64 && !EFI32 */ #endif /* !MBEDTLS_NO_PLATFORM_ENTROPY */ #if defined(MBEDTLS_ENTROPY_NV_SEED) +namespace lbug_mbedtls { int mbedtls_nv_seed_poll(void* data, unsigned char* output, size_t len, size_t* olen) { unsigned char buf[MBEDTLS_ENTROPY_BLOCK_SIZE]; size_t use_len = MBEDTLS_ENTROPY_BLOCK_SIZE; @@ -218,6 +229,7 @@ int mbedtls_nv_seed_poll(void* data, unsigned char* output, size_t len, size_t* return (0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_ENTROPY_NV_SEED */ #endif /* MBEDTLS_ENTROPY_C */ diff --git a/third_party/mbedtls/library/entropy_poll.h b/third_party/mbedtls/library/entropy_poll.h index 26a71ea1ff..010303429b 100644 --- a/third_party/mbedtls/library/entropy_poll.h +++ b/third_party/mbedtls/library/entropy_poll.h @@ -26,9 +26,6 @@ #include "mbedtls/build_info.h" -#ifdef __cplusplus -extern "C" { -#endif /* * Default thresholds for built-in sources, in bytes @@ -42,7 +39,9 @@ extern "C" { /** * \brief Platform-specific entropy poll callback */ +namespace lbug_mbedtls { int mbedtls_platform_entropy_poll(void* data, unsigned char* output, size_t len, size_t* olen); +} // namespace lbug_mbedtls #endif #if defined(MBEDTLS_ENTROPY_HARDWARE_ALT) @@ -54,7 +53,9 @@ int mbedtls_platform_entropy_poll(void* data, unsigned char* output, size_t len, * * \note This must accept NULL as its first argument. */ +namespace lbug_mbedtls { int mbedtls_hardware_poll(void* data, unsigned char* output, size_t len, size_t* olen); +} // namespace lbug_mbedtls #endif #if defined(MBEDTLS_ENTROPY_NV_SEED) @@ -63,11 +64,10 @@ int mbedtls_hardware_poll(void* data, unsigned char* output, size_t len, size_t* * * \note This must accept NULL as its first argument. */ +namespace lbug_mbedtls { int mbedtls_nv_seed_poll(void* data, unsigned char* output, size_t len, size_t* olen); +} // namespace lbug_mbedtls #endif -#ifdef __cplusplus -} -#endif #endif /* entropy_poll.h */ diff --git a/third_party/mbedtls/library/gcm.cpp b/third_party/mbedtls/library/gcm.cpp index cccba00af1..d438a9f3de 100644 --- a/third_party/mbedtls/library/gcm.cpp +++ b/third_party/mbedtls/library/gcm.cpp @@ -59,6 +59,7 @@ /* * Initialize a context */ +namespace lbug_mbedtls { void mbedtls_gcm_init(mbedtls_gcm_context* ctx) { GCM_VALIDATE(ctx != NULL); memset(ctx, 0, sizeof(mbedtls_gcm_context)); @@ -574,6 +575,7 @@ void mbedtls_gcm_free(mbedtls_gcm_context* ctx) { mbedtls_platform_zeroize(ctx, sizeof(mbedtls_gcm_context)); } +} // namespace lbug_mbedtls #endif /* !MBEDTLS_GCM_ALT */ #if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_AES_C) @@ -584,6 +586,7 @@ void mbedtls_gcm_free(mbedtls_gcm_context* ctx) { */ #define MAX_TESTS 6 +namespace lbug_mbedtls { static const int key_index_test_data[MAX_TESTS] = {0, 0, 1, 1, 1, 1}; static const unsigned char key_test_data[MAX_TESTS][32] = { @@ -949,6 +952,7 @@ int mbedtls_gcm_self_test(int verbose) { return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_SELF_TEST && MBEDTLS_AES_C */ #endif /* MBEDTLS_GCM_C */ diff --git a/third_party/mbedtls/library/md.cpp b/third_party/mbedtls/library/md.cpp index ee05ad9f7e..4e60b490d7 100644 --- a/third_party/mbedtls/library/md.cpp +++ b/third_party/mbedtls/library/md.cpp @@ -61,71 +61,86 @@ #endif #if defined(MBEDTLS_MD5_C) +namespace lbug_mbedtls { const mbedtls_md_info_t mbedtls_md5_info = { "MD5", MBEDTLS_MD_MD5, 16, 64, }; +} // namespace lbug_mbedtls #endif #if defined(MBEDTLS_RIPEMD160_C) +namespace lbug_mbedtls { const mbedtls_md_info_t mbedtls_ripemd160_info = { "RIPEMD160", MBEDTLS_MD_RIPEMD160, 20, 64, }; +} // namespace lbug_mbedtls #endif #if defined(MBEDTLS_SHA1_C) +namespace lbug_mbedtls { const mbedtls_md_info_t mbedtls_sha1_info = { "SHA1", MBEDTLS_MD_SHA1, 20, 64, }; +} // namespace lbug_mbedtls #endif #if defined(MBEDTLS_SHA224_C) +namespace lbug_mbedtls { const mbedtls_md_info_t mbedtls_sha224_info = { "SHA224", MBEDTLS_MD_SHA224, 28, 64, }; +} // namespace lbug_mbedtls #endif #if defined(MBEDTLS_SHA256_C) +namespace lbug_mbedtls { const mbedtls_md_info_t mbedtls_sha256_info = { "SHA256", MBEDTLS_MD_SHA256, 32, 64, }; +} // namespace lbug_mbedtls #endif #if defined(MBEDTLS_SHA384_C) +namespace lbug_mbedtls { const mbedtls_md_info_t mbedtls_sha384_info = { "SHA384", MBEDTLS_MD_SHA384, 48, 128, }; +} // namespace lbug_mbedtls #endif #if defined(MBEDTLS_SHA512_C) +namespace lbug_mbedtls { const mbedtls_md_info_t mbedtls_sha512_info = { "SHA512", MBEDTLS_MD_SHA512, 64, 128, }; +} // namespace lbug_mbedtls #endif /* * Reminder: update profiles in x509_crt.c when adding a new hash! */ +namespace lbug_mbedtls { static const int supported_digests[] = { #if defined(MBEDTLS_SHA512_C) @@ -566,7 +581,9 @@ int mbedtls_md(const mbedtls_md_info_t* md_info, const unsigned char* input, siz } } +} // namespace lbug_mbedtls #if defined(MBEDTLS_FS_IO) +namespace lbug_mbedtls { int mbedtls_md_file(const mbedtls_md_info_t* md_info, const char* path, unsigned char* output) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; FILE* f; @@ -604,8 +621,10 @@ int mbedtls_md_file(const mbedtls_md_info_t* md_info, const char* path, unsigned return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_FS_IO */ +namespace lbug_mbedtls { int mbedtls_md_hmac_starts(mbedtls_md_context_t* ctx, const unsigned char* key, size_t keylen) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; unsigned char sum[MBEDTLS_MD_MAX_SIZE]; @@ -776,4 +795,5 @@ const char* mbedtls_md_get_name(const mbedtls_md_info_t* md_info) { return md_info->name; } +} // namespace lbug_mbedtls #endif /* MBEDTLS_MD_C */ diff --git a/third_party/mbedtls/library/md_wrap.h b/third_party/mbedtls/library/md_wrap.h index 5801f9e752..7a0902ced5 100644 --- a/third_party/mbedtls/library/md_wrap.h +++ b/third_party/mbedtls/library/md_wrap.h @@ -29,14 +29,12 @@ #include "mbedtls/build_info.h" #include "mbedtls/md.h" -#ifdef __cplusplus -extern "C" { -#endif /** * Message digest information. * Allows message digest functions to be called in a generic way. */ +namespace lbug_mbedtls { struct mbedtls_md_info_t { /** Name of the message digest */ const char* name; @@ -51,30 +49,42 @@ struct mbedtls_md_info_t { unsigned char block_size; }; +} // namespace lbug_mbedtls #if defined(MBEDTLS_MD5_C) +namespace lbug_mbedtls { extern const mbedtls_md_info_t mbedtls_md5_info; +} // namespace lbug_mbedtls #endif #if defined(MBEDTLS_RIPEMD160_C) +namespace lbug_mbedtls { extern const mbedtls_md_info_t mbedtls_ripemd160_info; +} // namespace lbug_mbedtls #endif #if defined(MBEDTLS_SHA1_C) +namespace lbug_mbedtls { extern const mbedtls_md_info_t mbedtls_sha1_info; +} // namespace lbug_mbedtls #endif #if defined(MBEDTLS_SHA224_C) +namespace lbug_mbedtls { extern const mbedtls_md_info_t mbedtls_sha224_info; +} // namespace lbug_mbedtls #endif #if defined(MBEDTLS_SHA256_C) +namespace lbug_mbedtls { extern const mbedtls_md_info_t mbedtls_sha256_info; +} // namespace lbug_mbedtls #endif #if defined(MBEDTLS_SHA384_C) +namespace lbug_mbedtls { extern const mbedtls_md_info_t mbedtls_sha384_info; +} // namespace lbug_mbedtls #endif #if defined(MBEDTLS_SHA512_C) +namespace lbug_mbedtls { extern const mbedtls_md_info_t mbedtls_sha512_info; +} // namespace lbug_mbedtls #endif -#ifdef __cplusplus -} -#endif #endif /* MBEDTLS_MD_WRAP_H */ diff --git a/third_party/mbedtls/library/oid.cpp b/third_party/mbedtls/library/oid.cpp index 1782225d71..03293a8dcf 100644 --- a/third_party/mbedtls/library/oid.cpp +++ b/third_party/mbedtls/library/oid.cpp @@ -157,6 +157,7 @@ /* * For X520 attribute types */ +namespace lbug_mbedtls { typedef struct { mbedtls_oid_descriptor_t descriptor; const char* short_name; @@ -300,7 +301,9 @@ static const oid_x509_ext_t oid_x509_ext[] = { FN_OID_TYPED_FROM_ASN1(oid_x509_ext_t, x509_ext, oid_x509_ext) FN_OID_GET_ATTR1(mbedtls_oid_get_x509_ext_type, oid_x509_ext_t, x509_ext, int, ext_type) +} // namespace lbug_mbedtls #if !defined(MBEDTLS_X509_REMOVE_INFO) +namespace lbug_mbedtls { static const mbedtls_oid_descriptor_t oid_ext_key_usage[] = { OID_DESCRIPTOR(MBEDTLS_OID_SERVER_AUTH, "id-kp-serverAuth", "TLS Web Server Authentication"), OID_DESCRIPTOR(MBEDTLS_OID_CLIENT_AUTH, "id-kp-clientAuth", "TLS Web Client Authentication"), @@ -325,12 +328,14 @@ static const mbedtls_oid_descriptor_t oid_certificate_policies[] = { FN_OID_TYPED_FROM_ASN1(mbedtls_oid_descriptor_t, certificate_policies, oid_certificate_policies) FN_OID_GET_ATTR1(mbedtls_oid_get_certificate_policies, mbedtls_oid_descriptor_t, certificate_policies, const char*, description) +} // namespace lbug_mbedtls #endif /* MBEDTLS_X509_REMOVE_INFO */ #if defined(MBEDTLS_MD_C) /* * For SignatureAlgorithmIdentifier */ +namespace lbug_mbedtls { typedef struct { mbedtls_oid_descriptor_t descriptor; mbedtls_md_type_t md_alg; @@ -442,20 +447,26 @@ static const oid_sig_alg_t oid_sig_alg[] = { FN_OID_TYPED_FROM_ASN1(oid_sig_alg_t, sig_alg, oid_sig_alg) +} // namespace lbug_mbedtls #if !defined(MBEDTLS_X509_REMOVE_INFO) +namespace lbug_mbedtls { FN_OID_GET_DESCRIPTOR_ATTR1(mbedtls_oid_get_sig_alg_desc, oid_sig_alg_t, sig_alg, const char*, description) +} // namespace lbug_mbedtls #endif +namespace lbug_mbedtls { FN_OID_GET_ATTR2(mbedtls_oid_get_sig_alg, oid_sig_alg_t, sig_alg, mbedtls_md_type_t, md_alg, mbedtls_pk_type_t, pk_alg) FN_OID_GET_OID_BY_ATTR2(mbedtls_oid_get_oid_by_sig_alg, oid_sig_alg_t, oid_sig_alg, mbedtls_pk_type_t, pk_alg, mbedtls_md_type_t, md_alg) +} // namespace lbug_mbedtls #endif /* MBEDTLS_MD_C */ /* * For PublicKeyInfo (PKCS1, RFC 5480) */ +namespace lbug_mbedtls { typedef struct { mbedtls_oid_descriptor_t descriptor; mbedtls_pk_type_t pk_alg; @@ -485,10 +496,12 @@ FN_OID_GET_ATTR1(mbedtls_oid_get_pk_alg, oid_pk_alg_t, pk_alg, mbedtls_pk_type_t FN_OID_GET_OID_BY_ATTR1(mbedtls_oid_get_oid_by_pk_alg, oid_pk_alg_t, oid_pk_alg, mbedtls_pk_type_t, pk_alg) +} // namespace lbug_mbedtls #if defined(MBEDTLS_ECP_C) /* * For namedCurve (RFC 5480) */ +namespace lbug_mbedtls { typedef struct { mbedtls_oid_descriptor_t descriptor; mbedtls_ecp_group_id grp_id; @@ -571,12 +584,14 @@ FN_OID_TYPED_FROM_ASN1(oid_ecp_grp_t, grp_id, oid_ecp_grp) FN_OID_GET_ATTR1(mbedtls_oid_get_ec_grp, oid_ecp_grp_t, grp_id, mbedtls_ecp_group_id, grp_id) FN_OID_GET_OID_BY_ATTR1(mbedtls_oid_get_oid_by_ec_grp, oid_ecp_grp_t, oid_ecp_grp, mbedtls_ecp_group_id, grp_id) +} // namespace lbug_mbedtls #endif /* MBEDTLS_ECP_C */ #if defined(MBEDTLS_CIPHER_C) /* * For PKCS#5 PBES2 encryption algorithm */ +namespace lbug_mbedtls { typedef struct { mbedtls_oid_descriptor_t descriptor; mbedtls_cipher_type_t cipher_alg; @@ -600,12 +615,14 @@ static const oid_cipher_alg_t oid_cipher_alg[] = { FN_OID_TYPED_FROM_ASN1(oid_cipher_alg_t, cipher_alg, oid_cipher_alg) FN_OID_GET_ATTR1(mbedtls_oid_get_cipher_alg, oid_cipher_alg_t, cipher_alg, mbedtls_cipher_type_t, cipher_alg) +} // namespace lbug_mbedtls #endif /* MBEDTLS_CIPHER_C */ #if defined(MBEDTLS_MD_C) /* * For digestAlgorithm */ +namespace lbug_mbedtls { typedef struct { mbedtls_oid_descriptor_t descriptor; mbedtls_md_type_t md_alg; @@ -712,12 +729,14 @@ static const oid_md_hmac_t oid_md_hmac[] = { FN_OID_TYPED_FROM_ASN1(oid_md_hmac_t, md_hmac, oid_md_hmac) FN_OID_GET_ATTR1(mbedtls_oid_get_md_hmac, oid_md_hmac_t, md_hmac, mbedtls_md_type_t, md_hmac) +} // namespace lbug_mbedtls #endif /* MBEDTLS_MD_C */ #if defined(MBEDTLS_PKCS12_C) /* * For PKCS#12 PBEs */ +namespace lbug_mbedtls { typedef struct { mbedtls_oid_descriptor_t descriptor; mbedtls_md_type_t md_alg; @@ -747,6 +766,7 @@ static const oid_pkcs12_pbe_alg_t oid_pkcs12_pbe_alg[] = { FN_OID_TYPED_FROM_ASN1(oid_pkcs12_pbe_alg_t, pkcs12_pbe_alg, oid_pkcs12_pbe_alg) FN_OID_GET_ATTR2(mbedtls_oid_get_pkcs12_pbe_alg, oid_pkcs12_pbe_alg_t, pkcs12_pbe_alg, mbedtls_md_type_t, md_alg, mbedtls_cipher_type_t, cipher_alg) +} // namespace lbug_mbedtls #endif /* MBEDTLS_PKCS12_C */ #define OID_SAFE_SNPRINTF \ @@ -759,9 +779,11 @@ FN_OID_GET_ATTR2(mbedtls_oid_get_pkcs12_pbe_alg, oid_pkcs12_pbe_alg_t, pkcs12_pb } while (0) /* Return the x.y.z.... style numeric string for the given OID */ +namespace lbug_mbedtls { int mbedtls_oid_get_numeric_string(char*, size_t, const mbedtls_asn1_buf*) { return MBEDTLS_ERR_ERROR_GENERIC_ERROR; // patched because it used to require printf which would // fail on Windows } +} // namespace lbug_mbedtls #endif /* MBEDTLS_OID_C */ diff --git a/third_party/mbedtls/library/pem.cpp b/third_party/mbedtls/library/pem.cpp index ea6532b612..2f99e7b27d 100644 --- a/third_party/mbedtls/library/pem.cpp +++ b/third_party/mbedtls/library/pem.cpp @@ -45,15 +45,18 @@ #endif #if defined(MBEDTLS_PEM_PARSE_C) +namespace lbug_mbedtls { void mbedtls_pem_init(mbedtls_pem_context* ctx) { memset(ctx, 0, sizeof(mbedtls_pem_context)); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_MD5_C) && defined(MBEDTLS_CIPHER_MODE_CBC) && \ (defined(MBEDTLS_DES_C) || defined(MBEDTLS_AES_C)) /* * Read a 16-byte hex string and convert it to binary */ +namespace lbug_mbedtls { static int pem_get_iv(const unsigned char* s, unsigned char* iv, size_t iv_len) { size_t i, j, k; @@ -132,10 +135,12 @@ static int pem_pbkdf1(unsigned char* key, size_t keylen, unsigned char* iv, return (ret); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_DES_C) /* * Decrypt with DES-CBC, using PBKDF1 for key derivation */ +namespace lbug_mbedtls { static int pem_des_decrypt(unsigned char des_iv[8], unsigned char* buf, size_t buflen, const unsigned char* pwd, size_t pwdlen) { mbedtls_des_context des_ctx; @@ -182,12 +187,14 @@ static int pem_des3_decrypt(unsigned char des3_iv[8], unsigned char* buf, size_t return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_DES_C */ #if defined(MBEDTLS_AES_C) /* * Decrypt with AES-XXX-CBC, using PBKDF1 for key derivation */ +namespace lbug_mbedtls { static int pem_aes_decrypt(unsigned char aes_iv[16], unsigned int keylen, unsigned char* buf, size_t buflen, const unsigned char* pwd, size_t pwdlen) { mbedtls_aes_context aes_ctx; @@ -209,11 +216,13 @@ static int pem_aes_decrypt(unsigned char aes_iv[16], unsigned int keylen, unsign return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_AES_C */ #endif /* MBEDTLS_MD5_C && MBEDTLS_CIPHER_MODE_CBC && \ ( MBEDTLS_AES_C || MBEDTLS_DES_C ) */ +namespace lbug_mbedtls { int mbedtls_pem_read_buffer(mbedtls_pem_context* ctx, const char* header, const char* footer, const unsigned char* data, const unsigned char* pwd, size_t pwdlen, size_t* use_len) { int ret, enc; @@ -417,9 +426,11 @@ void mbedtls_pem_free(mbedtls_pem_context* ctx) { mbedtls_platform_zeroize(ctx, sizeof(mbedtls_pem_context)); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_PEM_PARSE_C */ #if defined(MBEDTLS_PEM_WRITE_C) +namespace lbug_mbedtls { int mbedtls_pem_write_buffer(const char* header, const char* footer, const unsigned char* der_data, size_t der_len, unsigned char* buf, size_t buf_len, size_t* olen) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; @@ -467,5 +478,6 @@ int mbedtls_pem_write_buffer(const char* header, const char* footer, const unsig mbedtls_free(encode_buf); return (0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_PEM_WRITE_C */ #endif /* MBEDTLS_PEM_PARSE_C || MBEDTLS_PEM_WRITE_C */ diff --git a/third_party/mbedtls/library/pk.cpp b/third_party/mbedtls/library/pk.cpp index a4c862862f..6aef3d436b 100644 --- a/third_party/mbedtls/library/pk.cpp +++ b/third_party/mbedtls/library/pk.cpp @@ -49,6 +49,7 @@ /* * Initialise a mbedtls_pk_context */ +namespace lbug_mbedtls { void mbedtls_pk_init(mbedtls_pk_context* ctx) { PK_VALIDATE(ctx != NULL); @@ -69,10 +70,12 @@ void mbedtls_pk_free(mbedtls_pk_context* ctx) { mbedtls_platform_zeroize(ctx, sizeof(mbedtls_pk_context)); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE) /* * Initialize a restart context */ +namespace lbug_mbedtls { void mbedtls_pk_restart_init(mbedtls_pk_restart_ctx* ctx) { PK_VALIDATE(ctx != NULL); ctx->pk_info = NULL; @@ -92,11 +95,13 @@ void mbedtls_pk_restart_free(mbedtls_pk_restart_ctx* ctx) { ctx->pk_info = NULL; ctx->rs_ctx = NULL; } +} // namespace lbug_mbedtls #endif /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */ /* * Get pk_info structure from type */ +namespace lbug_mbedtls { const mbedtls_pk_info_t* mbedtls_pk_info_from_type(mbedtls_pk_type_t pk_type) { switch (pk_type) { #if defined(MBEDTLS_RSA_C) @@ -135,10 +140,12 @@ int mbedtls_pk_setup(mbedtls_pk_context* ctx, const mbedtls_pk_info_t* info) { return (0); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_USE_PSA_CRYPTO) /* * Initialise a PSA-wrapping context */ +namespace lbug_mbedtls { int mbedtls_pk_setup_opaque(mbedtls_pk_context* ctx, const psa_key_id_t key) { const mbedtls_pk_info_t* const info = &mbedtls_pk_opaque_info; psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; @@ -167,12 +174,14 @@ int mbedtls_pk_setup_opaque(mbedtls_pk_context* ctx, const psa_key_id_t key) { return (0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_USE_PSA_CRYPTO */ #if defined(MBEDTLS_PK_RSA_ALT_SUPPORT) /* * Initialize an RSA-alt context */ +namespace lbug_mbedtls { int mbedtls_pk_setup_rsa_alt(mbedtls_pk_context* ctx, void* key, mbedtls_pk_rsa_alt_decrypt_func decrypt_func, mbedtls_pk_rsa_alt_sign_func sign_func, mbedtls_pk_rsa_alt_key_len_func key_len_func) { @@ -197,11 +206,13 @@ int mbedtls_pk_setup_rsa_alt(mbedtls_pk_context* ctx, void* key, return (0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_PK_RSA_ALT_SUPPORT */ /* * Tell if a PK can do the operations of the given type */ +namespace lbug_mbedtls { int mbedtls_pk_can_do(const mbedtls_pk_context* ctx, mbedtls_pk_type_t type) { /* A context with null pk_info is not set up yet and can't do anything. * For backward compatibility, also accept NULL instead of a context @@ -228,10 +239,12 @@ static inline int pk_hashlen_helper(mbedtls_md_type_t md_alg, size_t* hash_len) return (0); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE) /* * Helper to set up a restart context if needed */ +namespace lbug_mbedtls { static int pk_restart_setup(mbedtls_pk_restart_ctx* ctx, const mbedtls_pk_info_t* info) { /* Don't do anything if already set up or invalid */ if (ctx == NULL || ctx->pk_info != NULL) @@ -248,11 +261,13 @@ static int pk_restart_setup(mbedtls_pk_restart_ctx* ctx, const mbedtls_pk_info_t return (0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */ /* * Verify a signature (restartable) */ +namespace lbug_mbedtls { int mbedtls_pk_verify_restartable(mbedtls_pk_context* ctx, mbedtls_md_type_t md_alg, const unsigned char* hash, size_t hash_len, const unsigned char* sig, size_t sig_len, mbedtls_pk_restart_ctx* rs_ctx) { @@ -522,6 +537,7 @@ mbedtls_pk_type_t mbedtls_pk_get_type(const mbedtls_pk_context* ctx) { return (ctx->pk_info->type); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_USE_PSA_CRYPTO) /* * Load the key to a PSA key slot, @@ -529,6 +545,7 @@ mbedtls_pk_type_t mbedtls_pk_get_type(const mbedtls_pk_context* ctx) { * * Currently only works for EC private keys. */ +namespace lbug_mbedtls { int mbedtls_pk_wrap_as_opaque(mbedtls_pk_context* pk, psa_key_id_t* key, psa_algorithm_t hash_alg) { #if !defined(MBEDTLS_ECP_C) ((void)pk); @@ -574,5 +591,6 @@ int mbedtls_pk_wrap_as_opaque(mbedtls_pk_context* pk, psa_key_id_t* key, psa_alg return (mbedtls_pk_setup_opaque(pk, *key)); #endif /* MBEDTLS_ECP_C */ } +} // namespace lbug_mbedtls #endif /* MBEDTLS_USE_PSA_CRYPTO */ #endif /* MBEDTLS_PK_C */ diff --git a/third_party/mbedtls/library/pk_wrap.cpp b/third_party/mbedtls/library/pk_wrap.cpp index ce2499a4fb..e51a12871a 100644 --- a/third_party/mbedtls/library/pk_wrap.cpp +++ b/third_party/mbedtls/library/pk_wrap.cpp @@ -62,6 +62,7 @@ #include #if defined(MBEDTLS_RSA_C) +namespace lbug_mbedtls { static int rsa_can_do(mbedtls_pk_type_t type) { return (type == MBEDTLS_PK_RSA || type == MBEDTLS_PK_RSASSA_PSS); } @@ -201,12 +202,14 @@ const mbedtls_pk_info_t mbedtls_rsa_info = { #endif rsa_debug, }; +} // namespace lbug_mbedtls #endif /* MBEDTLS_RSA_C */ #if defined(MBEDTLS_ECP_C) /* * Generic EC key */ +namespace lbug_mbedtls { static int eckey_can_do(mbedtls_pk_type_t type) { return (type == MBEDTLS_PK_ECKEY || type == MBEDTLS_PK_ECKEY_DH || type == MBEDTLS_PK_ECDSA); } @@ -215,8 +218,10 @@ static size_t eckey_get_bitlen(const void* ctx) { return (((mbedtls_ecp_keypair*)ctx)->grp.pbits); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_ECDSA_C) /* Forward declarations */ +namespace lbug_mbedtls { static int ecdsa_verify_wrap(void* ctx, mbedtls_md_type_t md_alg, const unsigned char* hash, size_t hash_len, const unsigned char* sig, size_t sig_len); @@ -255,8 +260,10 @@ static int eckey_sign_wrap(void* ctx, mbedtls_md_type_t md_alg, const unsigned c return (ret); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_ECP_RESTARTABLE) /* Forward declarations */ +namespace lbug_mbedtls { static int ecdsa_verify_rs_wrap(void* ctx, mbedtls_md_type_t md_alg, const unsigned char* hash, size_t hash_len, const unsigned char* sig, size_t sig_len, void* rs_ctx); @@ -342,9 +349,11 @@ static int eckey_sign_rs_wrap(void* ctx, mbedtls_md_type_t md_alg, const unsigne cleanup: return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_ECP_RESTARTABLE */ #endif /* MBEDTLS_ECDSA_C */ +namespace lbug_mbedtls { static int eckey_check_pair(const void* pub, const void* prv, int (*f_rng)(void*, unsigned char*, size_t), void* p_rng) { return (mbedtls_ecp_check_pub_priv((const mbedtls_ecp_keypair*)pub, @@ -419,18 +428,22 @@ const mbedtls_pk_info_t mbedtls_eckeydh_info = { #endif eckey_debug, /* Same underlying key structure */ }; +} // namespace lbug_mbedtls #endif /* MBEDTLS_ECP_C */ #if defined(MBEDTLS_ECDSA_C) +namespace lbug_mbedtls { static int ecdsa_can_do(mbedtls_pk_type_t type) { return (type == MBEDTLS_PK_ECDSA); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_USE_PSA_CRYPTO) /* * An ASN.1 encoded signature is a sequence of two ASN.1 integers. Parse one of * those integers and convert it to the fixed-length encoding expected by PSA. */ +namespace lbug_mbedtls { static int extract_ecdsa_sig_int(unsigned char** from, const unsigned char* end, unsigned char* to, size_t to_len) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; @@ -549,7 +562,9 @@ static int ecdsa_verify_wrap(void* ctx_arg, mbedtls_md_type_t md_alg, const unsi psa_destroy_key(key_id); return (ret); } +} // namespace lbug_mbedtls #else /* MBEDTLS_USE_PSA_CRYPTO */ +namespace lbug_mbedtls { static int ecdsa_verify_wrap(void* ctx, mbedtls_md_type_t md_alg, const unsigned char* hash, size_t hash_len, const unsigned char* sig, size_t sig_len) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; @@ -562,8 +577,10 @@ static int ecdsa_verify_wrap(void* ctx, mbedtls_md_type_t md_alg, const unsigned return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_USE_PSA_CRYPTO */ +namespace lbug_mbedtls { static int ecdsa_sign_wrap(void* ctx, mbedtls_md_type_t md_alg, const unsigned char* hash, size_t hash_len, unsigned char* sig, size_t sig_size, size_t* sig_len, int (*f_rng)(void*, unsigned char*, size_t), void* p_rng) { @@ -571,7 +588,9 @@ static int ecdsa_sign_wrap(void* ctx, mbedtls_md_type_t md_alg, const unsigned c sig_size, sig_len, f_rng, p_rng)); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_ECP_RESTARTABLE) +namespace lbug_mbedtls { static int ecdsa_verify_rs_wrap(void* ctx, mbedtls_md_type_t md_alg, const unsigned char* hash, size_t hash_len, const unsigned char* sig, size_t sig_len, void* rs_ctx) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; @@ -592,8 +611,10 @@ static int ecdsa_sign_rs_wrap(void* ctx, mbedtls_md_type_t md_alg, const unsigne return (mbedtls_ecdsa_write_signature_restartable((mbedtls_ecdsa_context*)ctx, md_alg, hash, hash_len, sig, sig_size, sig_len, f_rng, p_rng, (mbedtls_ecdsa_restart_ctx*)rs_ctx)); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_ECP_RESTARTABLE */ +namespace lbug_mbedtls { static void* ecdsa_alloc_wrap(void) { void* ctx = mbedtls_calloc(1, sizeof(mbedtls_ecdsa_context)); @@ -608,7 +629,9 @@ static void ecdsa_free_wrap(void* ctx) { mbedtls_free(ctx); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_ECP_RESTARTABLE) +namespace lbug_mbedtls { static void* ecdsa_rs_alloc(void) { void* ctx = mbedtls_calloc(1, sizeof(mbedtls_ecdsa_restart_ctx)); @@ -622,8 +645,10 @@ static void ecdsa_rs_free(void* ctx) { mbedtls_ecdsa_restart_free(ctx); mbedtls_free(ctx); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_ECP_RESTARTABLE */ +namespace lbug_mbedtls { const mbedtls_pk_info_t mbedtls_ecdsa_info = { MBEDTLS_PK_ECDSA, "ECDSA", eckey_get_bitlen, /* Compatible key structures */ ecdsa_can_do, ecdsa_verify_wrap, ecdsa_sign_wrap, @@ -637,6 +662,7 @@ const mbedtls_pk_info_t mbedtls_ecdsa_info = { #endif eckey_debug, /* Compatible key structures */ }; +} // namespace lbug_mbedtls #endif /* MBEDTLS_ECDSA_C */ #if defined(MBEDTLS_PK_RSA_ALT_SUPPORT) @@ -644,6 +670,7 @@ const mbedtls_pk_info_t mbedtls_ecdsa_info = { * Support for alternative RSA-private implementations */ +namespace lbug_mbedtls { static int rsa_alt_can_do(mbedtls_pk_type_t type) { return (type == MBEDTLS_PK_RSA); } @@ -688,7 +715,9 @@ static int rsa_alt_decrypt_wrap(void* ctx, const unsigned char* input, size_t il return (rsa_alt->decrypt_func(rsa_alt->key, olen, input, output, osize)); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_RSA_C) +namespace lbug_mbedtls { static int rsa_alt_check_pair(const void* pub, const void* prv, int (*f_rng)(void*, unsigned char*, size_t), void* p_rng) { unsigned char sig[MBEDTLS_MPI_MAX_SIZE]; @@ -712,8 +741,10 @@ static int rsa_alt_check_pair(const void* pub, const void* prv, return (0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_RSA_C */ +namespace lbug_mbedtls { static void* rsa_alt_alloc_wrap(void) { void* ctx = mbedtls_calloc(1, sizeof(mbedtls_rsa_alt_context)); @@ -755,10 +786,12 @@ const mbedtls_pk_info_t mbedtls_rsa_alt_info = { NULL, }; +} // namespace lbug_mbedtls #endif /* MBEDTLS_PK_RSA_ALT_SUPPORT */ #if defined(MBEDTLS_USE_PSA_CRYPTO) +namespace lbug_mbedtls { static void* pk_opaque_alloc_wrap(void) { void* ctx = mbedtls_calloc(1, sizeof(psa_key_id_t)); @@ -792,6 +825,7 @@ static int pk_opaque_can_do(mbedtls_pk_type_t type) { return (type == MBEDTLS_PK_ECKEY || type == MBEDTLS_PK_ECDSA); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_ECDSA_C) /* @@ -803,6 +837,7 @@ static int pk_opaque_can_do(mbedtls_pk_type_t type) { * start: start of the output buffer, and also of the mpi to write at the end * n_len: length of the mpi to read from start */ +namespace lbug_mbedtls { static int asn1_write_mpibuf(unsigned char** p, unsigned char* start, size_t n_len) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; size_t len = 0; @@ -869,8 +904,10 @@ static int pk_ecdsa_sig_asn1_from_psa(unsigned char* sig, size_t* sig_len, size_ return (0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_ECDSA_C */ +namespace lbug_mbedtls { static int pk_opaque_sign_wrap(void* ctx, mbedtls_md_type_t md_alg, const unsigned char* hash, size_t hash_len, unsigned char* sig, size_t sig_size, size_t* sig_len, int (*f_rng)(void*, unsigned char*, size_t), void* p_rng) { @@ -923,6 +960,7 @@ const mbedtls_pk_info_t mbedtls_pk_opaque_info = { NULL, /* debug - could be done later, or even left NULL */ }; +} // namespace lbug_mbedtls #endif /* MBEDTLS_USE_PSA_CRYPTO */ #endif /* MBEDTLS_PK_C */ diff --git a/third_party/mbedtls/library/pk_wrap.h b/third_party/mbedtls/library/pk_wrap.h index 9e9b27d199..239bd401ff 100644 --- a/third_party/mbedtls/library/pk_wrap.h +++ b/third_party/mbedtls/library/pk_wrap.h @@ -26,6 +26,7 @@ #include "mbedtls/build_info.h" #include "mbedtls/pk.h" +namespace lbug_mbedtls { struct mbedtls_pk_info_t { /** Public key type */ mbedtls_pk_type_t type; @@ -88,35 +89,48 @@ struct mbedtls_pk_info_t { /** Interface with the debug module */ void (*debug_func)(const void* ctx, mbedtls_pk_debug_item* items); }; +} // namespace lbug_mbedtls #if defined(MBEDTLS_PK_RSA_ALT_SUPPORT) /* Container for RSA-alt */ +namespace lbug_mbedtls { typedef struct { void* key; mbedtls_pk_rsa_alt_decrypt_func decrypt_func; mbedtls_pk_rsa_alt_sign_func sign_func; mbedtls_pk_rsa_alt_key_len_func key_len_func; } mbedtls_rsa_alt_context; +} // namespace lbug_mbedtls #endif #if defined(MBEDTLS_RSA_C) +namespace lbug_mbedtls { extern const mbedtls_pk_info_t mbedtls_rsa_info; +} // namespace lbug_mbedtls #endif #if defined(MBEDTLS_ECP_C) +namespace lbug_mbedtls { extern const mbedtls_pk_info_t mbedtls_eckey_info; extern const mbedtls_pk_info_t mbedtls_eckeydh_info; +} // namespace lbug_mbedtls #endif #if defined(MBEDTLS_ECDSA_C) +namespace lbug_mbedtls { extern const mbedtls_pk_info_t mbedtls_ecdsa_info; +} // namespace lbug_mbedtls #endif #if defined(MBEDTLS_PK_RSA_ALT_SUPPORT) +namespace lbug_mbedtls { extern const mbedtls_pk_info_t mbedtls_rsa_alt_info; +} // namespace lbug_mbedtls #endif #if defined(MBEDTLS_USE_PSA_CRYPTO) +namespace lbug_mbedtls { extern const mbedtls_pk_info_t mbedtls_pk_opaque_info; +} // namespace lbug_mbedtls #endif #endif /* MBEDTLS_PK_WRAP_H */ diff --git a/third_party/mbedtls/library/pkparse.cpp b/third_party/mbedtls/library/pkparse.cpp index 055d693cd2..4a2cb8dc49 100644 --- a/third_party/mbedtls/library/pkparse.cpp +++ b/third_party/mbedtls/library/pkparse.cpp @@ -68,6 +68,7 @@ * A terminating null byte is always appended. It is included in the announced * length only if the data looks like it is PEM encoded. */ +namespace lbug_mbedtls { int mbedtls_pk_load_file(const char* path, unsigned char** buf, size_t* n) { FILE* f; long size; @@ -160,6 +161,7 @@ int mbedtls_pk_parse_public_keyfile(mbedtls_pk_context* ctx, const char* path) { return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_FS_IO */ #if defined(MBEDTLS_ECP_C) @@ -171,6 +173,7 @@ int mbedtls_pk_parse_public_keyfile(mbedtls_pk_context* ctx, const char* path) { * -- implicitCurve NULL * } */ +namespace lbug_mbedtls { static int pk_get_ecparams(unsigned char** p, const unsigned char* end, mbedtls_asn1_buf* params) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; @@ -202,6 +205,7 @@ static int pk_get_ecparams(unsigned char** p, const unsigned char* end, mbedtls_ return (0); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_PK_PARSE_EC_EXTENDED) /* * Parse a SpecifiedECDomain (SEC 1 C.2) and (mostly) fill the group with it. @@ -222,6 +226,7 @@ static int pk_get_ecparams(unsigned char** p, const unsigned char* end, mbedtls_ * * We only support prime-field as field type, and ignore hash and cofactor. */ +namespace lbug_mbedtls { static int pk_group_from_specified(const mbedtls_asn1_buf* params, mbedtls_ecp_group* grp) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; unsigned char* p = params->p; @@ -415,6 +420,7 @@ static int pk_group_id_from_specified(const mbedtls_asn1_buf* params, return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_PK_PARSE_EC_EXTENDED */ /* @@ -425,6 +431,7 @@ static int pk_group_id_from_specified(const mbedtls_asn1_buf* params, * specifiedCurve SpecifiedECDomain -- = SEQUENCE { ... } * -- implicitCurve NULL */ +namespace lbug_mbedtls { static int pk_use_ecparams(const mbedtls_asn1_buf* params, mbedtls_ecp_group* grp) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; mbedtls_ecp_group_id grp_id; @@ -475,6 +482,7 @@ static int pk_get_ecpubkey(unsigned char** p, const unsigned char* end, mbedtls_ return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_ECP_C */ #if defined(MBEDTLS_RSA_C) @@ -484,6 +492,7 @@ static int pk_get_ecpubkey(unsigned char** p, const unsigned char* end, mbedtls_ * publicExponent INTEGER -- e * } */ +namespace lbug_mbedtls { static int pk_get_rsapubkey(unsigned char** p, const unsigned char* end, mbedtls_rsa_context* rsa) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; size_t len; @@ -522,6 +531,7 @@ static int pk_get_rsapubkey(unsigned char** p, const unsigned char* end, mbedtls return (0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_RSA_C */ /* Get a PK algorithm identifier @@ -530,6 +540,7 @@ static int pk_get_rsapubkey(unsigned char** p, const unsigned char* end, mbedtls * algorithm OBJECT IDENTIFIER, * parameters ANY DEFINED BY algorithm OPTIONAL } */ +namespace lbug_mbedtls { static int pk_get_pk_alg(unsigned char** p, const unsigned char* end, mbedtls_pk_type_t* pk_alg, mbedtls_asn1_buf* params) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; @@ -617,6 +628,7 @@ int mbedtls_pk_parse_subpubkey(unsigned char** p, const unsigned char* end, return (ret); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_RSA_C) /* * Wrapper around mbedtls_asn1_get_mpi() that rejects zero. @@ -628,6 +640,7 @@ int mbedtls_pk_parse_subpubkey(unsigned char** p, const unsigned char* end, * Since values can't be omitted in PKCS#1, passing a zero value to * rsa_complete() would be incorrect, so reject zero values early. */ +namespace lbug_mbedtls { static int asn1_get_nonzero_mpi(unsigned char** p, const unsigned char* end, mbedtls_mpi* X) { int ret; @@ -781,12 +794,14 @@ static int pk_parse_key_pkcs1_der(mbedtls_rsa_context* rsa, const unsigned char* return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_RSA_C */ #if defined(MBEDTLS_ECP_C) /* * Parse a SEC1 encoded private EC key */ +namespace lbug_mbedtls { static int pk_parse_key_sec1_der(mbedtls_ecp_keypair* eck, const unsigned char* key, size_t keylen, int (*f_rng)(void*, unsigned char*, size_t), void* p_rng) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; @@ -893,6 +908,7 @@ static int pk_parse_key_sec1_der(mbedtls_ecp_keypair* eck, const unsigned char* return (0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_ECP_C */ /* @@ -908,6 +924,7 @@ static int pk_parse_key_sec1_der(mbedtls_ecp_keypair* eck, const unsigned char* * PK context on failure. * */ +namespace lbug_mbedtls { static int pk_parse_key_pkcs8_unencrypted_der(mbedtls_pk_context* pk, const unsigned char* key, size_t keylen, int (*f_rng)(void*, unsigned char*, size_t), void* p_rng) { int ret, version; @@ -999,7 +1016,9 @@ static int pk_parse_key_pkcs8_unencrypted_der(mbedtls_pk_context* pk, const unsi * free it after use. * */ +} // namespace lbug_mbedtls #if defined(MBEDTLS_PKCS12_C) || defined(MBEDTLS_PKCS5_C) +namespace lbug_mbedtls { static int pk_parse_key_pkcs8_encrypted_der(mbedtls_pk_context* pk, unsigned char* key, size_t keylen, const unsigned char* pwd, size_t pwdlen, int (*f_rng)(void*, unsigned char*, size_t), void* p_rng) { @@ -1087,11 +1106,13 @@ static int pk_parse_key_pkcs8_encrypted_der(mbedtls_pk_context* pk, unsigned cha return (pk_parse_key_pkcs8_unencrypted_der(pk, buf, len, f_rng, p_rng)); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_PKCS12_C || MBEDTLS_PKCS5_C */ /* * Parse a private key */ +namespace lbug_mbedtls { int mbedtls_pk_parse_key(mbedtls_pk_context* pk, const unsigned char* key, size_t keylen, const unsigned char* pwd, size_t pwdlen, int (*f_rng)(void*, unsigned char*, size_t), void* p_rng) { @@ -1372,4 +1393,5 @@ int mbedtls_pk_parse_public_key(mbedtls_pk_context* ctx, const unsigned char* ke return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_PK_PARSE_C */ diff --git a/third_party/mbedtls/library/platform_util.cpp b/third_party/mbedtls/library/platform_util.cpp index da97ef363c..812392aba1 100644 --- a/third_party/mbedtls/library/platform_util.cpp +++ b/third_party/mbedtls/library/platform_util.cpp @@ -63,6 +63,7 @@ * mbedtls_platform_zeroize() to use a suitable implementation for their * platform and needs. */ +namespace lbug_mbedtls { static void* (*const volatile memset_func)(void*, int, size_t) = memset; void mbedtls_platform_zeroize(void* buf, size_t len) { @@ -71,6 +72,7 @@ void mbedtls_platform_zeroize(void* buf, size_t len) { if (len > 0) memset_func(buf, 0, len); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_PLATFORM_ZEROIZE_ALT */ #if defined(MBEDTLS_HAVE_TIME_DATE) && !defined(MBEDTLS_PLATFORM_GMTIME_R_ALT) @@ -98,6 +100,7 @@ void mbedtls_platform_zeroize(void* buf, size_t len) { ( defined(_POSIX_THREAD_SAFE_FUNCTIONS ) && \ _POSIX_THREAD_SAFE_FUNCTIONS >= 200112L ) ) */ +namespace lbug_mbedtls { struct tm* mbedtls_platform_gmtime_r(const mbedtls_time_t* tt, struct tm* tm_buf) { #if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) return ((gmtime_s(tm_buf, tt) == 0) ? tm_buf : NULL); @@ -125,8 +128,11 @@ struct tm* mbedtls_platform_gmtime_r(const mbedtls_time_t* tt, struct tm* tm_buf return ((lt == NULL) ? NULL : tm_buf); #endif /* _WIN32 && !EFIX64 && !EFI32 */ } +} // namespace lbug_mbedtls #endif /* MBEDTLS_HAVE_TIME_DATE && MBEDTLS_PLATFORM_GMTIME_R_ALT */ #if defined(MBEDTLS_TEST_HOOKS) +namespace lbug_mbedtls { void (*mbedtls_test_hook_test_fail)(const char*, int, const char*); +} // namespace lbug_mbedtls #endif /* MBEDTLS_TEST_HOOKS */ diff --git a/third_party/mbedtls/library/rsa.cpp b/third_party/mbedtls/library/rsa.cpp index 9301e52271..15e139ec7d 100644 --- a/third_party/mbedtls/library/rsa.cpp +++ b/third_party/mbedtls/library/rsa.cpp @@ -72,6 +72,7 @@ #define RSA_VALIDATE_RET(cond) MBEDTLS_INTERNAL_VALIDATE_RET(cond, MBEDTLS_ERR_RSA_BAD_INPUT_DATA) #define RSA_VALIDATE(cond) MBEDTLS_INTERNAL_VALIDATE(cond) +namespace lbug_mbedtls { int mbedtls_rsa_import(mbedtls_rsa_context* ctx, const mbedtls_mpi* N, const mbedtls_mpi* P, const mbedtls_mpi* Q, const mbedtls_mpi* D, const mbedtls_mpi* E) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; @@ -455,6 +456,7 @@ size_t mbedtls_rsa_get_len(const mbedtls_rsa_context* ctx) { return (ctx->len); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_GENPRIME) /* @@ -463,6 +465,7 @@ size_t mbedtls_rsa_get_len(const mbedtls_rsa_context* ctx) { * This generation method follows the RSA key pair generation procedure of * FIPS 186-4 if 2^16 < exponent < 2^256 and nbits = 2048 or nbits = 3072. */ +namespace lbug_mbedtls { int mbedtls_rsa_gen_key(mbedtls_rsa_context* ctx, int (*f_rng)(void*, unsigned char*, size_t), void* p_rng, unsigned int nbits, int exponent) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; @@ -570,11 +573,13 @@ int mbedtls_rsa_gen_key(mbedtls_rsa_context* ctx, int (*f_rng)(void*, unsigned c return (0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_GENPRIME */ /* * Check a public RSA key */ +namespace lbug_mbedtls { int mbedtls_rsa_check_pubkey(const mbedtls_rsa_context* ctx) { RSA_VALIDATE_RET(ctx != NULL); @@ -974,6 +979,7 @@ int mbedtls_rsa_private(mbedtls_rsa_context* ctx, int (*f_rng)(void*, unsigned c return (ret); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_PKCS1_V21) /** * Generate and apply the MGF1 operation (from PKCS#1 v2.1) to a buffer. @@ -984,6 +990,7 @@ int mbedtls_rsa_private(mbedtls_rsa_context* ctx, int (*f_rng)(void*, unsigned c * \param slen length of the source buffer * \param md_ctx message digest context to use */ +namespace lbug_mbedtls { static int mgf_mask(unsigned char* dst, size_t dlen, unsigned char* src, size_t slen, mbedtls_md_context_t* md_ctx) { unsigned char mask[MBEDTLS_MD_MAX_SIZE]; @@ -1028,12 +1035,14 @@ static int mgf_mask(unsigned char* dst, size_t dlen, unsigned char* src, size_t return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_PKCS1_V21 */ #if defined(MBEDTLS_PKCS1_V21) /* * Implementation of the PKCS#1 v2.1 RSAES-OAEP-ENCRYPT function */ +namespace lbug_mbedtls { int mbedtls_rsa_rsaes_oaep_encrypt(mbedtls_rsa_context* ctx, int (*f_rng)(void*, unsigned char*, size_t), void* p_rng, const unsigned char* label, size_t label_len, size_t ilen, const unsigned char* input, unsigned char* output) { @@ -1102,12 +1111,14 @@ int mbedtls_rsa_rsaes_oaep_encrypt(mbedtls_rsa_context* ctx, return (mbedtls_rsa_public(ctx, output, output)); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_PKCS1_V21 */ #if defined(MBEDTLS_PKCS1_V15) /* * Implementation of the PKCS#1 v2.1 RSAES-PKCS1-V1_5-ENCRYPT function */ +namespace lbug_mbedtls { int mbedtls_rsa_rsaes_pkcs1_v15_encrypt(mbedtls_rsa_context* ctx, int (*f_rng)(void*, unsigned char*, size_t), void* p_rng, size_t ilen, const unsigned char* input, unsigned char* output) { @@ -1154,11 +1165,13 @@ int mbedtls_rsa_rsaes_pkcs1_v15_encrypt(mbedtls_rsa_context* ctx, return (mbedtls_rsa_public(ctx, output, output)); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_PKCS1_V15 */ /* * Add the message padding, then do an RSA operation */ +namespace lbug_mbedtls { int mbedtls_rsa_pkcs1_encrypt(mbedtls_rsa_context* ctx, int (*f_rng)(void*, unsigned char*, size_t), void* p_rng, size_t ilen, const unsigned char* input, unsigned char* output) { RSA_VALIDATE_RET(ctx != NULL); @@ -1181,10 +1194,12 @@ int mbedtls_rsa_pkcs1_encrypt(mbedtls_rsa_context* ctx, int (*f_rng)(void*, unsi } } +} // namespace lbug_mbedtls #if defined(MBEDTLS_PKCS1_V21) /* * Implementation of the PKCS#1 v2.1 RSAES-OAEP-DECRYPT function */ +namespace lbug_mbedtls { int mbedtls_rsa_rsaes_oaep_decrypt(mbedtls_rsa_context* ctx, int (*f_rng)(void*, unsigned char*, size_t), void* p_rng, const unsigned char* label, size_t label_len, size_t* olen, const unsigned char* input, unsigned char* output, @@ -1309,12 +1324,14 @@ int mbedtls_rsa_rsaes_oaep_decrypt(mbedtls_rsa_context* ctx, return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_PKCS1_V21 */ #if defined(MBEDTLS_PKCS1_V15) /* * Implementation of the PKCS#1 v2.1 RSAES-PKCS1-V1_5-DECRYPT function */ +namespace lbug_mbedtls { int mbedtls_rsa_rsaes_pkcs1_v15_decrypt(mbedtls_rsa_context* ctx, int (*f_rng)(void*, unsigned char*, size_t), void* p_rng, size_t* olen, const unsigned char* input, unsigned char* output, size_t output_max_len) { @@ -1347,11 +1364,13 @@ int mbedtls_rsa_rsaes_pkcs1_v15_decrypt(mbedtls_rsa_context* ctx, return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_PKCS1_V15 */ /* * Do an RSA operation, then remove the message padding */ +namespace lbug_mbedtls { int mbedtls_rsa_pkcs1_decrypt(mbedtls_rsa_context* ctx, int (*f_rng)(void*, unsigned char*, size_t), void* p_rng, size_t* olen, const unsigned char* input, unsigned char* output, size_t output_max_len) { @@ -1378,7 +1397,9 @@ int mbedtls_rsa_pkcs1_decrypt(mbedtls_rsa_context* ctx, int (*f_rng)(void*, unsi } } +} // namespace lbug_mbedtls #if defined(MBEDTLS_PKCS1_V21) +namespace lbug_mbedtls { static int rsa_rsassa_pss_sign(mbedtls_rsa_context* ctx, int (*f_rng)(void*, unsigned char*, size_t), void* p_rng, mbedtls_md_type_t md_alg, unsigned int hashlen, const unsigned char* hash, int saltlen, unsigned char* sig) { @@ -1511,6 +1532,7 @@ int mbedtls_rsa_rsassa_pss_sign(mbedtls_rsa_context* ctx, return rsa_rsassa_pss_sign(ctx, f_rng, p_rng, md_alg, hashlen, hash, MBEDTLS_RSA_SALT_LEN_ANY, sig); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_PKCS1_V21 */ #if defined(MBEDTLS_PKCS1_V15) @@ -1535,6 +1557,7 @@ int mbedtls_rsa_rsassa_pss_sign(mbedtls_rsa_context* ctx, * - dst points to a buffer of size at least dst_len. * */ +namespace lbug_mbedtls { static int rsa_rsassa_pkcs1_v15_encode(mbedtls_md_type_t md_alg, unsigned int hashlen, const unsigned char* hash, size_t dst_len, unsigned char* dst) { size_t oid_size = 0; @@ -1697,11 +1720,13 @@ int mbedtls_rsa_rsassa_pkcs1_v15_sign(mbedtls_rsa_context* ctx, memset(sig, '!', ctx->len); return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_PKCS1_V15 */ /* * Do an RSA operation to sign the message digest */ +namespace lbug_mbedtls { int mbedtls_rsa_pkcs1_sign(mbedtls_rsa_context* ctx, int (*f_rng)(void*, unsigned char*, size_t), void* p_rng, mbedtls_md_type_t md_alg, unsigned int hashlen, const unsigned char* hash, unsigned char* sig) { @@ -1725,10 +1750,12 @@ int mbedtls_rsa_pkcs1_sign(mbedtls_rsa_context* ctx, int (*f_rng)(void*, unsigne } } +} // namespace lbug_mbedtls #if defined(MBEDTLS_PKCS1_V21) /* * Implementation of the PKCS#1 v2.1 RSASSA-PSS-VERIFY function */ +namespace lbug_mbedtls { int mbedtls_rsa_rsassa_pss_verify_ext(mbedtls_rsa_context* ctx, mbedtls_md_type_t md_alg, unsigned int hashlen, const unsigned char* hash, mbedtls_md_type_t mgf1_hash_id, int expected_salt_len, const unsigned char* sig) { @@ -1870,12 +1897,14 @@ int mbedtls_rsa_rsassa_pss_verify(mbedtls_rsa_context* ctx, mbedtls_md_type_t md return (mbedtls_rsa_rsassa_pss_verify_ext(ctx, md_alg, hashlen, hash, mgf1_hash_id, MBEDTLS_RSA_SALT_LEN_ANY, sig)); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_PKCS1_V21 */ #if defined(MBEDTLS_PKCS1_V15) /* * Implementation of the PKCS#1 v2.1 RSASSA-PKCS1-v1_5-VERIFY function */ +namespace lbug_mbedtls { int mbedtls_rsa_rsassa_pkcs1_v15_verify(mbedtls_rsa_context* ctx, mbedtls_md_type_t md_alg, unsigned int hashlen, const unsigned char* hash, const unsigned char* sig) { int ret = 0; @@ -1932,11 +1961,13 @@ int mbedtls_rsa_rsassa_pkcs1_v15_verify(mbedtls_rsa_context* ctx, mbedtls_md_typ return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_PKCS1_V15 */ /* * Do an RSA operation and check the message digest */ +namespace lbug_mbedtls { int mbedtls_rsa_pkcs1_verify(mbedtls_rsa_context* ctx, mbedtls_md_type_t md_alg, unsigned int hashlen, const unsigned char* hash, const unsigned char* sig) { RSA_VALIDATE_RET(ctx != NULL); @@ -2032,6 +2063,7 @@ void mbedtls_rsa_free(mbedtls_rsa_context* ctx) { #endif } +} // namespace lbug_mbedtls #endif /* !MBEDTLS_RSA_ALT */ #if defined(MBEDTLS_SELF_TEST) @@ -2083,6 +2115,7 @@ void mbedtls_rsa_free(mbedtls_rsa_context* ctx) { "\x11\x22\x33\x0A\x0B\x0C\xCC\xDD\xDD\xDD\xDD\xDD" #if defined(MBEDTLS_PKCS1_V15) +namespace lbug_mbedtls { static int myrand(void* rng_state, unsigned char* output, size_t len) { #if !defined(__OpenBSD__) && !defined(__NetBSD__) size_t i; @@ -2101,11 +2134,13 @@ static int myrand(void* rng_state, unsigned char* output, size_t len) { return (0); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_PKCS1_V15 */ /* * Checkup routine */ +namespace lbug_mbedtls { int mbedtls_rsa_self_test(int verbose) { int ret = 0; #if defined(MBEDTLS_PKCS1_V15) @@ -2230,6 +2265,7 @@ int mbedtls_rsa_self_test(int verbose) { return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_SELF_TEST */ #endif /* MBEDTLS_RSA_C */ diff --git a/third_party/mbedtls/library/rsa_alt_helpers.cpp b/third_party/mbedtls/library/rsa_alt_helpers.cpp index baa3a058de..87610ea1e1 100644 --- a/third_party/mbedtls/library/rsa_alt_helpers.cpp +++ b/third_party/mbedtls/library/rsa_alt_helpers.cpp @@ -59,6 +59,7 @@ * of (a) and (b) above to attempt to factor N. * */ +namespace lbug_mbedtls { int mbedtls_rsa_deduce_primes(mbedtls_mpi const* N, mbedtls_mpi const* E, mbedtls_mpi const* D, mbedtls_mpi* P, mbedtls_mpi* Q) { int ret = 0; @@ -423,4 +424,5 @@ int mbedtls_rsa_validate_crt(const mbedtls_mpi* P, const mbedtls_mpi* Q, const m return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_RSA_C */ diff --git a/third_party/mbedtls/library/rsa_alt_helpers.h b/third_party/mbedtls/library/rsa_alt_helpers.h index e801fb12f8..c9f2ff4f52 100644 --- a/third_party/mbedtls/library/rsa_alt_helpers.h +++ b/third_party/mbedtls/library/rsa_alt_helpers.h @@ -58,9 +58,6 @@ #include "mbedtls/bignum.h" #include "mbedtls/build_info.h" -#ifdef __cplusplus -extern "C" { -#endif /** * \brief Compute RSA prime moduli P, Q from public modulus N=PQ @@ -86,6 +83,7 @@ extern "C" { * use the helper function \c mbedtls_rsa_validate_params. * */ +namespace lbug_mbedtls { int mbedtls_rsa_deduce_primes(mbedtls_mpi const* N, mbedtls_mpi const* E, mbedtls_mpi const* D, mbedtls_mpi* P, mbedtls_mpi* Q); @@ -202,8 +200,6 @@ int mbedtls_rsa_validate_params(const mbedtls_mpi* N, const mbedtls_mpi* P, cons int mbedtls_rsa_validate_crt(const mbedtls_mpi* P, const mbedtls_mpi* Q, const mbedtls_mpi* D, const mbedtls_mpi* DP, const mbedtls_mpi* DQ, const mbedtls_mpi* QP); -#ifdef __cplusplus -} -#endif +} // namespace lbug_mbedtls #endif /* rsa_alt_helpers.h */ diff --git a/third_party/mbedtls/library/sha1.cpp b/third_party/mbedtls/library/sha1.cpp index 3bdbe695f9..3f51c025f4 100644 --- a/third_party/mbedtls/library/sha1.cpp +++ b/third_party/mbedtls/library/sha1.cpp @@ -47,6 +47,7 @@ #if !defined(MBEDTLS_SHA1_ALT) +namespace lbug_mbedtls { void mbedtls_sha1_init(mbedtls_sha1_context* ctx) { SHA1_VALIDATE(ctx != NULL); @@ -85,7 +86,9 @@ int mbedtls_sha1_starts(mbedtls_sha1_context* ctx) { return (0); } +} // namespace lbug_mbedtls #if !defined(MBEDTLS_SHA1_PROCESS_ALT) +namespace lbug_mbedtls { int mbedtls_internal_sha1_process(mbedtls_sha1_context* ctx, const unsigned char data[64]) { struct { uint32_t temp, W[16], A, B, C, D, E; @@ -250,11 +253,13 @@ int mbedtls_internal_sha1_process(mbedtls_sha1_context* ctx, const unsigned char return (0); } +} // namespace lbug_mbedtls #endif /* !MBEDTLS_SHA1_PROCESS_ALT */ /* * SHA-1 process buffer */ +namespace lbug_mbedtls { int mbedtls_sha1_update(mbedtls_sha1_context* ctx, const unsigned char* input, size_t ilen) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; size_t fill; @@ -355,11 +360,13 @@ int mbedtls_sha1_finish(mbedtls_sha1_context* ctx, unsigned char output[20]) { return (0); } +} // namespace lbug_mbedtls #endif /* !MBEDTLS_SHA1_ALT */ /* * output = SHA-1( input buffer ) */ +namespace lbug_mbedtls { int mbedtls_sha1(const unsigned char* input, size_t ilen, unsigned char output[20]) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; mbedtls_sha1_context ctx; @@ -384,10 +391,12 @@ int mbedtls_sha1(const unsigned char* input, size_t ilen, unsigned char output[2 return (ret); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_SELF_TEST) /* * FIPS-180-1 test vectors */ +namespace lbug_mbedtls { static const unsigned char sha1_test_buf[3][57] = {{"abc"}, {"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"}, {""}}; @@ -463,6 +472,7 @@ int mbedtls_sha1_self_test(int verbose) { return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_SELF_TEST */ #endif /* MBEDTLS_SHA1_C */ diff --git a/third_party/mbedtls/library/sha256.cpp b/third_party/mbedtls/library/sha256.cpp index 7f6c74aefe..c11e1be4ea 100644 --- a/third_party/mbedtls/library/sha256.cpp +++ b/third_party/mbedtls/library/sha256.cpp @@ -50,6 +50,7 @@ #if !defined(MBEDTLS_SHA256_ALT) +namespace lbug_mbedtls { void mbedtls_sha256_init(mbedtls_sha256_context* ctx) { SHA256_VALIDATE(ctx != NULL); @@ -114,7 +115,9 @@ int mbedtls_sha256_starts(mbedtls_sha256_context* ctx, int is224) { return (0); } +} // namespace lbug_mbedtls #if !defined(MBEDTLS_SHA256_PROCESS_ALT) +namespace lbug_mbedtls { static const uint32_t K[] = { 0x428A2F98, 0x71374491, @@ -292,11 +295,13 @@ int mbedtls_internal_sha256_process(mbedtls_sha256_context* ctx, const unsigned return (0); } +} // namespace lbug_mbedtls #endif /* !MBEDTLS_SHA256_PROCESS_ALT */ /* * SHA-256 process buffer */ +namespace lbug_mbedtls { int mbedtls_sha256_update(mbedtls_sha256_context* ctx, const unsigned char* input, size_t ilen) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; size_t fill; @@ -404,11 +409,13 @@ int mbedtls_sha256_finish(mbedtls_sha256_context* ctx, unsigned char* output) { return (0); } +} // namespace lbug_mbedtls #endif /* !MBEDTLS_SHA256_ALT */ /* * output = SHA-256( input buffer ) */ +namespace lbug_mbedtls { int mbedtls_sha256(const unsigned char* input, size_t ilen, unsigned char* output, int is224) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; mbedtls_sha256_context ctx; @@ -439,10 +446,12 @@ int mbedtls_sha256(const unsigned char* input, size_t ilen, unsigned char* outpu return (ret); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_SELF_TEST) /* * FIPS-180-2 test vectors */ +namespace lbug_mbedtls { static const unsigned char sha256_test_buf[3][57] = {{"abc"}, {"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"}, {""}}; @@ -544,6 +553,7 @@ int mbedtls_sha256_self_test(int verbose) { return (ret); } +} // namespace lbug_mbedtls #endif /* MBEDTLS_SELF_TEST */ #endif /* MBEDTLS_SHA256_C */ diff --git a/third_party/mbedtls/library/sha512.cpp b/third_party/mbedtls/library/sha512.cpp index 8c2c4b3884..928bcb56cd 100644 --- a/third_party/mbedtls/library/sha512.cpp +++ b/third_party/mbedtls/library/sha512.cpp @@ -57,13 +57,16 @@ #if !defined(MBEDTLS_SHA512_ALT) #if defined(MBEDTLS_SHA512_SMALLER) +namespace lbug_mbedtls { static void sha512_put_uint64_be(uint64_t n, unsigned char* b, uint8_t i) { MBEDTLS_PUT_UINT64_BE(n, b, i); } +} // namespace lbug_mbedtls #else #define sha512_put_uint64_be MBEDTLS_PUT_UINT64_BE #endif /* MBEDTLS_SHA512_SMALLER */ +namespace lbug_mbedtls { void mbedtls_sha512_init(mbedtls_sha512_context* ctx) { SHA512_VALIDATE(ctx != NULL); @@ -131,11 +134,13 @@ int mbedtls_sha512_starts(mbedtls_sha512_context* ctx, int is384) { return (0); } +} // namespace lbug_mbedtls #if !defined(MBEDTLS_SHA512_PROCESS_ALT) /* * Round constants */ +namespace lbug_mbedtls { static const uint64_t K[80] = {UL64(0x428A2F98D728AE22), UL64(0x7137449123EF65CD), UL64(0xB5C0FBCFEC4D3B2F), UL64(0xE9B5DBA58189DBBC), UL64(0x3956C25BF348B538), UL64(0x59F111F1B605D019), UL64(0x923F82A4AF194F9B), UL64(0xAB1C5ED5DA6D8118), @@ -266,11 +271,13 @@ int mbedtls_internal_sha512_process(mbedtls_sha512_context* ctx, const unsigned return (0); } +} // namespace lbug_mbedtls #endif /* !MBEDTLS_SHA512_PROCESS_ALT */ /* * SHA-512 process buffer */ +namespace lbug_mbedtls { int mbedtls_sha512_update(mbedtls_sha512_context* ctx, const unsigned char* input, size_t ilen) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; size_t fill; @@ -379,11 +386,13 @@ int mbedtls_sha512_finish(mbedtls_sha512_context* ctx, unsigned char* output) { return (0); } +} // namespace lbug_mbedtls #endif /* !MBEDTLS_SHA512_ALT */ /* * output = SHA-512( input buffer ) */ +namespace lbug_mbedtls { int mbedtls_sha512(const unsigned char* input, size_t ilen, unsigned char* output, int is384) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; mbedtls_sha512_context ctx; @@ -413,11 +422,13 @@ int mbedtls_sha512(const unsigned char* input, size_t ilen, unsigned char* outpu return (ret); } +} // namespace lbug_mbedtls #if defined(MBEDTLS_SELF_TEST) /* * FIPS-180-2 test vectors */ +namespace lbug_mbedtls { static const unsigned char sha512_test_buf[3][113] = {{"abc"}, {"abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnop" "qrsmnopqrstnopqrstu"}, @@ -542,6 +553,7 @@ int mbedtls_sha512_self_test(int verbose) { #undef ARRAY_LENGTH +} // namespace lbug_mbedtls #endif /* MBEDTLS_SELF_TEST */ #endif /* MBEDTLS_SHA512_C */ diff --git a/third_party/ports/mbedtls/Makefile b/third_party/ports/mbedtls/Makefile index 972a9f6dfe..48331c2ea1 100644 --- a/third_party/ports/mbedtls/Makefile +++ b/third_party/ports/mbedtls/Makefile @@ -8,6 +8,6 @@ DISTURL= https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v${VERSION}.tar.g SRCDIR= mbedtls-${VERSION} -BUILD_COMMANDS= cp ../../../ports/mbedtls/CMakeLists.txt.custom ../../../mbedtls/CMakeLists.txt && python3 ${SCRIPT_DIR}/scripts/format_c_to_cpp.py ${WRKSRC} +BUILD_COMMANDS= cp ../../../ports/mbedtls/CMakeLists.txt.custom ../../../mbedtls/CMakeLists.txt && python3 ../../../ports/mbedtls/do-patch.py . .include "${.CURDIR}/../bsd.port.mk" diff --git a/third_party/ports/mbedtls/do-patch.py b/third_party/ports/mbedtls/do-patch.py new file mode 100644 index 0000000000..eaf2158299 --- /dev/null +++ b/third_party/ports/mbedtls/do-patch.py @@ -0,0 +1,300 @@ +#!/usr/bin/env python3 +""" +Patch script for mbedtls. + +Applies transformations to pristine mbedtls sources for integration into +the ladybug codebase: + +1. Rename library/*.c to *.cpp (the port compiles mbedtls as C++). +2. Strip extern "C" guards: this port is compiled as C++ everywhere and is + never consumed by a C compiler, so C linkage is unnecessary. +3. Wrap top-level declarations/definitions in `namespace lbug_mbedtls`. + +The namespace prevents duplicate-symbol link errors when ladybug is linked +statically alongside another library that embeds its own mbedtls copy (e.g. +a statically-linked DuckDB, whose libduckdb_static.a also bundles unprefixed +`mbedtls_*` symbols). + +Because mbedtls sources interleave code with preprocessor conditionals, a +single namespace pair per file cannot always be balanced (e.g. sibling +`#if defined(MBEDTLS_AES_ALT)` / `#if defined(MBEDTLS_SELF_TEST)` branches). +Instead, each *segment* - a maximal run of code sharing the same conditional +context at brace depth 0 - gets its own `namespace lbug_mbedtls { ... }` +pair. The namespace is reopened as often as needed, which is legal C++ and +always balances. + +Public headers re-expose the names with `using namespace lbug_mbedtls;` so +in-tree consumers (src/common/sha256.cpp, extension/httpfs/src/crypto.cpp) +keep working unchanged with unqualified names. +""" + +import re +import sys +from pathlib import Path + +NAMESPACE = "lbug_mbedtls" + +# Headers containing only preprocessor macros - nothing to wrap. +SKIP_HEADERS = { + "include/mbedtls/build_info.h", + "include/mbedtls/check_config.h", + "include/mbedtls/mbedtls_config.h", + "include/mbedtls/private_access.h", +} + +EXTERN_C_OPEN = 'extern "C" {' + + +def strip_extern_c(text): + """Remove extern "C" linkage blocks and their __cplusplus guards.""" + lines = text.splitlines() + changed = True + while changed: + changed = False + for i, line in enumerate(lines): + stripped = line.strip() + prev = next((lines[j].strip() for j in range(i - 1, -1, -1) + if lines[j].strip()), "") + nxt = next((lines[j].strip() for j in range(i + 1, len(lines)) + if lines[j].strip()), "") + + def is_cplusplus_guard(s): + return s.startswith("#if") and "__cplusplus" in s + + # Opening block: guard + extern "C" { + #endif + if stripped == EXTERN_C_OPEN and is_cplusplus_guard(prev) and nxt == "#endif": + del lines[i + 1] + del lines[i] + del lines[i - 1] + changed = True + break + # Closing block: guard + } + #endif + if stripped == "}" and is_cplusplus_guard(prev) and nxt == "#endif": + del lines[i + 1] + del lines[i] + del lines[i - 1] + changed = True + break + return "\n".join(lines) + + +def _strip_comments_and_strings(line, in_block_comment): + """Replace comment interiors and string/char literal contents with spaces + so braces inside them don't confuse brace counting. Tracks multi-line + block comment state.""" + out = [] + i = 0 + n = len(line) + while i < n: + if in_block_comment: + j = line.find("*/", i) + if j < 0: + out.append(" " * (n - i)) + i = n + else: + out.append(" " * (j + 2 - i)) + i = j + 2 + in_block_comment = False + continue + c = line[i] + if c == "/" and i + 1 < n and line[i + 1] == "/": + out.append(" " * (n - i)) + break + if c == "/" and i + 1 < n and line[i + 1] == "*": + in_block_comment = True + out.append(" ") + i += 2 + continue + if c == '"' or c == "'": + quote = c + out.append(" ") + i += 1 + while i < n: + if line[i] == "\\": + out.append(" ") + i += 2 + continue + if line[i] == quote: + out.append(" ") + i += 1 + break + out.append(" ") + i += 1 + continue + out.append(c) + i += 1 + return "".join(out), in_block_comment + + +def analyze(lines): + """Per-line info: conditional-context signature, brace depth at line + start, and whether the line carries code (vs blank/comment/directive). + Backslash-continued lines are merged into their logical line first, so + macro bodies are treated as part of their #define directive.""" + n = len(lines) + infos = [{"sig": None, "depth": None, "content": False} for _ in range(n)] + stack = [] # conditional context + depth = 0 + in_comment = False + i = 0 + while i < n: + code, in_comment = _strip_comments_and_strings(lines[i], in_comment) + logical = code + j = i + while logical.rstrip().endswith("\\") and j + 1 < n: + j += 1 + nxt, in_comment = _strip_comments_and_strings(lines[j], in_comment) + logical = logical.rstrip()[:-1] + " " + nxt + sig = tuple(stack) + depth_at_start = depth + is_directive = logical.lstrip().startswith("#") + is_content = (not is_directive) and bool(logical.strip()) + if is_directive: + s = logical.lstrip() + if re.match(r"#\s*(if|ifdef|ifndef)\b", s): + stack.append(s) + elif re.match(r"#\s*endif\b", s): + if stack: + stack.pop() + # #else / #elif keep the stack shape; boundaries are handled by + # the segmentation rules below. + else: + depth += logical.count("{") - logical.count("}") + infos[i] = {"sig": sig, "depth": depth_at_start, + "content": is_content} + # Continuation tails belong to this logical line. + for k in range(i + 1, j + 1): + infos[k] = {"sig": None, "depth": None, "content": False} + i = j + 1 + return infos + + +_INCOMPLETE_ENDING = re.compile( + r"([,(+=*&|?:\[{>-]|\b(?:static|inline|extern|const|unsigned|signed|struct|union|enum|" + r"return|if|else|while|for|do|switch|case|default|sizeof|typedef))\s*$") + + +def _ends_incomplete(line): + """True if a code line syntactically expects continuation, e.g. a lone + `static` storage specifier ahead of a conditional attribute block.""" + code, _ = _strip_comments_and_strings(line, False) + return bool(_INCOMPLETE_ENDING.search(code.rstrip())) + + +def plan_segments(lines, infos): + """Return [(open_idx, close_idx)] pairs. Each pair brackets one segment: + a maximal run of code sharing the same conditional context at brace + depth 0. Insertions sit right next to top-level lines, so every pair is + balanced.""" + segments = [] + cur = None # [sig, open_idx, last_member_idx, dangling] + + def close(at): + nonlocal cur + if cur is not None: + segments.append((cur[1], at)) + cur = None + + for i, info in enumerate(infos): + line = lines[i] + if info["depth"] is None: + continue # continuation tail + if info["depth"] == 0: + if info["content"]: + if cur is None: + cur = [info["sig"], i, i, False] + elif info["sig"] != cur[0] and not cur[3]: + close(i) + cur = [info["sig"], i, i, False] + else: + cur[2] = i + # A complete statement/definition ends a dangling continuation. + if cur[3] and re.search(r"[;}]\s*$", _strip_comments_and_strings(line, False)[0]): + cur[3] = False + elif line.lstrip().startswith("#"): + # A top-level conditional directive is normally a segment + # boundary - but not if the segment's last line syntactically + # expects continuation (e.g. a lone `static` ahead of a + # conditional attribute block), which would split a single + # declaration across two namespaces. While dangling, all + # nested content joins the same segment. + s = line.lstrip() + if re.match(r"#\s*(if|ifdef|ifndef|endif|else|elif)\b", s): + if cur is not None and (cur[3] or _ends_incomplete(lines[cur[2]])): + cur[3] = True + continue + close(i) + else: + if info["content"] and cur is not None: + cur[2] = i + close(len(lines)) + return segments + + +def rename_c_to_cpp(srcdir): + """Rename library/*.c to *.cpp for C++ compilation.""" + lib_dir = srcdir / "library" + for c_file in lib_dir.glob("*.c"): + cpp_file = c_file.with_suffix(".cpp") + c_file.rename(cpp_file) + print(f" Renamed: library/{c_file.name} -> {cpp_file.name}") + + +def wrap_file(path, add_using_directive): + text = path.read_text(errors="replace") + text = strip_extern_c(text) + lines = text.splitlines() + + infos = analyze(lines) + segments = plan_segments(lines, infos) + if not segments: + print(f" Skipped (nothing to wrap): {path}") + return False + + # Insert bottom-up so indices stay valid. + for open_idx, close_idx in sorted(segments, reverse=True): + lines.insert(close_idx, f"}} // namespace {NAMESPACE}") + lines.insert(open_idx, f"namespace {NAMESPACE} {{") + + if add_using_directive: + lines.append("") + lines.append(f"using namespace {NAMESPACE};" + " // keep unqualified names for in-tree consumers") + + path.write_text("\n".join(lines) + "\n") + return True + + +def main(): + if len(sys.argv) < 2: + print("Usage: do-patch.py ") + sys.exit(1) + + srcdir = Path(sys.argv[1]).resolve() + if not srcdir.exists(): + print(f"Error: Source directory {srcdir} does not exist") + sys.exit(1) + + print("Applying mbedtls patches...") + + rename_c_to_cpp(srcdir) + + patched = 0 + for pattern in ("include/mbedtls/*.h", "library/*.h", "library/*.cpp"): + for path in sorted(srcdir.glob(pattern)): + rel = path.relative_to(srcdir).as_posix() + if rel in SKIP_HEADERS: + continue + # Public headers re-expose names unqualified; internal headers and + # TUs are used from within the namespace itself. + add_using = pattern.startswith("include/") + if wrap_file(path, add_using): + patched += 1 + print(f" Namespaced: {rel}") + + print(f"Patched {patched} files successfully!") + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/tools/shell/include/keywords.h b/tools/shell/include/keywords.h index 70c8f9d7cf..15cc519f12 100644 --- a/tools/shell/include/keywords.h +++ b/tools/shell/include/keywords.h @@ -1,6 +1,6 @@ #ifndef _keywordList // clang-format off -#define _keywordList {"ACYCLIC", "ANY", "ADD", "ALL", "ALTER", "ANALYZE", "AND", "AS", "ASC", "ASCENDING", "ATTACH", "BEGIN", "BY", "CALL", "CASE", "CAST", "CHECKPOINT", "COLUMN", "COMMENT", "COMMIT", "COMMIT_SKIP_CHECKPOINT", "CONTAINS", "COPY", "COUNT", "CREATE", "CSR", "CYCLE", "DATABASE", "DBTYPE", "DEFAULT", "DELETE", "DESC", "DESCENDING", "DETACH", "DISTINCT", "DROP", "ELSE", "END", "ENDS", "EXISTS", "EXPLAIN", "EXPORT", "EXTENSION", "FALSE", "FROM", "FORCE", "FOR", "GLOB", "GRAPH", "GROUP", "HASH", "HEADERS", "HINT", "IMPORT", "INDEX", "IF", "IN", "INCREMENT", "INSTALL", "IS", "JOIN", "KEY", "LIMIT", "LOAD", "LOGICAL", "MACRO", "MATCH", "MAXVALUE", "MERGE", "MINVALUE", "MULTI_JOIN", "NO", "NODE", "NOT", "NONE", "NULL", "ON", "ONLY", "OPTIONS", "OPTIONAL", "OR", "ORDER", "PRIMARY", "PROFILE", "PROJECT", "RANGE", "READ", "REL", "RENAME", "RETURN", "ROLLBACK", "ROLLBACK_SKIP_CHECKPOINT", "SEQUENCE", "SET", "SORTED", "SHORTEST", "START", "STARTS", "STRUCT", "TABLE", "THEN", "TO", "TRAIL", "TRANSACTION", "TRUE", "TYPE", "UNION", "UNWIND", "UNINSTALL", "UPDATE", "USE", "WHEN", "WHERE", "WITH", "WRITE", "WSHORTEST", "XOR", "SINGLE", "YIELD", "USER", "PARTITION", "PARTITIONS", "PASSWORD", "ROLE", "MAP"} -#define _keywordListLength 125 +#define _keywordList {"ACYCLIC", "ANY", "ADD", "ALL", "ALTER", "ANALYZE", "AND", "AS", "ASC", "ASCENDING", "ATTACH", "BEGIN", "BY", "CALL", "CASE", "CAST", "CHECKPOINT", "COLUMN", "COMMENT", "COMMIT", "COMMIT_SKIP_CHECKPOINT", "CONTAINS", "COPY", "COUNT", "CREATE", "CSR", "CYCLE", "DATABASE", "DBTYPE", "DEFAULT", "DELETE", "DESC", "DESCENDING", "DETACH", "DISTINCT", "DROP", "ELSE", "END", "ENDS", "EXISTS", "EXPLAIN", "EXPORT", "EXTENSION", "FALSE", "FROM", "FORCE", "FOR", "GLOB", "GRAPH", "GROUP", "HASH", "HEADERS", "HINT", "IMPORT", "INDEX", "IF", "IN", "INCREMENT", "INSTALL", "IS", "JOIN", "KEY", "LIMIT", "LIST", "LOAD", "LOGICAL", "MACRO", "MATCH", "MAXVALUE", "MERGE", "MINVALUE", "MULTI_JOIN", "NO", "NODE", "NOT", "NONE", "NULL", "ON", "ONLY", "OPTIONS", "OPTIONAL", "OR", "ORDER", "PRIMARY", "PROFILE", "PROJECT", "RANGE", "READ", "REL", "RENAME", "RETURN", "ROLLBACK", "ROLLBACK_SKIP_CHECKPOINT", "SEQUENCE", "SET", "SORTED", "SHORTEST", "START", "STARTS", "STRUCT", "TABLE", "THEN", "TO", "TRAIL", "TRANSACTION", "TRUE", "TYPE", "UNION", "UNWIND", "UNINSTALL", "UPDATE", "USE", "WHEN", "WHERE", "WITH", "WRITE", "WSHORTEST", "XOR", "SINGLE", "YIELD", "USER", "PARTITION", "PARTITIONS", "PASSWORD", "ROLE", "MAP"} +#define _keywordListLength 126 // clang-format on #endif diff --git a/tools/shell/shell_development_guide.md b/tools/shell/shell_development_guide.md index 5f43c7fa7e..7a5387536e 100644 --- a/tools/shell/shell_development_guide.md +++ b/tools/shell/shell_development_guide.md @@ -135,7 +135,7 @@ The first difference is how the queries get displayed. In the `refreshLine()` fu Once truncation is done, continue markers are added. These are visual symbols added to the front of the line to indicate what line you are currently adding and make the terminal look nicer. Once the continuation markers are added, the highlight callback from before is called. Again, a buffer is used to clear the screen and write all changes at once. -For multiline, better highlighting is implemented due to the whole query being avaiable. Multiline comments and errors are able to be highlighted in this mode. After the query is tokenized, the highlight errors function is called. This function iterates over every character and checks for comments, unclosed strings, and unclosed brackets. If any errors are found, the highlighting is changed to indicate an error. Highlighting then continues as normal. +For multiline, better highlighting is implemented due to the whole query being available. Multiline comments and errors are able to be highlighted in this mode. After the query is tokenized, the highlight errors function is called. This function iterates over every character and checks for comments, unclosed strings, and unclosed brackets. If any errors are found, the highlighting is changed to indicate an error. Highlighting then continues as normal. For history, the newlines and comments do not need to be ignored as the shell is able to display those characters. Currently, history search is still only `:singleline` mode so when `ctrl_r` is pressed, newlines and returns are converted into spaces. However, when the search is selected, these spaces return back into newlines and are properly displayed by `refreshLine()`.