From 5e0417eebd0f57676e8068e1341a734842365c97 Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Mon, 10 Mar 2025 13:08:56 +0100 Subject: [PATCH 01/45] refactor: Rename 'identity' to the standard 'identifier' --- grammar.js | 48 +- src/grammar.json | 87 +- src/node-types.json | 58 +- src/parser.c | 5923 +++++++++++++++++++++---------------------- 4 files changed, 3054 insertions(+), 3062 deletions(-) diff --git a/grammar.js b/grammar.js index 7f23f45..29145ef 100644 --- a/grammar.js +++ b/grammar.js @@ -15,7 +15,7 @@ module.exports = grammar({ $.comment, ], - word: $ => $.identity, + word: $ => $.identifier, conflicts: $ => [ // FIXME: Conflict at end of association when there shouldn't be one @@ -55,7 +55,7 @@ module.exports = grammar({ category_declaration: $ => seq( 'category', - field('id', $.identity), + field('id', $.identifier), field('meta', repeat($.meta)), '{', field('assets', repeat($.asset_declaration)), @@ -66,8 +66,8 @@ module.exports = grammar({ asset_declaration: $ => seq( optional(alias('abstract', 'abstract')), 'asset', - field('id', $.identity), - field('extends', optional(seq('extends', $.identity))), + field('id', $.identifier), + field('extends', optional(seq('extends', $.identifier))), field('meta', repeat($.meta)), '{', optional(field('body', $.asset_definition)), @@ -79,7 +79,7 @@ module.exports = grammar({ // A varaible within an asset asset_variable: $ => seq( 'let', - field('id', $.identity), + field('id', $.identifier), '=', field('value', $.asset_expr), ), @@ -93,8 +93,8 @@ module.exports = grammar({ 'E', '!E', )), - field('id', $.identity), - repeat(field('tag', seq('@', $.identity))), + field('id', $.identifier), + optional(field('tag', seq('@', $.identifier))), optional(field('cias', seq( '{', $.cias, @@ -115,11 +115,11 @@ module.exports = grammar({ choice('!', token(prec(1, '//!'))), optional(field('name', $.detector_name)), field('context', $.detector_context), - optional(field('type', $.identity)), + optional(field('type', $.identifier)), optional(field('ttc', $.ttc)), ), - detector_name: $ => sep1($.identity, '.'), + detector_name: $ => sep1($.identifier, '.'), detector_context: $ => seq( '(', @@ -128,8 +128,8 @@ module.exports = grammar({ ), detector_context_asset: $ => seq( - field('type', $.identity), - field('id', $.identity), + field('type', $.identifier), + field('id', $.identifier), ), // Precondition for attack steps @@ -164,12 +164,12 @@ module.exports = grammar({ _ttc_primary: $ => choice( $._number, - $.identity, + $.identifier, $.ttc_distribution, ), ttc_distribution: $ => seq( - field('id', $.identity), + field('id', $.identifier), '(', field('values', commaSep1($._number)), ')', @@ -207,12 +207,12 @@ module.exports = grammar({ _asset_expr_primary: $ => choice( - $.identity, + $.identifier, $.asset_variable_substitution ), asset_variable_substitution: $ => seq( - field('id', $.identity), + field('id', $.identifier), '(', ')', ), @@ -220,7 +220,7 @@ module.exports = grammar({ asset_expr_type: $ => prec.left('binary_exp', seq( field('expression', $._inline_asset_expr), '[', - field('type_id', $.identity), + field('type_id', $.identifier), ']', )), @@ -254,7 +254,7 @@ module.exports = grammar({ // Define values, i.e. global string constants define_declaration: $ => seq( '#', - field('id', $.identity), + field('id', $.identifier), ':', field('value', $.string) ), @@ -269,15 +269,15 @@ module.exports = grammar({ ), association: $ => seq( - field('left_id', $.identity), - '[', field('left_field_id', $.identity), ']', + field('left_id', $.identifier), + '[', field('left_field_id', $.identifier), ']', field('left_mult', $.multiplicity), '<--', - field('id', $.identity), + field('id', $.identifier), '-->', field('right_mult', $.multiplicity), - '[', field('right_field_id', $.identity), ']', - field('right_id', $.identity), + '[', field('right_field_id', $.identifier), ']', + field('right_id', $.identifier), field('meta', repeat($.meta)), ), @@ -300,7 +300,7 @@ module.exports = grammar({ // Meta information for category, asset, or otherwise. meta: $ => seq( - field('id', $.identity), + field('id', $.identifier), 'info', ':', field('info', alias($.string, $.meta_string)), @@ -311,7 +311,7 @@ module.exports = grammar({ _number: $ => choice($.integer, $.float), integer: _ => token(/[0-9]+/), float: _ => token(/(:?[0-9]+(:?[.][0-9]*)?|[.][0-9]+)/), - identity: _ => token(/[a-zA-Z0-9_]+/), + identifier: _ => token(/[a-zA-Z0-9_]+/), star: _ => token('*'), cia: _ => token(/[CIA]/) diff --git a/src/grammar.json b/src/grammar.json index 460702c..5eb59cd 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -1,7 +1,7 @@ { "$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json", "name": "mal", - "word": "identity", + "word": "identifier", "rules": { "source_file": { "type": "REPEAT", @@ -102,7 +102,7 @@ "name": "id", "content": { "type": "SYMBOL", - "name": "identity" + "name": "identifier" } }, { @@ -166,7 +166,7 @@ "name": "id", "content": { "type": "SYMBOL", - "name": "identity" + "name": "identifier" } }, { @@ -184,7 +184,7 @@ }, { "type": "SYMBOL", - "name": "identity" + "name": "identifier" } ] }, @@ -259,7 +259,7 @@ "name": "id", "content": { "type": "SYMBOL", - "name": "identity" + "name": "identifier" } }, { @@ -313,28 +313,33 @@ "name": "id", "content": { "type": "SYMBOL", - "name": "identity" + "name": "identifier" } }, { - "type": "REPEAT", - "content": { - "type": "FIELD", - "name": "tag", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "@" - }, - { - "type": "SYMBOL", - "name": "identity" - } - ] + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "tag", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "@" + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + } + }, + { + "type": "BLANK" } - } + ] }, { "type": "CHOICE", @@ -522,7 +527,7 @@ "name": "type", "content": { "type": "SYMBOL", - "name": "identity" + "name": "identifier" } }, { @@ -553,7 +558,7 @@ "members": [ { "type": "SYMBOL", - "name": "identity" + "name": "identifier" }, { "type": "REPEAT", @@ -566,7 +571,7 @@ }, { "type": "SYMBOL", - "name": "identity" + "name": "identifier" } ] } @@ -619,7 +624,7 @@ "name": "type", "content": { "type": "SYMBOL", - "name": "identity" + "name": "identifier" } }, { @@ -627,7 +632,7 @@ "name": "id", "content": { "type": "SYMBOL", - "name": "identity" + "name": "identifier" } } ] @@ -781,7 +786,7 @@ }, { "type": "SYMBOL", - "name": "identity" + "name": "identifier" }, { "type": "SYMBOL", @@ -797,7 +802,7 @@ "name": "id", "content": { "type": "SYMBOL", - "name": "identity" + "name": "identifier" } }, { @@ -1056,7 +1061,7 @@ "members": [ { "type": "SYMBOL", - "name": "identity" + "name": "identifier" }, { "type": "SYMBOL", @@ -1072,7 +1077,7 @@ "name": "id", "content": { "type": "SYMBOL", - "name": "identity" + "name": "identifier" } }, { @@ -1108,7 +1113,7 @@ "name": "type_id", "content": { "type": "SYMBOL", - "name": "identity" + "name": "identifier" } }, { @@ -1297,7 +1302,7 @@ "name": "id", "content": { "type": "SYMBOL", - "name": "identity" + "name": "identifier" } }, { @@ -1346,7 +1351,7 @@ "name": "left_id", "content": { "type": "SYMBOL", - "name": "identity" + "name": "identifier" } }, { @@ -1358,7 +1363,7 @@ "name": "left_field_id", "content": { "type": "SYMBOL", - "name": "identity" + "name": "identifier" } }, { @@ -1382,7 +1387,7 @@ "name": "id", "content": { "type": "SYMBOL", - "name": "identity" + "name": "identifier" } }, { @@ -1406,7 +1411,7 @@ "name": "right_field_id", "content": { "type": "SYMBOL", - "name": "identity" + "name": "identifier" } }, { @@ -1418,7 +1423,7 @@ "name": "right_id", "content": { "type": "SYMBOL", - "name": "identity" + "name": "identifier" } }, { @@ -1493,7 +1498,7 @@ "name": "id", "content": { "type": "SYMBOL", - "name": "identity" + "name": "identifier" } }, { @@ -1566,7 +1571,7 @@ "value": "(:?[0-9]+(:?[.][0-9]*)?|[.][0-9]+)" } }, - "identity": { + "identifier": { "type": "TOKEN", "content": { "type": "PATTERN", diff --git a/src/node-types.json b/src/node-types.json index 914aca5..d686a3d 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -22,7 +22,7 @@ "named": false }, { - "type": "identity", + "type": "identifier", "named": true } ] @@ -32,7 +32,7 @@ "required": true, "types": [ { - "type": "identity", + "type": "identifier", "named": true } ] @@ -93,7 +93,7 @@ "named": true }, { - "type": "identity", + "type": "identifier", "named": true } ] @@ -132,7 +132,7 @@ "named": true }, { - "type": "identity", + "type": "identifier", "named": true } ] @@ -188,7 +188,7 @@ "named": true }, { - "type": "identity", + "type": "identifier", "named": true } ] @@ -228,7 +228,7 @@ "named": true }, { - "type": "identity", + "type": "identifier", "named": true } ] @@ -238,7 +238,7 @@ "required": true, "types": [ { - "type": "identity", + "type": "identifier", "named": true } ] @@ -278,7 +278,7 @@ "named": true }, { - "type": "identity", + "type": "identifier", "named": true } ] @@ -304,7 +304,7 @@ "required": true, "types": [ { - "type": "identity", + "type": "identifier", "named": true } ] @@ -330,7 +330,7 @@ "required": true, "types": [ { - "type": "identity", + "type": "identifier", "named": true } ] @@ -346,7 +346,7 @@ "required": true, "types": [ { - "type": "identity", + "type": "identifier", "named": true } ] @@ -356,7 +356,7 @@ "required": true, "types": [ { - "type": "identity", + "type": "identifier", "named": true } ] @@ -366,7 +366,7 @@ "required": true, "types": [ { - "type": "identity", + "type": "identifier", "named": true } ] @@ -396,7 +396,7 @@ "required": true, "types": [ { - "type": "identity", + "type": "identifier", "named": true } ] @@ -406,7 +406,7 @@ "required": true, "types": [ { - "type": "identity", + "type": "identifier", "named": true } ] @@ -475,7 +475,7 @@ "required": true, "types": [ { - "type": "identity", + "type": "identifier", "named": true } ] @@ -545,7 +545,7 @@ "named": false }, { - "type": "identity", + "type": "identifier", "named": true } ] @@ -581,7 +581,7 @@ "required": true, "types": [ { - "type": "identity", + "type": "identifier", "named": true } ] @@ -649,7 +649,7 @@ "required": true, "types": [ { - "type": "identity", + "type": "identifier", "named": true } ] @@ -705,7 +705,7 @@ "required": false, "types": [ { - "type": "identity", + "type": "identifier", "named": true } ] @@ -736,7 +736,7 @@ "required": true, "types": [ { - "type": "identity", + "type": "identifier", "named": true } ] @@ -746,7 +746,7 @@ "required": true, "types": [ { - "type": "identity", + "type": "identifier", "named": true } ] @@ -762,7 +762,7 @@ "required": true, "types": [ { - "type": "identity", + "type": "identifier", "named": true } ] @@ -793,7 +793,7 @@ "required": true, "types": [ { - "type": "identity", + "type": "identifier", "named": true } ] @@ -955,7 +955,7 @@ "named": true }, { - "type": "identity", + "type": "identifier", "named": true }, { @@ -994,7 +994,7 @@ "named": true }, { - "type": "identity", + "type": "identifier", "named": true }, { @@ -1054,7 +1054,7 @@ "named": true }, { - "type": "identity", + "type": "identifier", "named": true }, { @@ -1082,7 +1082,7 @@ "required": true, "types": [ { - "type": "identity", + "type": "identifier", "named": true } ] @@ -1253,7 +1253,7 @@ "named": true }, { - "type": "identity", + "type": "identifier", "named": true }, { diff --git a/src/parser.c b/src/parser.c index 8415e53..4fff3e4 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1,4 +1,4 @@ -/* Automatically generated by tree-sitter v0.25.3 */ +/* Automatically generated by tree-sitter v0.25.1 */ #include "tree_sitter/parser.h" @@ -7,20 +7,20 @@ #endif #define LANGUAGE_VERSION 15 -#define STATE_COUNT 326 +#define STATE_COUNT 324 #define LARGE_STATE_COUNT 2 -#define SYMBOL_COUNT 94 +#define SYMBOL_COUNT 93 #define ALIAS_COUNT 1 #define TOKEN_COUNT 46 #define EXTERNAL_TOKEN_COUNT 0 #define FIELD_COUNT 33 #define MAX_ALIAS_SEQUENCE_LENGTH 14 #define MAX_RESERVED_WORD_SET_SIZE 0 -#define PRODUCTION_ID_COUNT 174 +#define PRODUCTION_ID_COUNT 172 #define SUPERTYPE_COUNT 0 enum ts_symbol_identifiers { - sym_identity = 1, + sym_identifier = 1, sym_comment = 2, anon_sym_include = 3, anon_sym_category = 4, @@ -106,19 +106,18 @@ enum ts_symbol_identifiers { aux_sym_category_declaration_repeat1 = 84, aux_sym_category_declaration_repeat2 = 85, aux_sym_asset_definition_repeat1 = 86, - aux_sym_attack_step_repeat1 = 87, - aux_sym_cias_repeat1 = 88, - aux_sym_detector_name_repeat1 = 89, - aux_sym_detector_context_repeat1 = 90, - aux_sym_preconditions_repeat1 = 91, - aux_sym_ttc_distribution_repeat1 = 92, - aux_sym_associations_declaration_repeat1 = 93, - alias_sym_meta_string = 94, + aux_sym_cias_repeat1 = 87, + aux_sym_detector_name_repeat1 = 88, + aux_sym_detector_context_repeat1 = 89, + aux_sym_preconditions_repeat1 = 90, + aux_sym_ttc_distribution_repeat1 = 91, + aux_sym_associations_declaration_repeat1 = 92, + alias_sym_meta_string = 93, }; static const char * const ts_symbol_names[] = { [ts_builtin_sym_end] = "end", - [sym_identity] = "identity", + [sym_identifier] = "identifier", [sym_comment] = "comment", [anon_sym_include] = "include", [anon_sym_category] = "category", @@ -204,7 +203,6 @@ static const char * const ts_symbol_names[] = { [aux_sym_category_declaration_repeat1] = "category_declaration_repeat1", [aux_sym_category_declaration_repeat2] = "category_declaration_repeat2", [aux_sym_asset_definition_repeat1] = "asset_definition_repeat1", - [aux_sym_attack_step_repeat1] = "attack_step_repeat1", [aux_sym_cias_repeat1] = "cias_repeat1", [aux_sym_detector_name_repeat1] = "detector_name_repeat1", [aux_sym_detector_context_repeat1] = "detector_context_repeat1", @@ -216,7 +214,7 @@ static const char * const ts_symbol_names[] = { static const TSSymbol ts_symbol_map[] = { [ts_builtin_sym_end] = ts_builtin_sym_end, - [sym_identity] = sym_identity, + [sym_identifier] = sym_identifier, [sym_comment] = sym_comment, [anon_sym_include] = anon_sym_include, [anon_sym_category] = anon_sym_category, @@ -302,7 +300,6 @@ static const TSSymbol ts_symbol_map[] = { [aux_sym_category_declaration_repeat1] = aux_sym_category_declaration_repeat1, [aux_sym_category_declaration_repeat2] = aux_sym_category_declaration_repeat2, [aux_sym_asset_definition_repeat1] = aux_sym_asset_definition_repeat1, - [aux_sym_attack_step_repeat1] = aux_sym_attack_step_repeat1, [aux_sym_cias_repeat1] = aux_sym_cias_repeat1, [aux_sym_detector_name_repeat1] = aux_sym_detector_name_repeat1, [aux_sym_detector_context_repeat1] = aux_sym_detector_context_repeat1, @@ -317,7 +314,7 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = false, .named = true, }, - [sym_identity] = { + [sym_identifier] = { .visible = true, .named = true, }, @@ -661,10 +658,6 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = false, .named = false, }, - [aux_sym_attack_step_repeat1] = { - .visible = false, - .named = false, - }, [aux_sym_cias_repeat1] = { .visible = false, .named = false, @@ -788,160 +781,158 @@ static const TSMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { [17] = {.index = 34, .length = 3}, [18] = {.index = 37, .length = 3}, [19] = {.index = 40, .length = 3}, - [20] = {.index = 43, .length = 3}, - [21] = {.index = 46, .length = 2}, + [20] = {.index = 43, .length = 2}, + [21] = {.index = 45, .length = 3}, [22] = {.index = 48, .length = 3}, - [23] = {.index = 51, .length = 3}, - [24] = {.index = 54, .length = 2}, + [23] = {.index = 51, .length = 4}, + [24] = {.index = 55, .length = 1}, [25] = {.index = 56, .length = 1}, - [26] = {.index = 57, .length = 1}, - [27] = {.index = 58, .length = 2}, - [28] = {.index = 60, .length = 4}, - [29] = {.index = 64, .length = 4}, - [30] = {.index = 68, .length = 4}, - [31] = {.index = 72, .length = 4}, - [32] = {.index = 76, .length = 4}, - [33] = {.index = 80, .length = 4}, - [34] = {.index = 84, .length = 4}, - [35] = {.index = 88, .length = 4}, - [36] = {.index = 92, .length = 4}, - [37] = {.index = 96, .length = 4}, - [38] = {.index = 100, .length = 4}, - [39] = {.index = 104, .length = 4}, - [40] = {.index = 108, .length = 4}, - [41] = {.index = 112, .length = 4}, - [42] = {.index = 116, .length = 4}, - [43] = {.index = 120, .length = 2}, - [44] = {.index = 122, .length = 4}, - [45] = {.index = 126, .length = 4}, - [46] = {.index = 130, .length = 4}, - [47] = {.index = 134, .length = 4}, - [48] = {.index = 138, .length = 2}, - [49] = {.index = 140, .length = 5}, - [50] = {.index = 145, .length = 2}, - [51] = {.index = 147, .length = 2}, - [52] = {.index = 149, .length = 2}, - [53] = {.index = 151, .length = 2}, - [54] = {.index = 153, .length = 3}, - [55] = {.index = 156, .length = 5}, - [56] = {.index = 161, .length = 5}, - [57] = {.index = 166, .length = 5}, - [58] = {.index = 171, .length = 5}, - [59] = {.index = 176, .length = 5}, - [60] = {.index = 181, .length = 5}, - [61] = {.index = 186, .length = 5}, - [62] = {.index = 191, .length = 5}, - [63] = {.index = 196, .length = 5}, - [64] = {.index = 201, .length = 5}, - [65] = {.index = 206, .length = 5}, - [66] = {.index = 211, .length = 5}, - [67] = {.index = 216, .length = 5}, - [68] = {.index = 221, .length = 5}, - [69] = {.index = 226, .length = 5}, - [70] = {.index = 231, .length = 5}, - [71] = {.index = 236, .length = 5}, - [72] = {.index = 241, .length = 5}, - [73] = {.index = 246, .length = 5}, - [74] = {.index = 251, .length = 5}, - [75] = {.index = 256, .length = 5}, - [76] = {.index = 261, .length = 5}, - [77] = {.index = 266, .length = 1}, - [78] = {.index = 267, .length = 3}, - [79] = {.index = 270, .length = 6}, - [80] = {.index = 276, .length = 6}, - [81] = {.index = 282, .length = 6}, - [82] = {.index = 288, .length = 6}, - [83] = {.index = 294, .length = 6}, - [84] = {.index = 300, .length = 2}, - [85] = {.index = 302, .length = 3}, - [86] = {.index = 305, .length = 3}, - [87] = {.index = 308, .length = 3}, - [88] = {.index = 311, .length = 6}, - [89] = {.index = 317, .length = 6}, - [90] = {.index = 323, .length = 6}, - [91] = {.index = 329, .length = 6}, - [92] = {.index = 335, .length = 6}, - [93] = {.index = 341, .length = 6}, - [94] = {.index = 347, .length = 6}, - [95] = {.index = 353, .length = 6}, - [96] = {.index = 359, .length = 6}, - [97] = {.index = 365, .length = 6}, - [98] = {.index = 371, .length = 6}, - [99] = {.index = 377, .length = 6}, - [100] = {.index = 383, .length = 6}, - [101] = {.index = 389, .length = 6}, - [102] = {.index = 395, .length = 6}, - [103] = {.index = 401, .length = 6}, - [104] = {.index = 407, .length = 2}, - [105] = {.index = 409, .length = 7}, - [106] = {.index = 416, .length = 7}, - [107] = {.index = 423, .length = 7}, - [108] = {.index = 430, .length = 7}, - [109] = {.index = 437, .length = 7}, - [110] = {.index = 444, .length = 7}, - [111] = {.index = 451, .length = 7}, - [112] = {.index = 458, .length = 7}, - [113] = {.index = 465, .length = 7}, - [114] = {.index = 472, .length = 7}, - [115] = {.index = 479, .length = 4}, - [116] = {.index = 483, .length = 2}, - [117] = {.index = 485, .length = 7}, - [118] = {.index = 492, .length = 7}, - [119] = {.index = 499, .length = 7}, - [120] = {.index = 506, .length = 7}, - [121] = {.index = 513, .length = 7}, - [122] = {.index = 520, .length = 7}, - [123] = {.index = 527, .length = 7}, - [124] = {.index = 534, .length = 7}, - [125] = {.index = 541, .length = 7}, - [126] = {.index = 548, .length = 7}, - [127] = {.index = 555, .length = 7}, - [128] = {.index = 562, .length = 8}, - [129] = {.index = 570, .length = 8}, - [130] = {.index = 578, .length = 8}, - [131] = {.index = 586, .length = 8}, - [132] = {.index = 594, .length = 8}, - [133] = {.index = 602, .length = 8}, - [134] = {.index = 610, .length = 8}, - [135] = {.index = 618, .length = 8}, - [136] = {.index = 626, .length = 8}, - [137] = {.index = 634, .length = 8}, - [138] = {.index = 642, .length = 3}, - [139] = {.index = 645, .length = 8}, - [140] = {.index = 653, .length = 8}, - [141] = {.index = 661, .length = 8}, - [142] = {.index = 669, .length = 8}, - [143] = {.index = 677, .length = 8}, - [144] = {.index = 685, .length = 8}, - [145] = {.index = 693, .length = 8}, - [146] = {.index = 701, .length = 8}, - [147] = {.index = 709, .length = 8}, - [148] = {.index = 717, .length = 8}, - [149] = {.index = 725, .length = 8}, - [150] = {.index = 733, .length = 9}, - [151] = {.index = 742, .length = 9}, - [152] = {.index = 751, .length = 9}, - [153] = {.index = 760, .length = 9}, - [154] = {.index = 769, .length = 9}, - [155] = {.index = 778, .length = 9}, - [156] = {.index = 787, .length = 9}, - [157] = {.index = 796, .length = 9}, - [158] = {.index = 805, .length = 9}, - [159] = {.index = 814, .length = 9}, - [160] = {.index = 823, .length = 9}, - [161] = {.index = 832, .length = 9}, - [162] = {.index = 841, .length = 9}, - [163] = {.index = 850, .length = 9}, - [164] = {.index = 859, .length = 9}, - [165] = {.index = 868, .length = 7}, - [166] = {.index = 875, .length = 10}, - [167] = {.index = 885, .length = 10}, - [168] = {.index = 895, .length = 10}, - [169] = {.index = 905, .length = 10}, - [170] = {.index = 915, .length = 10}, - [171] = {.index = 925, .length = 10}, - [172] = {.index = 935, .length = 8}, - [173] = {.index = 943, .length = 11}, + [26] = {.index = 57, .length = 2}, + [27] = {.index = 59, .length = 4}, + [28] = {.index = 63, .length = 4}, + [29] = {.index = 67, .length = 4}, + [30] = {.index = 71, .length = 4}, + [31] = {.index = 75, .length = 4}, + [32] = {.index = 79, .length = 4}, + [33] = {.index = 83, .length = 4}, + [34] = {.index = 87, .length = 4}, + [35] = {.index = 91, .length = 4}, + [36] = {.index = 95, .length = 4}, + [37] = {.index = 99, .length = 4}, + [38] = {.index = 103, .length = 4}, + [39] = {.index = 107, .length = 4}, + [40] = {.index = 111, .length = 4}, + [41] = {.index = 115, .length = 2}, + [42] = {.index = 117, .length = 5}, + [43] = {.index = 122, .length = 5}, + [44] = {.index = 127, .length = 5}, + [45] = {.index = 132, .length = 5}, + [46] = {.index = 137, .length = 5}, + [47] = {.index = 142, .length = 5}, + [48] = {.index = 147, .length = 2}, + [49] = {.index = 149, .length = 2}, + [50] = {.index = 151, .length = 2}, + [51] = {.index = 153, .length = 2}, + [52] = {.index = 155, .length = 3}, + [53] = {.index = 158, .length = 5}, + [54] = {.index = 163, .length = 5}, + [55] = {.index = 168, .length = 5}, + [56] = {.index = 173, .length = 5}, + [57] = {.index = 178, .length = 5}, + [58] = {.index = 183, .length = 5}, + [59] = {.index = 188, .length = 5}, + [60] = {.index = 193, .length = 5}, + [61] = {.index = 198, .length = 5}, + [62] = {.index = 203, .length = 5}, + [63] = {.index = 208, .length = 5}, + [64] = {.index = 213, .length = 5}, + [65] = {.index = 218, .length = 1}, + [66] = {.index = 219, .length = 3}, + [67] = {.index = 222, .length = 6}, + [68] = {.index = 228, .length = 6}, + [69] = {.index = 234, .length = 6}, + [70] = {.index = 240, .length = 6}, + [71] = {.index = 246, .length = 6}, + [72] = {.index = 252, .length = 6}, + [73] = {.index = 258, .length = 6}, + [74] = {.index = 264, .length = 6}, + [75] = {.index = 270, .length = 6}, + [76] = {.index = 276, .length = 6}, + [77] = {.index = 282, .length = 6}, + [78] = {.index = 288, .length = 6}, + [79] = {.index = 294, .length = 6}, + [80] = {.index = 300, .length = 6}, + [81] = {.index = 306, .length = 6}, + [82] = {.index = 312, .length = 2}, + [83] = {.index = 314, .length = 3}, + [84] = {.index = 317, .length = 3}, + [85] = {.index = 320, .length = 3}, + [86] = {.index = 323, .length = 6}, + [87] = {.index = 329, .length = 6}, + [88] = {.index = 335, .length = 6}, + [89] = {.index = 341, .length = 6}, + [90] = {.index = 347, .length = 6}, + [91] = {.index = 353, .length = 2}, + [92] = {.index = 355, .length = 7}, + [93] = {.index = 362, .length = 7}, + [94] = {.index = 369, .length = 7}, + [95] = {.index = 376, .length = 7}, + [96] = {.index = 383, .length = 7}, + [97] = {.index = 390, .length = 7}, + [98] = {.index = 397, .length = 7}, + [99] = {.index = 404, .length = 7}, + [100] = {.index = 411, .length = 7}, + [101] = {.index = 418, .length = 7}, + [102] = {.index = 425, .length = 7}, + [103] = {.index = 432, .length = 7}, + [104] = {.index = 439, .length = 7}, + [105] = {.index = 446, .length = 7}, + [106] = {.index = 453, .length = 7}, + [107] = {.index = 460, .length = 7}, + [108] = {.index = 467, .length = 7}, + [109] = {.index = 474, .length = 7}, + [110] = {.index = 481, .length = 7}, + [111] = {.index = 488, .length = 7}, + [112] = {.index = 495, .length = 7}, + [113] = {.index = 502, .length = 4}, + [114] = {.index = 506, .length = 2}, + [115] = {.index = 508, .length = 7}, + [116] = {.index = 515, .length = 8}, + [117] = {.index = 523, .length = 8}, + [118] = {.index = 531, .length = 8}, + [119] = {.index = 539, .length = 8}, + [120] = {.index = 547, .length = 8}, + [121] = {.index = 555, .length = 8}, + [122] = {.index = 563, .length = 8}, + [123] = {.index = 571, .length = 8}, + [124] = {.index = 579, .length = 8}, + [125] = {.index = 587, .length = 8}, + [126] = {.index = 595, .length = 8}, + [127] = {.index = 603, .length = 8}, + [128] = {.index = 611, .length = 8}, + [129] = {.index = 619, .length = 8}, + [130] = {.index = 627, .length = 8}, + [131] = {.index = 635, .length = 8}, + [132] = {.index = 643, .length = 8}, + [133] = {.index = 651, .length = 8}, + [134] = {.index = 659, .length = 8}, + [135] = {.index = 667, .length = 8}, + [136] = {.index = 675, .length = 3}, + [137] = {.index = 678, .length = 9}, + [138] = {.index = 687, .length = 9}, + [139] = {.index = 696, .length = 9}, + [140] = {.index = 705, .length = 9}, + [141] = {.index = 714, .length = 9}, + [142] = {.index = 723, .length = 9}, + [143] = {.index = 732, .length = 9}, + [144] = {.index = 741, .length = 9}, + [145] = {.index = 750, .length = 9}, + [146] = {.index = 759, .length = 9}, + [147] = {.index = 768, .length = 9}, + [148] = {.index = 777, .length = 9}, + [149] = {.index = 786, .length = 9}, + [150] = {.index = 795, .length = 9}, + [151] = {.index = 804, .length = 9}, + [152] = {.index = 813, .length = 9}, + [153] = {.index = 822, .length = 7}, + [154] = {.index = 829, .length = 10}, + [155] = {.index = 839, .length = 10}, + [156] = {.index = 849, .length = 10}, + [157] = {.index = 859, .length = 10}, + [158] = {.index = 869, .length = 10}, + [159] = {.index = 879, .length = 10}, + [160] = {.index = 889, .length = 10}, + [161] = {.index = 899, .length = 10}, + [162] = {.index = 909, .length = 10}, + [163] = {.index = 919, .length = 10}, + [164] = {.index = 929, .length = 10}, + [165] = {.index = 939, .length = 8}, + [166] = {.index = 947, .length = 11}, + [167] = {.index = 958, .length = 11}, + [168] = {.index = 969, .length = 11}, + [169] = {.index = 980, .length = 11}, + [170] = {.index = 991, .length = 11}, + [171] = {.index = 1002, .length = 12}, }; static const TSFieldMapEntry ts_field_map_entries[] = { @@ -1000,465 +991,398 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_meta, 2}, {field_step_type, 0}, [37] = - {field_id, 1}, - {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [40] = {field_extends, 2}, {field_extends, 3}, {field_id, 1}, - [43] = + [40] = {field_body, 4}, {field_id, 1}, {field_meta, 2}, - [46] = + [43] = {field_end, 2}, {field_start, 0}, - [48] = + [45] = {field_extends, 3}, {field_extends, 4}, {field_id, 2}, - [51] = + [48] = {field_body, 5}, {field_id, 2}, {field_meta, 3}, - [54] = - {field_tag, 0}, - {field_tag, 1}, - [56] = + [51] = + {field_id, 1}, + {field_step_type, 0}, + {field_tag, 2}, + {field_tag, 3}, + [55] = {field_context, 1}, - [57] = + [56] = {field_condition, 1}, - [58] = + [57] = {field_operator, 0}, {field_reaches, 1}, - [60] = + [59] = {field_detector, 2}, {field_id, 1}, {field_preconditions, 3}, {field_step_type, 0}, - [64] = + [63] = {field_detector, 2}, {field_id, 1}, {field_reaches, 3}, {field_step_type, 0}, - [68] = + [67] = {field_id, 1}, {field_preconditions, 2}, {field_reaches, 3}, {field_step_type, 0}, - [72] = + [71] = {field_detector, 3}, {field_id, 1}, {field_step_type, 0}, {field_ttc, 2}, - [76] = + [75] = {field_id, 1}, {field_preconditions, 3}, {field_step_type, 0}, {field_ttc, 2}, - [80] = + [79] = {field_id, 1}, {field_reaches, 3}, {field_step_type, 0}, {field_ttc, 2}, - [84] = + [83] = {field_id, 1}, {field_meta, 3}, {field_step_type, 0}, {field_ttc, 2}, - [88] = + [87] = {field_detector, 3}, {field_id, 1}, {field_meta, 2}, {field_step_type, 0}, - [92] = + [91] = {field_id, 1}, {field_meta, 2}, {field_preconditions, 3}, {field_step_type, 0}, - [96] = + [95] = {field_id, 1}, {field_meta, 2}, {field_reaches, 3}, {field_step_type, 0}, - [100] = - {field_detector, 3}, - {field_id, 1}, - {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [104] = - {field_id, 1}, - {field_preconditions, 3}, - {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [108] = - {field_id, 1}, - {field_reaches, 3}, - {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [112] = - {field_id, 1}, - {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 3}, - [116] = - {field_id, 1}, - {field_meta, 3}, - {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [120] = - {field_tag, 0, .inherited = true}, - {field_tag, 1, .inherited = true}, - [122] = + [99] = {field_body, 5}, {field_extends, 2}, {field_extends, 3}, {field_id, 1}, - [126] = + [103] = {field_extends, 2}, {field_extends, 3}, {field_id, 1}, {field_meta, 4}, - [130] = + [107] = {field_body, 6}, {field_extends, 3}, {field_extends, 4}, {field_id, 2}, - [134] = + [111] = {field_extends, 3}, {field_extends, 4}, {field_id, 2}, {field_meta, 5}, - [138] = + [115] = {field_expression, 0}, {field_operator, 1}, - [140] = + [117] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, {field_id, 1}, {field_step_type, 0}, - [145] = + [122] = + {field_detector, 4}, + {field_id, 1}, + {field_step_type, 0}, + {field_tag, 2}, + {field_tag, 3}, + [127] = + {field_id, 1}, + {field_preconditions, 4}, + {field_step_type, 0}, + {field_tag, 2}, + {field_tag, 3}, + [132] = + {field_id, 1}, + {field_reaches, 4}, + {field_step_type, 0}, + {field_tag, 2}, + {field_tag, 3}, + [137] = + {field_id, 1}, + {field_step_type, 0}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 4}, + [142] = + {field_id, 1}, + {field_meta, 4}, + {field_step_type, 0}, + {field_tag, 2}, + {field_tag, 3}, + [147] = {field_context, 2}, {field_name, 1}, - [147] = + [149] = {field_context, 1}, {field_type, 2}, - [149] = + [151] = {field_context, 1}, {field_ttc, 2}, - [151] = + [153] = {field_condition, 1}, {field_condition, 2}, - [153] = + [155] = {field_operator, 0}, {field_reaches, 1}, {field_reaches, 2}, - [156] = + [158] = {field_detector, 2}, {field_id, 1}, {field_preconditions, 3}, {field_reaches, 4}, {field_step_type, 0}, - [161] = + [163] = {field_detector, 3}, {field_id, 1}, {field_preconditions, 4}, {field_step_type, 0}, {field_ttc, 2}, - [166] = + [168] = {field_detector, 3}, {field_id, 1}, {field_reaches, 4}, {field_step_type, 0}, {field_ttc, 2}, - [171] = + [173] = {field_id, 1}, {field_preconditions, 3}, {field_reaches, 4}, {field_step_type, 0}, {field_ttc, 2}, - [176] = + [178] = {field_detector, 4}, {field_id, 1}, {field_meta, 3}, {field_step_type, 0}, {field_ttc, 2}, - [181] = + [183] = {field_id, 1}, {field_meta, 3}, {field_preconditions, 4}, {field_step_type, 0}, {field_ttc, 2}, - [186] = + [188] = {field_id, 1}, {field_meta, 3}, {field_reaches, 4}, {field_step_type, 0}, {field_ttc, 2}, - [191] = + [193] = {field_detector, 3}, {field_id, 1}, {field_meta, 2}, {field_preconditions, 4}, {field_step_type, 0}, - [196] = + [198] = {field_detector, 3}, {field_id, 1}, {field_meta, 2}, {field_reaches, 4}, {field_step_type, 0}, - [201] = + [203] = {field_id, 1}, {field_meta, 2}, {field_preconditions, 3}, {field_reaches, 4}, {field_step_type, 0}, - [206] = - {field_detector, 3}, - {field_id, 1}, - {field_preconditions, 4}, - {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [211] = - {field_detector, 3}, - {field_id, 1}, - {field_reaches, 4}, - {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [216] = - {field_id, 1}, - {field_preconditions, 3}, - {field_reaches, 4}, - {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [221] = - {field_detector, 4}, - {field_id, 1}, - {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 3}, - [226] = - {field_id, 1}, - {field_preconditions, 4}, - {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 3}, - [231] = - {field_id, 1}, - {field_reaches, 4}, - {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 3}, - [236] = - {field_id, 1}, - {field_meta, 4}, - {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 3}, - [241] = - {field_detector, 4}, - {field_id, 1}, - {field_meta, 3}, - {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [246] = - {field_id, 1}, - {field_meta, 3}, - {field_preconditions, 4}, - {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [251] = - {field_id, 1}, - {field_meta, 3}, - {field_reaches, 4}, - {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [256] = + [208] = {field_body, 6}, {field_extends, 2}, {field_extends, 3}, {field_id, 1}, {field_meta, 4}, - [261] = + [213] = {field_body, 7}, {field_extends, 3}, {field_extends, 4}, {field_id, 2}, {field_meta, 5}, - [266] = + [218] = {field_id, 0}, - [267] = + [219] = {field_left, 0}, {field_operator, 1}, {field_right, 2}, - [270] = + [222] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, {field_detector, 5}, {field_id, 1}, {field_step_type, 0}, - [276] = + [228] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, {field_id, 1}, {field_preconditions, 5}, {field_step_type, 0}, - [282] = + [234] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, {field_id, 1}, {field_reaches, 5}, {field_step_type, 0}, - [288] = + [240] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, {field_id, 1}, {field_step_type, 0}, {field_ttc, 5}, - [294] = + [246] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, {field_id, 1}, {field_meta, 5}, {field_step_type, 0}, - [300] = - {field_id, 1}, - {field_type, 0}, - [302] = - {field_context, 2}, - {field_name, 1}, - {field_type, 3}, - [305] = - {field_context, 2}, - {field_name, 1}, - {field_ttc, 3}, - [308] = - {field_context, 1}, - {field_ttc, 3}, - {field_type, 2}, - [311] = - {field_detector, 3}, - {field_id, 1}, - {field_preconditions, 4}, - {field_reaches, 5}, - {field_step_type, 0}, - {field_ttc, 2}, - [317] = + [252] = {field_detector, 4}, {field_id, 1}, - {field_meta, 3}, {field_preconditions, 5}, {field_step_type, 0}, - {field_ttc, 2}, - [323] = + {field_tag, 2}, + {field_tag, 3}, + [258] = {field_detector, 4}, {field_id, 1}, - {field_meta, 3}, - {field_reaches, 5}, - {field_step_type, 0}, - {field_ttc, 2}, - [329] = - {field_id, 1}, - {field_meta, 3}, - {field_preconditions, 4}, {field_reaches, 5}, {field_step_type, 0}, - {field_ttc, 2}, - [335] = - {field_detector, 3}, + {field_tag, 2}, + {field_tag, 3}, + [264] = {field_id, 1}, - {field_meta, 2}, {field_preconditions, 4}, {field_reaches, 5}, {field_step_type, 0}, - [341] = - {field_cias, 3}, - {field_cias, 4}, - {field_cias, 5}, - {field_id, 1}, - {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [347] = - {field_detector, 3}, + {field_tag, 2}, + {field_tag, 3}, + [270] = + {field_detector, 5}, {field_id, 1}, - {field_preconditions, 4}, - {field_reaches, 5}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [353] = - {field_detector, 4}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 4}, + [276] = {field_id, 1}, {field_preconditions, 5}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 3}, - [359] = - {field_detector, 4}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 4}, + [282] = {field_id, 1}, {field_reaches, 5}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 3}, - [365] = + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 4}, + [288] = {field_id, 1}, - {field_preconditions, 4}, - {field_reaches, 5}, + {field_meta, 5}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 3}, - [371] = + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 4}, + [294] = {field_detector, 5}, {field_id, 1}, {field_meta, 4}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 3}, - [377] = + {field_tag, 2}, + {field_tag, 3}, + [300] = {field_id, 1}, {field_meta, 4}, {field_preconditions, 5}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 3}, - [383] = + {field_tag, 2}, + {field_tag, 3}, + [306] = {field_id, 1}, {field_meta, 4}, {field_reaches, 5}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, + {field_tag, 2}, + {field_tag, 3}, + [312] = + {field_id, 1}, + {field_type, 0}, + [314] = + {field_context, 2}, + {field_name, 1}, + {field_type, 3}, + [317] = + {field_context, 2}, + {field_name, 1}, + {field_ttc, 3}, + [320] = + {field_context, 1}, {field_ttc, 3}, - [389] = + {field_type, 2}, + [323] = + {field_detector, 3}, + {field_id, 1}, + {field_preconditions, 4}, + {field_reaches, 5}, + {field_step_type, 0}, + {field_ttc, 2}, + [329] = {field_detector, 4}, {field_id, 1}, {field_meta, 3}, {field_preconditions, 5}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [395] = + {field_ttc, 2}, + [335] = {field_detector, 4}, {field_id, 1}, {field_meta, 3}, {field_reaches, 5}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [401] = + {field_ttc, 2}, + [341] = {field_id, 1}, {field_meta, 3}, {field_preconditions, 4}, {field_reaches, 5}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [407] = + {field_ttc, 2}, + [347] = + {field_detector, 3}, + {field_id, 1}, + {field_meta, 2}, + {field_preconditions, 4}, + {field_reaches, 5}, + {field_step_type, 0}, + [353] = {field_expression, 0}, {field_type_id, 2}, - [409] = + [355] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1466,7 +1390,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_id, 1}, {field_preconditions, 6}, {field_step_type, 0}, - [416] = + [362] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1474,7 +1398,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_id, 1}, {field_reaches, 6}, {field_step_type, 0}, - [423] = + [369] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1482,7 +1406,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_preconditions, 5}, {field_reaches, 6}, {field_step_type, 0}, - [430] = + [376] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1490,7 +1414,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_id, 1}, {field_step_type, 0}, {field_ttc, 5}, - [437] = + [383] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1498,7 +1422,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_preconditions, 6}, {field_step_type, 0}, {field_ttc, 5}, - [444] = + [390] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1506,7 +1430,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_reaches, 6}, {field_step_type, 0}, {field_ttc, 5}, - [451] = + [397] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1514,7 +1438,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_meta, 6}, {field_step_type, 0}, {field_ttc, 5}, - [458] = + [404] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1522,7 +1446,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_id, 1}, {field_meta, 5}, {field_step_type, 0}, - [465] = + [411] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1530,7 +1454,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_meta, 5}, {field_preconditions, 6}, {field_step_type, 0}, - [472] = + [418] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1538,103 +1462,111 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_meta, 5}, {field_reaches, 6}, {field_step_type, 0}, - [479] = - {field_context, 2}, - {field_name, 1}, - {field_ttc, 4}, - {field_type, 3}, - [483] = - {field_id, 0}, - {field_values, 2}, - [485] = + [425] = + {field_cias, 4}, + {field_cias, 5}, + {field_cias, 6}, + {field_id, 1}, + {field_step_type, 0}, + {field_tag, 2}, + {field_tag, 3}, + [432] = {field_detector, 4}, {field_id, 1}, - {field_meta, 3}, {field_preconditions, 5}, {field_reaches, 6}, {field_step_type, 0}, - {field_ttc, 2}, - [492] = - {field_cias, 3}, - {field_cias, 4}, - {field_cias, 5}, - {field_detector, 6}, + {field_tag, 2}, + {field_tag, 3}, + [439] = + {field_detector, 5}, {field_id, 1}, + {field_preconditions, 6}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [499] = - {field_cias, 3}, - {field_cias, 4}, - {field_cias, 5}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 4}, + [446] = + {field_detector, 5}, {field_id, 1}, - {field_preconditions, 6}, + {field_reaches, 6}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [506] = - {field_cias, 3}, - {field_cias, 4}, - {field_cias, 5}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 4}, + [453] = {field_id, 1}, + {field_preconditions, 5}, {field_reaches, 6}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [513] = - {field_cias, 3}, - {field_cias, 4}, - {field_cias, 5}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 4}, + [460] = + {field_detector, 6}, {field_id, 1}, + {field_meta, 5}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 6}, - [520] = - {field_cias, 3}, - {field_cias, 4}, - {field_cias, 5}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 4}, + [467] = {field_id, 1}, - {field_meta, 6}, + {field_meta, 5}, + {field_preconditions, 6}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [527] = - {field_detector, 4}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 4}, + [474] = {field_id, 1}, - {field_preconditions, 5}, + {field_meta, 5}, {field_reaches, 6}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 3}, - [534] = + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 4}, + [481] = {field_detector, 5}, {field_id, 1}, {field_meta, 4}, {field_preconditions, 6}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 3}, - [541] = + {field_tag, 2}, + {field_tag, 3}, + [488] = {field_detector, 5}, {field_id, 1}, {field_meta, 4}, {field_reaches, 6}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 3}, - [548] = + {field_tag, 2}, + {field_tag, 3}, + [495] = {field_id, 1}, {field_meta, 4}, {field_preconditions, 5}, {field_reaches, 6}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 3}, - [555] = + {field_tag, 2}, + {field_tag, 3}, + [502] = + {field_context, 2}, + {field_name, 1}, + {field_ttc, 4}, + {field_type, 3}, + [506] = + {field_id, 0}, + {field_values, 2}, + [508] = {field_detector, 4}, {field_id, 1}, {field_meta, 3}, {field_preconditions, 5}, {field_reaches, 6}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [562] = + {field_ttc, 2}, + [515] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1643,7 +1575,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_preconditions, 6}, {field_reaches, 7}, {field_step_type, 0}, - [570] = + [523] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1652,7 +1584,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_preconditions, 7}, {field_step_type, 0}, {field_ttc, 5}, - [578] = + [531] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1661,7 +1593,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_reaches, 7}, {field_step_type, 0}, {field_ttc, 5}, - [586] = + [539] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1670,7 +1602,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_reaches, 7}, {field_step_type, 0}, {field_ttc, 5}, - [594] = + [547] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1679,7 +1611,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_meta, 6}, {field_step_type, 0}, {field_ttc, 5}, - [602] = + [555] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1688,7 +1620,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_preconditions, 7}, {field_step_type, 0}, {field_ttc, 5}, - [610] = + [563] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1697,7 +1629,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_reaches, 7}, {field_step_type, 0}, {field_ttc, 5}, - [618] = + [571] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1706,7 +1638,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_meta, 5}, {field_preconditions, 7}, {field_step_type, 0}, - [626] = + [579] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1715,7 +1647,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_meta, 5}, {field_reaches, 7}, {field_step_type, 0}, - [634] = + [587] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1724,110 +1656,101 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_preconditions, 6}, {field_reaches, 7}, {field_step_type, 0}, - [642] = - {field_id, 0}, - {field_values, 2}, - {field_values, 3}, - [645] = - {field_cias, 3}, + [595] = {field_cias, 4}, {field_cias, 5}, - {field_detector, 6}, + {field_cias, 6}, + {field_detector, 7}, {field_id, 1}, - {field_preconditions, 7}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [653] = - {field_cias, 3}, + {field_tag, 2}, + {field_tag, 3}, + [603] = {field_cias, 4}, {field_cias, 5}, - {field_detector, 6}, + {field_cias, 6}, {field_id, 1}, - {field_reaches, 7}, + {field_preconditions, 7}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [661] = - {field_cias, 3}, + {field_tag, 2}, + {field_tag, 3}, + [611] = {field_cias, 4}, {field_cias, 5}, + {field_cias, 6}, {field_id, 1}, - {field_preconditions, 6}, {field_reaches, 7}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [669] = - {field_cias, 3}, + {field_tag, 2}, + {field_tag, 3}, + [619] = {field_cias, 4}, {field_cias, 5}, - {field_detector, 7}, + {field_cias, 6}, {field_id, 1}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 6}, - [677] = - {field_cias, 3}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 7}, + [627] = {field_cias, 4}, {field_cias, 5}, + {field_cias, 6}, {field_id, 1}, - {field_preconditions, 7}, + {field_meta, 7}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 6}, - [685] = - {field_cias, 3}, - {field_cias, 4}, - {field_cias, 5}, + {field_tag, 2}, + {field_tag, 3}, + [635] = + {field_detector, 5}, {field_id, 1}, + {field_preconditions, 6}, {field_reaches, 7}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 6}, - [693] = - {field_cias, 3}, - {field_cias, 4}, - {field_cias, 5}, - {field_id, 1}, - {field_meta, 7}, - {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 6}, - [701] = - {field_cias, 3}, - {field_cias, 4}, - {field_cias, 5}, - {field_detector, 7}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 4}, + [643] = + {field_detector, 6}, {field_id, 1}, - {field_meta, 6}, + {field_meta, 5}, + {field_preconditions, 7}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [709] = - {field_cias, 3}, - {field_cias, 4}, - {field_cias, 5}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 4}, + [651] = + {field_detector, 6}, {field_id, 1}, - {field_meta, 6}, - {field_preconditions, 7}, + {field_meta, 5}, + {field_reaches, 7}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [717] = - {field_cias, 3}, - {field_cias, 4}, - {field_cias, 5}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 4}, + [659] = {field_id, 1}, - {field_meta, 6}, + {field_meta, 5}, + {field_preconditions, 6}, {field_reaches, 7}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [725] = + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 4}, + [667] = {field_detector, 5}, {field_id, 1}, {field_meta, 4}, {field_preconditions, 6}, {field_reaches, 7}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 3}, - [733] = + {field_tag, 2}, + {field_tag, 3}, + [675] = + {field_id, 0}, + {field_values, 2}, + {field_values, 3}, + [678] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1837,7 +1760,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_reaches, 8}, {field_step_type, 0}, {field_ttc, 5}, - [742] = + [687] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1847,7 +1770,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_preconditions, 8}, {field_step_type, 0}, {field_ttc, 5}, - [751] = + [696] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1857,7 +1780,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_reaches, 8}, {field_step_type, 0}, {field_ttc, 5}, - [760] = + [705] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1867,7 +1790,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_reaches, 8}, {field_step_type, 0}, {field_ttc, 5}, - [769] = + [714] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1877,107 +1800,117 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_preconditions, 7}, {field_reaches, 8}, {field_step_type, 0}, - [778] = - {field_cias, 3}, - {field_cias, 4}, - {field_cias, 5}, - {field_detector, 6}, - {field_id, 1}, - {field_preconditions, 7}, - {field_reaches, 8}, - {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [787] = - {field_cias, 3}, + [723] = {field_cias, 4}, {field_cias, 5}, + {field_cias, 6}, {field_detector, 7}, {field_id, 1}, {field_preconditions, 8}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 6}, - [796] = - {field_cias, 3}, + {field_tag, 2}, + {field_tag, 3}, + [732] = {field_cias, 4}, {field_cias, 5}, + {field_cias, 6}, {field_detector, 7}, {field_id, 1}, {field_reaches, 8}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 6}, - [805] = - {field_cias, 3}, + {field_tag, 2}, + {field_tag, 3}, + [741] = {field_cias, 4}, {field_cias, 5}, + {field_cias, 6}, {field_id, 1}, {field_preconditions, 7}, {field_reaches, 8}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 6}, - [814] = - {field_cias, 3}, + {field_tag, 2}, + {field_tag, 3}, + [750] = {field_cias, 4}, {field_cias, 5}, + {field_cias, 6}, {field_detector, 8}, {field_id, 1}, - {field_meta, 7}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 6}, - [823] = - {field_cias, 3}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 7}, + [759] = {field_cias, 4}, {field_cias, 5}, + {field_cias, 6}, {field_id, 1}, - {field_meta, 7}, {field_preconditions, 8}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 6}, - [832] = - {field_cias, 3}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 7}, + [768] = {field_cias, 4}, {field_cias, 5}, + {field_cias, 6}, {field_id, 1}, - {field_meta, 7}, {field_reaches, 8}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 6}, - [841] = - {field_cias, 3}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 7}, + [777] = {field_cias, 4}, {field_cias, 5}, - {field_detector, 7}, + {field_cias, 6}, {field_id, 1}, - {field_meta, 6}, - {field_preconditions, 8}, + {field_meta, 8}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [850] = - {field_cias, 3}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 7}, + [786] = {field_cias, 4}, {field_cias, 5}, - {field_detector, 7}, + {field_cias, 6}, + {field_detector, 8}, {field_id, 1}, - {field_meta, 6}, - {field_reaches, 8}, + {field_meta, 7}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [859] = - {field_cias, 3}, + {field_tag, 2}, + {field_tag, 3}, + [795] = {field_cias, 4}, {field_cias, 5}, + {field_cias, 6}, {field_id, 1}, - {field_meta, 6}, + {field_meta, 7}, + {field_preconditions, 8}, + {field_step_type, 0}, + {field_tag, 2}, + {field_tag, 3}, + [804] = + {field_cias, 4}, + {field_cias, 5}, + {field_cias, 6}, + {field_id, 1}, + {field_meta, 7}, + {field_reaches, 8}, + {field_step_type, 0}, + {field_tag, 2}, + {field_tag, 3}, + [813] = + {field_detector, 6}, + {field_id, 1}, + {field_meta, 5}, {field_preconditions, 7}, {field_reaches, 8}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [868] = + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 4}, + [822] = {field_id, 6}, {field_left_field_id, 2}, {field_left_id, 0}, @@ -1985,7 +1918,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_right_field_id, 10}, {field_right_id, 12}, {field_right_mult, 8}, - [875] = + [829] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1996,62 +1929,117 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_reaches, 9}, {field_step_type, 0}, {field_ttc, 5}, - [885] = - {field_cias, 3}, + [839] = {field_cias, 4}, {field_cias, 5}, + {field_cias, 6}, {field_detector, 7}, {field_id, 1}, {field_preconditions, 8}, {field_reaches, 9}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 6}, - [895] = - {field_cias, 3}, + {field_tag, 2}, + {field_tag, 3}, + [849] = {field_cias, 4}, {field_cias, 5}, + {field_cias, 6}, {field_detector, 8}, {field_id, 1}, - {field_meta, 7}, {field_preconditions, 9}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 6}, - [905] = - {field_cias, 3}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 7}, + [859] = {field_cias, 4}, {field_cias, 5}, + {field_cias, 6}, {field_detector, 8}, {field_id, 1}, - {field_meta, 7}, {field_reaches, 9}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 6}, - [915] = - {field_cias, 3}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 7}, + [869] = {field_cias, 4}, {field_cias, 5}, + {field_cias, 6}, {field_id, 1}, - {field_meta, 7}, {field_preconditions, 8}, {field_reaches, 9}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 6}, - [925] = - {field_cias, 3}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 7}, + [879] = {field_cias, 4}, {field_cias, 5}, - {field_detector, 7}, + {field_cias, 6}, + {field_detector, 9}, {field_id, 1}, - {field_meta, 6}, + {field_meta, 8}, + {field_step_type, 0}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 7}, + [889] = + {field_cias, 4}, + {field_cias, 5}, + {field_cias, 6}, + {field_id, 1}, + {field_meta, 8}, + {field_preconditions, 9}, + {field_step_type, 0}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 7}, + [899] = + {field_cias, 4}, + {field_cias, 5}, + {field_cias, 6}, + {field_id, 1}, + {field_meta, 8}, + {field_reaches, 9}, + {field_step_type, 0}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 7}, + [909] = + {field_cias, 4}, + {field_cias, 5}, + {field_cias, 6}, + {field_detector, 8}, + {field_id, 1}, + {field_meta, 7}, + {field_preconditions, 9}, + {field_step_type, 0}, + {field_tag, 2}, + {field_tag, 3}, + [919] = + {field_cias, 4}, + {field_cias, 5}, + {field_cias, 6}, + {field_detector, 8}, + {field_id, 1}, + {field_meta, 7}, + {field_reaches, 9}, + {field_step_type, 0}, + {field_tag, 2}, + {field_tag, 3}, + [929] = + {field_cias, 4}, + {field_cias, 5}, + {field_cias, 6}, + {field_id, 1}, + {field_meta, 7}, {field_preconditions, 8}, {field_reaches, 9}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - [935] = + {field_tag, 2}, + {field_tag, 3}, + [939] = {field_id, 6}, {field_left_field_id, 2}, {field_left_id, 0}, @@ -2060,18 +2048,79 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_right_field_id, 10}, {field_right_id, 12}, {field_right_mult, 8}, - [943] = - {field_cias, 3}, + [947] = + {field_cias, 4}, + {field_cias, 5}, + {field_cias, 6}, + {field_detector, 8}, + {field_id, 1}, + {field_preconditions, 9}, + {field_reaches, 10}, + {field_step_type, 0}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 7}, + [958] = + {field_cias, 4}, + {field_cias, 5}, + {field_cias, 6}, + {field_detector, 9}, + {field_id, 1}, + {field_meta, 8}, + {field_preconditions, 10}, + {field_step_type, 0}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 7}, + [969] = + {field_cias, 4}, + {field_cias, 5}, + {field_cias, 6}, + {field_detector, 9}, + {field_id, 1}, + {field_meta, 8}, + {field_reaches, 10}, + {field_step_type, 0}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 7}, + [980] = + {field_cias, 4}, + {field_cias, 5}, + {field_cias, 6}, + {field_id, 1}, + {field_meta, 8}, + {field_preconditions, 9}, + {field_reaches, 10}, + {field_step_type, 0}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 7}, + [991] = {field_cias, 4}, {field_cias, 5}, + {field_cias, 6}, {field_detector, 8}, {field_id, 1}, {field_meta, 7}, {field_preconditions, 9}, {field_reaches, 10}, {field_step_type, 0}, - {field_tag, 2, .inherited = true}, - {field_ttc, 6}, + {field_tag, 2}, + {field_tag, 3}, + [1002] = + {field_cias, 4}, + {field_cias, 5}, + {field_cias, 6}, + {field_detector, 9}, + {field_id, 1}, + {field_meta, 8}, + {field_preconditions, 10}, + {field_reaches, 11}, + {field_step_type, 0}, + {field_tag, 2}, + {field_tag, 3}, + {field_ttc, 7}, }; static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = { @@ -2194,10 +2243,10 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [105] = 105, [106] = 106, [107] = 107, - [108] = 108, - [109] = 109, - [110] = 30, - [111] = 100, + [108] = 29, + [109] = 83, + [110] = 110, + [111] = 111, [112] = 112, [113] = 113, [114] = 114, @@ -2284,9 +2333,9 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [195] = 195, [196] = 196, [197] = 197, - [198] = 198, + [198] = 194, [199] = 199, - [200] = 198, + [200] = 200, [201] = 201, [202] = 202, [203] = 203, @@ -2296,10 +2345,10 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [207] = 207, [208] = 208, [209] = 209, - [210] = 210, + [210] = 27, [211] = 211, [212] = 212, - [213] = 29, + [213] = 213, [214] = 214, [215] = 215, [216] = 216, @@ -2329,7 +2378,7 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [240] = 240, [241] = 241, [242] = 242, - [243] = 31, + [243] = 243, [244] = 244, [245] = 245, [246] = 246, @@ -2348,7 +2397,7 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [259] = 259, [260] = 260, [261] = 261, - [262] = 262, + [262] = 28, [263] = 263, [264] = 264, [265] = 265, @@ -2404,14 +2453,12 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [315] = 315, [316] = 316, [317] = 317, - [318] = 318, + [318] = 317, [319] = 319, - [320] = 299, + [320] = 309, [321] = 321, - [322] = 304, + [322] = 319, [323] = 323, - [324] = 302, - [325] = 325, }; static bool ts_lex(TSLexer *lexer, TSStateId state) { @@ -2796,7 +2843,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { if (('0' <= lookahead && lookahead <= '9')) ADVANCE(70); END_STATE(); case 71: - ACCEPT_TOKEN(sym_identity); + ACCEPT_TOKEN(sym_identifier); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || @@ -2988,10 +3035,10 @@ static const TSLexerMode ts_lex_modes[STATE_COUNT] = { [3] = {.lex_state = 1}, [4] = {.lex_state = 1}, [5] = {.lex_state = 1}, - [6] = {.lex_state = 1}, + [6] = {.lex_state = 24}, [7] = {.lex_state = 1}, [8] = {.lex_state = 1}, - [9] = {.lex_state = 24}, + [9] = {.lex_state = 1}, [10] = {.lex_state = 1}, [11] = {.lex_state = 1}, [12] = {.lex_state = 1}, @@ -3002,7 +3049,7 @@ static const TSLexerMode ts_lex_modes[STATE_COUNT] = { [17] = {.lex_state = 1}, [18] = {.lex_state = 1}, [19] = {.lex_state = 24}, - [20] = {.lex_state = 1}, + [20] = {.lex_state = 24}, [21] = {.lex_state = 24}, [22] = {.lex_state = 24}, [23] = {.lex_state = 24}, @@ -3010,10 +3057,10 @@ static const TSLexerMode ts_lex_modes[STATE_COUNT] = { [25] = {.lex_state = 24}, [26] = {.lex_state = 24}, [27] = {.lex_state = 1}, - [28] = {.lex_state = 24}, + [28] = {.lex_state = 1}, [29] = {.lex_state = 1}, - [30] = {.lex_state = 1}, - [31] = {.lex_state = 1}, + [30] = {.lex_state = 24}, + [31] = {.lex_state = 24}, [32] = {.lex_state = 24}, [33] = {.lex_state = 24}, [34] = {.lex_state = 24}, @@ -3048,7 +3095,7 @@ static const TSLexerMode ts_lex_modes[STATE_COUNT] = { [63] = {.lex_state = 24}, [64] = {.lex_state = 24}, [65] = {.lex_state = 24}, - [66] = {.lex_state = 24}, + [66] = {.lex_state = 4}, [67] = {.lex_state = 24}, [68] = {.lex_state = 24}, [69] = {.lex_state = 24}, @@ -3057,21 +3104,21 @@ static const TSLexerMode ts_lex_modes[STATE_COUNT] = { [72] = {.lex_state = 24}, [73] = {.lex_state = 24}, [74] = {.lex_state = 24}, - [75] = {.lex_state = 4}, - [76] = {.lex_state = 24}, + [75] = {.lex_state = 24}, + [76] = {.lex_state = 4}, [77] = {.lex_state = 24}, [78] = {.lex_state = 24}, [79] = {.lex_state = 24}, [80] = {.lex_state = 24}, [81] = {.lex_state = 24}, [82] = {.lex_state = 24}, - [83] = {.lex_state = 24}, + [83] = {.lex_state = 4}, [84] = {.lex_state = 24}, [85] = {.lex_state = 24}, - [86] = {.lex_state = 24}, - [87] = {.lex_state = 4}, + [86] = {.lex_state = 4}, + [87] = {.lex_state = 24}, [88] = {.lex_state = 24}, - [89] = {.lex_state = 4}, + [89] = {.lex_state = 24}, [90] = {.lex_state = 24}, [91] = {.lex_state = 24}, [92] = {.lex_state = 24}, @@ -3082,30 +3129,30 @@ static const TSLexerMode ts_lex_modes[STATE_COUNT] = { [97] = {.lex_state = 24}, [98] = {.lex_state = 24}, [99] = {.lex_state = 24}, - [100] = {.lex_state = 4}, + [100] = {.lex_state = 24}, [101] = {.lex_state = 24}, [102] = {.lex_state = 24}, [103] = {.lex_state = 24}, [104] = {.lex_state = 24}, [105] = {.lex_state = 24}, [106] = {.lex_state = 24}, - [107] = {.lex_state = 24}, + [107] = {.lex_state = 4}, [108] = {.lex_state = 24}, - [109] = {.lex_state = 24}, + [109] = {.lex_state = 4}, [110] = {.lex_state = 24}, - [111] = {.lex_state = 4}, - [112] = {.lex_state = 4}, + [111] = {.lex_state = 24}, + [112] = {.lex_state = 24}, [113] = {.lex_state = 24}, [114] = {.lex_state = 24}, [115] = {.lex_state = 24}, [116] = {.lex_state = 24}, [117] = {.lex_state = 24}, [118] = {.lex_state = 24}, - [119] = {.lex_state = 24}, + [119] = {.lex_state = 4}, [120] = {.lex_state = 24}, [121] = {.lex_state = 24}, [122] = {.lex_state = 24}, - [123] = {.lex_state = 4}, + [123] = {.lex_state = 24}, [124] = {.lex_state = 24}, [125] = {.lex_state = 24}, [126] = {.lex_state = 24}, @@ -3120,11 +3167,11 @@ static const TSLexerMode ts_lex_modes[STATE_COUNT] = { [135] = {.lex_state = 24}, [136] = {.lex_state = 24}, [137] = {.lex_state = 24}, - [138] = {.lex_state = 24}, + [138] = {.lex_state = 4}, [139] = {.lex_state = 4}, [140] = {.lex_state = 4}, [141] = {.lex_state = 4}, - [142] = {.lex_state = 4}, + [142] = {.lex_state = 24}, [143] = {.lex_state = 24}, [144] = {.lex_state = 24}, [145] = {.lex_state = 24}, @@ -3139,8 +3186,8 @@ static const TSLexerMode ts_lex_modes[STATE_COUNT] = { [154] = {.lex_state = 24}, [155] = {.lex_state = 24}, [156] = {.lex_state = 24}, - [157] = {.lex_state = 24}, - [158] = {.lex_state = 4}, + [157] = {.lex_state = 4}, + [158] = {.lex_state = 24}, [159] = {.lex_state = 24}, [160] = {.lex_state = 24}, [161] = {.lex_state = 24}, @@ -3153,8 +3200,8 @@ static const TSLexerMode ts_lex_modes[STATE_COUNT] = { [168] = {.lex_state = 24}, [169] = {.lex_state = 24}, [170] = {.lex_state = 24}, - [171] = {.lex_state = 24}, - [172] = {.lex_state = 4}, + [171] = {.lex_state = 4}, + [172] = {.lex_state = 24}, [173] = {.lex_state = 24}, [174] = {.lex_state = 24}, [175] = {.lex_state = 24}, @@ -3176,13 +3223,13 @@ static const TSLexerMode ts_lex_modes[STATE_COUNT] = { [191] = {.lex_state = 24}, [192] = {.lex_state = 24}, [193] = {.lex_state = 24}, - [194] = {.lex_state = 24}, - [195] = {.lex_state = 24}, + [194] = {.lex_state = 4}, + [195] = {.lex_state = 0}, [196] = {.lex_state = 4}, [197] = {.lex_state = 0}, [198] = {.lex_state = 4}, - [199] = {.lex_state = 0}, - [200] = {.lex_state = 4}, + [199] = {.lex_state = 24}, + [200] = {.lex_state = 24}, [201] = {.lex_state = 24}, [202] = {.lex_state = 24}, [203] = {.lex_state = 24}, @@ -3203,117 +3250,115 @@ static const TSLexerMode ts_lex_modes[STATE_COUNT] = { [218] = {.lex_state = 24}, [219] = {.lex_state = 24}, [220] = {.lex_state = 24}, - [221] = {.lex_state = 24}, + [221] = {.lex_state = 0}, [222] = {.lex_state = 24}, [223] = {.lex_state = 24}, - [224] = {.lex_state = 0}, + [224] = {.lex_state = 24}, [225] = {.lex_state = 24}, [226] = {.lex_state = 24}, [227] = {.lex_state = 24}, [228] = {.lex_state = 24}, [229] = {.lex_state = 24}, [230] = {.lex_state = 24}, - [231] = {.lex_state = 24}, - [232] = {.lex_state = 24}, - [233] = {.lex_state = 24}, + [231] = {.lex_state = 4}, + [232] = {.lex_state = 0}, + [233] = {.lex_state = 0}, [234] = {.lex_state = 24}, [235] = {.lex_state = 24}, [236] = {.lex_state = 24}, - [237] = {.lex_state = 0}, - [238] = {.lex_state = 4}, - [239] = {.lex_state = 0}, - [240] = {.lex_state = 4}, - [241] = {.lex_state = 24}, - [242] = {.lex_state = 0}, - [243] = {.lex_state = 24}, - [244] = {.lex_state = 4}, - [245] = {.lex_state = 4}, + [237] = {.lex_state = 24}, + [238] = {.lex_state = 0}, + [239] = {.lex_state = 4}, + [240] = {.lex_state = 24}, + [241] = {.lex_state = 0}, + [242] = {.lex_state = 24}, + [243] = {.lex_state = 4}, + [244] = {.lex_state = 24}, + [245] = {.lex_state = 24}, [246] = {.lex_state = 24}, - [247] = {.lex_state = 24}, - [248] = {.lex_state = 24}, - [249] = {.lex_state = 24}, + [247] = {.lex_state = 4}, + [248] = {.lex_state = 0}, + [249] = {.lex_state = 0}, [250] = {.lex_state = 0}, [251] = {.lex_state = 24}, - [252] = {.lex_state = 0}, + [252] = {.lex_state = 24}, [253] = {.lex_state = 24}, [254] = {.lex_state = 24}, [255] = {.lex_state = 24}, [256] = {.lex_state = 24}, [257] = {.lex_state = 0}, - [258] = {.lex_state = 24}, + [258] = {.lex_state = 0}, [259] = {.lex_state = 24}, [260] = {.lex_state = 24}, - [261] = {.lex_state = 0}, - [262] = {.lex_state = 0}, + [261] = {.lex_state = 24}, + [262] = {.lex_state = 24}, [263] = {.lex_state = 24}, - [264] = {.lex_state = 24}, + [264] = {.lex_state = 15}, [265] = {.lex_state = 0}, - [266] = {.lex_state = 0}, - [267] = {.lex_state = 0}, - [268] = {.lex_state = 4}, - [269] = {.lex_state = 24}, - [270] = {.lex_state = 24}, - [271] = {.lex_state = 24}, - [272] = {.lex_state = 15}, - [273] = {.lex_state = 4}, - [274] = {.lex_state = 0}, + [266] = {.lex_state = 24}, + [267] = {.lex_state = 4}, + [268] = {.lex_state = 0}, + [269] = {.lex_state = 15}, + [270] = {.lex_state = 0}, + [271] = {.lex_state = 0}, + [272] = {.lex_state = 4}, + [273] = {.lex_state = 24}, + [274] = {.lex_state = 24}, [275] = {.lex_state = 0}, - [276] = {.lex_state = 15}, - [277] = {.lex_state = 0}, + [276] = {.lex_state = 24}, + [277] = {.lex_state = 24}, [278] = {.lex_state = 0}, - [279] = {.lex_state = 0}, - [280] = {.lex_state = 0}, - [281] = {.lex_state = 0}, + [279] = {.lex_state = 24}, + [280] = {.lex_state = 24}, + [281] = {.lex_state = 24}, [282] = {.lex_state = 0}, - [283] = {.lex_state = 0}, - [284] = {.lex_state = 24}, - [285] = {.lex_state = 24}, + [283] = {.lex_state = 24}, + [284] = {.lex_state = 0}, + [285] = {.lex_state = 0}, [286] = {.lex_state = 0}, [287] = {.lex_state = 0}, - [288] = {.lex_state = 0}, + [288] = {.lex_state = 24}, [289] = {.lex_state = 0}, [290] = {.lex_state = 24}, - [291] = {.lex_state = 4}, - [292] = {.lex_state = 24}, - [293] = {.lex_state = 0}, - [294] = {.lex_state = 24}, + [291] = {.lex_state = 0}, + [292] = {.lex_state = 0}, + [293] = {.lex_state = 24}, + [294] = {.lex_state = 0}, [295] = {.lex_state = 0}, - [296] = {.lex_state = 24}, - [297] = {.lex_state = 15}, + [296] = {.lex_state = 0}, + [297] = {.lex_state = 24}, [298] = {.lex_state = 0}, - [299] = {.lex_state = 0}, - [300] = {.lex_state = 15}, + [299] = {.lex_state = 24}, + [300] = {.lex_state = 0}, [301] = {.lex_state = 0}, [302] = {.lex_state = 24}, [303] = {.lex_state = 24}, - [304] = {.lex_state = 0}, - [305] = {.lex_state = 0}, - [306] = {.lex_state = 24}, + [304] = {.lex_state = 24}, + [305] = {.lex_state = 15}, + [306] = {.lex_state = 0}, [307] = {.lex_state = 0}, [308] = {.lex_state = 24}, - [309] = {.lex_state = 24}, - [310] = {.lex_state = 24}, - [311] = {.lex_state = 24}, + [309] = {.lex_state = 0}, + [310] = {.lex_state = 0}, + [311] = {.lex_state = 0}, [312] = {.lex_state = 0}, [313] = {.lex_state = 0}, [314] = {.lex_state = 24}, - [315] = {.lex_state = 24}, - [316] = {.lex_state = 0}, - [317] = {.lex_state = 24}, + [315] = {.lex_state = 0}, + [316] = {.lex_state = 4}, + [317] = {.lex_state = 0}, [318] = {.lex_state = 0}, [319] = {.lex_state = 24}, [320] = {.lex_state = 0}, [321] = {.lex_state = 24}, - [322] = {.lex_state = 0}, - [323] = {.lex_state = 0}, - [324] = {.lex_state = 24}, - [325] = {.lex_state = 0}, + [322] = {.lex_state = 24}, + [323] = {.lex_state = 15}, }; static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [STATE(0)] = { [ts_builtin_sym_end] = ACTIONS(1), - [sym_identity] = ACTIONS(1), + [sym_identifier] = ACTIONS(1), [sym_comment] = ACTIONS(3), [anon_sym_include] = ACTIONS(1), [anon_sym_category] = ACTIONS(1), @@ -3358,13 +3403,13 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [sym_cia] = ACTIONS(1), }, [STATE(1)] = { - [sym_source_file] = STATE(288), - [sym_declaration] = STATE(55), - [sym_include_declaration] = STATE(209), - [sym_category_declaration] = STATE(209), - [sym_define_declaration] = STATE(209), - [sym_associations_declaration] = STATE(209), - [aux_sym_source_file_repeat1] = STATE(55), + [sym_source_file] = STATE(291), + [sym_declaration] = STATE(64), + [sym_include_declaration] = STATE(203), + [sym_category_declaration] = STATE(203), + [sym_define_declaration] = STATE(203), + [sym_associations_declaration] = STATE(203), + [aux_sym_source_file_repeat1] = STATE(64), [ts_builtin_sym_end] = ACTIONS(5), [sym_comment] = ACTIONS(3), [anon_sym_include] = ACTIONS(7), @@ -3375,9 +3420,9 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { }; static const uint16_t ts_small_parse_table[] = { - [0] = 17, + [0] = 16, ACTIONS(15), 1, - sym_identity, + sym_identifier, ACTIONS(17), 1, sym_comment, ACTIONS(19), 1, @@ -3394,13 +3439,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, STATE(11), 1, sym_ttc, - STATE(20), 1, - aux_sym_attack_step_repeat1, - STATE(44), 1, + STATE(46), 1, sym_detector, - STATE(68), 1, + STATE(92), 1, sym_preconditions, - STATE(126), 1, + STATE(193), 1, sym_reaching, ACTIONS(23), 2, anon_sym_let, @@ -3408,7 +3451,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - STATE(10), 2, + STATE(8), 2, sym_meta, aux_sym_category_declaration_repeat1, ACTIONS(21), 5, @@ -3417,13 +3460,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [59] = 17, + [56] = 15, ACTIONS(15), 1, - sym_identity, + sym_identifier, ACTIONS(17), 1, sym_comment, - ACTIONS(25), 1, - anon_sym_AT, ACTIONS(27), 1, anon_sym_BANG, ACTIONS(29), 1, @@ -3434,15 +3475,13 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(37), 1, anon_sym_LBRACE, - STATE(2), 1, - aux_sym_attack_step_repeat1, - STATE(6), 1, + STATE(10), 1, sym_ttc, - STATE(39), 1, + STATE(45), 1, sym_detector, - STATE(69), 1, + STATE(89), 1, sym_preconditions, - STATE(151), 1, + STATE(126), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, @@ -3459,9 +3498,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [118] = 14, + [109] = 14, ACTIONS(15), 1, - sym_identity, + sym_identifier, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -3472,13 +3511,13 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LT_DASH, ACTIONS(35), 1, anon_sym_LBRACK, - STATE(16), 1, + STATE(13), 1, sym_ttc, - STATE(38), 1, + STATE(51), 1, sym_detector, - STATE(71), 1, + STATE(106), 1, sym_preconditions, - STATE(138), 1, + STATE(133), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, @@ -3486,7 +3525,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(45), 2, anon_sym_let, anon_sym_E, - STATE(17), 2, + STATE(14), 2, sym_meta, aux_sym_category_declaration_repeat1, ACTIONS(43), 5, @@ -3495,9 +3534,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [168] = 14, + [159] = 14, ACTIONS(15), 1, - sym_identity, + sym_identifier, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -3508,13 +3547,13 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LT_DASH, ACTIONS(35), 1, anon_sym_LBRACK, - STATE(13), 1, + STATE(12), 1, sym_ttc, - STATE(47), 1, + STATE(44), 1, sym_detector, - STATE(88), 1, + STATE(93), 1, sym_preconditions, - STATE(160), 1, + STATE(165), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, @@ -3522,7 +3561,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(49), 2, anon_sym_let, anon_sym_E, - STATE(15), 2, + STATE(16), 2, sym_meta, aux_sym_category_declaration_repeat1, ACTIONS(47), 5, @@ -3531,9 +3570,33 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [218] = 12, + [209] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_LPAREN, + ACTIONS(55), 1, + anon_sym_DASH, + ACTIONS(51), 16, + anon_sym_RBRACE, + anon_sym_let, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_POUND, + anon_sym_E, + anon_sym_BANGE, + anon_sym_COMMA, + anon_sym_DOT, + anon_sym_RPAREN, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + anon_sym_LBRACK, + anon_sym_STAR, + anon_sym_BSLASH_SLASH, + anon_sym_SLASH_BSLASH, + [237] = 12, ACTIONS(15), 1, - sym_identity, + sym_identifier, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -3542,30 +3605,30 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(37), 1, + STATE(33), 1, sym_detector, - STATE(93), 1, + STATE(72), 1, sym_preconditions, - STATE(161), 1, + STATE(137), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(53), 2, + ACTIONS(59), 2, anon_sym_let, anon_sym_E, - STATE(8), 2, + STATE(27), 2, sym_meta, aux_sym_category_declaration_repeat1, - ACTIONS(51), 5, + ACTIONS(57), 5, anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [262] = 12, + [281] = 12, ACTIONS(15), 1, - sym_identity, + sym_identifier, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -3574,30 +3637,30 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(40), 1, + STATE(48), 1, sym_detector, - STATE(108), 1, + STATE(78), 1, sym_preconditions, - STATE(125), 1, + STATE(124), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(57), 2, + ACTIONS(63), 2, anon_sym_let, anon_sym_E, - STATE(29), 2, + STATE(27), 2, sym_meta, aux_sym_category_declaration_repeat1, - ACTIONS(55), 5, + ACTIONS(61), 5, anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [306] = 12, + [325] = 12, ACTIONS(15), 1, - sym_identity, + sym_identifier, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -3606,55 +3669,31 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(34), 1, + STATE(36), 1, sym_detector, - STATE(97), 1, + STATE(103), 1, sym_preconditions, - STATE(131), 1, + STATE(130), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(61), 2, + ACTIONS(67), 2, anon_sym_let, anon_sym_E, - STATE(29), 2, + STATE(27), 2, sym_meta, aux_sym_category_declaration_repeat1, - ACTIONS(59), 5, + ACTIONS(65), 5, anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [350] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(65), 1, - anon_sym_LPAREN, - ACTIONS(67), 1, - anon_sym_DASH, - ACTIONS(63), 16, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - anon_sym_COMMA, - anon_sym_DOT, - anon_sym_RPAREN, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - anon_sym_LBRACK, - anon_sym_STAR, - anon_sym_BSLASH_SLASH, - anon_sym_SLASH_BSLASH, - [378] = 12, - ACTIONS(15), 1, - sym_identity, - ACTIONS(17), 1, + [369] = 12, + ACTIONS(15), 1, + sym_identifier, + ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, anon_sym_BANG, @@ -3662,11 +3701,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(35), 1, + STATE(34), 1, sym_detector, - STATE(109), 1, + STATE(69), 1, sym_preconditions, - STATE(137), 1, + STATE(136), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, @@ -3674,7 +3713,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(71), 2, anon_sym_let, anon_sym_E, - STATE(29), 2, + STATE(15), 2, sym_meta, aux_sym_category_declaration_repeat1, ACTIONS(69), 5, @@ -3683,9 +3722,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [422] = 12, + [413] = 12, ACTIONS(15), 1, - sym_identity, + sym_identifier, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -3694,11 +3733,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(36), 1, + STATE(40), 1, sym_detector, - STATE(104), 1, + STATE(71), 1, sym_preconditions, - STATE(136), 1, + STATE(149), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, @@ -3706,7 +3745,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(75), 2, anon_sym_let, anon_sym_E, - STATE(12), 2, + STATE(9), 2, sym_meta, aux_sym_category_declaration_repeat1, ACTIONS(73), 5, @@ -3715,9 +3754,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [466] = 12, + [457] = 12, ACTIONS(15), 1, - sym_identity, + sym_identifier, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -3726,11 +3765,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(43), 1, + STATE(47), 1, sym_detector, - STATE(79), 1, + STATE(99), 1, sym_preconditions, - STATE(150), 1, + STATE(178), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, @@ -3738,7 +3777,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(79), 2, anon_sym_let, anon_sym_E, - STATE(29), 2, + STATE(18), 2, sym_meta, aux_sym_category_declaration_repeat1, ACTIONS(77), 5, @@ -3747,9 +3786,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [510] = 12, + [501] = 12, ACTIONS(15), 1, - sym_identity, + sym_identifier, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -3758,11 +3797,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(49), 1, + STATE(37), 1, sym_detector, - STATE(67), 1, + STATE(80), 1, sym_preconditions, - STATE(175), 1, + STATE(148), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, @@ -3770,7 +3809,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(83), 2, anon_sym_let, anon_sym_E, - STATE(18), 2, + STATE(17), 2, sym_meta, aux_sym_category_declaration_repeat1, ACTIONS(81), 5, @@ -3779,9 +3818,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [554] = 12, + [545] = 12, ACTIONS(15), 1, - sym_identity, + sym_identifier, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -3790,11 +3829,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(48), 1, + STATE(39), 1, sym_detector, - STATE(94), 1, + STATE(81), 1, sym_preconditions, - STATE(169), 1, + STATE(150), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, @@ -3802,7 +3841,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(87), 2, anon_sym_let, anon_sym_E, - STATE(29), 2, + STATE(27), 2, sym_meta, aux_sym_category_declaration_repeat1, ACTIONS(85), 5, @@ -3811,9 +3850,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [598] = 12, + [589] = 12, ACTIONS(15), 1, - sym_identity, + sym_identifier, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -3822,11 +3861,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(51), 1, + STATE(41), 1, sym_detector, - STATE(101), 1, + STATE(84), 1, sym_preconditions, - STATE(176), 1, + STATE(154), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, @@ -3834,7 +3873,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(91), 2, anon_sym_let, anon_sym_E, - STATE(29), 2, + STATE(27), 2, sym_meta, aux_sym_category_declaration_repeat1, ACTIONS(89), 5, @@ -3843,9 +3882,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [642] = 12, + [633] = 12, ACTIONS(15), 1, - sym_identity, + sym_identifier, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -3854,11 +3893,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(46), 1, + STATE(49), 1, sym_detector, - STATE(83), 1, + STATE(101), 1, sym_preconditions, - STATE(156), 1, + STATE(179), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, @@ -3866,7 +3905,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(95), 2, anon_sym_let, anon_sym_E, - STATE(14), 2, + STATE(27), 2, sym_meta, aux_sym_category_declaration_repeat1, ACTIONS(93), 5, @@ -3875,9 +3914,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [686] = 12, + [677] = 12, ACTIONS(15), 1, - sym_identity, + sym_identifier, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -3886,11 +3925,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(45), 1, + STATE(43), 1, sym_detector, - STATE(84), 1, + STATE(90), 1, sym_preconditions, - STATE(157), 1, + STATE(162), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, @@ -3898,7 +3937,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(99), 2, anon_sym_let, anon_sym_E, - STATE(29), 2, + STATE(27), 2, sym_meta, aux_sym_category_declaration_repeat1, ACTIONS(97), 5, @@ -3907,9 +3946,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [730] = 12, + [721] = 12, ACTIONS(15), 1, - sym_identity, + sym_identifier, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -3918,9 +3957,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(52), 1, + STATE(50), 1, sym_detector, - STATE(105), 1, + STATE(104), 1, sym_preconditions, STATE(185), 1, sym_reaching, @@ -3930,7 +3969,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(103), 2, anon_sym_let, anon_sym_E, - STATE(29), 2, + STATE(27), 2, sym_meta, aux_sym_category_declaration_repeat1, ACTIONS(101), 5, @@ -3939,7 +3978,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [774] = 3, + [765] = 3, ACTIONS(3), 1, sym_comment, ACTIONS(107), 1, @@ -3961,42 +4000,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_STAR, anon_sym_BSLASH_SLASH, anon_sym_SLASH_BSLASH, - [799] = 5, - ACTIONS(17), 1, - sym_comment, - ACTIONS(113), 1, - anon_sym_AT, - STATE(20), 1, - aux_sym_attack_step_repeat1, - ACTIONS(109), 4, - anon_sym_let, - anon_sym_E, - anon_sym_BANG, - sym_identity, - ACTIONS(111), 11, - anon_sym_LBRACE, - anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, - anon_sym_SLASH_SLASH_BANG, - anon_sym_LT_DASH, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - anon_sym_LBRACK, - [828] = 6, + [790] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(118), 1, - anon_sym_DOT, - ACTIONS(120), 1, - anon_sym_LBRACK, - ACTIONS(122), 1, + ACTIONS(111), 1, anon_sym_DASH, - ACTIONS(124), 1, - anon_sym_STAR, - ACTIONS(116), 13, + ACTIONS(109), 16, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4005,17 +4014,20 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_E, anon_sym_BANGE, anon_sym_COMMA, + anon_sym_DOT, anon_sym_RPAREN, anon_sym_PLUS_GT, anon_sym_DASH_GT, + anon_sym_LBRACK, + anon_sym_STAR, anon_sym_BSLASH_SLASH, anon_sym_SLASH_BSLASH, - [859] = 3, + [815] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(128), 1, + ACTIONS(115), 1, anon_sym_DASH, - ACTIONS(126), 16, + ACTIONS(113), 16, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4032,12 +4044,20 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_STAR, anon_sym_BSLASH_SLASH, anon_sym_SLASH_BSLASH, - [884] = 3, + [840] = 7, ACTIONS(3), 1, sym_comment, - ACTIONS(122), 1, + ACTIONS(119), 1, + anon_sym_DOT, + ACTIONS(121), 1, + anon_sym_LBRACK, + ACTIONS(123), 1, anon_sym_DASH, - ACTIONS(116), 16, + ACTIONS(125), 1, + anon_sym_STAR, + ACTIONS(127), 1, + anon_sym_SLASH_BSLASH, + ACTIONS(117), 12, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4046,20 +4066,22 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_E, anon_sym_BANGE, anon_sym_COMMA, - anon_sym_DOT, anon_sym_RPAREN, anon_sym_PLUS_GT, anon_sym_DASH_GT, - anon_sym_LBRACK, - anon_sym_STAR, anon_sym_BSLASH_SLASH, - anon_sym_SLASH_BSLASH, - [909] = 3, + [873] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(132), 1, + ACTIONS(119), 1, + anon_sym_DOT, + ACTIONS(121), 1, + anon_sym_LBRACK, + ACTIONS(125), 1, + anon_sym_STAR, + ACTIONS(129), 1, anon_sym_DASH, - ACTIONS(130), 16, + ACTIONS(117), 13, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4068,28 +4090,17 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_E, anon_sym_BANGE, anon_sym_COMMA, - anon_sym_DOT, anon_sym_RPAREN, anon_sym_PLUS_GT, anon_sym_DASH_GT, - anon_sym_LBRACK, - anon_sym_STAR, anon_sym_BSLASH_SLASH, anon_sym_SLASH_BSLASH, - [934] = 7, + [904] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(118), 1, - anon_sym_DOT, - ACTIONS(120), 1, - anon_sym_LBRACK, - ACTIONS(124), 1, - anon_sym_STAR, - ACTIONS(134), 1, + ACTIONS(133), 1, anon_sym_DASH, - ACTIONS(136), 1, - anon_sym_SLASH_BSLASH, - ACTIONS(116), 12, + ACTIONS(131), 16, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4098,16 +4109,20 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_E, anon_sym_BANGE, anon_sym_COMMA, + anon_sym_DOT, anon_sym_RPAREN, anon_sym_PLUS_GT, anon_sym_DASH_GT, + anon_sym_LBRACK, + anon_sym_STAR, anon_sym_BSLASH_SLASH, - [967] = 3, + anon_sym_SLASH_BSLASH, + [929] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(140), 1, + ACTIONS(129), 1, anon_sym_DASH, - ACTIONS(138), 16, + ACTIONS(117), 16, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4124,43 +4139,22 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_STAR, anon_sym_BSLASH_SLASH, anon_sym_SLASH_BSLASH, - [992] = 3, - ACTIONS(17), 1, - sym_comment, - ACTIONS(142), 4, - anon_sym_let, - anon_sym_E, - anon_sym_BANG, - sym_identity, - ACTIONS(144), 12, - anon_sym_LBRACE, - anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, - anon_sym_AT, - anon_sym_SLASH_SLASH_BANG, - anon_sym_LT_DASH, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - anon_sym_LBRACK, - [1016] = 8, + [954] = 8, ACTIONS(3), 1, sym_comment, - ACTIONS(118), 1, + ACTIONS(119), 1, anon_sym_DOT, - ACTIONS(120), 1, + ACTIONS(121), 1, anon_sym_LBRACK, - ACTIONS(124), 1, - anon_sym_STAR, - ACTIONS(134), 1, + ACTIONS(123), 1, anon_sym_DASH, - ACTIONS(136), 1, + ACTIONS(125), 1, + anon_sym_STAR, + ACTIONS(127), 1, anon_sym_SLASH_BSLASH, - ACTIONS(148), 1, + ACTIONS(137), 1, anon_sym_BSLASH_SLASH, - ACTIONS(146), 10, + ACTIONS(135), 10, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4171,19 +4165,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_COMMA, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1050] = 5, + [988] = 5, ACTIONS(17), 1, sym_comment, - ACTIONS(150), 1, - sym_identity, - STATE(29), 2, + ACTIONS(139), 1, + sym_identifier, + STATE(27), 2, sym_meta, aux_sym_category_declaration_repeat1, - ACTIONS(155), 3, + ACTIONS(144), 3, anon_sym_let, anon_sym_E, anon_sym_BANG, - ACTIONS(153), 9, + ACTIONS(142), 9, anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, @@ -4193,15 +4187,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LT_DASH, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1077] = 3, + [1015] = 3, ACTIONS(17), 1, sym_comment, - ACTIONS(157), 4, + ACTIONS(146), 4, anon_sym_let, anon_sym_E, anon_sym_BANG, - sym_identity, - ACTIONS(159), 9, + sym_identifier, + ACTIONS(148), 9, anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, @@ -4211,15 +4205,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LT_DASH, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1098] = 3, + [1036] = 3, ACTIONS(17), 1, sym_comment, - ACTIONS(161), 4, + ACTIONS(150), 4, anon_sym_let, anon_sym_E, anon_sym_BANG, - sym_identity, - ACTIONS(163), 9, + sym_identifier, + ACTIONS(152), 9, anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, @@ -4229,19 +4223,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LT_DASH, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1119] = 6, + [1057] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(165), 1, - sym_identity, - ACTIONS(171), 1, + ACTIONS(154), 1, + sym_identifier, + ACTIONS(160), 1, anon_sym_LBRACK, - STATE(78), 1, + STATE(100), 1, sym_ttc, - ACTIONS(169), 2, + ACTIONS(158), 2, anon_sym_let, anon_sym_E, - ACTIONS(167), 8, + ACTIONS(156), 8, anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, @@ -4250,40 +4244,58 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LT_DASH, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1146] = 6, + [1084] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(171), 1, + ACTIONS(160), 1, anon_sym_LBRACK, - ACTIONS(173), 1, - sym_identity, - STATE(72), 1, + ACTIONS(162), 1, + sym_identifier, + STATE(73), 1, sym_ttc, - ACTIONS(177), 2, + ACTIONS(166), 2, anon_sym_let, anon_sym_E, - ACTIONS(175), 8, + ACTIONS(164), 8, + anon_sym_RBRACE, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_POUND, + anon_sym_BANGE, + anon_sym_LT_DASH, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + [1111] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(160), 1, + anon_sym_LBRACK, + STATE(74), 1, + sym_ttc, + ACTIONS(168), 10, anon_sym_RBRACE, + anon_sym_let, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, + anon_sym_E, anon_sym_BANGE, anon_sym_LT_DASH, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1173] = 6, + [1133] = 6, ACTIONS(3), 1, sym_comment, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(76), 1, + STATE(85), 1, sym_preconditions, - STATE(144), 1, + STATE(155), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(179), 7, + ACTIONS(170), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4291,19 +4303,34 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1199] = 6, + [1159] = 6, ACTIONS(3), 1, sym_comment, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(80), 1, + STATE(82), 1, sym_preconditions, STATE(152), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(181), 7, + ACTIONS(172), 7, + anon_sym_RBRACE, + anon_sym_let, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_POUND, + anon_sym_E, + anon_sym_BANGE, + [1185] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(160), 1, + anon_sym_LBRACK, + STATE(87), 1, + sym_ttc, + ACTIONS(174), 10, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4311,19 +4338,22 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1225] = 6, + anon_sym_LT_DASH, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + [1207] = 6, ACTIONS(3), 1, sym_comment, ACTIONS(31), 1, anon_sym_LT_DASH, STATE(77), 1, sym_preconditions, - STATE(148), 1, + STATE(143), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(183), 7, + ACTIONS(176), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4331,19 +4361,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1251] = 6, + [1233] = 6, ACTIONS(3), 1, sym_comment, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(90), 1, + STATE(88), 1, sym_preconditions, - STATE(129), 1, + STATE(160), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(185), 7, + ACTIONS(178), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4351,19 +4381,36 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1277] = 6, + [1259] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(180), 3, + anon_sym_let, + anon_sym_E, + sym_identifier, + ACTIONS(182), 9, + anon_sym_RBRACE, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_POUND, + anon_sym_BANGE, + anon_sym_LT_DASH, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + anon_sym_LBRACK, + [1279] = 6, ACTIONS(3), 1, sym_comment, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(81), 1, + STATE(91), 1, sym_preconditions, - STATE(154), 1, + STATE(163), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(187), 7, + ACTIONS(184), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4371,19 +4418,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1303] = 6, + [1305] = 6, ACTIONS(3), 1, sym_comment, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(82), 1, + STATE(110), 1, sym_preconditions, - STATE(192), 1, + STATE(128), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(189), 7, + ACTIONS(186), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4391,19 +4438,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1329] = 6, + [1331] = 6, ACTIONS(3), 1, sym_comment, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(98), 1, + STATE(96), 1, sym_preconditions, - STATE(132), 1, + STATE(168), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(191), 7, + ACTIONS(188), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4411,14 +4458,14 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1355] = 3, + [1357] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(193), 3, + ACTIONS(190), 3, anon_sym_let, anon_sym_E, - sym_identity, - ACTIONS(195), 9, + sym_identifier, + ACTIONS(192), 9, anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, @@ -4428,37 +4475,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PLUS_GT, anon_sym_DASH_GT, anon_sym_LBRACK, - [1375] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(171), 1, - anon_sym_LBRACK, - STATE(86), 1, - sym_ttc, - ACTIONS(197), 10, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - anon_sym_LT_DASH, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - [1397] = 6, + [1377] = 6, ACTIONS(3), 1, sym_comment, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(91), 1, + STATE(97), 1, sym_preconditions, - STATE(162), 1, + STATE(173), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(199), 7, + ACTIONS(194), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4466,19 +4495,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1423] = 6, + [1403] = 6, ACTIONS(3), 1, sym_comment, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(99), 1, + STATE(98), 1, sym_preconditions, - STATE(134), 1, + STATE(176), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(201), 7, + ACTIONS(196), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4486,19 +4515,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1449] = 6, + [1429] = 6, ACTIONS(3), 1, sym_comment, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(95), 1, + STATE(67), 1, sym_preconditions, - STATE(170), 1, + STATE(134), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(203), 7, + ACTIONS(198), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4506,19 +4535,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1475] = 6, + [1455] = 6, ACTIONS(3), 1, sym_comment, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(92), 1, + STATE(68), 1, sym_preconditions, - STATE(166), 1, + STATE(192), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(205), 7, + ACTIONS(200), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4526,19 +4555,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1501] = 6, + [1481] = 6, ACTIONS(3), 1, sym_comment, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(96), 1, + STATE(102), 1, sym_preconditions, - STATE(173), 1, + STATE(183), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(207), 7, + ACTIONS(202), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4546,19 +4575,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1527] = 6, + [1507] = 6, ACTIONS(3), 1, sym_comment, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(102), 1, + STATE(70), 1, sym_preconditions, - STATE(179), 1, + STATE(131), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(209), 7, + ACTIONS(204), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4566,19 +4595,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1553] = 6, + [1533] = 6, ACTIONS(3), 1, sym_comment, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(103), 1, + STATE(105), 1, sym_preconditions, - STATE(183), 1, + STATE(186), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(211), 7, + ACTIONS(206), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4586,36 +4615,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1579] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(213), 3, - anon_sym_let, - anon_sym_E, - sym_identity, - ACTIONS(215), 9, - anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, - anon_sym_LT_DASH, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - anon_sym_LBRACK, - [1599] = 6, + [1559] = 6, ACTIONS(3), 1, sym_comment, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(106), 1, + STATE(65), 1, sym_preconditions, - STATE(186), 1, + STATE(189), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(217), 7, + ACTIONS(208), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4623,19 +4635,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1625] = 6, + [1585] = 6, ACTIONS(3), 1, sym_comment, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(107), 1, + STATE(79), 1, sym_preconditions, - STATE(190), 1, + STATE(146), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(219), 7, + ACTIONS(210), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4643,106 +4655,109 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1651] = 4, + [1611] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(171), 1, - anon_sym_LBRACK, - STATE(73), 1, - sym_ttc, - ACTIONS(221), 10, + ACTIONS(212), 1, anon_sym_RBRACE, + ACTIONS(214), 1, anon_sym_let, + STATE(292), 1, + sym_asset_definition, + STATE(94), 3, + sym_asset_variable, + sym_attack_step, + aux_sym_asset_definition_repeat1, + ACTIONS(216), 5, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - anon_sym_LT_DASH, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - [1673] = 4, + [1636] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(225), 1, - anon_sym_COMMA, - STATE(54), 1, - aux_sym_preconditions_repeat1, - ACTIONS(223), 9, - anon_sym_RBRACE, + ACTIONS(214), 1, anon_sym_let, + ACTIONS(218), 1, + anon_sym_RBRACE, + STATE(311), 1, + sym_asset_definition, + STATE(94), 3, + sym_asset_variable, + sym_attack_step, + aux_sym_asset_definition_repeat1, + ACTIONS(216), 5, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - [1694] = 8, + [1661] = 8, ACTIONS(3), 1, sym_comment, - ACTIONS(7), 1, + ACTIONS(220), 1, + ts_builtin_sym_end, + ACTIONS(222), 1, anon_sym_include, - ACTIONS(9), 1, + ACTIONS(225), 1, anon_sym_category, - ACTIONS(11), 1, + ACTIONS(228), 1, anon_sym_POUND, - ACTIONS(13), 1, + ACTIONS(231), 1, anon_sym_associations, - ACTIONS(228), 1, - ts_builtin_sym_end, - STATE(64), 2, + STATE(54), 2, sym_declaration, aux_sym_source_file_repeat1, - STATE(209), 4, + STATE(203), 4, sym_include_declaration, sym_category_declaration, sym_define_declaration, sym_associations_declaration, - [1723] = 6, + [1690] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(230), 1, - anon_sym_RBRACE, - ACTIONS(232), 1, + ACTIONS(214), 1, anon_sym_let, - STATE(316), 1, + ACTIONS(234), 1, + anon_sym_RBRACE, + STATE(289), 1, sym_asset_definition, - STATE(85), 3, + STATE(94), 3, sym_asset_variable, sym_attack_step, aux_sym_asset_definition_repeat1, - ACTIONS(234), 5, + ACTIONS(216), 5, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1748] = 6, + [1715] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(232), 1, + ACTIONS(214), 1, anon_sym_let, ACTIONS(236), 1, anon_sym_RBRACE, - STATE(282), 1, + STATE(306), 1, sym_asset_definition, - STATE(85), 3, + STATE(94), 3, sym_asset_variable, sym_attack_step, aux_sym_asset_definition_repeat1, - ACTIONS(234), 5, + ACTIONS(216), 5, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1773] = 4, + [1740] = 4, ACTIONS(3), 1, sym_comment, ACTIONS(240), 1, anon_sym_COMMA, - STATE(65), 1, + STATE(63), 1, aux_sym_preconditions_repeat1, ACTIONS(238), 9, anon_sym_RBRACE, @@ -4754,130 +4769,146 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_BANGE, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1794] = 6, + [1761] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(232), 1, + ACTIONS(214), 1, anon_sym_let, ACTIONS(242), 1, anon_sym_RBRACE, - STATE(323), 1, + STATE(286), 1, sym_asset_definition, - STATE(85), 3, + STATE(94), 3, sym_asset_variable, sym_attack_step, aux_sym_asset_definition_repeat1, - ACTIONS(234), 5, + ACTIONS(216), 5, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1819] = 6, + [1786] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(232), 1, - anon_sym_let, - ACTIONS(244), 1, + ACTIONS(246), 1, + anon_sym_COMMA, + STATE(59), 1, + aux_sym_preconditions_repeat1, + ACTIONS(244), 9, anon_sym_RBRACE, - STATE(301), 1, - sym_asset_definition, - STATE(85), 3, - sym_asset_variable, - sym_attack_step, - aux_sym_asset_definition_repeat1, - ACTIONS(234), 5, + anon_sym_let, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1844] = 6, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + [1807] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(232), 1, + ACTIONS(214), 1, anon_sym_let, - ACTIONS(246), 1, + ACTIONS(249), 1, anon_sym_RBRACE, - STATE(279), 1, + STATE(295), 1, sym_asset_definition, - STATE(85), 3, + STATE(94), 3, sym_asset_variable, sym_attack_step, aux_sym_asset_definition_repeat1, - ACTIONS(234), 5, + ACTIONS(216), 5, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1869] = 6, + [1832] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(232), 1, + ACTIONS(214), 1, anon_sym_let, - ACTIONS(248), 1, + ACTIONS(251), 1, anon_sym_RBRACE, - STATE(313), 1, + STATE(294), 1, sym_asset_definition, - STATE(85), 3, + STATE(94), 3, sym_asset_variable, sym_attack_step, aux_sym_asset_definition_repeat1, - ACTIONS(234), 5, + ACTIONS(216), 5, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1894] = 6, + [1857] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(232), 1, + ACTIONS(214), 1, anon_sym_let, - ACTIONS(250), 1, + ACTIONS(253), 1, anon_sym_RBRACE, - STATE(280), 1, + STATE(312), 1, sym_asset_definition, - STATE(85), 3, + STATE(94), 3, sym_asset_variable, sym_attack_step, aux_sym_asset_definition_repeat1, - ACTIONS(234), 5, + ACTIONS(216), 5, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1919] = 8, + [1882] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(252), 1, - ts_builtin_sym_end, - ACTIONS(254), 1, + ACTIONS(240), 1, + anon_sym_COMMA, + STATE(59), 1, + aux_sym_preconditions_repeat1, + ACTIONS(255), 9, + anon_sym_RBRACE, + anon_sym_let, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_POUND, + anon_sym_E, + anon_sym_BANGE, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + [1903] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, anon_sym_include, - ACTIONS(257), 1, + ACTIONS(9), 1, anon_sym_category, - ACTIONS(260), 1, + ACTIONS(11), 1, anon_sym_POUND, - ACTIONS(263), 1, + ACTIONS(13), 1, anon_sym_associations, - STATE(64), 2, + ACTIONS(257), 1, + ts_builtin_sym_end, + STATE(54), 2, sym_declaration, aux_sym_source_file_repeat1, - STATE(209), 4, + STATE(203), 4, sym_include_declaration, sym_category_declaration, sym_define_declaration, sym_associations_declaration, - [1948] = 4, + [1932] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(240), 1, - anon_sym_COMMA, - STATE(54), 1, - aux_sym_preconditions_repeat1, - ACTIONS(266), 9, + STATE(122), 1, + sym_reaching, + ACTIONS(33), 2, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + ACTIONS(259), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4885,22 +4916,34 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - [1969] = 6, + [1952] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(232), 1, - anon_sym_let, - ACTIONS(268), 1, + ACTIONS(261), 1, + sym_identifier, + ACTIONS(263), 1, + anon_sym_LPAREN, + ACTIONS(265), 2, + sym_integer, + sym_float, + STATE(196), 6, + sym__ttc_expr, + sym__ttc_parenthesized, + sym__ttc_primary, + sym_ttc_distribution, + sym_ttc_binop, + sym__number, + [1974] = 4, + ACTIONS(3), 1, + sym_comment, + STATE(151), 1, + sym_reaching, + ACTIONS(33), 2, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + ACTIONS(267), 7, anon_sym_RBRACE, - STATE(298), 1, - sym_asset_definition, - STATE(85), 3, - sym_asset_variable, - sym_attack_step, - aux_sym_asset_definition_repeat1, - ACTIONS(234), 5, + anon_sym_let, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, @@ -4909,12 +4952,12 @@ static const uint16_t ts_small_parse_table[] = { [1994] = 4, ACTIONS(3), 1, sym_comment, - STATE(184), 1, + STATE(127), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(270), 7, + ACTIONS(269), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4925,12 +4968,12 @@ static const uint16_t ts_small_parse_table[] = { [2014] = 4, ACTIONS(3), 1, sym_comment, - STATE(135), 1, + STATE(153), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(272), 7, + ACTIONS(271), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4941,12 +4984,12 @@ static const uint16_t ts_small_parse_table[] = { [2034] = 4, ACTIONS(3), 1, sym_comment, - STATE(194), 1, + STATE(145), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(274), 7, + ACTIONS(273), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4954,32 +4997,31 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2054] = 5, + [2054] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(276), 1, + STATE(129), 1, + sym_reaching, + ACTIONS(33), 2, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + ACTIONS(275), 7, anon_sym_RBRACE, - ACTIONS(278), 1, anon_sym_let, - STATE(70), 3, - sym_asset_variable, - sym_attack_step, - aux_sym_asset_definition_repeat1, - ACTIONS(281), 5, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2076] = 4, + [2074] = 4, ACTIONS(3), 1, sym_comment, - STATE(155), 1, + STATE(156), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(284), 7, + ACTIONS(277), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4987,10 +5029,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2096] = 2, + [2094] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(286), 10, + ACTIONS(279), 10, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5001,10 +5043,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LT_DASH, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [2112] = 2, + [2110] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(288), 10, + ACTIONS(281), 10, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5015,10 +5057,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LT_DASH, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [2128] = 2, + [2126] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(223), 10, + ACTIONS(244), 10, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5029,32 +5071,32 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_COMMA, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [2144] = 5, + [2142] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(290), 1, - sym_identity, - ACTIONS(292), 1, + ACTIONS(261), 1, + sym_identifier, + ACTIONS(263), 1, anon_sym_LPAREN, - ACTIONS(294), 2, + ACTIONS(283), 2, sym_integer, sym_float, - STATE(196), 6, + STATE(141), 6, sym__ttc_expr, sym__ttc_parenthesized, sym__ttc_primary, sym_ttc_distribution, sym_ttc_binop, sym__number, - [2166] = 4, + [2164] = 4, ACTIONS(3), 1, sym_comment, - STATE(159), 1, + STATE(158), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(296), 7, + ACTIONS(285), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5062,15 +5104,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2186] = 4, + [2184] = 4, ACTIONS(3), 1, sym_comment, - STATE(195), 1, + STATE(132), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(298), 7, + ACTIONS(287), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5078,10 +5120,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2206] = 2, + [2204] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(300), 10, + STATE(159), 1, + sym_reaching, + ACTIONS(33), 2, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + ACTIONS(289), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5089,18 +5136,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - anon_sym_LT_DASH, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - [2222] = 4, + [2224] = 4, ACTIONS(3), 1, sym_comment, - STATE(163), 1, + STATE(161), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(302), 7, + ACTIONS(291), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5108,7 +5152,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2242] = 4, + [2244] = 4, ACTIONS(3), 1, sym_comment, STATE(164), 1, @@ -5116,7 +5160,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(304), 7, + ACTIONS(293), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5124,15 +5168,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2262] = 4, + [2264] = 4, ACTIONS(3), 1, sym_comment, - STATE(165), 1, + STATE(167), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(306), 7, + ACTIONS(295), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5140,15 +5184,32 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2282] = 4, + [2284] = 5, ACTIONS(3), 1, sym_comment, - STATE(128), 1, + ACTIONS(261), 1, + sym_identifier, + ACTIONS(263), 1, + anon_sym_LPAREN, + ACTIONS(297), 2, + sym_integer, + sym_float, + STATE(198), 6, + sym__ttc_expr, + sym__ttc_parenthesized, + sym__ttc_primary, + sym_ttc_distribution, + sym_ttc_binop, + sym__number, + [2306] = 4, + ACTIONS(3), 1, + sym_comment, + STATE(169), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(308), 7, + ACTIONS(299), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5156,15 +5217,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2302] = 4, + [2326] = 4, ACTIONS(3), 1, sym_comment, - STATE(167), 1, + STATE(170), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(310), 7, + ACTIONS(301), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5172,15 +5233,27 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2322] = 4, + [2346] = 5, ACTIONS(3), 1, sym_comment, - STATE(171), 1, - sym_reaching, - ACTIONS(33), 2, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - ACTIONS(312), 7, + ACTIONS(261), 1, + sym_identifier, + ACTIONS(263), 1, + anon_sym_LPAREN, + ACTIONS(303), 2, + sym_integer, + sym_float, + STATE(140), 6, + sym__ttc_expr, + sym__ttc_parenthesized, + sym__ttc_primary, + sym_ttc_distribution, + sym_ttc_binop, + sym__number, + [2368] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(305), 10, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5188,27 +5261,34 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2342] = 5, + anon_sym_LT_DASH, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + [2384] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(232), 1, - anon_sym_let, - ACTIONS(314), 1, + STATE(172), 1, + sym_reaching, + ACTIONS(33), 2, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + ACTIONS(307), 7, anon_sym_RBRACE, - STATE(70), 3, - sym_asset_variable, - sym_attack_step, - aux_sym_asset_definition_repeat1, - ACTIONS(234), 5, + anon_sym_let, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2364] = 2, + [2404] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(316), 10, + STATE(135), 1, + sym_reaching, + ACTIONS(33), 2, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + ACTIONS(309), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5216,27 +5296,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - anon_sym_LT_DASH, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - [2380] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(290), 1, - sym_identity, - ACTIONS(292), 1, - anon_sym_LPAREN, - ACTIONS(318), 2, - sym_integer, - sym_float, - STATE(141), 6, - sym__ttc_expr, - sym__ttc_parenthesized, - sym__ttc_primary, - sym_ttc_distribution, - sym_ttc_binop, - sym__number, - [2402] = 4, + [2424] = 4, ACTIONS(3), 1, sym_comment, STATE(174), 1, @@ -5244,7 +5304,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(320), 7, + ACTIONS(311), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5252,32 +5312,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2422] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(290), 1, - sym_identity, - ACTIONS(292), 1, - anon_sym_LPAREN, - ACTIONS(322), 2, - sym_integer, - sym_float, - STATE(142), 6, - sym__ttc_expr, - sym__ttc_parenthesized, - sym__ttc_primary, - sym_ttc_distribution, - sym_ttc_binop, - sym__number, [2444] = 4, ACTIONS(3), 1, sym_comment, - STATE(143), 1, + STATE(175), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(324), 7, + ACTIONS(313), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5288,12 +5331,12 @@ static const uint16_t ts_small_parse_table[] = { [2464] = 4, ACTIONS(3), 1, sym_comment, - STATE(177), 1, + STATE(123), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(326), 7, + ACTIONS(315), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5304,12 +5347,12 @@ static const uint16_t ts_small_parse_table[] = { [2484] = 4, ACTIONS(3), 1, sym_comment, - STATE(178), 1, + STATE(177), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(328), 7, + ACTIONS(317), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5317,23 +5360,41 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2504] = 4, + [2504] = 5, ACTIONS(3), 1, sym_comment, - STATE(130), 1, - sym_reaching, - ACTIONS(33), 2, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - ACTIONS(330), 7, + ACTIONS(214), 1, + anon_sym_let, + ACTIONS(319), 1, + anon_sym_RBRACE, + STATE(95), 3, + sym_asset_variable, + sym_attack_step, + aux_sym_asset_definition_repeat1, + ACTIONS(216), 5, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_POUND, + anon_sym_E, + anon_sym_BANGE, + [2526] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(321), 1, anon_sym_RBRACE, + ACTIONS(323), 1, anon_sym_let, + STATE(95), 3, + sym_asset_variable, + sym_attack_step, + aux_sym_asset_definition_repeat1, + ACTIONS(326), 5, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2524] = 4, + [2548] = 4, ACTIONS(3), 1, sym_comment, STATE(180), 1, @@ -5341,7 +5402,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(332), 7, + ACTIONS(329), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5349,7 +5410,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2544] = 4, + [2568] = 4, ACTIONS(3), 1, sym_comment, STATE(181), 1, @@ -5357,7 +5418,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(334), 7, + ACTIONS(331), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5365,7 +5426,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2564] = 4, + [2588] = 4, ACTIONS(3), 1, sym_comment, STATE(182), 1, @@ -5373,7 +5434,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(336), 7, + ACTIONS(333), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5381,15 +5442,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2584] = 4, + [2608] = 4, ACTIONS(3), 1, sym_comment, - STATE(145), 1, + STATE(184), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(338), 7, + ACTIONS(335), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5397,15 +5458,29 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2604] = 4, + [2628] = 2, ACTIONS(3), 1, sym_comment, - STATE(146), 1, + ACTIONS(337), 10, + anon_sym_RBRACE, + anon_sym_let, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_POUND, + anon_sym_E, + anon_sym_BANGE, + anon_sym_LT_DASH, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + [2644] = 4, + ACTIONS(3), 1, + sym_comment, + STATE(187), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(340), 7, + ACTIONS(339), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5413,15 +5488,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2624] = 4, + [2664] = 4, ACTIONS(3), 1, sym_comment, - STATE(147), 1, + STATE(188), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(342), 7, + ACTIONS(341), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5429,32 +5504,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2644] = 5, + [2684] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(290), 1, - sym_identity, - ACTIONS(292), 1, - anon_sym_LPAREN, - ACTIONS(344), 2, - sym_integer, - sym_float, - STATE(198), 6, - sym__ttc_expr, - sym__ttc_parenthesized, - sym__ttc_primary, - sym_ttc_distribution, - sym_ttc_binop, - sym__number, - [2666] = 4, - ACTIONS(3), 1, - sym_comment, - STATE(187), 1, + STATE(144), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(346), 7, + ACTIONS(343), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5462,15 +5520,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2686] = 4, + [2704] = 4, ACTIONS(3), 1, sym_comment, - STATE(188), 1, + STATE(190), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(348), 7, + ACTIONS(345), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5478,15 +5536,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2706] = 4, + [2724] = 4, ACTIONS(3), 1, sym_comment, - STATE(189), 1, + STATE(191), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(350), 7, + ACTIONS(347), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5494,15 +5552,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2726] = 4, + [2744] = 4, ACTIONS(3), 1, sym_comment, - STATE(149), 1, + STATE(147), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(352), 7, + ACTIONS(349), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5510,31 +5568,27 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2746] = 4, + [2764] = 5, ACTIONS(3), 1, sym_comment, - STATE(191), 1, - sym_reaching, - ACTIONS(33), 2, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - ACTIONS(354), 7, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2766] = 4, + ACTIONS(261), 1, + sym_identifier, + ACTIONS(263), 1, + anon_sym_LPAREN, + ACTIONS(351), 2, + sym_integer, + sym_float, + STATE(139), 6, + sym__ttc_expr, + sym__ttc_parenthesized, + sym__ttc_primary, + sym_ttc_distribution, + sym_ttc_binop, + sym__number, + [2786] = 2, ACTIONS(3), 1, sym_comment, - STATE(124), 1, - sym_reaching, - ACTIONS(33), 2, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - ACTIONS(356), 7, + ACTIONS(152), 10, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5542,58 +5596,35 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2786] = 4, - ACTIONS(3), 1, - sym_comment, - STATE(193), 1, - sym_reaching, - ACTIONS(33), 2, + anon_sym_LT_DASH, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(358), 7, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2806] = 4, + [2802] = 5, ACTIONS(3), 1, sym_comment, - STATE(133), 1, - sym_reaching, - ACTIONS(33), 2, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - ACTIONS(360), 7, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2826] = 4, + ACTIONS(261), 1, + sym_identifier, + ACTIONS(263), 1, + anon_sym_LPAREN, + ACTIONS(353), 2, + sym_integer, + sym_float, + STATE(194), 6, + sym__ttc_expr, + sym__ttc_parenthesized, + sym__ttc_primary, + sym_ttc_distribution, + sym_ttc_binop, + sym__number, + [2824] = 4, ACTIONS(3), 1, sym_comment, - STATE(153), 1, + STATE(142), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(362), 7, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2846] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(159), 10, + ACTIONS(355), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5601,51 +5632,46 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - anon_sym_LT_DASH, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - [2862] = 5, + [2844] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(290), 1, - sym_identity, - ACTIONS(292), 1, + ACTIONS(357), 1, + sym_identifier, + ACTIONS(359), 1, anon_sym_LPAREN, - ACTIONS(364), 2, - sym_integer, - sym_float, - STATE(200), 6, - sym__ttc_expr, - sym__ttc_parenthesized, - sym__ttc_primary, - sym_ttc_distribution, - sym_ttc_binop, - sym__number, - [2884] = 5, + STATE(57), 1, + sym_asset_expr, + STATE(26), 6, + sym__inline_asset_expr, + sym__asset_expr_primary, + sym_asset_variable_substitution, + sym_asset_expr_type, + sym_asset_expr_binop, + sym_asset_expr_unop, + [2865] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(290), 1, - sym_identity, - ACTIONS(292), 1, + ACTIONS(357), 1, + sym_identifier, + ACTIONS(359), 1, anon_sym_LPAREN, - ACTIONS(366), 2, - sym_integer, - sym_float, - STATE(140), 6, - sym__ttc_expr, - sym__ttc_parenthesized, - sym__ttc_primary, - sym_ttc_distribution, - sym_ttc_binop, - sym__number, - [2906] = 4, + STATE(166), 1, + sym_asset_expr, + STATE(26), 6, + sym__inline_asset_expr, + sym__asset_expr_primary, + sym_asset_variable_substitution, + sym_asset_expr_type, + sym_asset_expr_binop, + sym_asset_expr_unop, + [2886] = 4, ACTIONS(3), 1, sym_comment, ACTIONS(240), 1, anon_sym_COMMA, - STATE(54), 1, + STATE(114), 1, aux_sym_preconditions_repeat1, - ACTIONS(368), 7, + ACTIONS(361), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5653,30 +5679,14 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2925] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(370), 1, - sym_identity, - ACTIONS(372), 1, - anon_sym_LPAREN, - STATE(115), 1, - sym_asset_expr, - STATE(28), 6, - sym__inline_asset_expr, - sym__asset_expr_primary, - sym_asset_variable_substitution, - sym_asset_expr_type, - sym_asset_expr_binop, - sym_asset_expr_unop, - [2946] = 4, + [2905] = 4, ACTIONS(3), 1, sym_comment, ACTIONS(240), 1, anon_sym_COMMA, - STATE(113), 1, + STATE(59), 1, aux_sym_preconditions_repeat1, - ACTIONS(374), 7, + ACTIONS(363), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5684,128 +5694,112 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2965] = 5, + [2924] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(370), 1, - sym_identity, - ACTIONS(372), 1, + ACTIONS(357), 1, + sym_identifier, + ACTIONS(359), 1, anon_sym_LPAREN, - STATE(58), 1, + STATE(113), 1, sym_asset_expr, - STATE(28), 6, + STATE(26), 6, sym__inline_asset_expr, sym__asset_expr_primary, sym_asset_variable_substitution, sym_asset_expr_type, sym_asset_expr_binop, sym_asset_expr_unop, - [2986] = 5, + [2945] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(370), 1, - sym_identity, - ACTIONS(372), 1, + ACTIONS(357), 1, + sym_identifier, + ACTIONS(359), 1, anon_sym_LPAREN, - STATE(168), 1, + STATE(75), 1, sym_asset_expr, - STATE(28), 6, + STATE(26), 6, sym__inline_asset_expr, sym__asset_expr_primary, sym_asset_variable_substitution, sym_asset_expr_type, sym_asset_expr_binop, sym_asset_expr_unop, - [3007] = 5, + [2966] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(370), 1, - sym_identity, - ACTIONS(372), 1, + ACTIONS(357), 1, + sym_identifier, + ACTIONS(359), 1, anon_sym_LPAREN, - STATE(74), 1, - sym_asset_expr, - STATE(28), 6, + STATE(22), 6, sym__inline_asset_expr, sym__asset_expr_primary, sym_asset_variable_substitution, sym_asset_expr_type, sym_asset_expr_binop, sym_asset_expr_unop, - [3028] = 4, + [2984] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(370), 1, - sym_identity, - ACTIONS(372), 1, + ACTIONS(357), 1, + sym_identifier, + ACTIONS(359), 1, anon_sym_LPAREN, - STATE(127), 6, + STATE(25), 6, sym__inline_asset_expr, sym__asset_expr_primary, sym_asset_variable_substitution, sym_asset_expr_type, sym_asset_expr_binop, sym_asset_expr_unop, - [3046] = 4, + [3002] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(370), 1, - sym_identity, - ACTIONS(372), 1, + ACTIONS(365), 1, anon_sym_LPAREN, - STATE(21), 6, - sym__inline_asset_expr, - sym__asset_expr_primary, - sym_asset_variable_substitution, - sym_asset_expr_type, - sym_asset_expr_binop, - sym_asset_expr_unop, - [3064] = 4, + ACTIONS(369), 1, + anon_sym_SLASH, + ACTIONS(367), 6, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_CARET, + [3020] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(370), 1, - sym_identity, - ACTIONS(372), 1, + ACTIONS(357), 1, + sym_identifier, + ACTIONS(359), 1, anon_sym_LPAREN, - STATE(23), 6, + STATE(125), 6, sym__inline_asset_expr, sym__asset_expr_primary, sym_asset_variable_substitution, sym_asset_expr_type, sym_asset_expr_binop, sym_asset_expr_unop, - [3082] = 4, + [3038] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(370), 1, - sym_identity, - ACTIONS(372), 1, + ACTIONS(357), 1, + sym_identifier, + ACTIONS(359), 1, anon_sym_LPAREN, - STATE(25), 6, + STATE(23), 6, sym__inline_asset_expr, sym__asset_expr_primary, sym_asset_variable_substitution, sym_asset_expr_type, sym_asset_expr_binop, sym_asset_expr_unop, - [3100] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(376), 1, - anon_sym_LPAREN, - ACTIONS(380), 1, - anon_sym_SLASH, - ACTIONS(378), 6, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_CARET, - [3118] = 2, + [3056] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(382), 7, + ACTIONS(371), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5813,10 +5807,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3131] = 2, + [3069] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(384), 7, + ACTIONS(373), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5824,10 +5818,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3144] = 2, + [3082] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(386), 7, + ACTIONS(375), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5835,26 +5829,37 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3157] = 7, + [3095] = 7, ACTIONS(3), 1, sym_comment, - ACTIONS(118), 1, + ACTIONS(119), 1, anon_sym_DOT, - ACTIONS(120), 1, + ACTIONS(121), 1, anon_sym_LBRACK, - ACTIONS(124), 1, + ACTIONS(125), 1, anon_sym_STAR, - ACTIONS(148), 1, + ACTIONS(137), 1, anon_sym_BSLASH_SLASH, - ACTIONS(388), 1, + ACTIONS(377), 1, anon_sym_RPAREN, - ACTIONS(136), 2, + ACTIONS(127), 2, anon_sym_DASH, anon_sym_SLASH_BSLASH, - [3180] = 2, + [3118] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(379), 7, + anon_sym_RBRACE, + anon_sym_let, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_POUND, + anon_sym_E, + anon_sym_BANGE, + [3131] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(390), 7, + ACTIONS(381), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5862,10 +5867,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3193] = 2, + [3144] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(392), 7, + ACTIONS(383), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5873,10 +5878,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3206] = 2, + [3157] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(394), 7, + ACTIONS(385), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5884,10 +5889,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3219] = 2, + [3170] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(396), 7, + ACTIONS(387), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5895,10 +5900,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3232] = 2, + [3183] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(398), 7, + ACTIONS(389), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5906,10 +5911,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3245] = 2, + [3196] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(400), 7, + ACTIONS(391), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5917,10 +5922,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3258] = 2, + [3209] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(402), 7, + ACTIONS(393), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5928,10 +5933,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3271] = 2, + [3222] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(404), 7, + ACTIONS(395), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5939,10 +5944,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3284] = 2, + [3235] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(406), 7, + ACTIONS(397), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5950,10 +5955,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3297] = 2, + [3248] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(408), 7, + ACTIONS(399), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5961,10 +5966,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3310] = 2, + [3261] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(410), 7, + ACTIONS(401), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5972,62 +5977,62 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3323] = 3, + [3274] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(414), 1, + ACTIONS(405), 1, anon_sym_SLASH, - ACTIONS(412), 6, + ACTIONS(403), 6, anon_sym_RPAREN, anon_sym_RBRACK, anon_sym_PLUS, anon_sym_DASH, anon_sym_STAR, anon_sym_CARET, - [3338] = 5, + [3289] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(418), 1, + ACTIONS(409), 1, anon_sym_STAR, - ACTIONS(420), 1, + ACTIONS(411), 1, anon_sym_SLASH, - ACTIONS(422), 1, + ACTIONS(413), 1, anon_sym_CARET, - ACTIONS(416), 4, + ACTIONS(407), 4, anon_sym_RPAREN, anon_sym_RBRACK, anon_sym_PLUS, anon_sym_DASH, - [3357] = 4, + [3308] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(422), 1, + ACTIONS(413), 1, anon_sym_CARET, - ACTIONS(424), 1, + ACTIONS(415), 1, anon_sym_SLASH, - ACTIONS(416), 5, + ACTIONS(407), 5, anon_sym_RPAREN, anon_sym_RBRACK, anon_sym_PLUS, anon_sym_DASH, anon_sym_STAR, - [3374] = 4, + [3325] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(422), 1, + ACTIONS(413), 1, anon_sym_CARET, - ACTIONS(424), 1, + ACTIONS(415), 1, anon_sym_SLASH, - ACTIONS(416), 5, + ACTIONS(407), 5, anon_sym_RPAREN, anon_sym_RBRACK, anon_sym_PLUS, anon_sym_DASH, anon_sym_STAR, - [3391] = 2, + [3342] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(426), 7, + ACTIONS(417), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6035,10 +6040,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3404] = 2, + [3355] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(428), 7, + ACTIONS(419), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6046,10 +6051,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3417] = 2, + [3368] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(430), 7, + ACTIONS(421), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6057,10 +6062,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3430] = 2, + [3381] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(432), 7, + ACTIONS(423), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6068,10 +6073,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3443] = 2, + [3394] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(434), 7, + ACTIONS(425), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6079,10 +6084,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3456] = 2, + [3407] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(436), 7, + ACTIONS(427), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6090,10 +6095,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3469] = 2, + [3420] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(438), 7, + ACTIONS(429), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6101,10 +6106,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3482] = 2, + [3433] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(440), 7, + ACTIONS(431), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6112,10 +6117,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3495] = 2, + [3446] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(442), 7, + ACTIONS(433), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6123,10 +6128,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3508] = 2, + [3459] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(444), 7, + ACTIONS(435), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6134,10 +6139,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3521] = 2, + [3472] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(446), 7, + ACTIONS(437), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6145,10 +6150,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3534] = 2, + [3485] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(448), 7, + ACTIONS(439), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6156,10 +6161,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3547] = 2, + [3498] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(450), 7, + ACTIONS(441), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6167,10 +6172,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3560] = 2, + [3511] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(452), 7, + ACTIONS(443), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6178,10 +6183,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3573] = 2, + [3524] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(454), 7, + ACTIONS(445), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6189,22 +6194,22 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3586] = 3, + [3537] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(458), 1, + ACTIONS(449), 1, anon_sym_SLASH, - ACTIONS(456), 6, + ACTIONS(447), 6, anon_sym_RPAREN, anon_sym_RBRACK, anon_sym_PLUS, anon_sym_DASH, anon_sym_STAR, anon_sym_CARET, - [3601] = 2, + [3552] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(460), 7, + ACTIONS(451), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6212,10 +6217,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3614] = 2, + [3565] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(462), 7, + ACTIONS(453), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6223,10 +6228,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3627] = 2, + [3578] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(464), 7, + ACTIONS(455), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6234,10 +6239,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3640] = 2, + [3591] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(466), 7, + ACTIONS(457), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6245,10 +6250,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3653] = 2, + [3604] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(468), 7, + ACTIONS(459), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6256,10 +6261,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3666] = 2, + [3617] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(470), 7, + ACTIONS(461), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6267,10 +6272,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3679] = 2, + [3630] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(472), 7, + ACTIONS(463), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6278,10 +6283,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3692] = 2, + [3643] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(474), 7, + ACTIONS(465), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6289,10 +6294,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3705] = 2, + [3656] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(476), 7, + ACTIONS(467), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6300,10 +6305,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3718] = 2, + [3669] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(478), 7, + ACTIONS(469), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6311,10 +6316,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3731] = 2, + [3682] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(480), 7, + ACTIONS(471), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6322,10 +6327,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3744] = 2, + [3695] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(482), 7, + ACTIONS(473), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6333,10 +6338,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3757] = 2, + [3708] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(484), 7, + ACTIONS(475), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6344,33 +6349,22 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3770] = 3, + [3721] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(488), 1, + ACTIONS(479), 1, anon_sym_SLASH, - ACTIONS(486), 6, + ACTIONS(477), 6, anon_sym_RPAREN, anon_sym_RBRACK, anon_sym_PLUS, anon_sym_DASH, anon_sym_STAR, anon_sym_CARET, - [3785] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(490), 7, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3798] = 2, + [3736] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(492), 7, + ACTIONS(481), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6378,10 +6372,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3811] = 2, + [3749] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(494), 7, + ACTIONS(483), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6389,10 +6383,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3824] = 2, + [3762] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(496), 7, + ACTIONS(485), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6400,10 +6394,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3837] = 2, + [3775] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(498), 7, + ACTIONS(487), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6411,10 +6405,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3850] = 2, + [3788] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(500), 7, + ACTIONS(489), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6422,10 +6416,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3863] = 2, + [3801] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(502), 7, + ACTIONS(491), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6433,10 +6427,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3876] = 2, + [3814] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(504), 7, + ACTIONS(493), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6444,10 +6438,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3889] = 2, + [3827] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(506), 7, + ACTIONS(495), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6455,10 +6449,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3902] = 2, + [3840] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(508), 7, + ACTIONS(497), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6466,10 +6460,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3915] = 2, + [3853] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(510), 7, + ACTIONS(499), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6477,10 +6471,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3928] = 2, + [3866] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(512), 7, + ACTIONS(501), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6488,10 +6482,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3941] = 2, + [3879] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(514), 7, + ACTIONS(503), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6499,10 +6493,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3954] = 2, + [3892] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(516), 7, + ACTIONS(505), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6510,10 +6504,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3967] = 2, + [3905] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(518), 7, + ACTIONS(507), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6521,10 +6515,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3980] = 2, + [3918] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(520), 7, + ACTIONS(509), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6532,10 +6526,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3993] = 2, + [3931] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(522), 7, + ACTIONS(511), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6543,10 +6537,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [4006] = 2, + [3944] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(524), 7, + ACTIONS(513), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6554,10 +6548,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [4019] = 2, + [3957] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(526), 7, + ACTIONS(515), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6565,10 +6559,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [4032] = 2, + [3970] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(528), 7, + ACTIONS(517), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6576,10 +6570,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [4045] = 2, + [3983] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(530), 7, + ACTIONS(519), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6587,10 +6581,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [4058] = 2, + [3996] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(532), 7, + ACTIONS(521), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6598,10 +6592,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [4071] = 2, + [4009] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(534), 7, + ACTIONS(523), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6609,1305 +6603,1303 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [4084] = 6, + [4022] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(418), 1, + ACTIONS(409), 1, anon_sym_STAR, - ACTIONS(420), 1, + ACTIONS(411), 1, anon_sym_SLASH, - ACTIONS(422), 1, + ACTIONS(413), 1, anon_sym_CARET, - ACTIONS(536), 1, - anon_sym_RPAREN, - ACTIONS(538), 2, + ACTIONS(525), 1, + anon_sym_RBRACK, + ACTIONS(527), 2, anon_sym_PLUS, anon_sym_DASH, - [4104] = 6, + [4042] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(540), 1, + ACTIONS(529), 1, anon_sym_STAR, - ACTIONS(542), 1, + ACTIONS(531), 1, sym_integer, - STATE(268), 1, + STATE(267), 1, sym_multiplicity_range, - STATE(305), 1, + STATE(316), 1, sym_multiplicity, - STATE(245), 2, + STATE(247), 2, sym__multiplicity_atom, sym_star, - [4124] = 6, + [4062] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(418), 1, + ACTIONS(409), 1, anon_sym_STAR, - ACTIONS(420), 1, + ACTIONS(411), 1, anon_sym_SLASH, - ACTIONS(422), 1, + ACTIONS(413), 1, anon_sym_CARET, - ACTIONS(544), 1, - anon_sym_RBRACK, - ACTIONS(538), 2, + ACTIONS(533), 1, + anon_sym_RPAREN, + ACTIONS(527), 2, anon_sym_PLUS, anon_sym_DASH, - [4144] = 6, + [4082] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(540), 1, + ACTIONS(529), 1, anon_sym_STAR, - ACTIONS(542), 1, + ACTIONS(531), 1, sym_integer, - STATE(268), 1, + STATE(267), 1, sym_multiplicity_range, - STATE(291), 1, + STATE(287), 1, sym_multiplicity, - STATE(245), 2, + STATE(247), 2, sym__multiplicity_atom, sym_star, - [4164] = 6, + [4102] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(418), 1, + ACTIONS(409), 1, anon_sym_STAR, - ACTIONS(420), 1, + ACTIONS(411), 1, anon_sym_SLASH, - ACTIONS(422), 1, + ACTIONS(413), 1, anon_sym_CARET, - ACTIONS(546), 1, + ACTIONS(535), 1, anon_sym_RBRACK, - ACTIONS(538), 2, + ACTIONS(527), 2, anon_sym_PLUS, anon_sym_DASH, - [4184] = 2, + [4122] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(548), 5, + ACTIONS(537), 5, ts_builtin_sym_end, anon_sym_include, anon_sym_category, anon_sym_POUND, anon_sym_associations, - [4195] = 5, + [4133] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(550), 1, + ACTIONS(539), 1, anon_sym_RBRACE, - ACTIONS(552), 1, - anon_sym_abstract, - ACTIONS(554), 1, - anon_sym_asset, - STATE(217), 2, - sym_asset_declaration, - aux_sym_category_declaration_repeat2, - [4212] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(552), 1, + ACTIONS(541), 1, anon_sym_abstract, - ACTIONS(554), 1, + ACTIONS(543), 1, anon_sym_asset, - ACTIONS(556), 1, - anon_sym_RBRACE, - STATE(210), 2, + STATE(207), 2, sym_asset_declaration, aux_sym_category_declaration_repeat2, - [4229] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(558), 1, - sym_identity, - ACTIONS(560), 1, - anon_sym_LBRACE, - ACTIONS(562), 1, - anon_sym_extends, - STATE(221), 2, - sym_meta, - aux_sym_category_declaration_repeat1, - [4246] = 2, + [4150] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(564), 5, + ACTIONS(545), 5, ts_builtin_sym_end, anon_sym_include, anon_sym_category, anon_sym_POUND, anon_sym_associations, - [4257] = 2, + [4161] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(566), 5, - ts_builtin_sym_end, - anon_sym_include, - anon_sym_category, - anon_sym_POUND, - anon_sym_associations, - [4268] = 2, + ACTIONS(541), 1, + anon_sym_abstract, + ACTIONS(543), 1, + anon_sym_asset, + ACTIONS(547), 1, + anon_sym_RBRACE, + STATE(206), 2, + sym_asset_declaration, + aux_sym_category_declaration_repeat2, + [4178] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(568), 5, + ACTIONS(549), 5, ts_builtin_sym_end, anon_sym_include, anon_sym_category, anon_sym_POUND, anon_sym_associations, - [4279] = 2, + [4189] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(570), 5, + ACTIONS(551), 5, ts_builtin_sym_end, anon_sym_include, anon_sym_category, anon_sym_POUND, anon_sym_associations, - [4290] = 2, + [4200] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(572), 5, + ACTIONS(553), 5, ts_builtin_sym_end, anon_sym_include, anon_sym_category, anon_sym_POUND, anon_sym_associations, - [4301] = 5, + [4211] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(552), 1, + ACTIONS(541), 1, anon_sym_abstract, - ACTIONS(554), 1, + ACTIONS(543), 1, anon_sym_asset, - ACTIONS(574), 1, + ACTIONS(555), 1, anon_sym_RBRACE, - STATE(217), 2, + STATE(207), 2, sym_asset_declaration, aux_sym_category_declaration_repeat2, - [4318] = 5, + [4228] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(552), 1, + ACTIONS(557), 1, + anon_sym_RBRACE, + ACTIONS(559), 1, anon_sym_abstract, - ACTIONS(554), 1, + ACTIONS(562), 1, anon_sym_asset, - ACTIONS(576), 1, - anon_sym_RBRACE, - STATE(202), 2, + STATE(207), 2, sym_asset_declaration, aux_sym_category_declaration_repeat2, - [4335] = 2, + [4245] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(578), 5, + ACTIONS(565), 5, ts_builtin_sym_end, anon_sym_include, anon_sym_category, anon_sym_POUND, anon_sym_associations, - [4346] = 4, + [4256] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(580), 1, - sym_identity, - ACTIONS(153), 2, + ACTIONS(541), 1, + anon_sym_abstract, + ACTIONS(543), 1, + anon_sym_asset, + ACTIONS(567), 1, + anon_sym_RBRACE, + STATE(200), 2, + sym_asset_declaration, + aux_sym_category_declaration_repeat2, + [4273] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(569), 1, + sym_identifier, + ACTIONS(142), 2, anon_sym_LBRACE, anon_sym_RBRACE, - STATE(213), 2, + STATE(210), 2, sym_meta, aux_sym_category_declaration_repeat1, - [4361] = 2, + [4288] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(572), 5, + ts_builtin_sym_end, + anon_sym_include, + anon_sym_category, + anon_sym_POUND, + anon_sym_associations, + [4299] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(583), 5, + ACTIONS(574), 5, ts_builtin_sym_end, anon_sym_include, anon_sym_category, anon_sym_POUND, anon_sym_associations, - [4372] = 5, + [4310] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(558), 1, - sym_identity, - ACTIONS(585), 1, + ACTIONS(576), 1, + sym_identifier, + ACTIONS(578), 1, anon_sym_LBRACE, - ACTIONS(587), 1, + ACTIONS(580), 1, anon_sym_extends, - STATE(227), 2, + STATE(219), 2, + sym_meta, + aux_sym_category_declaration_repeat1, + [4327] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(576), 1, + sym_identifier, + ACTIONS(582), 1, + anon_sym_LBRACE, + ACTIONS(584), 1, + anon_sym_extends, + STATE(230), 2, sym_meta, aux_sym_category_declaration_repeat1, - [4389] = 2, + [4344] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(589), 5, + ACTIONS(586), 5, ts_builtin_sym_end, anon_sym_include, anon_sym_category, anon_sym_POUND, anon_sym_associations, - [4400] = 5, + [4355] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(591), 1, - anon_sym_RBRACE, - ACTIONS(593), 1, - anon_sym_abstract, - ACTIONS(596), 1, - anon_sym_asset, - STATE(217), 2, - sym_asset_declaration, - aux_sym_category_declaration_repeat2, - [4417] = 4, + ACTIONS(588), 1, + sym_identifier, + ACTIONS(590), 1, + anon_sym_LPAREN, + STATE(30), 1, + sym_detector_context, + STATE(265), 1, + sym_detector_name, + [4371] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(599), 1, - sym_identity, - ACTIONS(601), 1, + ACTIONS(592), 1, + sym_identifier, + ACTIONS(594), 1, anon_sym_RBRACE, - STATE(222), 2, + STATE(225), 2, sym_association, aux_sym_associations_declaration_repeat1, - [4431] = 4, + [4385] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(603), 1, - sym_identity, - ACTIONS(605), 1, + ACTIONS(596), 1, + sym_identifier, + ACTIONS(598), 1, anon_sym_LBRACE, - STATE(213), 2, + STATE(210), 2, sym_meta, aux_sym_category_declaration_repeat1, - [4445] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(607), 1, - sym_identity, - ACTIONS(609), 1, - anon_sym_LPAREN, - STATE(32), 1, - sym_detector_context, - STATE(275), 1, - sym_detector_name, - [4461] = 4, + [4399] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(603), 1, - sym_identity, - ACTIONS(611), 1, + ACTIONS(596), 1, + sym_identifier, + ACTIONS(600), 1, anon_sym_LBRACE, - STATE(213), 2, + STATE(210), 2, sym_meta, aux_sym_category_declaration_repeat1, - [4475] = 4, + [4413] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(599), 1, - sym_identity, - ACTIONS(613), 1, + ACTIONS(592), 1, + sym_identifier, + ACTIONS(602), 1, anon_sym_RBRACE, - STATE(228), 2, + STATE(217), 2, sym_association, aux_sym_associations_declaration_repeat1, - [4489] = 4, + [4427] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(603), 1, - sym_identity, - ACTIONS(615), 1, - anon_sym_LBRACE, - STATE(213), 2, - sym_meta, - aux_sym_category_declaration_repeat1, - [4503] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(540), 1, + ACTIONS(529), 1, anon_sym_STAR, - ACTIONS(617), 1, + ACTIONS(604), 1, sym_integer, - STATE(273), 2, + STATE(272), 2, sym__multiplicity_atom, sym_star, - [4517] = 4, + [4441] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(603), 1, - sym_identity, - ACTIONS(619), 1, + ACTIONS(596), 1, + sym_identifier, + ACTIONS(606), 1, anon_sym_LBRACE, - STATE(231), 2, + STATE(229), 2, sym_meta, aux_sym_category_declaration_repeat1, - [4531] = 4, + [4455] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(603), 1, - sym_identity, - ACTIONS(621), 1, + ACTIONS(596), 1, + sym_identifier, + ACTIONS(608), 1, anon_sym_LBRACE, - STATE(219), 2, + STATE(210), 2, sym_meta, aux_sym_category_declaration_repeat1, - [4545] = 4, + [4469] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(603), 1, - sym_identity, - ACTIONS(623), 1, + ACTIONS(596), 1, + sym_identifier, + ACTIONS(610), 1, anon_sym_LBRACE, - STATE(213), 2, + STATE(223), 2, sym_meta, aux_sym_category_declaration_repeat1, - [4559] = 4, + [4483] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(625), 1, - sym_identity, - ACTIONS(628), 1, + ACTIONS(612), 1, + sym_identifier, + ACTIONS(615), 1, anon_sym_RBRACE, - STATE(228), 2, + STATE(225), 2, sym_association, aux_sym_associations_declaration_repeat1, - [4573] = 4, + [4497] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(630), 1, - sym_identity, - ACTIONS(633), 1, + ACTIONS(617), 1, + sym_identifier, + ACTIONS(620), 1, anon_sym_RBRACE, - STATE(232), 2, + STATE(227), 2, sym_meta, aux_sym_category_declaration_repeat1, - [4587] = 4, + [4511] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(603), 1, - sym_identity, - ACTIONS(635), 1, + ACTIONS(622), 1, + sym_identifier, + ACTIONS(625), 1, + anon_sym_RBRACE, + STATE(210), 2, + sym_meta, + aux_sym_category_declaration_repeat1, + [4525] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(596), 1, + sym_identifier, + ACTIONS(627), 1, anon_sym_LBRACE, - STATE(223), 2, + STATE(218), 2, sym_meta, aux_sym_category_declaration_repeat1, - [4601] = 4, + [4539] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(603), 1, - sym_identity, - ACTIONS(637), 1, + ACTIONS(596), 1, + sym_identifier, + ACTIONS(629), 1, anon_sym_LBRACE, - STATE(213), 2, + STATE(210), 2, sym_meta, aux_sym_category_declaration_repeat1, - [4615] = 4, + [4553] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(639), 1, - sym_identity, - ACTIONS(642), 1, - anon_sym_RBRACE, - STATE(213), 2, + ACTIONS(596), 1, + sym_identifier, + ACTIONS(631), 1, + anon_sym_LBRACE, + STATE(210), 2, sym_meta, aux_sym_category_declaration_repeat1, - [4629] = 2, + [4567] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(644), 3, - anon_sym_RBRACE, - anon_sym_abstract, - anon_sym_asset, - [4638] = 2, + ACTIONS(633), 3, + anon_sym_LBRACK, + anon_sym_LT_DASH_DASH, + anon_sym_DOT_DOT, + [4576] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(646), 3, - anon_sym_RBRACE, - anon_sym_abstract, - anon_sym_asset, - [4647] = 2, + ACTIONS(635), 1, + anon_sym_COMMA, + ACTIONS(637), 1, + anon_sym_RPAREN, + STATE(238), 1, + aux_sym_detector_context_repeat1, + [4589] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(648), 3, + ACTIONS(635), 1, + anon_sym_COMMA, + ACTIONS(639), 1, + anon_sym_RPAREN, + STATE(232), 1, + aux_sym_detector_context_repeat1, + [4602] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(641), 1, + anon_sym_DOT, + ACTIONS(643), 1, + anon_sym_LPAREN, + STATE(236), 1, + aux_sym_detector_name_repeat1, + [4615] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(645), 3, anon_sym_RBRACE, anon_sym_abstract, anon_sym_asset, - [4656] = 2, + [4624] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(647), 1, + anon_sym_DOT, + ACTIONS(650), 1, + anon_sym_LPAREN, + STATE(236), 1, + aux_sym_detector_name_repeat1, + [4637] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(650), 3, + ACTIONS(652), 3, anon_sym_RBRACE, anon_sym_abstract, anon_sym_asset, - [4665] = 4, + [4646] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(652), 1, + ACTIONS(654), 1, anon_sym_COMMA, - ACTIONS(655), 1, + ACTIONS(657), 1, anon_sym_RPAREN, - STATE(237), 1, + STATE(238), 1, aux_sym_detector_context_repeat1, - [4678] = 3, + [4659] = 3, ACTIONS(3), 1, sym_comment, - STATE(266), 1, + STATE(271), 1, sym__number, - ACTIONS(657), 2, + ACTIONS(659), 2, sym_integer, sym_float, - [4689] = 4, + [4670] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(659), 1, + ACTIONS(661), 3, + anon_sym_RBRACE, + anon_sym_abstract, + anon_sym_asset, + [4679] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(663), 1, anon_sym_COMMA, - ACTIONS(661), 1, + ACTIONS(665), 1, anon_sym_RPAREN, - STATE(250), 1, + STATE(248), 1, aux_sym_ttc_distribution_repeat1, - [4702] = 3, + [4692] = 2, ACTIONS(3), 1, sym_comment, - STATE(242), 1, + ACTIONS(667), 3, + anon_sym_RBRACE, + anon_sym_abstract, + anon_sym_asset, + [4701] = 3, + ACTIONS(3), 1, + sym_comment, + STATE(249), 1, sym__number, - ACTIONS(663), 2, + ACTIONS(669), 2, sym_integer, sym_float, - [4713] = 2, + [4712] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(665), 3, + ACTIONS(671), 3, anon_sym_RBRACE, anon_sym_abstract, anon_sym_asset, - [4722] = 4, + [4721] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(659), 1, - anon_sym_COMMA, - ACTIONS(667), 1, - anon_sym_RPAREN, - STATE(239), 1, - aux_sym_ttc_distribution_repeat1, - [4735] = 2, + ACTIONS(673), 3, + anon_sym_RBRACE, + anon_sym_abstract, + anon_sym_asset, + [4730] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(163), 3, - anon_sym_LBRACE, + ACTIONS(675), 3, anon_sym_RBRACE, - sym_identity, - [4744] = 2, + anon_sym_abstract, + anon_sym_asset, + [4739] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(669), 3, + ACTIONS(679), 1, + anon_sym_DOT_DOT, + ACTIONS(677), 2, anon_sym_LBRACK, anon_sym_LT_DASH_DASH, - anon_sym_DOT_DOT, - [4753] = 3, + [4750] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(673), 1, - anon_sym_DOT_DOT, - ACTIONS(671), 2, - anon_sym_LBRACK, - anon_sym_LT_DASH_DASH, - [4764] = 2, + ACTIONS(681), 1, + anon_sym_COMMA, + ACTIONS(684), 1, + anon_sym_RPAREN, + STATE(248), 1, + aux_sym_ttc_distribution_repeat1, + [4763] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(675), 3, - anon_sym_RBRACE, - anon_sym_abstract, - anon_sym_asset, - [4773] = 4, + ACTIONS(663), 1, + anon_sym_COMMA, + ACTIONS(686), 1, + anon_sym_RPAREN, + STATE(241), 1, + aux_sym_ttc_distribution_repeat1, + [4776] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(677), 1, - anon_sym_DOT, - ACTIONS(679), 1, - anon_sym_LPAREN, - STATE(263), 1, - aux_sym_detector_name_repeat1, - [4786] = 2, + ACTIONS(688), 1, + anon_sym_RBRACE, + ACTIONS(690), 1, + anon_sym_COMMA, + STATE(257), 1, + aux_sym_cias_repeat1, + [4789] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(681), 3, + ACTIONS(692), 3, anon_sym_RBRACE, anon_sym_abstract, anon_sym_asset, - [4795] = 2, + [4798] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(683), 3, + ACTIONS(694), 3, anon_sym_RBRACE, anon_sym_abstract, anon_sym_asset, - [4804] = 4, + [4807] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(685), 1, - anon_sym_COMMA, - ACTIONS(688), 1, - anon_sym_RPAREN, - STATE(250), 1, - aux_sym_ttc_distribution_repeat1, - [4817] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(690), 3, + ACTIONS(696), 3, anon_sym_RBRACE, anon_sym_abstract, anon_sym_asset, - [4826] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(692), 1, - anon_sym_COMMA, - ACTIONS(694), 1, - anon_sym_RPAREN, - STATE(237), 1, - aux_sym_detector_context_repeat1, - [4839] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(677), 1, - anon_sym_DOT, - ACTIONS(696), 1, - anon_sym_LPAREN, - STATE(247), 1, - aux_sym_detector_name_repeat1, - [4852] = 2, + [4816] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(698), 3, anon_sym_RBRACE, anon_sym_abstract, anon_sym_asset, - [4861] = 2, + [4825] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(700), 3, - anon_sym_RBRACE, - anon_sym_abstract, - anon_sym_asset, - [4870] = 2, + ACTIONS(641), 1, + anon_sym_DOT, + ACTIONS(700), 1, + anon_sym_LPAREN, + STATE(234), 1, + aux_sym_detector_name_repeat1, + [4838] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(702), 3, anon_sym_RBRACE, anon_sym_abstract, anon_sym_asset, - [4879] = 4, + [4847] = 4, ACTIONS(3), 1, sym_comment, + ACTIONS(690), 1, + anon_sym_COMMA, ACTIONS(704), 1, anon_sym_RBRACE, + STATE(258), 1, + aux_sym_cias_repeat1, + [4860] = 4, + ACTIONS(3), 1, + sym_comment, ACTIONS(706), 1, + anon_sym_RBRACE, + ACTIONS(708), 1, anon_sym_COMMA, - STATE(262), 1, + STATE(258), 1, aux_sym_cias_repeat1, - [4892] = 2, + [4873] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(708), 3, + ACTIONS(711), 3, anon_sym_RBRACE, anon_sym_abstract, anon_sym_asset, - [4901] = 2, + [4882] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(710), 3, + ACTIONS(713), 3, anon_sym_RBRACE, anon_sym_abstract, anon_sym_asset, - [4910] = 2, + [4891] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(712), 3, + ACTIONS(715), 3, anon_sym_RBRACE, anon_sym_abstract, anon_sym_asset, - [4919] = 4, + [4900] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(692), 1, - anon_sym_COMMA, - ACTIONS(714), 1, - anon_sym_RPAREN, - STATE(252), 1, - aux_sym_detector_context_repeat1, - [4932] = 4, + ACTIONS(148), 3, + anon_sym_LBRACE, + anon_sym_RBRACE, + sym_identifier, + [4909] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(716), 1, + ACTIONS(717), 3, anon_sym_RBRACE, - ACTIONS(718), 1, - anon_sym_COMMA, - STATE(262), 1, - aux_sym_cias_repeat1, - [4945] = 4, + anon_sym_abstract, + anon_sym_asset, + [4918] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(721), 1, + ACTIONS(719), 1, + sym_cia, + STATE(285), 1, + sym_cias, + [4928] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(590), 1, + anon_sym_LPAREN, + STATE(31), 1, + sym_detector_context, + [4938] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(650), 2, anon_sym_DOT, - ACTIONS(724), 1, anon_sym_LPAREN, - STATE(263), 1, - aux_sym_detector_name_repeat1, - [4958] = 2, + [4946] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(726), 3, - anon_sym_RBRACE, - anon_sym_abstract, - anon_sym_asset, - [4967] = 4, + ACTIONS(677), 2, + anon_sym_LBRACK, + anon_sym_LT_DASH_DASH, + [4954] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(706), 1, - anon_sym_COMMA, - ACTIONS(728), 1, + ACTIONS(706), 2, anon_sym_RBRACE, - STATE(257), 1, - aux_sym_cias_repeat1, - [4980] = 2, + anon_sym_COMMA, + [4962] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(719), 1, + sym_cia, + STATE(315), 1, + sym_cias, + [4972] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(688), 2, + ACTIONS(721), 2, anon_sym_COMMA, anon_sym_RPAREN, - [4988] = 2, + [4980] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(730), 2, + ACTIONS(684), 2, anon_sym_COMMA, anon_sym_RPAREN, - [4996] = 2, + [4988] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(671), 2, + ACTIONS(723), 2, anon_sym_LBRACK, anon_sym_LT_DASH_DASH, - [5004] = 3, + [4996] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(732), 1, - sym_identity, - STATE(277), 1, + ACTIONS(725), 1, + sym_identifier, + STATE(233), 1, sym_detector_context_asset, - [5014] = 3, + [5006] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(732), 1, - sym_identity, - STATE(261), 1, + ACTIONS(725), 1, + sym_identifier, + STATE(275), 1, sym_detector_context_asset, + [5016] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(657), 2, + anon_sym_COMMA, + anon_sym_RPAREN, [5024] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(724), 2, - anon_sym_DOT, - anon_sym_LPAREN, - [5032] = 3, + ACTIONS(727), 1, + sym_identifier, + [5031] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(734), 1, - sym_cia, - STATE(278), 1, - sym_cias, - [5042] = 2, + ACTIONS(729), 1, + sym_identifier, + [5038] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(736), 2, - anon_sym_LBRACK, - anon_sym_LT_DASH_DASH, - [5050] = 2, + ACTIONS(731), 1, + anon_sym_RBRACK, + [5045] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(716), 2, - anon_sym_RBRACE, - anon_sym_COMMA, - [5058] = 3, + ACTIONS(733), 1, + sym_identifier, + [5052] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(609), 1, - anon_sym_LPAREN, - STATE(33), 1, - sym_detector_context, - [5068] = 3, + ACTIONS(735), 1, + sym_identifier, + [5059] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(734), 1, - sym_cia, - STATE(283), 1, - sym_cias, - [5078] = 2, + ACTIONS(737), 1, + sym_identifier, + [5066] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(655), 2, - anon_sym_COMMA, + ACTIONS(739), 1, anon_sym_RPAREN, - [5086] = 2, + [5073] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(738), 1, - anon_sym_RBRACE, - [5093] = 2, + ACTIONS(741), 1, + sym_identifier, + [5080] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(740), 1, + ACTIONS(743), 1, + anon_sym_LBRACK, + [5087] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(745), 1, anon_sym_RBRACE, - [5100] = 2, + [5094] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(742), 1, + ACTIONS(747), 1, anon_sym_RBRACE, - [5107] = 2, + [5101] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(744), 1, - anon_sym_RBRACK, - [5114] = 2, + ACTIONS(749), 1, + anon_sym_LBRACK, + [5108] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(746), 1, - anon_sym_RBRACE, - [5121] = 2, + ACTIONS(751), 1, + sym_identifier, + [5115] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(748), 1, + ACTIONS(753), 1, anon_sym_RBRACE, - [5128] = 2, + [5122] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(750), 1, + ACTIONS(755), 1, anon_sym_asset, - [5135] = 2, + [5129] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(752), 1, - sym_identity, - [5142] = 2, + ACTIONS(757), 1, + ts_builtin_sym_end, + [5136] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(754), 1, - anon_sym_RPAREN, - [5149] = 2, + ACTIONS(759), 1, + anon_sym_RBRACE, + [5143] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(756), 1, - anon_sym_LBRACK, - [5156] = 2, + ACTIONS(761), 1, + sym_identifier, + [5150] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(758), 1, - ts_builtin_sym_end, - [5163] = 2, + ACTIONS(763), 1, + anon_sym_RBRACE, + [5157] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(760), 1, - anon_sym_LBRACE, - [5170] = 2, + ACTIONS(765), 1, + anon_sym_RBRACE, + [5164] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(762), 1, - sym_identity, - [5177] = 2, + ACTIONS(767), 1, + sym_string, + [5171] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(764), 1, - anon_sym_LT_DASH_DASH, - [5184] = 2, + ACTIONS(769), 1, + sym_identifier, + [5178] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(766), 1, - sym_identity, - [5191] = 2, + ACTIONS(771), 1, + anon_sym_RBRACK, + [5185] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(768), 1, - sym_string, - [5198] = 2, + ACTIONS(773), 1, + sym_identifier, + [5192] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(770), 1, - sym_identity, - [5205] = 2, + ACTIONS(775), 1, + sym_string, + [5199] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(772), 1, + ACTIONS(777), 1, anon_sym_EQ, - [5212] = 2, + [5206] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(774), 1, - sym_identity, - [5219] = 2, + ACTIONS(779), 1, + sym_identifier, + [5213] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(776), 1, - sym_cia, - [5226] = 2, + ACTIONS(781), 1, + sym_identifier, + [5220] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(778), 1, - anon_sym_RBRACE, - [5233] = 2, + ACTIONS(783), 1, + sym_identifier, + [5227] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(780), 1, - sym_string, - [5240] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(782), 1, + ACTIONS(785), 1, anon_sym_DASH_DASH_GT, - [5247] = 2, + [5234] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(784), 1, + ACTIONS(787), 1, anon_sym_RBRACE, - [5254] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(786), 1, - anon_sym_info, - [5261] = 2, + [5241] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(788), 1, - sym_identity, - [5268] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(790), 1, - anon_sym_COLON, - [5275] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(792), 1, - anon_sym_LBRACK, - [5282] = 2, + ACTIONS(789), 1, + anon_sym_RBRACK, + [5248] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(794), 1, - sym_identity, - [5289] = 2, + ACTIONS(791), 1, + sym_identifier, + [5255] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(796), 1, + ACTIONS(793), 1, anon_sym_COLON, - [5296] = 2, + [5262] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(798), 1, - sym_identity, - [5303] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(800), 1, - sym_identity, - [5310] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(802), 1, - sym_identity, - [5317] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(804), 1, - sym_identity, - [5324] = 2, + ACTIONS(795), 1, + anon_sym_LBRACE, + [5269] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(806), 1, - anon_sym_RBRACK, - [5331] = 2, + ACTIONS(797), 1, + anon_sym_RBRACE, + [5276] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(808), 1, + ACTIONS(799), 1, anon_sym_RBRACE, - [5338] = 2, + [5283] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(810), 1, - sym_identity, - [5345] = 2, + ACTIONS(801), 1, + anon_sym_COLON, + [5290] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(812), 1, - sym_identity, - [5352] = 2, + ACTIONS(803), 1, + sym_identifier, + [5297] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(814), 1, + ACTIONS(805), 1, anon_sym_RBRACE, - [5359] = 2, + [5304] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(816), 1, - sym_identity, - [5366] = 2, + ACTIONS(807), 1, + anon_sym_LT_DASH_DASH, + [5311] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(818), 1, + ACTIONS(809), 1, sym_string, - [5373] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(820), 1, - sym_identity, - [5380] = 2, + [5318] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(822), 1, + ACTIONS(811), 1, sym_string, - [5387] = 2, + [5325] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(824), 1, - sym_identity, - [5394] = 2, + ACTIONS(813), 1, + anon_sym_info, + [5332] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(826), 1, + ACTIONS(815), 1, anon_sym_COLON, - [5401] = 2, + [5339] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(828), 1, - anon_sym_RBRACE, - [5408] = 2, + ACTIONS(817), 1, + sym_identifier, + [5346] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(830), 1, + ACTIONS(819), 1, anon_sym_info, - [5415] = 2, + [5353] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(832), 1, - anon_sym_RBRACK, + ACTIONS(821), 1, + sym_cia, }; static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(2)] = 0, - [SMALL_STATE(3)] = 59, - [SMALL_STATE(4)] = 118, - [SMALL_STATE(5)] = 168, - [SMALL_STATE(6)] = 218, - [SMALL_STATE(7)] = 262, - [SMALL_STATE(8)] = 306, - [SMALL_STATE(9)] = 350, - [SMALL_STATE(10)] = 378, - [SMALL_STATE(11)] = 422, - [SMALL_STATE(12)] = 466, - [SMALL_STATE(13)] = 510, - [SMALL_STATE(14)] = 554, - [SMALL_STATE(15)] = 598, - [SMALL_STATE(16)] = 642, - [SMALL_STATE(17)] = 686, - [SMALL_STATE(18)] = 730, - [SMALL_STATE(19)] = 774, - [SMALL_STATE(20)] = 799, - [SMALL_STATE(21)] = 828, - [SMALL_STATE(22)] = 859, - [SMALL_STATE(23)] = 884, - [SMALL_STATE(24)] = 909, - [SMALL_STATE(25)] = 934, - [SMALL_STATE(26)] = 967, - [SMALL_STATE(27)] = 992, - [SMALL_STATE(28)] = 1016, - [SMALL_STATE(29)] = 1050, - [SMALL_STATE(30)] = 1077, - [SMALL_STATE(31)] = 1098, - [SMALL_STATE(32)] = 1119, - [SMALL_STATE(33)] = 1146, - [SMALL_STATE(34)] = 1173, - [SMALL_STATE(35)] = 1199, - [SMALL_STATE(36)] = 1225, - [SMALL_STATE(37)] = 1251, - [SMALL_STATE(38)] = 1277, - [SMALL_STATE(39)] = 1303, - [SMALL_STATE(40)] = 1329, - [SMALL_STATE(41)] = 1355, - [SMALL_STATE(42)] = 1375, - [SMALL_STATE(43)] = 1397, - [SMALL_STATE(44)] = 1423, - [SMALL_STATE(45)] = 1449, - [SMALL_STATE(46)] = 1475, - [SMALL_STATE(47)] = 1501, - [SMALL_STATE(48)] = 1527, - [SMALL_STATE(49)] = 1553, - [SMALL_STATE(50)] = 1579, - [SMALL_STATE(51)] = 1599, - [SMALL_STATE(52)] = 1625, - [SMALL_STATE(53)] = 1651, - [SMALL_STATE(54)] = 1673, - [SMALL_STATE(55)] = 1694, - [SMALL_STATE(56)] = 1723, - [SMALL_STATE(57)] = 1748, - [SMALL_STATE(58)] = 1773, - [SMALL_STATE(59)] = 1794, - [SMALL_STATE(60)] = 1819, - [SMALL_STATE(61)] = 1844, - [SMALL_STATE(62)] = 1869, - [SMALL_STATE(63)] = 1894, - [SMALL_STATE(64)] = 1919, - [SMALL_STATE(65)] = 1948, - [SMALL_STATE(66)] = 1969, - [SMALL_STATE(67)] = 1994, - [SMALL_STATE(68)] = 2014, - [SMALL_STATE(69)] = 2034, - [SMALL_STATE(70)] = 2054, - [SMALL_STATE(71)] = 2076, - [SMALL_STATE(72)] = 2096, - [SMALL_STATE(73)] = 2112, - [SMALL_STATE(74)] = 2128, - [SMALL_STATE(75)] = 2144, - [SMALL_STATE(76)] = 2166, - [SMALL_STATE(77)] = 2186, - [SMALL_STATE(78)] = 2206, - [SMALL_STATE(79)] = 2222, - [SMALL_STATE(80)] = 2242, - [SMALL_STATE(81)] = 2262, - [SMALL_STATE(82)] = 2282, - [SMALL_STATE(83)] = 2302, - [SMALL_STATE(84)] = 2322, - [SMALL_STATE(85)] = 2342, - [SMALL_STATE(86)] = 2364, - [SMALL_STATE(87)] = 2380, - [SMALL_STATE(88)] = 2402, - [SMALL_STATE(89)] = 2422, - [SMALL_STATE(90)] = 2444, - [SMALL_STATE(91)] = 2464, - [SMALL_STATE(92)] = 2484, - [SMALL_STATE(93)] = 2504, - [SMALL_STATE(94)] = 2524, - [SMALL_STATE(95)] = 2544, - [SMALL_STATE(96)] = 2564, - [SMALL_STATE(97)] = 2584, - [SMALL_STATE(98)] = 2604, - [SMALL_STATE(99)] = 2624, - [SMALL_STATE(100)] = 2644, - [SMALL_STATE(101)] = 2666, - [SMALL_STATE(102)] = 2686, - [SMALL_STATE(103)] = 2706, - [SMALL_STATE(104)] = 2726, - [SMALL_STATE(105)] = 2746, - [SMALL_STATE(106)] = 2766, - [SMALL_STATE(107)] = 2786, - [SMALL_STATE(108)] = 2806, - [SMALL_STATE(109)] = 2826, - [SMALL_STATE(110)] = 2846, - [SMALL_STATE(111)] = 2862, - [SMALL_STATE(112)] = 2884, - [SMALL_STATE(113)] = 2906, - [SMALL_STATE(114)] = 2925, - [SMALL_STATE(115)] = 2946, - [SMALL_STATE(116)] = 2965, - [SMALL_STATE(117)] = 2986, - [SMALL_STATE(118)] = 3007, - [SMALL_STATE(119)] = 3028, - [SMALL_STATE(120)] = 3046, - [SMALL_STATE(121)] = 3064, - [SMALL_STATE(122)] = 3082, - [SMALL_STATE(123)] = 3100, - [SMALL_STATE(124)] = 3118, - [SMALL_STATE(125)] = 3131, - [SMALL_STATE(126)] = 3144, - [SMALL_STATE(127)] = 3157, - [SMALL_STATE(128)] = 3180, - [SMALL_STATE(129)] = 3193, - [SMALL_STATE(130)] = 3206, - [SMALL_STATE(131)] = 3219, - [SMALL_STATE(132)] = 3232, - [SMALL_STATE(133)] = 3245, - [SMALL_STATE(134)] = 3258, - [SMALL_STATE(135)] = 3271, - [SMALL_STATE(136)] = 3284, - [SMALL_STATE(137)] = 3297, - [SMALL_STATE(138)] = 3310, - [SMALL_STATE(139)] = 3323, - [SMALL_STATE(140)] = 3338, - [SMALL_STATE(141)] = 3357, - [SMALL_STATE(142)] = 3374, - [SMALL_STATE(143)] = 3391, - [SMALL_STATE(144)] = 3404, - [SMALL_STATE(145)] = 3417, - [SMALL_STATE(146)] = 3430, - [SMALL_STATE(147)] = 3443, - [SMALL_STATE(148)] = 3456, - [SMALL_STATE(149)] = 3469, - [SMALL_STATE(150)] = 3482, - [SMALL_STATE(151)] = 3495, - [SMALL_STATE(152)] = 3508, - [SMALL_STATE(153)] = 3521, - [SMALL_STATE(154)] = 3534, - [SMALL_STATE(155)] = 3547, - [SMALL_STATE(156)] = 3560, - [SMALL_STATE(157)] = 3573, - [SMALL_STATE(158)] = 3586, - [SMALL_STATE(159)] = 3601, - [SMALL_STATE(160)] = 3614, - [SMALL_STATE(161)] = 3627, - [SMALL_STATE(162)] = 3640, - [SMALL_STATE(163)] = 3653, - [SMALL_STATE(164)] = 3666, - [SMALL_STATE(165)] = 3679, - [SMALL_STATE(166)] = 3692, - [SMALL_STATE(167)] = 3705, - [SMALL_STATE(168)] = 3718, - [SMALL_STATE(169)] = 3731, - [SMALL_STATE(170)] = 3744, - [SMALL_STATE(171)] = 3757, - [SMALL_STATE(172)] = 3770, - [SMALL_STATE(173)] = 3785, - [SMALL_STATE(174)] = 3798, - [SMALL_STATE(175)] = 3811, - [SMALL_STATE(176)] = 3824, - [SMALL_STATE(177)] = 3837, - [SMALL_STATE(178)] = 3850, - [SMALL_STATE(179)] = 3863, - [SMALL_STATE(180)] = 3876, - [SMALL_STATE(181)] = 3889, - [SMALL_STATE(182)] = 3902, - [SMALL_STATE(183)] = 3915, - [SMALL_STATE(184)] = 3928, - [SMALL_STATE(185)] = 3941, - [SMALL_STATE(186)] = 3954, - [SMALL_STATE(187)] = 3967, - [SMALL_STATE(188)] = 3980, - [SMALL_STATE(189)] = 3993, - [SMALL_STATE(190)] = 4006, - [SMALL_STATE(191)] = 4019, - [SMALL_STATE(192)] = 4032, - [SMALL_STATE(193)] = 4045, - [SMALL_STATE(194)] = 4058, - [SMALL_STATE(195)] = 4071, - [SMALL_STATE(196)] = 4084, - [SMALL_STATE(197)] = 4104, - [SMALL_STATE(198)] = 4124, - [SMALL_STATE(199)] = 4144, - [SMALL_STATE(200)] = 4164, - [SMALL_STATE(201)] = 4184, - [SMALL_STATE(202)] = 4195, - [SMALL_STATE(203)] = 4212, - [SMALL_STATE(204)] = 4229, - [SMALL_STATE(205)] = 4246, - [SMALL_STATE(206)] = 4257, - [SMALL_STATE(207)] = 4268, - [SMALL_STATE(208)] = 4279, - [SMALL_STATE(209)] = 4290, - [SMALL_STATE(210)] = 4301, - [SMALL_STATE(211)] = 4318, - [SMALL_STATE(212)] = 4335, - [SMALL_STATE(213)] = 4346, - [SMALL_STATE(214)] = 4361, - [SMALL_STATE(215)] = 4372, - [SMALL_STATE(216)] = 4389, - [SMALL_STATE(217)] = 4400, - [SMALL_STATE(218)] = 4417, - [SMALL_STATE(219)] = 4431, - [SMALL_STATE(220)] = 4445, - [SMALL_STATE(221)] = 4461, - [SMALL_STATE(222)] = 4475, - [SMALL_STATE(223)] = 4489, - [SMALL_STATE(224)] = 4503, - [SMALL_STATE(225)] = 4517, - [SMALL_STATE(226)] = 4531, - [SMALL_STATE(227)] = 4545, - [SMALL_STATE(228)] = 4559, - [SMALL_STATE(229)] = 4573, - [SMALL_STATE(230)] = 4587, - [SMALL_STATE(231)] = 4601, - [SMALL_STATE(232)] = 4615, - [SMALL_STATE(233)] = 4629, - [SMALL_STATE(234)] = 4638, - [SMALL_STATE(235)] = 4647, - [SMALL_STATE(236)] = 4656, - [SMALL_STATE(237)] = 4665, - [SMALL_STATE(238)] = 4678, - [SMALL_STATE(239)] = 4689, - [SMALL_STATE(240)] = 4702, - [SMALL_STATE(241)] = 4713, - [SMALL_STATE(242)] = 4722, - [SMALL_STATE(243)] = 4735, - [SMALL_STATE(244)] = 4744, - [SMALL_STATE(245)] = 4753, - [SMALL_STATE(246)] = 4764, - [SMALL_STATE(247)] = 4773, - [SMALL_STATE(248)] = 4786, - [SMALL_STATE(249)] = 4795, - [SMALL_STATE(250)] = 4804, - [SMALL_STATE(251)] = 4817, - [SMALL_STATE(252)] = 4826, - [SMALL_STATE(253)] = 4839, - [SMALL_STATE(254)] = 4852, - [SMALL_STATE(255)] = 4861, - [SMALL_STATE(256)] = 4870, - [SMALL_STATE(257)] = 4879, - [SMALL_STATE(258)] = 4892, - [SMALL_STATE(259)] = 4901, - [SMALL_STATE(260)] = 4910, - [SMALL_STATE(261)] = 4919, - [SMALL_STATE(262)] = 4932, - [SMALL_STATE(263)] = 4945, - [SMALL_STATE(264)] = 4958, - [SMALL_STATE(265)] = 4967, - [SMALL_STATE(266)] = 4980, - [SMALL_STATE(267)] = 4988, - [SMALL_STATE(268)] = 4996, - [SMALL_STATE(269)] = 5004, - [SMALL_STATE(270)] = 5014, - [SMALL_STATE(271)] = 5024, - [SMALL_STATE(272)] = 5032, - [SMALL_STATE(273)] = 5042, - [SMALL_STATE(274)] = 5050, - [SMALL_STATE(275)] = 5058, - [SMALL_STATE(276)] = 5068, - [SMALL_STATE(277)] = 5078, - [SMALL_STATE(278)] = 5086, - [SMALL_STATE(279)] = 5093, - [SMALL_STATE(280)] = 5100, - [SMALL_STATE(281)] = 5107, - [SMALL_STATE(282)] = 5114, - [SMALL_STATE(283)] = 5121, - [SMALL_STATE(284)] = 5128, - [SMALL_STATE(285)] = 5135, - [SMALL_STATE(286)] = 5142, - [SMALL_STATE(287)] = 5149, - [SMALL_STATE(288)] = 5156, - [SMALL_STATE(289)] = 5163, - [SMALL_STATE(290)] = 5170, - [SMALL_STATE(291)] = 5177, - [SMALL_STATE(292)] = 5184, - [SMALL_STATE(293)] = 5191, - [SMALL_STATE(294)] = 5198, - [SMALL_STATE(295)] = 5205, - [SMALL_STATE(296)] = 5212, - [SMALL_STATE(297)] = 5219, - [SMALL_STATE(298)] = 5226, - [SMALL_STATE(299)] = 5233, - [SMALL_STATE(300)] = 5240, - [SMALL_STATE(301)] = 5247, - [SMALL_STATE(302)] = 5254, - [SMALL_STATE(303)] = 5261, - [SMALL_STATE(304)] = 5268, - [SMALL_STATE(305)] = 5275, - [SMALL_STATE(306)] = 5282, - [SMALL_STATE(307)] = 5289, - [SMALL_STATE(308)] = 5296, - [SMALL_STATE(309)] = 5303, - [SMALL_STATE(310)] = 5310, - [SMALL_STATE(311)] = 5317, - [SMALL_STATE(312)] = 5324, - [SMALL_STATE(313)] = 5331, - [SMALL_STATE(314)] = 5338, - [SMALL_STATE(315)] = 5345, - [SMALL_STATE(316)] = 5352, - [SMALL_STATE(317)] = 5359, - [SMALL_STATE(318)] = 5366, - [SMALL_STATE(319)] = 5373, - [SMALL_STATE(320)] = 5380, - [SMALL_STATE(321)] = 5387, - [SMALL_STATE(322)] = 5394, - [SMALL_STATE(323)] = 5401, - [SMALL_STATE(324)] = 5408, - [SMALL_STATE(325)] = 5415, + [SMALL_STATE(3)] = 56, + [SMALL_STATE(4)] = 109, + [SMALL_STATE(5)] = 159, + [SMALL_STATE(6)] = 209, + [SMALL_STATE(7)] = 237, + [SMALL_STATE(8)] = 281, + [SMALL_STATE(9)] = 325, + [SMALL_STATE(10)] = 369, + [SMALL_STATE(11)] = 413, + [SMALL_STATE(12)] = 457, + [SMALL_STATE(13)] = 501, + [SMALL_STATE(14)] = 545, + [SMALL_STATE(15)] = 589, + [SMALL_STATE(16)] = 633, + [SMALL_STATE(17)] = 677, + [SMALL_STATE(18)] = 721, + [SMALL_STATE(19)] = 765, + [SMALL_STATE(20)] = 790, + [SMALL_STATE(21)] = 815, + [SMALL_STATE(22)] = 840, + [SMALL_STATE(23)] = 873, + [SMALL_STATE(24)] = 904, + [SMALL_STATE(25)] = 929, + [SMALL_STATE(26)] = 954, + [SMALL_STATE(27)] = 988, + [SMALL_STATE(28)] = 1015, + [SMALL_STATE(29)] = 1036, + [SMALL_STATE(30)] = 1057, + [SMALL_STATE(31)] = 1084, + [SMALL_STATE(32)] = 1111, + [SMALL_STATE(33)] = 1133, + [SMALL_STATE(34)] = 1159, + [SMALL_STATE(35)] = 1185, + [SMALL_STATE(36)] = 1207, + [SMALL_STATE(37)] = 1233, + [SMALL_STATE(38)] = 1259, + [SMALL_STATE(39)] = 1279, + [SMALL_STATE(40)] = 1305, + [SMALL_STATE(41)] = 1331, + [SMALL_STATE(42)] = 1357, + [SMALL_STATE(43)] = 1377, + [SMALL_STATE(44)] = 1403, + [SMALL_STATE(45)] = 1429, + [SMALL_STATE(46)] = 1455, + [SMALL_STATE(47)] = 1481, + [SMALL_STATE(48)] = 1507, + [SMALL_STATE(49)] = 1533, + [SMALL_STATE(50)] = 1559, + [SMALL_STATE(51)] = 1585, + [SMALL_STATE(52)] = 1611, + [SMALL_STATE(53)] = 1636, + [SMALL_STATE(54)] = 1661, + [SMALL_STATE(55)] = 1690, + [SMALL_STATE(56)] = 1715, + [SMALL_STATE(57)] = 1740, + [SMALL_STATE(58)] = 1761, + [SMALL_STATE(59)] = 1786, + [SMALL_STATE(60)] = 1807, + [SMALL_STATE(61)] = 1832, + [SMALL_STATE(62)] = 1857, + [SMALL_STATE(63)] = 1882, + [SMALL_STATE(64)] = 1903, + [SMALL_STATE(65)] = 1932, + [SMALL_STATE(66)] = 1952, + [SMALL_STATE(67)] = 1974, + [SMALL_STATE(68)] = 1994, + [SMALL_STATE(69)] = 2014, + [SMALL_STATE(70)] = 2034, + [SMALL_STATE(71)] = 2054, + [SMALL_STATE(72)] = 2074, + [SMALL_STATE(73)] = 2094, + [SMALL_STATE(74)] = 2110, + [SMALL_STATE(75)] = 2126, + [SMALL_STATE(76)] = 2142, + [SMALL_STATE(77)] = 2164, + [SMALL_STATE(78)] = 2184, + [SMALL_STATE(79)] = 2204, + [SMALL_STATE(80)] = 2224, + [SMALL_STATE(81)] = 2244, + [SMALL_STATE(82)] = 2264, + [SMALL_STATE(83)] = 2284, + [SMALL_STATE(84)] = 2306, + [SMALL_STATE(85)] = 2326, + [SMALL_STATE(86)] = 2346, + [SMALL_STATE(87)] = 2368, + [SMALL_STATE(88)] = 2384, + [SMALL_STATE(89)] = 2404, + [SMALL_STATE(90)] = 2424, + [SMALL_STATE(91)] = 2444, + [SMALL_STATE(92)] = 2464, + [SMALL_STATE(93)] = 2484, + [SMALL_STATE(94)] = 2504, + [SMALL_STATE(95)] = 2526, + [SMALL_STATE(96)] = 2548, + [SMALL_STATE(97)] = 2568, + [SMALL_STATE(98)] = 2588, + [SMALL_STATE(99)] = 2608, + [SMALL_STATE(100)] = 2628, + [SMALL_STATE(101)] = 2644, + [SMALL_STATE(102)] = 2664, + [SMALL_STATE(103)] = 2684, + [SMALL_STATE(104)] = 2704, + [SMALL_STATE(105)] = 2724, + [SMALL_STATE(106)] = 2744, + [SMALL_STATE(107)] = 2764, + [SMALL_STATE(108)] = 2786, + [SMALL_STATE(109)] = 2802, + [SMALL_STATE(110)] = 2824, + [SMALL_STATE(111)] = 2844, + [SMALL_STATE(112)] = 2865, + [SMALL_STATE(113)] = 2886, + [SMALL_STATE(114)] = 2905, + [SMALL_STATE(115)] = 2924, + [SMALL_STATE(116)] = 2945, + [SMALL_STATE(117)] = 2966, + [SMALL_STATE(118)] = 2984, + [SMALL_STATE(119)] = 3002, + [SMALL_STATE(120)] = 3020, + [SMALL_STATE(121)] = 3038, + [SMALL_STATE(122)] = 3056, + [SMALL_STATE(123)] = 3069, + [SMALL_STATE(124)] = 3082, + [SMALL_STATE(125)] = 3095, + [SMALL_STATE(126)] = 3118, + [SMALL_STATE(127)] = 3131, + [SMALL_STATE(128)] = 3144, + [SMALL_STATE(129)] = 3157, + [SMALL_STATE(130)] = 3170, + [SMALL_STATE(131)] = 3183, + [SMALL_STATE(132)] = 3196, + [SMALL_STATE(133)] = 3209, + [SMALL_STATE(134)] = 3222, + [SMALL_STATE(135)] = 3235, + [SMALL_STATE(136)] = 3248, + [SMALL_STATE(137)] = 3261, + [SMALL_STATE(138)] = 3274, + [SMALL_STATE(139)] = 3289, + [SMALL_STATE(140)] = 3308, + [SMALL_STATE(141)] = 3325, + [SMALL_STATE(142)] = 3342, + [SMALL_STATE(143)] = 3355, + [SMALL_STATE(144)] = 3368, + [SMALL_STATE(145)] = 3381, + [SMALL_STATE(146)] = 3394, + [SMALL_STATE(147)] = 3407, + [SMALL_STATE(148)] = 3420, + [SMALL_STATE(149)] = 3433, + [SMALL_STATE(150)] = 3446, + [SMALL_STATE(151)] = 3459, + [SMALL_STATE(152)] = 3472, + [SMALL_STATE(153)] = 3485, + [SMALL_STATE(154)] = 3498, + [SMALL_STATE(155)] = 3511, + [SMALL_STATE(156)] = 3524, + [SMALL_STATE(157)] = 3537, + [SMALL_STATE(158)] = 3552, + [SMALL_STATE(159)] = 3565, + [SMALL_STATE(160)] = 3578, + [SMALL_STATE(161)] = 3591, + [SMALL_STATE(162)] = 3604, + [SMALL_STATE(163)] = 3617, + [SMALL_STATE(164)] = 3630, + [SMALL_STATE(165)] = 3643, + [SMALL_STATE(166)] = 3656, + [SMALL_STATE(167)] = 3669, + [SMALL_STATE(168)] = 3682, + [SMALL_STATE(169)] = 3695, + [SMALL_STATE(170)] = 3708, + [SMALL_STATE(171)] = 3721, + [SMALL_STATE(172)] = 3736, + [SMALL_STATE(173)] = 3749, + [SMALL_STATE(174)] = 3762, + [SMALL_STATE(175)] = 3775, + [SMALL_STATE(176)] = 3788, + [SMALL_STATE(177)] = 3801, + [SMALL_STATE(178)] = 3814, + [SMALL_STATE(179)] = 3827, + [SMALL_STATE(180)] = 3840, + [SMALL_STATE(181)] = 3853, + [SMALL_STATE(182)] = 3866, + [SMALL_STATE(183)] = 3879, + [SMALL_STATE(184)] = 3892, + [SMALL_STATE(185)] = 3905, + [SMALL_STATE(186)] = 3918, + [SMALL_STATE(187)] = 3931, + [SMALL_STATE(188)] = 3944, + [SMALL_STATE(189)] = 3957, + [SMALL_STATE(190)] = 3970, + [SMALL_STATE(191)] = 3983, + [SMALL_STATE(192)] = 3996, + [SMALL_STATE(193)] = 4009, + [SMALL_STATE(194)] = 4022, + [SMALL_STATE(195)] = 4042, + [SMALL_STATE(196)] = 4062, + [SMALL_STATE(197)] = 4082, + [SMALL_STATE(198)] = 4102, + [SMALL_STATE(199)] = 4122, + [SMALL_STATE(200)] = 4133, + [SMALL_STATE(201)] = 4150, + [SMALL_STATE(202)] = 4161, + [SMALL_STATE(203)] = 4178, + [SMALL_STATE(204)] = 4189, + [SMALL_STATE(205)] = 4200, + [SMALL_STATE(206)] = 4211, + [SMALL_STATE(207)] = 4228, + [SMALL_STATE(208)] = 4245, + [SMALL_STATE(209)] = 4256, + [SMALL_STATE(210)] = 4273, + [SMALL_STATE(211)] = 4288, + [SMALL_STATE(212)] = 4299, + [SMALL_STATE(213)] = 4310, + [SMALL_STATE(214)] = 4327, + [SMALL_STATE(215)] = 4344, + [SMALL_STATE(216)] = 4355, + [SMALL_STATE(217)] = 4371, + [SMALL_STATE(218)] = 4385, + [SMALL_STATE(219)] = 4399, + [SMALL_STATE(220)] = 4413, + [SMALL_STATE(221)] = 4427, + [SMALL_STATE(222)] = 4441, + [SMALL_STATE(223)] = 4455, + [SMALL_STATE(224)] = 4469, + [SMALL_STATE(225)] = 4483, + [SMALL_STATE(226)] = 4497, + [SMALL_STATE(227)] = 4511, + [SMALL_STATE(228)] = 4525, + [SMALL_STATE(229)] = 4539, + [SMALL_STATE(230)] = 4553, + [SMALL_STATE(231)] = 4567, + [SMALL_STATE(232)] = 4576, + [SMALL_STATE(233)] = 4589, + [SMALL_STATE(234)] = 4602, + [SMALL_STATE(235)] = 4615, + [SMALL_STATE(236)] = 4624, + [SMALL_STATE(237)] = 4637, + [SMALL_STATE(238)] = 4646, + [SMALL_STATE(239)] = 4659, + [SMALL_STATE(240)] = 4670, + [SMALL_STATE(241)] = 4679, + [SMALL_STATE(242)] = 4692, + [SMALL_STATE(243)] = 4701, + [SMALL_STATE(244)] = 4712, + [SMALL_STATE(245)] = 4721, + [SMALL_STATE(246)] = 4730, + [SMALL_STATE(247)] = 4739, + [SMALL_STATE(248)] = 4750, + [SMALL_STATE(249)] = 4763, + [SMALL_STATE(250)] = 4776, + [SMALL_STATE(251)] = 4789, + [SMALL_STATE(252)] = 4798, + [SMALL_STATE(253)] = 4807, + [SMALL_STATE(254)] = 4816, + [SMALL_STATE(255)] = 4825, + [SMALL_STATE(256)] = 4838, + [SMALL_STATE(257)] = 4847, + [SMALL_STATE(258)] = 4860, + [SMALL_STATE(259)] = 4873, + [SMALL_STATE(260)] = 4882, + [SMALL_STATE(261)] = 4891, + [SMALL_STATE(262)] = 4900, + [SMALL_STATE(263)] = 4909, + [SMALL_STATE(264)] = 4918, + [SMALL_STATE(265)] = 4928, + [SMALL_STATE(266)] = 4938, + [SMALL_STATE(267)] = 4946, + [SMALL_STATE(268)] = 4954, + [SMALL_STATE(269)] = 4962, + [SMALL_STATE(270)] = 4972, + [SMALL_STATE(271)] = 4980, + [SMALL_STATE(272)] = 4988, + [SMALL_STATE(273)] = 4996, + [SMALL_STATE(274)] = 5006, + [SMALL_STATE(275)] = 5016, + [SMALL_STATE(276)] = 5024, + [SMALL_STATE(277)] = 5031, + [SMALL_STATE(278)] = 5038, + [SMALL_STATE(279)] = 5045, + [SMALL_STATE(280)] = 5052, + [SMALL_STATE(281)] = 5059, + [SMALL_STATE(282)] = 5066, + [SMALL_STATE(283)] = 5073, + [SMALL_STATE(284)] = 5080, + [SMALL_STATE(285)] = 5087, + [SMALL_STATE(286)] = 5094, + [SMALL_STATE(287)] = 5101, + [SMALL_STATE(288)] = 5108, + [SMALL_STATE(289)] = 5115, + [SMALL_STATE(290)] = 5122, + [SMALL_STATE(291)] = 5129, + [SMALL_STATE(292)] = 5136, + [SMALL_STATE(293)] = 5143, + [SMALL_STATE(294)] = 5150, + [SMALL_STATE(295)] = 5157, + [SMALL_STATE(296)] = 5164, + [SMALL_STATE(297)] = 5171, + [SMALL_STATE(298)] = 5178, + [SMALL_STATE(299)] = 5185, + [SMALL_STATE(300)] = 5192, + [SMALL_STATE(301)] = 5199, + [SMALL_STATE(302)] = 5206, + [SMALL_STATE(303)] = 5213, + [SMALL_STATE(304)] = 5220, + [SMALL_STATE(305)] = 5227, + [SMALL_STATE(306)] = 5234, + [SMALL_STATE(307)] = 5241, + [SMALL_STATE(308)] = 5248, + [SMALL_STATE(309)] = 5255, + [SMALL_STATE(310)] = 5262, + [SMALL_STATE(311)] = 5269, + [SMALL_STATE(312)] = 5276, + [SMALL_STATE(313)] = 5283, + [SMALL_STATE(314)] = 5290, + [SMALL_STATE(315)] = 5297, + [SMALL_STATE(316)] = 5304, + [SMALL_STATE(317)] = 5311, + [SMALL_STATE(318)] = 5318, + [SMALL_STATE(319)] = 5325, + [SMALL_STATE(320)] = 5332, + [SMALL_STATE(321)] = 5339, + [SMALL_STATE(322)] = 5346, + [SMALL_STATE(323)] = 5353, }; static const TSParseActionEntry ts_parse_actions[] = { @@ -7915,410 +7907,405 @@ static const TSParseActionEntry ts_parse_actions[] = { [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT_EXTRA(), [5] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 0, 0, 0), - [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(293), - [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(290), - [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(296), - [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(289), - [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(324), + [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(300), + [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(304), + [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(293), + [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(310), + [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(322), [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT_EXTRA(), - [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(276), - [21] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 18), - [23] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 3, 0, 18), - [25] = {.entry = {.count = 1, .reusable = true}}, SHIFT(317), - [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(220), - [29] = {.entry = {.count = 1, .reusable = true}}, SHIFT(220), - [31] = {.entry = {.count = 1, .reusable = true}}, SHIFT(116), - [33] = {.entry = {.count = 1, .reusable = true}}, SHIFT(114), - [35] = {.entry = {.count = 1, .reusable = true}}, SHIFT(100), - [37] = {.entry = {.count = 1, .reusable = true}}, SHIFT(272), - [39] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 2, 0, 9), - [41] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 2, 0, 9), - [43] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 49), - [45] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 5, 0, 49), - [47] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 93), - [49] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 6, 0, 93), - [51] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 16), - [53] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 3, 0, 16), - [55] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 17), - [57] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 3, 0, 17), - [59] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 34), - [61] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 4, 0, 34), - [63] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__asset_expr_primary, 1, 0, 0), - [65] = {.entry = {.count = 1, .reusable = true}}, SHIFT(286), - [67] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__asset_expr_primary, 1, 0, 0), - [69] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 42), - [71] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 4, 0, 42), - [73] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 41), - [75] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 4, 0, 41), - [77] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 71), - [79] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 5, 0, 71), - [81] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 121), - [83] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 7, 0, 121), - [85] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 111), - [87] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 7, 0, 111), - [89] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 122), - [91] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 7, 0, 122), - [93] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 82), - [95] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 6, 0, 82), - [97] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 83), - [99] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 6, 0, 83), - [101] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 145), - [103] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 8, 0, 145), - [105] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_expr_unop, 2, 0, 48), - [107] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asset_expr_unop, 2, 0, 48), - [109] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_attack_step_repeat1, 2, 0, 43), - [111] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_attack_step_repeat1, 2, 0, 43), - [113] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attack_step_repeat1, 2, 0, 43), SHIFT_REPEAT(317), - [116] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_expr_binop, 3, 0, 78), - [118] = {.entry = {.count = 1, .reusable = true}}, SHIFT(121), - [120] = {.entry = {.count = 1, .reusable = true}}, SHIFT(309), - [122] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asset_expr_binop, 3, 0, 78), - [124] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), - [126] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_expr_type, 4, 0, 104), - [128] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asset_expr_type, 4, 0, 104), - [130] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_variable_substitution, 3, 0, 77), - [132] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asset_variable_substitution, 3, 0, 77), - [134] = {.entry = {.count = 1, .reusable = false}}, SHIFT(120), - [136] = {.entry = {.count = 1, .reusable = true}}, SHIFT(120), - [138] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__inline_asset_expr, 3, 0, 0), - [140] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__inline_asset_expr, 3, 0, 0), - [142] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_attack_step_repeat1, 2, 0, 24), - [144] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_attack_step_repeat1, 2, 0, 24), - [146] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_expr, 1, 0, 0), - [148] = {.entry = {.count = 1, .reusable = true}}, SHIFT(122), - [150] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_category_declaration_repeat1, 2, 0, 0), SHIFT_REPEAT(324), - [153] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat1, 2, 0, 0), - [155] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_category_declaration_repeat1, 2, 0, 0), - [157] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc, 3, 0, 0), - [159] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc, 3, 0, 0), - [161] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_meta, 4, 0, 6), - [163] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_meta, 4, 0, 6), - [165] = {.entry = {.count = 1, .reusable = false}}, SHIFT(53), - [167] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 2, 0, 25), - [169] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 2, 0, 25), - [171] = {.entry = {.count = 1, .reusable = true}}, SHIFT(111), - [173] = {.entry = {.count = 1, .reusable = false}}, SHIFT(42), - [175] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 3, 0, 50), - [177] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 3, 0, 50), - [179] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 59), - [181] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 72), - [183] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 68), - [185] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 31), - [187] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 79), - [189] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 13), - [191] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 35), - [193] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector_context, 3, 0, 0), - [195] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_context, 3, 0, 0), - [197] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 4, 0, 85), - [199] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 98), - [201] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 38), - [203] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 112), - [205] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 108), - [207] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 118), - [209] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 132), - [211] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 142), - [213] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector_context, 4, 0, 0), - [215] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_context, 4, 0, 0), - [217] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 146), - [219] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 159), - [221] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 3, 0, 51), - [223] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_preconditions_repeat1, 2, 0, 0), - [225] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_preconditions_repeat1, 2, 0, 0), SHIFT_REPEAT(118), - [228] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1, 0, 0), - [230] = {.entry = {.count = 1, .reusable = true}}, SHIFT(251), - [232] = {.entry = {.count = 1, .reusable = true}}, SHIFT(310), - [234] = {.entry = {.count = 1, .reusable = true}}, SHIFT(315), - [236] = {.entry = {.count = 1, .reusable = true}}, SHIFT(249), - [238] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preconditions, 2, 0, 26), - [240] = {.entry = {.count = 1, .reusable = true}}, SHIFT(118), - [242] = {.entry = {.count = 1, .reusable = true}}, SHIFT(246), - [244] = {.entry = {.count = 1, .reusable = true}}, SHIFT(255), - [246] = {.entry = {.count = 1, .reusable = true}}, SHIFT(235), - [248] = {.entry = {.count = 1, .reusable = true}}, SHIFT(260), - [250] = {.entry = {.count = 1, .reusable = true}}, SHIFT(241), - [252] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), - [254] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(293), - [257] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(290), - [260] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(296), - [263] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(289), - [266] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preconditions, 3, 0, 53), - [268] = {.entry = {.count = 1, .reusable = true}}, SHIFT(234), - [270] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 143), - [272] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 39), - [274] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 14), - [276] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_asset_definition_repeat1, 2, 0, 0), - [278] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_asset_definition_repeat1, 2, 0, 0), SHIFT_REPEAT(310), - [281] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_asset_definition_repeat1, 2, 0, 0), SHIFT_REPEAT(315), - [284] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 80), - [286] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 4, 0, 86), - [288] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 4, 0, 87), - [290] = {.entry = {.count = 1, .reusable = false}}, SHIFT(123), - [292] = {.entry = {.count = 1, .reusable = true}}, SHIFT(75), - [294] = {.entry = {.count = 1, .reusable = false}}, SHIFT(196), - [296] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 89), - [298] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 95), - [300] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 3, 0, 52), - [302] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 99), - [304] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 101), - [306] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 105), - [308] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 28), - [310] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 109), - [312] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 113), - [314] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_definition, 1, 0, 0), - [316] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 5, 0, 115), - [318] = {.entry = {.count = 1, .reusable = false}}, SHIFT(141), - [320] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 119), - [322] = {.entry = {.count = 1, .reusable = false}}, SHIFT(142), - [324] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 56), - [326] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 124), - [328] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 129), - [330] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 32), - [332] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 133), - [334] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 135), - [336] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 139), - [338] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 60), - [340] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 62), - [342] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 65), - [344] = {.entry = {.count = 1, .reusable = false}}, SHIFT(198), - [346] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 147), - [348] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 151), - [350] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 156), - [352] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 69), - [354] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 160), - [356] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 162), - [358] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 168), - [360] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 36), - [362] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 73), - [364] = {.entry = {.count = 1, .reusable = false}}, SHIFT(200), - [366] = {.entry = {.count = 1, .reusable = false}}, SHIFT(140), - [368] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_reaching, 3, 0, 54), - [370] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), - [372] = {.entry = {.count = 1, .reusable = true}}, SHIFT(119), - [374] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_reaching, 2, 0, 27), - [376] = {.entry = {.count = 1, .reusable = true}}, SHIFT(240), - [378] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__ttc_primary, 1, 0, 0), - [380] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__ttc_primary, 1, 0, 0), - [382] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 171), - [384] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 37), - [386] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 40), - [388] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), - [390] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 55), - [392] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 57), - [394] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 58), - [396] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 61), - [398] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 63), - [400] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 64), - [402] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 66), - [404] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 67), - [406] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 70), - [408] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 74), - [410] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 81), - [412] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__ttc_parenthesized, 3, 0, 0), - [414] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__ttc_parenthesized, 3, 0, 0), - [416] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc_binop, 3, 0, 78), - [418] = {.entry = {.count = 1, .reusable = true}}, SHIFT(87), - [420] = {.entry = {.count = 1, .reusable = false}}, SHIFT(87), - [422] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89), - [424] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc_binop, 3, 0, 78), - [426] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 88), - [428] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 90), - [430] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 91), - [432] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 92), - [434] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 94), - [436] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 96), - [438] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 97), - [440] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 100), - [442] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 15), - [444] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 102), - [446] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 103), - [448] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 106), - [450] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 107), - [452] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 110), - [454] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 114), - [456] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc_distribution, 4, 0, 116), - [458] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc_distribution, 4, 0, 116), - [460] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 117), - [462] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 120), - [464] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 33), - [466] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 125), - [468] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 126), - [470] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 127), - [472] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 128), - [474] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 130), - [476] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 131), - [478] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_variable, 4, 0, 3), - [480] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 134), - [482] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 136), - [484] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 137), - [486] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc_distribution, 5, 0, 138), - [488] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc_distribution, 5, 0, 138), - [490] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 140), - [492] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 141), - [494] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 144), - [496] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 148), - [498] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 149), - [500] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 150), - [502] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 152), - [504] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 153), - [506] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 154), - [508] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 155), - [510] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 157), - [512] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 158), - [514] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 161), - [516] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 163), - [518] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 164), - [520] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 166), - [522] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 167), - [524] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 169), - [526] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 170), - [528] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 29), - [530] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 11, 0, 173), - [532] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 30), - [534] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 123), - [536] = {.entry = {.count = 1, .reusable = true}}, SHIFT(139), - [538] = {.entry = {.count = 1, .reusable = true}}, SHIFT(112), - [540] = {.entry = {.count = 1, .reusable = true}}, SHIFT(244), - [542] = {.entry = {.count = 1, .reusable = true}}, SHIFT(245), - [544] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), - [546] = {.entry = {.count = 1, .reusable = true}}, SHIFT(110), - [548] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_associations_declaration, 4, 0, 0), - [550] = {.entry = {.count = 1, .reusable = true}}, SHIFT(206), - [552] = {.entry = {.count = 1, .reusable = true}}, SHIFT(284), - [554] = {.entry = {.count = 1, .reusable = true}}, SHIFT(285), - [556] = {.entry = {.count = 1, .reusable = true}}, SHIFT(205), - [558] = {.entry = {.count = 1, .reusable = false}}, SHIFT(302), - [560] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), - [562] = {.entry = {.count = 1, .reusable = false}}, SHIFT(308), - [564] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_category_declaration, 4, 0, 2), - [566] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_category_declaration, 6, 0, 7), - [568] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_associations_declaration, 3, 0, 0), - [570] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_category_declaration, 5, 0, 5), - [572] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 1, 0, 0), - [574] = {.entry = {.count = 1, .reusable = true}}, SHIFT(216), - [576] = {.entry = {.count = 1, .reusable = true}}, SHIFT(208), - [578] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_define_declaration, 4, 0, 3), - [580] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat1, 2, 0, 0), SHIFT_REPEAT(302), - [583] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_include_declaration, 2, 0, 1), - [585] = {.entry = {.count = 1, .reusable = true}}, SHIFT(66), - [587] = {.entry = {.count = 1, .reusable = false}}, SHIFT(306), - [589] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_category_declaration, 5, 0, 4), - [591] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat2, 2, 0, 0), - [593] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat2, 2, 0, 0), SHIFT_REPEAT(284), - [596] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat2, 2, 0, 0), SHIFT_REPEAT(285), - [599] = {.entry = {.count = 1, .reusable = true}}, SHIFT(287), - [601] = {.entry = {.count = 1, .reusable = true}}, SHIFT(207), - [603] = {.entry = {.count = 1, .reusable = true}}, SHIFT(302), - [605] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), - [607] = {.entry = {.count = 1, .reusable = true}}, SHIFT(253), - [609] = {.entry = {.count = 1, .reusable = true}}, SHIFT(270), - [611] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), - [613] = {.entry = {.count = 1, .reusable = true}}, SHIFT(201), - [615] = {.entry = {.count = 1, .reusable = true}}, SHIFT(211), - [617] = {.entry = {.count = 1, .reusable = true}}, SHIFT(273), - [619] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), - [621] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), - [623] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), - [625] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_associations_declaration_repeat1, 2, 0, 0), SHIFT_REPEAT(287), - [628] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_associations_declaration_repeat1, 2, 0, 0), - [630] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_association, 13, 0, 165), SHIFT(302), - [633] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_association, 13, 0, 165), - [635] = {.entry = {.count = 1, .reusable = true}}, SHIFT(203), - [637] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57), - [639] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_association, 14, 0, 172), SHIFT(302), - [642] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_association, 14, 0, 172), - [644] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 7, 0, 23), - [646] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 4, 0, 2), - [648] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 6, 0, 19), - [650] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 6, 0, 20), - [652] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_detector_context_repeat1, 2, 0, 0), SHIFT_REPEAT(269), - [655] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_detector_context_repeat1, 2, 0, 0), - [657] = {.entry = {.count = 1, .reusable = false}}, SHIFT(266), - [659] = {.entry = {.count = 1, .reusable = true}}, SHIFT(238), - [661] = {.entry = {.count = 1, .reusable = true}}, SHIFT(172), - [663] = {.entry = {.count = 1, .reusable = false}}, SHIFT(242), - [665] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 7, 0, 22), - [667] = {.entry = {.count = 1, .reusable = true}}, SHIFT(158), - [669] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_star, 1, 0, 0), - [671] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_multiplicity, 1, 0, 0), - [673] = {.entry = {.count = 1, .reusable = true}}, SHIFT(224), - [675] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 5, 0, 8), - [677] = {.entry = {.count = 1, .reusable = true}}, SHIFT(321), - [679] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_name, 2, 0, 0), - [681] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 7, 0, 44), - [683] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 7, 0, 45), - [685] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_ttc_distribution_repeat1, 2, 0, 0), SHIFT_REPEAT(238), - [688] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_ttc_distribution_repeat1, 2, 0, 0), - [690] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 6, 0, 12), - [692] = {.entry = {.count = 1, .reusable = true}}, SHIFT(269), - [694] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), - [696] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_name, 1, 0, 0), - [698] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 8, 0, 46), - [700] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 8, 0, 47), - [702] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 5, 0, 10), + [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(264), + [21] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 2, 0, 9), + [23] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 2, 0, 9), + [25] = {.entry = {.count = 1, .reusable = true}}, SHIFT(299), + [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(216), + [29] = {.entry = {.count = 1, .reusable = true}}, SHIFT(216), + [31] = {.entry = {.count = 1, .reusable = true}}, SHIFT(111), + [33] = {.entry = {.count = 1, .reusable = true}}, SHIFT(115), + [35] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), + [37] = {.entry = {.count = 1, .reusable = true}}, SHIFT(269), + [39] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 23), + [41] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 4, 0, 23), + [43] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 42), + [45] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 5, 0, 42), + [47] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 102), + [49] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 7, 0, 102), + [51] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__asset_expr_primary, 1, 0, 0), + [53] = {.entry = {.count = 1, .reusable = true}}, SHIFT(282), + [55] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__asset_expr_primary, 1, 0, 0), + [57] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 47), + [59] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 5, 0, 47), + [61] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 17), + [63] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 3, 0, 17), + [65] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 33), + [67] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 4, 0, 33), + [69] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 46), + [71] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 5, 0, 46), + [73] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 16), + [75] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 3, 0, 16), + [77] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 129), + [79] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 8, 0, 129), + [81] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 70), + [83] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 6, 0, 70), + [85] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 71), + [87] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 6, 0, 71), + [89] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 78), + [91] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 6, 0, 78), + [93] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 130), + [95] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 8, 0, 130), + [97] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 98), + [99] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 7, 0, 98), + [101] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 148), + [103] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 9, 0, 148), + [105] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_expr_unop, 2, 0, 41), + [107] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asset_expr_unop, 2, 0, 41), + [109] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__inline_asset_expr, 3, 0, 0), + [111] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__inline_asset_expr, 3, 0, 0), + [113] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_variable_substitution, 3, 0, 65), + [115] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asset_variable_substitution, 3, 0, 65), + [117] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_expr_binop, 3, 0, 66), + [119] = {.entry = {.count = 1, .reusable = true}}, SHIFT(118), + [121] = {.entry = {.count = 1, .reusable = true}}, SHIFT(276), + [123] = {.entry = {.count = 1, .reusable = false}}, SHIFT(121), + [125] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), + [127] = {.entry = {.count = 1, .reusable = true}}, SHIFT(121), + [129] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asset_expr_binop, 3, 0, 66), + [131] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_expr_type, 4, 0, 91), + [133] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asset_expr_type, 4, 0, 91), + [135] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_expr, 1, 0, 0), + [137] = {.entry = {.count = 1, .reusable = true}}, SHIFT(117), + [139] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_category_declaration_repeat1, 2, 0, 0), SHIFT_REPEAT(322), + [142] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat1, 2, 0, 0), + [144] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_category_declaration_repeat1, 2, 0, 0), + [146] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_meta, 4, 0, 6), + [148] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_meta, 4, 0, 6), + [150] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc, 3, 0, 0), + [152] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc, 3, 0, 0), + [154] = {.entry = {.count = 1, .reusable = false}}, SHIFT(32), + [156] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 2, 0, 24), + [158] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 2, 0, 24), + [160] = {.entry = {.count = 1, .reusable = true}}, SHIFT(109), + [162] = {.entry = {.count = 1, .reusable = false}}, SHIFT(35), + [164] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 3, 0, 48), + [166] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 3, 0, 48), + [168] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 3, 0, 49), + [170] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 79), + [172] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 75), + [174] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 4, 0, 83), + [176] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 57), + [178] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 95), + [180] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector_context, 3, 0, 0), + [182] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_context, 3, 0, 0), + [184] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 99), + [186] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 30), + [188] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 107), + [190] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector_context, 4, 0, 0), + [192] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_context, 4, 0, 0), + [194] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 120), + [196] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 126), + [198] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 43), + [200] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 13), + [202] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 145), + [204] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 34), + [206] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 149), + [208] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 159), + [210] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 67), + [212] = {.entry = {.count = 1, .reusable = true}}, SHIFT(242), + [214] = {.entry = {.count = 1, .reusable = true}}, SHIFT(277), + [216] = {.entry = {.count = 1, .reusable = true}}, SHIFT(280), + [218] = {.entry = {.count = 1, .reusable = true}}, SHIFT(252), + [220] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), + [222] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(300), + [225] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(304), + [228] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(293), + [231] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(310), + [234] = {.entry = {.count = 1, .reusable = true}}, SHIFT(240), + [236] = {.entry = {.count = 1, .reusable = true}}, SHIFT(235), + [238] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preconditions, 2, 0, 25), + [240] = {.entry = {.count = 1, .reusable = true}}, SHIFT(116), + [242] = {.entry = {.count = 1, .reusable = true}}, SHIFT(244), + [244] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_preconditions_repeat1, 2, 0, 0), + [246] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_preconditions_repeat1, 2, 0, 0), SHIFT_REPEAT(116), + [249] = {.entry = {.count = 1, .reusable = true}}, SHIFT(256), + [251] = {.entry = {.count = 1, .reusable = true}}, SHIFT(259), + [253] = {.entry = {.count = 1, .reusable = true}}, SHIFT(263), + [255] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preconditions, 3, 0, 51), + [257] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1, 0, 0), + [259] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 11, 0, 167), + [261] = {.entry = {.count = 1, .reusable = false}}, SHIFT(119), + [263] = {.entry = {.count = 1, .reusable = true}}, SHIFT(66), + [265] = {.entry = {.count = 1, .reusable = false}}, SHIFT(196), + [267] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 72), + [269] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 27), + [271] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 76), + [273] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 60), + [275] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 31), + [277] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 80), + [279] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 4, 0, 84), + [281] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 4, 0, 85), + [283] = {.entry = {.count = 1, .reusable = false}}, SHIFT(141), + [285] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 87), + [287] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 35), + [289] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 92), + [291] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 96), + [293] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 100), + [295] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 104), + [297] = {.entry = {.count = 1, .reusable = false}}, SHIFT(198), + [299] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 108), + [301] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 110), + [303] = {.entry = {.count = 1, .reusable = false}}, SHIFT(140), + [305] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 5, 0, 113), + [307] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 117), + [309] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 44), + [311] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 121), + [313] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 123), + [315] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 14), + [317] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 127), + [319] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_definition, 1, 0, 0), + [321] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_asset_definition_repeat1, 2, 0, 0), + [323] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_asset_definition_repeat1, 2, 0, 0), SHIFT_REPEAT(277), + [326] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_asset_definition_repeat1, 2, 0, 0), SHIFT_REPEAT(280), + [329] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 132), + [331] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 138), + [333] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 142), + [335] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 146), + [337] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 3, 0, 50), + [339] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 150), + [341] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 156), + [343] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 58), + [345] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 160), + [347] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 162), + [349] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 68), + [351] = {.entry = {.count = 1, .reusable = false}}, SHIFT(139), + [353] = {.entry = {.count = 1, .reusable = false}}, SHIFT(194), + [355] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 54), + [357] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), + [359] = {.entry = {.count = 1, .reusable = true}}, SHIFT(120), + [361] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_reaching, 2, 0, 26), + [363] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_reaching, 3, 0, 52), + [365] = {.entry = {.count = 1, .reusable = true}}, SHIFT(243), + [367] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__ttc_primary, 1, 0, 0), + [369] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__ttc_primary, 1, 0, 0), + [371] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 12, 0, 171), + [373] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 29), + [375] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 36), + [377] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), + [379] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 45), + [381] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 53), + [383] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 55), + [385] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 56), + [387] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 59), + [389] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 61), + [391] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 62), + [393] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 69), + [395] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 73), + [397] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 74), + [399] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 77), + [401] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 81), + [403] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__ttc_parenthesized, 3, 0, 0), + [405] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__ttc_parenthesized, 3, 0, 0), + [407] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc_binop, 3, 0, 66), + [409] = {.entry = {.count = 1, .reusable = true}}, SHIFT(86), + [411] = {.entry = {.count = 1, .reusable = false}}, SHIFT(86), + [413] = {.entry = {.count = 1, .reusable = true}}, SHIFT(76), + [415] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc_binop, 3, 0, 66), + [417] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 86), + [419] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 88), + [421] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 89), + [423] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 90), + [425] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 93), + [427] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 94), + [429] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 97), + [431] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 32), + [433] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 101), + [435] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 103), + [437] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 105), + [439] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 106), + [441] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 109), + [443] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 111), + [445] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 112), + [447] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc_distribution, 4, 0, 114), + [449] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc_distribution, 4, 0, 114), + [451] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 115), + [453] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 116), + [455] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 118), + [457] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 119), + [459] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 122), + [461] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 124), + [463] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 125), + [465] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 128), + [467] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_variable, 4, 0, 3), + [469] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 131), + [471] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 133), + [473] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 134), + [475] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 135), + [477] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc_distribution, 5, 0, 136), + [479] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc_distribution, 5, 0, 136), + [481] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 137), + [483] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 139), + [485] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 140), + [487] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 141), + [489] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 143), + [491] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 144), + [493] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 147), + [495] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 151), + [497] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 152), + [499] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 154), + [501] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 155), + [503] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 157), + [505] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 158), + [507] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 161), + [509] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 163), + [511] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 164), + [513] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 11, 0, 166), + [515] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 11, 0, 168), + [517] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 11, 0, 169), + [519] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 11, 0, 170), + [521] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 28), + [523] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 15), + [525] = {.entry = {.count = 1, .reusable = true}}, SHIFT(108), + [527] = {.entry = {.count = 1, .reusable = true}}, SHIFT(107), + [529] = {.entry = {.count = 1, .reusable = true}}, SHIFT(231), + [531] = {.entry = {.count = 1, .reusable = true}}, SHIFT(247), + [533] = {.entry = {.count = 1, .reusable = true}}, SHIFT(138), + [535] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), + [537] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_category_declaration, 5, 0, 5), + [539] = {.entry = {.count = 1, .reusable = true}}, SHIFT(204), + [541] = {.entry = {.count = 1, .reusable = true}}, SHIFT(290), + [543] = {.entry = {.count = 1, .reusable = true}}, SHIFT(297), + [545] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_category_declaration, 4, 0, 2), + [547] = {.entry = {.count = 1, .reusable = true}}, SHIFT(201), + [549] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 1, 0, 0), + [551] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_category_declaration, 6, 0, 7), + [553] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_associations_declaration, 3, 0, 0), + [555] = {.entry = {.count = 1, .reusable = true}}, SHIFT(215), + [557] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat2, 2, 0, 0), + [559] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat2, 2, 0, 0), SHIFT_REPEAT(290), + [562] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat2, 2, 0, 0), SHIFT_REPEAT(297), + [565] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_define_declaration, 4, 0, 3), + [567] = {.entry = {.count = 1, .reusable = true}}, SHIFT(199), + [569] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat1, 2, 0, 0), SHIFT_REPEAT(319), + [572] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_associations_declaration, 4, 0, 0), + [574] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_include_declaration, 2, 0, 1), + [576] = {.entry = {.count = 1, .reusable = false}}, SHIFT(319), + [578] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), + [580] = {.entry = {.count = 1, .reusable = false}}, SHIFT(281), + [582] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), + [584] = {.entry = {.count = 1, .reusable = false}}, SHIFT(303), + [586] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_category_declaration, 5, 0, 4), + [588] = {.entry = {.count = 1, .reusable = true}}, SHIFT(255), + [590] = {.entry = {.count = 1, .reusable = true}}, SHIFT(273), + [592] = {.entry = {.count = 1, .reusable = true}}, SHIFT(284), + [594] = {.entry = {.count = 1, .reusable = true}}, SHIFT(211), + [596] = {.entry = {.count = 1, .reusable = true}}, SHIFT(319), + [598] = {.entry = {.count = 1, .reusable = true}}, SHIFT(209), + [600] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), + [602] = {.entry = {.count = 1, .reusable = true}}, SHIFT(205), + [604] = {.entry = {.count = 1, .reusable = true}}, SHIFT(272), + [606] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), + [608] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), + [610] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), + [612] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_associations_declaration_repeat1, 2, 0, 0), SHIFT_REPEAT(284), + [615] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_associations_declaration_repeat1, 2, 0, 0), + [617] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_association, 13, 0, 153), SHIFT(319), + [620] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_association, 13, 0, 153), + [622] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_association, 14, 0, 165), SHIFT(319), + [625] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_association, 14, 0, 165), + [627] = {.entry = {.count = 1, .reusable = true}}, SHIFT(202), + [629] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), + [631] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), + [633] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_star, 1, 0, 0), + [635] = {.entry = {.count = 1, .reusable = true}}, SHIFT(274), + [637] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42), + [639] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), + [641] = {.entry = {.count = 1, .reusable = true}}, SHIFT(283), + [643] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_name, 2, 0, 0), + [645] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 6, 0, 18), + [647] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_detector_name_repeat1, 2, 0, 0), SHIFT_REPEAT(283), + [650] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_detector_name_repeat1, 2, 0, 0), + [652] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 6, 0, 19), + [654] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_detector_context_repeat1, 2, 0, 0), SHIFT_REPEAT(274), + [657] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_detector_context_repeat1, 2, 0, 0), + [659] = {.entry = {.count = 1, .reusable = false}}, SHIFT(271), + [661] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 4, 0, 2), + [663] = {.entry = {.count = 1, .reusable = true}}, SHIFT(239), + [665] = {.entry = {.count = 1, .reusable = true}}, SHIFT(171), + [667] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 6, 0, 12), + [669] = {.entry = {.count = 1, .reusable = false}}, SHIFT(249), + [671] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 7, 0, 21), + [673] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 7, 0, 22), + [675] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 7, 0, 37), + [677] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_multiplicity, 1, 0, 0), + [679] = {.entry = {.count = 1, .reusable = true}}, SHIFT(221), + [681] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_ttc_distribution_repeat1, 2, 0, 0), SHIFT_REPEAT(239), + [684] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_ttc_distribution_repeat1, 2, 0, 0), + [686] = {.entry = {.count = 1, .reusable = true}}, SHIFT(157), + [688] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_cias, 1, 0, 0), + [690] = {.entry = {.count = 1, .reusable = true}}, SHIFT(323), + [692] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 8, 0, 39), + [694] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 8, 0, 40), + [696] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 8, 0, 63), + [698] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 9, 0, 64), + [700] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_name, 1, 0, 0), + [702] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 5, 0, 8), [704] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_cias, 2, 0, 0), - [706] = {.entry = {.count = 1, .reusable = true}}, SHIFT(297), - [708] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 8, 0, 75), - [710] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 9, 0, 76), - [712] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 5, 0, 5), - [714] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), - [716] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_cias_repeat1, 2, 0, 0), - [718] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_cias_repeat1, 2, 0, 0), SHIFT_REPEAT(297), - [721] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_detector_name_repeat1, 2, 0, 0), SHIFT_REPEAT(321), - [724] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_detector_name_repeat1, 2, 0, 0), - [726] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 6, 0, 11), - [728] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_cias, 1, 0, 0), - [730] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_context_asset, 2, 0, 84), - [732] = {.entry = {.count = 1, .reusable = true}}, SHIFT(311), - [734] = {.entry = {.count = 1, .reusable = true}}, SHIFT(265), - [736] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_multiplicity_range, 3, 0, 21), - [738] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), - [740] = {.entry = {.count = 1, .reusable = true}}, SHIFT(248), - [742] = {.entry = {.count = 1, .reusable = true}}, SHIFT(254), - [744] = {.entry = {.count = 1, .reusable = true}}, SHIFT(199), - [746] = {.entry = {.count = 1, .reusable = true}}, SHIFT(258), - [748] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), - [750] = {.entry = {.count = 1, .reusable = true}}, SHIFT(303), - [752] = {.entry = {.count = 1, .reusable = true}}, SHIFT(215), - [754] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), - [756] = {.entry = {.count = 1, .reusable = true}}, SHIFT(294), - [758] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [760] = {.entry = {.count = 1, .reusable = true}}, SHIFT(218), - [762] = {.entry = {.count = 1, .reusable = true}}, SHIFT(230), - [764] = {.entry = {.count = 1, .reusable = true}}, SHIFT(314), - [766] = {.entry = {.count = 1, .reusable = true}}, SHIFT(229), - [768] = {.entry = {.count = 1, .reusable = true}}, SHIFT(214), - [770] = {.entry = {.count = 1, .reusable = true}}, SHIFT(281), - [772] = {.entry = {.count = 1, .reusable = true}}, SHIFT(117), - [774] = {.entry = {.count = 1, .reusable = true}}, SHIFT(307), - [776] = {.entry = {.count = 1, .reusable = true}}, SHIFT(274), - [778] = {.entry = {.count = 1, .reusable = true}}, SHIFT(256), - [780] = {.entry = {.count = 1, .reusable = true}}, SHIFT(243), - [782] = {.entry = {.count = 1, .reusable = true}}, SHIFT(197), - [784] = {.entry = {.count = 1, .reusable = true}}, SHIFT(259), - [786] = {.entry = {.count = 1, .reusable = true}}, SHIFT(304), - [788] = {.entry = {.count = 1, .reusable = true}}, SHIFT(204), - [790] = {.entry = {.count = 1, .reusable = true}}, SHIFT(299), - [792] = {.entry = {.count = 1, .reusable = true}}, SHIFT(319), - [794] = {.entry = {.count = 1, .reusable = true}}, SHIFT(225), - [796] = {.entry = {.count = 1, .reusable = true}}, SHIFT(318), - [798] = {.entry = {.count = 1, .reusable = true}}, SHIFT(226), - [800] = {.entry = {.count = 1, .reusable = true}}, SHIFT(312), - [802] = {.entry = {.count = 1, .reusable = true}}, SHIFT(295), - [804] = {.entry = {.count = 1, .reusable = true}}, SHIFT(267), - [806] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), - [808] = {.entry = {.count = 1, .reusable = true}}, SHIFT(236), - [810] = {.entry = {.count = 1, .reusable = true}}, SHIFT(300), - [812] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), - [814] = {.entry = {.count = 1, .reusable = true}}, SHIFT(233), - [816] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), - [818] = {.entry = {.count = 1, .reusable = true}}, SHIFT(212), - [820] = {.entry = {.count = 1, .reusable = true}}, SHIFT(325), - [822] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), - [824] = {.entry = {.count = 1, .reusable = true}}, SHIFT(271), - [826] = {.entry = {.count = 1, .reusable = true}}, SHIFT(320), - [828] = {.entry = {.count = 1, .reusable = true}}, SHIFT(264), - [830] = {.entry = {.count = 1, .reusable = true}}, SHIFT(322), - [832] = {.entry = {.count = 1, .reusable = true}}, SHIFT(292), + [706] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_cias_repeat1, 2, 0, 0), + [708] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_cias_repeat1, 2, 0, 0), SHIFT_REPEAT(323), + [711] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 5, 0, 5), + [713] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 5, 0, 10), + [715] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 6, 0, 11), + [717] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 7, 0, 38), + [719] = {.entry = {.count = 1, .reusable = true}}, SHIFT(250), + [721] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_context_asset, 2, 0, 82), + [723] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_multiplicity_range, 3, 0, 20), + [725] = {.entry = {.count = 1, .reusable = true}}, SHIFT(321), + [727] = {.entry = {.count = 1, .reusable = true}}, SHIFT(298), + [729] = {.entry = {.count = 1, .reusable = true}}, SHIFT(301), + [731] = {.entry = {.count = 1, .reusable = true}}, SHIFT(279), + [733] = {.entry = {.count = 1, .reusable = true}}, SHIFT(226), + [735] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), + [737] = {.entry = {.count = 1, .reusable = true}}, SHIFT(224), + [739] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), + [741] = {.entry = {.count = 1, .reusable = true}}, SHIFT(266), + [743] = {.entry = {.count = 1, .reusable = true}}, SHIFT(302), + [745] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), + [747] = {.entry = {.count = 1, .reusable = true}}, SHIFT(251), + [749] = {.entry = {.count = 1, .reusable = true}}, SHIFT(308), + [751] = {.entry = {.count = 1, .reusable = true}}, SHIFT(305), + [753] = {.entry = {.count = 1, .reusable = true}}, SHIFT(260), + [755] = {.entry = {.count = 1, .reusable = true}}, SHIFT(314), + [757] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [759] = {.entry = {.count = 1, .reusable = true}}, SHIFT(245), + [761] = {.entry = {.count = 1, .reusable = true}}, SHIFT(313), + [763] = {.entry = {.count = 1, .reusable = true}}, SHIFT(237), + [765] = {.entry = {.count = 1, .reusable = true}}, SHIFT(261), + [767] = {.entry = {.count = 1, .reusable = true}}, SHIFT(208), + [769] = {.entry = {.count = 1, .reusable = true}}, SHIFT(214), + [771] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), + [773] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), + [775] = {.entry = {.count = 1, .reusable = true}}, SHIFT(212), + [777] = {.entry = {.count = 1, .reusable = true}}, SHIFT(112), + [779] = {.entry = {.count = 1, .reusable = true}}, SHIFT(307), + [781] = {.entry = {.count = 1, .reusable = true}}, SHIFT(222), + [783] = {.entry = {.count = 1, .reusable = true}}, SHIFT(228), + [785] = {.entry = {.count = 1, .reusable = true}}, SHIFT(197), + [787] = {.entry = {.count = 1, .reusable = true}}, SHIFT(246), + [789] = {.entry = {.count = 1, .reusable = true}}, SHIFT(195), + [791] = {.entry = {.count = 1, .reusable = true}}, SHIFT(278), + [793] = {.entry = {.count = 1, .reusable = true}}, SHIFT(317), + [795] = {.entry = {.count = 1, .reusable = true}}, SHIFT(220), + [797] = {.entry = {.count = 1, .reusable = true}}, SHIFT(254), + [799] = {.entry = {.count = 1, .reusable = true}}, SHIFT(253), + [801] = {.entry = {.count = 1, .reusable = true}}, SHIFT(296), + [803] = {.entry = {.count = 1, .reusable = true}}, SHIFT(213), + [805] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), + [807] = {.entry = {.count = 1, .reusable = true}}, SHIFT(288), + [809] = {.entry = {.count = 1, .reusable = true}}, SHIFT(262), + [811] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), + [813] = {.entry = {.count = 1, .reusable = true}}, SHIFT(309), + [815] = {.entry = {.count = 1, .reusable = true}}, SHIFT(318), + [817] = {.entry = {.count = 1, .reusable = true}}, SHIFT(270), + [819] = {.entry = {.count = 1, .reusable = true}}, SHIFT(320), + [821] = {.entry = {.count = 1, .reusable = true}}, SHIFT(268), }; #ifdef __cplusplus @@ -8360,7 +8347,7 @@ TS_PUBLIC const TSLanguage *tree_sitter_mal(void) { .lex_modes = (const void*)ts_lex_modes, .lex_fn = ts_lex, .keyword_lex_fn = ts_lex_keywords, - .keyword_capture_token = sym_identity, + .keyword_capture_token = sym_identifier, .primary_state_ids = ts_primary_state_ids, .name = "mal", .max_reserved_word_set_size = 0, From 2fea2b365fb8da9dc3c09f9a96193b366bcb80ee Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Mon, 10 Mar 2025 15:59:04 +0100 Subject: [PATCH 02/45] docs: Minimal visitor pattern example --- examples/visitor/README.md | 14 ++++++++++++ examples/visitor/lang.py | 5 +++++ examples/visitor/main.py | 13 +++++++++++ examples/visitor/requirements.txt | 1 + examples/visitor/simple.py | 36 +++++++++++++++++++++++++++++++ 5 files changed, 69 insertions(+) create mode 100644 examples/visitor/README.md create mode 100644 examples/visitor/lang.py create mode 100644 examples/visitor/main.py create mode 100644 examples/visitor/requirements.txt create mode 100644 examples/visitor/simple.py diff --git a/examples/visitor/README.md b/examples/visitor/README.md new file mode 100644 index 0000000..e073ac8 --- /dev/null +++ b/examples/visitor/README.md @@ -0,0 +1,14 @@ +# Visitor Pattern Example +This example showcases how a visitor pattern can be built to use the MAL parser. + +# Running +1. Install [tree-sitter-cli](https://github.com/tree-sitter/tree-sitter/tree/master/cli) +2. Build the language in the project root folder using `tree-sitter build` +4. Navigate to `./examples/visitor/` + 1. Create a virtual environment `python -m venv venv` + 2. Activate the environment (e.g. `source ./venv/bin/activate`) + 3. Install dependencies `pip install -r requirements.txt` +5. Navigate back to project root +6. Build the python dependency using `pip install -e .` +7. (Optional) swap between fast or simple visitor patterns by editing `main.py` imports +8. Execute the main file `python main.py` diff --git a/examples/visitor/lang.py b/examples/visitor/lang.py new file mode 100644 index 0000000..7eddf90 --- /dev/null +++ b/examples/visitor/lang.py @@ -0,0 +1,5 @@ +from tree_sitter import Language, Parser +import tree_sitter_mal as ts_mal + +MAL_LANGUAGE = Language(ts_mal.language()) +PARSER = Parser(MAL_LANGUAGE) diff --git a/examples/visitor/main.py b/examples/visitor/main.py new file mode 100644 index 0000000..a6d43d6 --- /dev/null +++ b/examples/visitor/main.py @@ -0,0 +1,13 @@ +from simple import MalCompiler +# or +# from fast import MalCompiler + + +# Example Python source code +source_code = b''' +#version: "1.2.3" +''' + +# Run the visitor pattern on the tree +compiler = MalCompiler() +compiler.compile(source_code) diff --git a/examples/visitor/requirements.txt b/examples/visitor/requirements.txt new file mode 100644 index 0000000..eca3be8 --- /dev/null +++ b/examples/visitor/requirements.txt @@ -0,0 +1 @@ +tree_sitter diff --git a/examples/visitor/simple.py b/examples/visitor/simple.py new file mode 100644 index 0000000..6a87798 --- /dev/null +++ b/examples/visitor/simple.py @@ -0,0 +1,36 @@ +from tree_sitter import Node +from lang import PARSER as parser + + +class ParseTreeVisitor: + def visit(self, node: Node): + # Function name of child class handling the node type + function_name = f'visit_{node.type}' + # Default to skip, in case a specific visitor can't be found + # Generally the case for anonymous nodes (keywords etc) or + # named nodes (rules) that do not have a vistor implemented yet. + visitor = getattr(self, function_name, self.skip) + # Use visitor implementaiton + return visitor(node) + + def skip(self, node: Node): + for child in node.children: + self.visit(child) + + +# Concrete visitor to process function definitions +class MalCompiler(ParseTreeVisitor): + def compile(self, source: bytes): + tree = parser.parse(source) + self.visit(tree.root_node) + + def visit_define_declaration(self, node: Node): + key = node.child_by_field_name("name").text + value = node.child_by_field_name("value").text + + print(f"Found definition -> {key}: '{value}'") + + # Iterate children nodes for whatever reason + # self.skip(node) + + return ("defines", {key: value}) From 9e56d7512c95a7d6ade156621e5a2a03a1f196ae Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Mon, 10 Mar 2025 16:00:33 +0100 Subject: [PATCH 03/45] chore: Add __pycache__ to ignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 308fcab..40bc158 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ _obj/ dist/ *.egg-info *.whl +__pycache__/ # C artifacts *.a From 5266b7c05748556b67c2dd16670d8367f37f8ab3 Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Wed, 12 Mar 2025 12:44:21 +0100 Subject: [PATCH 04/45] refactor: Rename 'identity' to 'identifier' in tests --- test/corpus/asset.ts-test | 38 +++++------ test/corpus/association.ts-test | 106 +++++++++++++++--------------- test/corpus/attackstep.ts-test | 108 +++++++++++++++---------------- test/corpus/category.ts-test | 12 ++-- test/corpus/define.ts-test | 8 +-- test/corpus/detector.ts-test | 66 +++++++++---------- test/corpus/precondition.ts-test | 62 +++++++++--------- test/corpus/variable.ts-test | 8 +-- 8 files changed, 204 insertions(+), 204 deletions(-) diff --git a/test/corpus/asset.ts-test b/test/corpus/asset.ts-test index deee2ec..b0e88ce 100644 --- a/test/corpus/asset.ts-test +++ b/test/corpus/asset.ts-test @@ -11,9 +11,9 @@ category Test { (source_file (declaration (category_declaration - id: (identity) + id: (identifier) assets: (asset_declaration - id: (identity))))) + id: (identifier))))) ================================ Empty Abstract Asset Declaration @@ -28,9 +28,9 @@ category Test { (source_file (declaration (category_declaration - id: (identity) + id: (identifier) assets: (asset_declaration - id: (identity))))) + id: (identifier))))) ================================= Empty Extending Asset Declaration @@ -45,10 +45,10 @@ category Test { (source_file (declaration (category_declaration - id: (identity) + id: (identifier) assets: (asset_declaration - id: (identity) - extends: (identity))))) + id: (identifier) + extends: (identifier))))) ========================================== Empty Extending Abstract Asset Declaration @@ -64,10 +64,10 @@ category Test { (source_file (declaration (category_declaration - id: (identity) + id: (identifier) assets: (asset_declaration - id: (identity) - extends: (identity))))) + id: (identifier) + extends: (identifier))))) ================ Two Empty Assets @@ -83,11 +83,11 @@ category Test { (source_file (declaration (category_declaration - id: (identity) + id: (identifier) assets: (asset_declaration - id: (identity)) + id: (identifier)) assets: (asset_declaration - id: (identity))))) + id: (identifier))))) ====================================== Empty Asset Declaration with Meta Info @@ -105,17 +105,17 @@ category Test { (source_file (declaration (category_declaration - id: (identity) + id: (identifier) assets: (asset_declaration - id: (identity) + id: (identifier) meta: (meta - id: (identity) + id: (identifier) info: (meta_string)) meta: (meta - id: (identity) + id: (identifier) info: (meta_string))) assets: (asset_declaration - id: (identity) + id: (identifier) meta: (meta - id: (identity) + id: (identifier) info: (meta_string)))))) diff --git a/test/corpus/association.ts-test b/test/corpus/association.ts-test index 6056ad2..a694104 100644 --- a/test/corpus/association.ts-test +++ b/test/corpus/association.ts-test @@ -24,15 +24,15 @@ associations { (declaration (associations_declaration (association - left_id: (identity) - left_field_id: (identity) + left_id: (identifier) + left_field_id: (identifier) left_mult: (multiplicity (integer)) - id: (identity) + id: (identifier) right_mult: (multiplicity (integer)) - right_field_id: (identity) - right_id: (identity))))) + right_field_id: (identifier) + right_id: (identifier))))) ========================== Association Multiplicities @@ -53,81 +53,81 @@ associations { (declaration (associations_declaration (association - left_id: (identity) - left_field_id: (identity) + left_id: (identifier) + left_field_id: (identifier) left_mult: (multiplicity (integer)) - id: (identity) + id: (identifier) right_mult: (multiplicity (integer)) - right_field_id: (identity) - right_id: (identity)) + right_field_id: (identifier) + right_id: (identifier)) (association - left_id: (identity) - left_field_id: (identity) + left_id: (identifier) + left_field_id: (identifier) left_mult: (multiplicity (star)) - id: (identity) + id: (identifier) right_mult: (multiplicity (star)) - right_field_id: (identity) - right_id: (identity)) + right_field_id: (identifier) + right_id: (identifier)) (association - left_id: (identity) - left_field_id: (identity) + left_id: (identifier) + left_field_id: (identifier) left_mult: (multiplicity (multiplicity_range start: (integer) end: (integer))) - id: (identity) + id: (identifier) right_mult: (multiplicity (multiplicity_range start: (integer) end: (integer))) - right_field_id: (identity) - right_id: (identity)) + right_field_id: (identifier) + right_id: (identifier)) (association - left_id: (identity) - left_field_id: (identity) + left_id: (identifier) + left_field_id: (identifier) left_mult: (multiplicity (multiplicity_range start: (integer) end: (star))) - id: (identity) + id: (identifier) right_mult: (multiplicity (multiplicity_range start: (integer) end: (star))) - right_field_id: (identity) - right_id: (identity)) + right_field_id: (identifier) + right_id: (identifier)) (association - left_id: (identity) - left_field_id: (identity) + left_id: (identifier) + left_field_id: (identifier) left_mult: (multiplicity (multiplicity_range start: (star) end: (integer))) - id: (identity) + id: (identifier) right_mult: (multiplicity (multiplicity_range start: (star) end: (integer))) - right_field_id: (identity) - right_id: (identity)) + right_field_id: (identifier) + right_id: (identifier)) (association - left_id: (identity) - left_field_id: (identity) + left_id: (identifier) + left_field_id: (identifier) left_mult: (multiplicity (multiplicity_range start: (star) end: (star))) - id: (identity) + id: (identifier) right_mult: (multiplicity (multiplicity_range start: (star) end: (star))) - right_field_id: (identity) - right_id: (identity))))) + right_field_id: (identifier) + right_id: (identifier))))) =============================== Association Declaration example @@ -143,15 +143,15 @@ associations { (declaration (associations_declaration (association - left_id: (identity) - left_field_id: (identity) + left_id: (identifier) + left_field_id: (identifier) left_mult: (multiplicity (star)) - id: (identity) + id: (identifier) right_mult: (multiplicity (star)) - right_field_id: (identity) - right_id: (identity))))) + right_field_id: (identifier) + right_id: (identifier))))) ====================================== Association Declaration with Meta Info @@ -170,31 +170,31 @@ associations { (declaration (associations_declaration (association - left_id: (identity) - left_field_id: (identity) + left_id: (identifier) + left_field_id: (identifier) left_mult: (multiplicity (integer)) - id: (identity) + id: (identifier) right_mult: (multiplicity (integer)) - right_field_id: (identity) - right_id: (identity) + right_field_id: (identifier) + right_id: (identifier) meta: (meta - id: (identity) + id: (identifier) info: (meta_string)) meta: (meta - id: (identity) + id: (identifier) info: (meta_string))) (association - left_id: (identity) - left_field_id: (identity) + left_id: (identifier) + left_field_id: (identifier) left_mult: (multiplicity (integer)) - id: (identity) + id: (identifier) right_mult: (multiplicity (integer)) - right_field_id: (identity) - right_id: (identity) + right_field_id: (identifier) + right_id: (identifier) meta: (meta - id: (identity) + id: (identifier) info: (meta_string)))))) diff --git a/test/corpus/attackstep.ts-test b/test/corpus/attackstep.ts-test index 75f6d16..d35dea1 100644 --- a/test/corpus/attackstep.ts-test +++ b/test/corpus/attackstep.ts-test @@ -17,20 +17,20 @@ category Test { (source_file (declaration (category_declaration - id: (identity) + id: (identifier) assets: (asset_declaration - id: (identity) + id: (identifier) body: (asset_definition (attack_step - id: (identity)) + id: (identifier)) (attack_step - id: (identity)) + id: (identifier)) (attack_step - id: (identity)) + id: (identifier)) (attack_step - id: (identity)) + id: (identifier)) (attack_step - id: (identity))))))) + id: (identifier))))))) ==================== Attack-step with Tag @@ -47,13 +47,13 @@ category Test { (source_file (declaration (category_declaration - id: (identity) + id: (identifier) assets: (asset_declaration - id: (identity) + id: (identifier) body: (asset_definition (attack_step - id: (identity) - tag: (identity))))))) + id: (identifier) + tag: (identifier))))))) ============================== Attack-step with Multiple Tags @@ -98,29 +98,29 @@ category Test { (source_file (declaration (category_declaration - id: (identity) + id: (identifier) assets: (asset_declaration - id: (identity) + id: (identifier) body: (asset_definition (attack_step - id: (identity) + id: (identifier) cias: (cias (cia))) (attack_step - id: (identity) + id: (identifier) cias: (cias (cia))) (attack_step - id: (identity) + id: (identifier) cias: (cias (cia))) (attack_step - id: (identity) + id: (identifier) cias: (cias (cia) (cia))) (attack_step - id: (identity) + id: (identifier) cias: (cias (cia) (cia)))))))) @@ -151,46 +151,46 @@ category Test { (source_file (declaration (category_declaration - id: (identity) + id: (identifier) assets: (asset_declaration - id: (identity) + id: (identifier) body: (asset_definition (attack_step - id: (identity) + id: (identifier) ttc: (ttc (integer))) (attack_step - id: (identity) + id: (identifier) ttc: (ttc (ttc_binop left: (integer) right: (integer)))) (attack_step - id: (identity) + id: (identifier) ttc: (ttc (ttc_binop left: (integer) right: (integer)))) (attack_step - id: (identity) + id: (identifier) ttc: (ttc (ttc_binop left: (integer) right: (integer)))) (attack_step - id: (identity) + id: (identifier) ttc: (ttc (ttc_binop left: (integer) right: (integer)))) (attack_step - id: (identity) + id: (identifier) ttc: (ttc (ttc_binop left: (integer) right: (integer)))) (attack_step - id: (identity) + id: (identifier) ttc: (ttc (ttc_binop left: (integer) @@ -198,7 +198,7 @@ category Test { left: (integer) right: (integer))))) (attack_step - id: (identity) + id: (identifier) ttc: (ttc (ttc_binop left: (integer) @@ -206,7 +206,7 @@ category Test { left: (integer) right: (integer))))) (attack_step - id: (identity) + id: (identifier) ttc: (ttc (ttc_binop left: (ttc_binop @@ -214,20 +214,20 @@ category Test { right: (integer)) right: (integer)))) (attack_step - id: (identity) + id: (identifier) ttc: (ttc - (identity))) + (identifier))) (attack_step - id: (identity) + id: (identifier) ttc: (ttc (ttc_distribution - id: (identity) + id: (identifier) values: (integer)))) (attack_step - id: (identity) + id: (identifier) ttc: (ttc (ttc_distribution - id: (identity) + id: (identifier) values: (integer) values: (integer))))))))) @@ -249,22 +249,22 @@ category Test { (source_file (declaration (category_declaration - id: (identity) + id: (identifier) assets: (asset_declaration - id: (identity) + id: (identifier) body: (asset_definition (attack_step - id: (identity) + id: (identifier) meta: (meta - id: (identity) + id: (identifier) info: (meta_string)) meta: (meta - id: (identity) + id: (identifier) info: (meta_string))) (attack_step - id: (identity) + id: (identifier) meta: (meta - id: (identity) + id: (identifier) info: (meta_string)))))))) ========================= @@ -289,31 +289,31 @@ category Test { (source_file (declaration (category_declaration - id: (identity) + id: (identifier) assets: (asset_declaration - id: (identity) + id: (identifier) body: (asset_definition (attack_step - id: (identity) + id: (identifier) reaches: (reaching reaches: (asset_expr - (identity)))) + (identifier)))) (attack_step - id: (identity) + id: (identifier) reaches: (reaching reaches: (asset_expr - (identity)) + (identifier)) reaches: (asset_expr - (identity)))) + (identifier)))) (attack_step - id: (identity) + id: (identifier) reaches: (reaching reaches: (asset_expr - (identity)))) + (identifier)))) (attack_step - id: (identity) + id: (identifier) reaches: (reaching reaches: (asset_expr - (identity)) + (identifier)) reaches: (asset_expr - (identity))))))))) + (identifier))))))))) diff --git a/test/corpus/category.ts-test b/test/corpus/category.ts-test index f275954..fa62f82 100644 --- a/test/corpus/category.ts-test +++ b/test/corpus/category.ts-test @@ -9,7 +9,7 @@ category System {} (source_file (declaration (category_declaration - id: (identity)))) + id: (identifier)))) ========================================= Empty Category Declaration with Meta Info @@ -25,16 +25,16 @@ category System sameLine info: "Meta on same line" {} (source_file (declaration (category_declaration - id: (identity) + id: (identifier) meta: (meta - id: (identity) + id: (identifier) info: (meta_string)) meta: (meta - id: (identity) + id: (identifier) info: (meta_string)))) (declaration (category_declaration - id: (identity) + id: (identifier) meta: (meta - id: (identity) + id: (identifier) info: (meta_string))))) diff --git a/test/corpus/define.ts-test b/test/corpus/define.ts-test index 3fe9598..608eec2 100644 --- a/test/corpus/define.ts-test +++ b/test/corpus/define.ts-test @@ -9,7 +9,7 @@ Define Declaration (source_file (declaration (define_declaration - id: (identity) + id: (identifier) value: (string)))) =========================== @@ -25,15 +25,15 @@ Multiple Define Declaration (source_file (declaration (define_declaration - id: (identity) + id: (identifier) value: (string))) (declaration (define_declaration - id: (identity) + id: (identifier) value: (string))) (declaration (define_declaration - id: (identity) + id: (identifier) value: (string)))) ============================================= diff --git a/test/corpus/detector.ts-test b/test/corpus/detector.ts-test index 9b5bef1..2f0a44d 100644 --- a/test/corpus/detector.ts-test +++ b/test/corpus/detector.ts-test @@ -13,20 +13,20 @@ category Test { (source_file (declaration (category_declaration - id: (identity) + id: (identifier) assets: (asset_declaration - id: (identity) + id: (identifier) body: (asset_definition (attack_step - id: (identity) + id: (identifier) detector: (detector context: (detector_context (detector_context_asset - type: (identity) - id: (identity)) + type: (identifier) + id: (identifier)) (detector_context_asset - type: (identity) - id: (identity)))))))))) + type: (identifier) + id: (identifier)))))))))) ========================== Commented Minimal Detector @@ -43,20 +43,20 @@ category Test { (source_file (declaration (category_declaration - id: (identity) + id: (identifier) assets: (asset_declaration - id: (identity) + id: (identifier) body: (asset_definition (attack_step - id: (identity) + id: (identifier) detector: (detector context: (detector_context (detector_context_asset - type: (identity) - id: (identity)) + type: (identifier) + id: (identifier)) (detector_context_asset - type: (identity) - id: (identity)))))))))) + type: (identifier) + id: (identifier)))))))))) =========================== Detector with Detector Name @@ -73,21 +73,21 @@ category Test { (source_file (declaration (category_declaration - id: (identity) + id: (identifier) assets: (asset_declaration - id: (identity) + id: (identifier) body: (asset_definition (attack_step - id: (identity) + id: (identifier) detector: (detector name: (detector_name - (identity) - (identity) - (identity)) + (identifier) + (identifier) + (identifier)) context: (detector_context (detector_context_asset - type: (identity) - id: (identity)))))))))) + type: (identifier) + id: (identifier)))))))))) =========================== Detector with Detector Type @@ -104,18 +104,18 @@ category Test { (source_file (declaration (category_declaration - id: (identity) + id: (identifier) assets: (asset_declaration - id: (identity) + id: (identifier) body: (asset_definition (attack_step - id: (identity) + id: (identifier) detector: (detector context: (detector_context (detector_context_asset - type: (identity) - id: (identity))) - type: (identity)))))))) + type: (identifier) + id: (identifier))) + type: (identifier)))))))) ================= Detector with TTC @@ -132,16 +132,16 @@ category Test { (source_file (declaration (category_declaration - id: (identity) + id: (identifier) assets: (asset_declaration - id: (identity) + id: (identifier) body: (asset_definition (attack_step - id: (identity) + id: (identifier) detector: (detector context: (detector_context (detector_context_asset - type: (identity) - id: (identity))) + type: (identifier) + id: (identifier))) ttc: (ttc (integer))))))))) diff --git a/test/corpus/precondition.ts-test b/test/corpus/precondition.ts-test index 7c241b7..d566450 100644 --- a/test/corpus/precondition.ts-test +++ b/test/corpus/precondition.ts-test @@ -16,22 +16,22 @@ category Test { (source_file (declaration (category_declaration - id: (identity) + id: (identifier) assets: (asset_declaration - id: (identity) + id: (identifier) body: (asset_definition (attack_step - id: (identity) + id: (identifier) preconditions: (preconditions condition: (asset_expr - (identity)))) + (identifier)))) (attack_step - id: (identity) + id: (identifier) preconditions: (preconditions condition: (asset_expr - (identity)) + (identifier)) condition: (asset_expr - (identity))))))))) + (identifier))))))))) ============================================================ Attack-step with asset expression operators in Pre-condition @@ -58,54 +58,54 @@ category Test { (source_file (declaration (category_declaration - id: (identity) + id: (identifier) assets: (asset_declaration - id: (identity) + id: (identifier) body: (asset_definition (attack_step - id: (identity) + id: (identifier) preconditions: (preconditions condition: (asset_expr - (identity)) + (identifier)) condition: (asset_expr (asset_expr_binop - left: (identity) - right: (identity))) + left: (identifier) + right: (identifier))) condition: (asset_expr (asset_expr_binop - left: (identity) - right: (identity))) + left: (identifier) + right: (identifier))) condition: (asset_expr (asset_expr_binop - left: (identity) - right: (identity))) + left: (identifier) + right: (identifier))) condition: (asset_expr (asset_expr_binop - left: (identity) - right: (identity))) + left: (identifier) + right: (identifier))) condition: (asset_expr (asset_expr_binop left: (asset_expr_binop - left: (identity) - right: (identity)) - right: (identity))) + left: (identifier) + right: (identifier)) + right: (identifier))) condition: (asset_expr (asset_expr_binop left: (asset_variable_substitution - id: (identity)) - right: (identity))) + id: (identifier)) + right: (identifier))) condition: (asset_expr (asset_expr_binop left: (asset_expr_unop - expression: (identity)) - right: (identity))) + expression: (identifier)) + right: (identifier))) condition: (asset_expr (asset_expr_type - expression: (identity) - type_id: (identity))) + expression: (identifier) + type_id: (identifier))) condition: (asset_expr (asset_expr_type expression: (asset_expr_type - expression: (identity) - type_id: (identity)) - type_id: (identity)))))))))) + expression: (identifier) + type_id: (identifier)) + type_id: (identifier)))))))))) diff --git a/test/corpus/variable.ts-test b/test/corpus/variable.ts-test index 810f2da..575415b 100644 --- a/test/corpus/variable.ts-test +++ b/test/corpus/variable.ts-test @@ -13,11 +13,11 @@ category Test { (source_file (declaration (category_declaration - id: (identity) + id: (identifier) assets: (asset_declaration - id: (identity) + id: (identifier) body: (asset_definition (asset_variable - id: (identity) + id: (identifier) value: (asset_expr - (identity)))))))) + (identifier)))))))) From 7d367e78e5fd0ebcf1473640ccc133976265b470 Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Wed, 12 Mar 2025 12:50:20 +0100 Subject: [PATCH 05/45] refactor: Rename 'identity' to 'identifier' in highlighting query --- queries/highlights.scm | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/queries/highlights.scm b/queries/highlights.scm index b5155ae..6b10b47 100644 --- a/queries/highlights.scm +++ b/queries/highlights.scm @@ -84,36 +84,36 @@ (float) @number.float ; Semantic objects -(define_declaration id: (identity) @constant) -(ttc_distribution id: (identity) @function.builtin) -(ttc (identity) @type) -(category_declaration id: (identity) @module) +(define_declaration id: (identifier) @constant) +(ttc_distribution id: (identifier) @function.builtin) +(ttc (identifier) @type) +(category_declaration id: (identifier) @module) (association - left_id: (identity) @type - left_field_id: (identity) @property - right_field_id: (identity) @property - right_id: (identity) @type) + left_id: (identifier) @type + left_field_id: (identifier) @property + right_field_id: (identifier) @property + right_id: (identifier) @type) (asset_declaration - [id: (identity) - extends: (identity)] @type) + [id: (identifier) + extends: (identifier)] @type) (detector_context_asset - type: (identity) @type - id: (identity) @property) + type: (identifier) @type + id: (identifier) @property) (asset_variable_substitution - id: (identity) @variable) + id: (identifier) @variable) (asset_variable - id: (identity) @variable) + id: (identifier) @variable) -(asset_expr (identity) @property) -(asset_expr [(identity) @function +(asset_expr (identifier) @property) +(asset_expr [(identifier) @function (asset_expr_binop left: (_)* operator: "." - right: (identity) @function)] .) + right: (identifier) @function)] .) ; Miscellaneous (comment) @comment -(attack_step tag: (identity) @tag +(attack_step tag: (identifier) @tag (#not-match? @tag "hidden|debug|trace")) -(attack_step tag: (identity) @tag.builtin +(attack_step tag: (identifier) @tag.builtin (#match? @tag.builtin "hidden|debug|trace")) From e2fecdc3a87c51db14cf49a1ee8aa46540a6acbf Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Mon, 17 Mar 2025 10:26:43 +0100 Subject: [PATCH 06/45] fix: Identifier field is 'id' not 'name' --- examples/visitor/simple.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/visitor/simple.py b/examples/visitor/simple.py index 6a87798..c34c770 100644 --- a/examples/visitor/simple.py +++ b/examples/visitor/simple.py @@ -25,7 +25,7 @@ def compile(self, source: bytes): self.visit(tree.root_node) def visit_define_declaration(self, node: Node): - key = node.child_by_field_name("name").text + key = node.child_by_field_name("id").text value = node.child_by_field_name("value").text print(f"Found definition -> {key}: '{value}'") From 9e4c830c9115d5d4971698c563d571a3ae81775f Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Mon, 17 Mar 2025 10:29:53 +0100 Subject: [PATCH 07/45] docs: Improve output by decoding bytes type in visitor example --- examples/visitor/simple.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/visitor/simple.py b/examples/visitor/simple.py index c34c770..48dda6e 100644 --- a/examples/visitor/simple.py +++ b/examples/visitor/simple.py @@ -28,7 +28,8 @@ def visit_define_declaration(self, node: Node): key = node.child_by_field_name("id").text value = node.child_by_field_name("value").text - print(f"Found definition -> {key}: '{value}'") + # Need to call decode because the text field is a `bytes` type. + print(f"Found definition -> {key.decode()}: '{value.decode()}'") # Iterate children nodes for whatever reason # self.skip(node) From e02583a9ea03b2617207fa8079ba66f8b4632618 Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Mon, 17 Mar 2025 10:34:59 +0100 Subject: [PATCH 08/45] docs: Use relative path instead of changing directory --- examples/visitor/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/visitor/README.md b/examples/visitor/README.md index e073ac8..995fcd6 100644 --- a/examples/visitor/README.md +++ b/examples/visitor/README.md @@ -8,7 +8,6 @@ This example showcases how a visitor pattern can be built to use the MAL parser. 1. Create a virtual environment `python -m venv venv` 2. Activate the environment (e.g. `source ./venv/bin/activate`) 3. Install dependencies `pip install -r requirements.txt` -5. Navigate back to project root -6. Build the python dependency using `pip install -e .` +6. Build the python dependency using `pip install -e ../..` (Path should direct to project root) 7. (Optional) swap between fast or simple visitor patterns by editing `main.py` imports 8. Execute the main file `python main.py` From e8087e185f5e90d379907c4a6195e1011a2d89c4 Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Tue, 18 Mar 2025 15:56:38 +0100 Subject: [PATCH 09/45] docs: Example of fast visitor pattern using tree sitter cursor --- examples/visitor/fast.py | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 examples/visitor/fast.py diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py new file mode 100644 index 0000000..7d1d952 --- /dev/null +++ b/examples/visitor/fast.py @@ -0,0 +1,55 @@ +from tree_sitter import TreeCursor +from lang import PARSER as parser + + +class ParseTreeVisitor: + def visit(self, cursor: TreeCursor): + # Function name of child class handling the node type + function_name = f'visit_{cursor.node.type}' + + # Enter into the node + has_children = cursor.goto_first_child() + + # Default to skip, in case a specific visitor can't be found + # Generally the case for anonymous nodes (keywords etc) or + # named nodes (rules) that do not have a vistor implemented yet. + visitor = getattr(self, function_name, self.skip) + + # Use visitor implementation + visitor_value = visitor(cursor) + + # Exit the node + if has_children: + cursor.goto_parent() + + return visitor_value + + def skip(self, cursor: TreeCursor): + self.visit(cursor) + while cursor.goto_next_sibling(): + self.visit(cursor) + + +# Concrete visitor to process function definitions +class MalCompiler(ParseTreeVisitor): + def compile(self, source: bytes): + tree = parser.parse(source) + self.visit(tree.walk()) + + def visit_define_declaration(self, cursor: TreeCursor): + # '#' (identity) ':' (string) + # skip '#' node + cursor.goto_next_sibling() + # grab (identity) node + key = cursor.node.text + # next node + cursor.goto_next_sibling() + # skip ':' node + cursor.goto_next_sibling() + # grab (string) node + value = cursor.node.text + + # Need to call decode because the text field is a `bytes` type. + print(f"Found definition -> {key.decode()}: '{value.decode()}'") + + return ("defines", {key: value}) From afe0a62b000594585fe016b9d90b2d5d6890637e Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Fri, 21 Mar 2025 11:13:21 +0100 Subject: [PATCH 10/45] docs: Include return of iterable values in skip visit function of example --- examples/visitor/fast.py | 8 ++++++-- examples/visitor/simple.py | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index 7d1d952..c1e17ac 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -25,9 +25,13 @@ def visit(self, cursor: TreeCursor): return visitor_value def skip(self, cursor: TreeCursor): - self.visit(cursor) + visitor_value = self.visit(cursor) + if visitor_value: + yield visitor_value while cursor.goto_next_sibling(): - self.visit(cursor) + visitor_value = self.visit(cursor) + if visitor_value: + yield visitor_value # Concrete visitor to process function definitions diff --git a/examples/visitor/simple.py b/examples/visitor/simple.py index 48dda6e..6cef928 100644 --- a/examples/visitor/simple.py +++ b/examples/visitor/simple.py @@ -15,7 +15,9 @@ def visit(self, node: Node): def skip(self, node: Node): for child in node.children: - self.visit(child) + visitor_value = self.visit(child) + if visitor_value: + yield visitor_value # Concrete visitor to process function definitions From 71c62513551103530202d7173d96b84281cac714 Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Fri, 21 Mar 2025 11:16:13 +0100 Subject: [PATCH 11/45] docs: Comment on necessary naming patterns of visitor functions in example --- examples/visitor/fast.py | 1 + examples/visitor/simple.py | 1 + 2 files changed, 2 insertions(+) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index c1e17ac..4d8e044 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -40,6 +40,7 @@ def compile(self, source: bytes): tree = parser.parse(source) self.visit(tree.walk()) + # Named visit_{rule name in grammar.js} def visit_define_declaration(self, cursor: TreeCursor): # '#' (identity) ':' (string) # skip '#' node diff --git a/examples/visitor/simple.py b/examples/visitor/simple.py index 6cef928..a0a2fcf 100644 --- a/examples/visitor/simple.py +++ b/examples/visitor/simple.py @@ -26,6 +26,7 @@ def compile(self, source: bytes): tree = parser.parse(source) self.visit(tree.root_node) + # Named visit_{rule name in grammar.js} def visit_define_declaration(self, node: Node): key = node.child_by_field_name("id").text value = node.child_by_field_name("value").text From 2eef7e024dd0417fe80903ead79e56cc1177aeba Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Fri, 21 Mar 2025 11:27:13 +0100 Subject: [PATCH 12/45] docs: Decode node text in return value of visitor example --- examples/visitor/fast.py | 2 +- examples/visitor/simple.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index 4d8e044..daf8b36 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -57,4 +57,4 @@ def visit_define_declaration(self, cursor: TreeCursor): # Need to call decode because the text field is a `bytes` type. print(f"Found definition -> {key.decode()}: '{value.decode()}'") - return ("defines", {key: value}) + return ("defines", {key.decode(): value.decode()}) diff --git a/examples/visitor/simple.py b/examples/visitor/simple.py index a0a2fcf..d52db53 100644 --- a/examples/visitor/simple.py +++ b/examples/visitor/simple.py @@ -37,4 +37,4 @@ def visit_define_declaration(self, node: Node): # Iterate children nodes for whatever reason # self.skip(node) - return ("defines", {key: value}) + return ("defines", {key.decode(): value.decode()}) From edce9b958b2e9a413bb31335f03986c35e3997a4 Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Tue, 25 Mar 2025 12:01:19 +0100 Subject: [PATCH 13/45] docs: Replace generator function with multiple type return in visitor example This makes the behavior more predictiable and readable. --- examples/visitor/fast.py | 18 ++++++++++++------ examples/visitor/simple.py | 13 ++++++++++--- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index daf8b36..40e57ef 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -25,13 +25,19 @@ def visit(self, cursor: TreeCursor): return visitor_value def skip(self, cursor: TreeCursor): - visitor_value = self.visit(cursor) - if visitor_value: - yield visitor_value + values = [] + if visitor_value := self.visit(cursor): + values.append(visitor_value) while cursor.goto_next_sibling(): - visitor_value = self.visit(cursor) - if visitor_value: - yield visitor_value + if visitor_value := self.visit(cursor): + values.append(visitor_value) + match len(values): + case 0: + return None + case 1: + return values[0] + case _: + return values # Concrete visitor to process function definitions diff --git a/examples/visitor/simple.py b/examples/visitor/simple.py index d52db53..0c72b29 100644 --- a/examples/visitor/simple.py +++ b/examples/visitor/simple.py @@ -14,10 +14,17 @@ def visit(self, node: Node): return visitor(node) def skip(self, node: Node): + values = [] for child in node.children: - visitor_value = self.visit(child) - if visitor_value: - yield visitor_value + if visitor_value := self.visit(child): + values.append(visitor_value) + match len(values): + case 0: + return None + case 1: + return values[0] + case _: + return values # Concrete visitor to process function definitions From 2a5224a8561ed57c1d691131f10120244051d9d0 Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Tue, 25 Mar 2025 12:59:34 +0100 Subject: [PATCH 14/45] docs: Provide return type hints for functions in visitor example --- examples/visitor/fast.py | 9 ++++++--- examples/visitor/simple.py | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index 40e57ef..a62c59a 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -1,9 +1,12 @@ from tree_sitter import TreeCursor +from typing import Tuple from lang import PARSER as parser +ASTNode = Tuple[str, object] + class ParseTreeVisitor: - def visit(self, cursor: TreeCursor): + def visit(self, cursor: TreeCursor) -> ASTNode | list[ASTNode] | None: # Function name of child class handling the node type function_name = f'visit_{cursor.node.type}' @@ -24,7 +27,7 @@ def visit(self, cursor: TreeCursor): return visitor_value - def skip(self, cursor: TreeCursor): + def skip(self, cursor: TreeCursor) -> ASTNode | list[ASTNode] | None: values = [] if visitor_value := self.visit(cursor): values.append(visitor_value) @@ -47,7 +50,7 @@ def compile(self, source: bytes): self.visit(tree.walk()) # Named visit_{rule name in grammar.js} - def visit_define_declaration(self, cursor: TreeCursor): + def visit_define_declaration(self, cursor: TreeCursor) -> ASTNode: # '#' (identity) ':' (string) # skip '#' node cursor.goto_next_sibling() diff --git a/examples/visitor/simple.py b/examples/visitor/simple.py index 0c72b29..cec737c 100644 --- a/examples/visitor/simple.py +++ b/examples/visitor/simple.py @@ -1,9 +1,12 @@ from tree_sitter import Node +from typing import Tuple from lang import PARSER as parser +ASTNode = Tuple[str, object] + class ParseTreeVisitor: - def visit(self, node: Node): + def visit(self, node: Node) -> ASTNode | list[ASTNode] | None: # Function name of child class handling the node type function_name = f'visit_{node.type}' # Default to skip, in case a specific visitor can't be found @@ -13,7 +16,7 @@ def visit(self, node: Node): # Use visitor implementaiton return visitor(node) - def skip(self, node: Node): + def skip(self, node: Node) -> ASTNode | list[ASTNode] | None: values = [] for child in node.children: if visitor_value := self.visit(child): @@ -34,7 +37,7 @@ def compile(self, source: bytes): self.visit(tree.root_node) # Named visit_{rule name in grammar.js} - def visit_define_declaration(self, node: Node): + def visit_define_declaration(self, node: Node) -> ASTNode: key = node.child_by_field_name("id").text value = node.child_by_field_name("value").text From 0a1e422c75318494cdb2242acc3adb027c6638f4 Mon Sep 17 00:00:00 2001 From: Tomas Fonseca Date: Wed, 2 Apr 2025 20:36:19 +0200 Subject: [PATCH 15/45] feat: Started implementing visitor --- examples/visitor/fast.py | 302 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 295 insertions(+), 7 deletions(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index a62c59a..2196bd8 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -6,7 +6,63 @@ class ParseTreeVisitor: - def visit(self, cursor: TreeCursor) -> ASTNode | list[ASTNode] | None: + def visit(self, cursor, params = None): + function_name = f'visit_{cursor.node.type}' # obtain the appropriate function + visitor = getattr(self, function_name, self.skip) + cursor.goto_first_child() # enter node's children + result = visitor(cursor) if not params else visitor(cursor, params) + cursor.goto_parent() # leave node's children + return result + + def visitMal(self, cursor: TreeCursor) -> ASTNode | list[ASTNode] | None: + langspec = { + "formatVersion": "1.0.0", + "defines": {}, + "categories": [], + "assets": [], + "associations": [], + } + + # Go to first declaration + cursor.goto_first_child() + + while True: + # Obtain node type of declaration + cursor.goto_first_child() + + # Visit declaration + result = self.visit(cursor) + + key, value = result + if key == "categories": + category, assets = value + langspec["categories"].extend(category) + langspec["assets"].extend(assets) + elif key == "defines": + langspec[key].update(value) + elif key == "associations": + langspec[key].extend(value) + + # Go back to declaration + cursor.goto_parent() + + # Attempt to move to next declaration. If not possible, done processing + if not cursor.goto_next_sibling(): + break + + for key in ("categories", "assets", "associations"): + unique = [] + for item in langspec[key]: + if item not in unique: + unique.append(item) + langspec[key] = unique + + return langspec + + def skip(self, _): + pass + + def _visit(self, cursor: TreeCursor) -> ASTNode | list[ASTNode] | None: # Function name of child class handling the node type function_name = f'visit_{cursor.node.type}' @@ -27,7 +83,7 @@ def visit(self, cursor: TreeCursor) -> ASTNode | list[ASTNode] | None: return visitor_value - def skip(self, cursor: TreeCursor) -> ASTNode | list[ASTNode] | None: + def _skip(self, cursor: TreeCursor) -> ASTNode | list[ASTNode] | None: values = [] if visitor_value := self.visit(cursor): values.append(visitor_value) @@ -47,11 +103,14 @@ def skip(self, cursor: TreeCursor) -> ASTNode | list[ASTNode] | None: class MalCompiler(ParseTreeVisitor): def compile(self, source: bytes): tree = parser.parse(source) - self.visit(tree.walk()) + self.visitMal(tree.walk()) # Named visit_{rule name in grammar.js} def visit_define_declaration(self, cursor: TreeCursor) -> ASTNode: - # '#' (identity) ':' (string) + ############################### + # '#' (identity) ':' (string) # + ############################### + # skip '#' node cursor.goto_next_sibling() # grab (identity) node @@ -63,7 +122,236 @@ def visit_define_declaration(self, cursor: TreeCursor) -> ASTNode: # grab (string) node value = cursor.node.text - # Need to call decode because the text field is a `bytes` type. - print(f"Found definition -> {key.decode()}: '{value.decode()}'") + return ("defines", {key.decode(): value.decode().strip("\"")}) + + def visit_category_declaration(self, cursor: TreeCursor) -> ASTNode: + ############################################ + # 'category' (id) (meta)* '{' (asset)* '}' # + ############################################ + + category = {} + + # skip 'category' + cursor.goto_next_sibling() + # grab (identity) + category["name"] = cursor.node.text.decode() + # next node + cursor.goto_next_sibling() + + # grab (meta) + # + # Since it is optional, we have to make sure we are dealing with a + # grammar rule + meta = {} + while (cursor.node.is_named): + info = self.visit(cursor) + meta[info[0]] = info[1] + cursor.goto_next_sibling() + category["meta"] = meta + + # skip '{' node + cursor.goto_next_sibling() + + # grab (asset) + assets = [] + while (cursor.node.is_named): + asset = self.visit(cursor, category["name"]) + assets.append(asset) + cursor.goto_next_sibling() + + # next node and skip '}' node + cursor.goto_next_sibling(), cursor.goto_next_sibling() + + return ("categories", ([category], assets)) + + def visit_meta(self, cursor: TreeCursor) -> ASTNode: + ############################ + # (id) 'info' ':' (string) # + ############################ + + # grab (id) node + id = cursor.node.text.decode() + + # next node + cursor.goto_next_sibling() + # skip 'info' node + cursor.goto_next_sibling() + # skip ':' node + cursor.goto_next_sibling() + + # grab (string) node + info_string = cursor.node.text.decode().strip('"') + + return (id, info_string) + + def visit_asset_declaration(self, cursor: TreeCursor, category: str) -> ASTNode: + ############################################################################## + # (abstract)? 'asset' (id) (extends id)? (meta)* '{' (asset_definition)* '}' # + ############################################################################## + + # grab (abstract)? + isAbstract = cursor.node.text.decode() == 'abstract' + if (isAbstract): + cursor.goto_next_sibling() # We must go to 'asset' + + # skip 'asset' + cursor.goto_next_sibling() + + # grab (id) + name = cursor.node.text.decode() + cursor.goto_next_sibling() + + # grab (extends id)? + superAsset = None + if (cursor.node.text.decode() == 'extends'): + cursor.goto_next_sibling() # move to the id + superAsset = cursor.node.text.decode() # get the text + cursor.goto_next_sibling() # move to the meta + + # grab (meta)* + meta = {} + while (cursor.node.is_named): + info = self.visit(cursor) + meta[info[0]] = info[1] + cursor.goto_next_sibling() + + # skip '{' + cursor.goto_next_sibling() + + # TODO visit asset_definition + variables, attackSteps = [], [] + if (cursor.node.is_named): + variables, attackSteps = self.visit(cursor) + + return {"name": name, + "meta": meta, + "category": category, + "isAbstract": isAbstract, + "superAsset": superAsset, + "variables":variables, + "attackSteps": attackSteps} + + def visit_asset_definition(self, cursor: TreeCursor) -> ASTNode: + ####################### + # (variable)* (step)* # + ####################### + + variables, steps = [], [] + while True: + definition, result = self.visit(cursor) + + if definition=='variable': + variables.append(result) + elif definition=='step': + steps.append(result) + + if not cursor.goto_next_sibling(): + break + + return (variables, steps) + + def visit_asset_variable(self, cursor: TreeCursor) -> ASTNode: + ########################## + # 'let' (id) '=' (value) # + ########################## + + ret = {} + + # skip 'let' + cursor.goto_next_sibling() + + # grab id + ret["name"] = cursor.node.text.decode() + ret["stepExpression"] = None + + # TODO visit step expression + + return ("variable", ret) + + def visit_attack_step(self, cursor: TreeCursor) -> ASTNode: + ############################################################################################################### + # (step_type) (id) ( '@' (id) )* ( '{' (cias) '}' )? (ttc)? (meta)* (detector)? (preconditions)? (reaches)? # + ############################################################################################################### + + # grab (step_type) + step_type = cursor.node.text.decode() + cursor.goto_next_sibling() + + # grab (id) + name = cursor.node.text.decode() + cursor.goto_next_sibling() + + # process all ( '@' (id) ) we might have + tags = [] + while (cursor.node.text.decode() == '@'): + cursor.goto_next_sibling() # skip '@' + tags.append(cursor.node.text.decode()) # grab (id) + cursor.goto_next_sibling() # move to next symbol + + # process all ( '{' (cias) '}' ) we might have + risk = None + if (cursor.node.text.decode() == '{'): + cursor.goto_next_sibling() # skip '{' + risk = self.visit(cursor) # grab (cias) + cursor.goto_next_sibling() # go to '}' + cursor.goto_next_sibling() # and skip it + + if (cursor.node.type == 'ttc'): + # TODO + # visit ttc + pass + + while (cursor.node.type == 'meta'): + # TODO + # visit meta + break + + if (cursor.node.type == 'detector' ): + # TODO visit detector + pass + + if (cursor.node.type == 'preconditions' ): + # TODO visit preconditions + pass + + if (cursor.node.type == 'reaches' ): + # TODO visit reaches + pass + + def visit_cias(self, cursor: TreeCursor): + ###################### + # (cia) (',' (cia))* # + ###################### + risk = { + "isConfidentiality": False, + "isIntegrity": False, + "isAvailability": False, + } + + while True: + risk.update(self.visit(cursor)) + cursor.goto_next_sibling() # go to ',' + # if we can't go to the next CIA break + if not cursor.goto_next_sibling(): + break + + return risk + + def visit_cia(self, cursor: TreeCursor): + ############### + # 'C'|'I'|'A' # + ############### + cia = cursor.node.text.decode() + + key = ( + "isConfidentiality" + if cia == 'C' + else "isIntegrity" + if cia == 'I' + else "isAvailability" + if cia == 'A' + else None + ) - return ("defines", {key.decode(): value.decode()}) + return {key: True} + From 7df441908fa869b15b8af72319fe0c7ae77b93f3 Mon Sep 17 00:00:00 2001 From: Tomas Fonseca Date: Thu, 3 Apr 2025 15:12:41 +0200 Subject: [PATCH 16/45] fix: Corrected visiting of CIAS and CIA --- examples/visitor/fast.py | 45 +++++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index 2196bd8..34de7bd 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -9,9 +9,10 @@ class ParseTreeVisitor: def visit(self, cursor, params = None): function_name = f'visit_{cursor.node.type}' # obtain the appropriate function visitor = getattr(self, function_name, self.skip) - cursor.goto_first_child() # enter node's children + hasChild = cursor.goto_first_child() # enter node's children result = visitor(cursor) if not params else visitor(cursor, params) - cursor.goto_parent() # leave node's children + if hasChild: + cursor.goto_parent() # leave node's children return result def visitMal(self, cursor: TreeCursor) -> ASTNode | list[ASTNode] | None: @@ -286,7 +287,8 @@ def visit_attack_step(self, cursor: TreeCursor) -> ASTNode: while (cursor.node.text.decode() == '@'): cursor.goto_next_sibling() # skip '@' tags.append(cursor.node.text.decode()) # grab (id) - cursor.goto_next_sibling() # move to next symbol + if not cursor.goto_next_sibling(): # move to next symbol, break if last + break # process all ( '{' (cias) '}' ) we might have risk = None @@ -296,28 +298,47 @@ def visit_attack_step(self, cursor: TreeCursor) -> ASTNode: cursor.goto_next_sibling() # go to '}' cursor.goto_next_sibling() # and skip it + ttc = None if (cursor.node.type == 'ttc'): # TODO # visit ttc pass + meta = {} while (cursor.node.type == 'meta'): - # TODO - # visit meta - break + info = self.visit(cursor) + meta[info[0]] = info[1] + if not cursor.goto_next_sibling(): # in case there is nothing after the meta + break + detectors = {} if (cursor.node.type == 'detector' ): # TODO visit detector pass + requires = None if (cursor.node.type == 'preconditions' ): # TODO visit preconditions pass + reaches = None if (cursor.node.type == 'reaches' ): # TODO visit reaches pass + ret = { + "name":name, + "meta": meta, + "detectors": detectors, + "type":step_type, + "tags":tags, + "risk": risk, + "ttc": ttc, + "requires":requires, + "reaches": reaches, + } + return ("step", ret) + def visit_cias(self, cursor: TreeCursor): ###################### # (cia) (',' (cia))* # @@ -329,12 +350,16 @@ def visit_cias(self, cursor: TreeCursor): } while True: - risk.update(self.visit(cursor)) - cursor.goto_next_sibling() # go to ',' - # if we can't go to the next CIA break - if not cursor.goto_next_sibling(): + val = self.visit(cursor) + risk.update(val) + + ret = cursor.goto_next_sibling() + if not ret: # no more ',' -> done break + # Otherwise, process the next CIA + cursor.goto_next_sibling() + return risk def visit_cia(self, cursor: TreeCursor): From 4d96fcb447f9c5bdd44be301b4264eb5e7b8c21f Mon Sep 17 00:00:00 2001 From: Tomas Fonseca Date: Tue, 29 Apr 2025 11:44:03 +0200 Subject: [PATCH 17/45] feat: Implemented more visitor patterns. Since the last commit, more visitor patters have been added. Currently, the TTC is fully implemented. The grammar was updated to support TTC functions which have no arguments, to be in accordance to the ANTLR grammar. --- examples/visitor/fast.py | 160 ++++++++++++++++++++++++++++++++++++++- examples/visitor/main.py | 29 ++++++- grammar.js | 2 +- 3 files changed, 185 insertions(+), 6 deletions(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index 34de7bd..ec1c924 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -284,6 +284,8 @@ def visit_attack_step(self, cursor: TreeCursor) -> ASTNode: # process all ( '@' (id) ) we might have tags = [] + + # TODO change grammar to make (@ id)* instead of (@ id)? while (cursor.node.text.decode() == '@'): cursor.goto_next_sibling() # skip '@' tags.append(cursor.node.text.decode()) # grab (id) @@ -300,9 +302,9 @@ def visit_attack_step(self, cursor: TreeCursor) -> ASTNode: ttc = None if (cursor.node.type == 'ttc'): - # TODO # visit ttc - pass + # TODO + ttc = self.visit(cursor) meta = {} while (cursor.node.type == 'meta'): @@ -361,7 +363,7 @@ def visit_cias(self, cursor: TreeCursor): cursor.goto_next_sibling() return risk - + def visit_cia(self, cursor: TreeCursor): ############### # 'C'|'I'|'A' # @@ -379,4 +381,156 @@ def visit_cia(self, cursor: TreeCursor): ) return {key: True} + + def visit_ttc(self, cursor: TreeCursor): + ################################## + # '[' (intermediary_ttc_exp) ']' # + ################################## + + # skip '[' + cursor.goto_next_sibling() + + return self._visit_intermediary_ttc_expr(cursor) + + def _visit_intermediary_ttc_expr(self, cursor: TreeCursor): + ################################################################################################### + # '(' (intermediary_ttc_expr) ')' | (integer) | (float) | (id) | (ttc_distribution) | (ttc_binop) # + ################################################################################################### + + # check if we have '(', in this case it's a parenthesized expression + if (cursor.node.text.decode() == '('): + cursor.goto_next_sibling() # skip '(' + return self._visit_intermediary_ttc_expr(cursor) # visit the expression + + # if we have an id, just return it + elif (cursor.node.type == 'identifier'): + return cursor.node.text.decode() + + # otherwise visit the node + return self.visit(cursor) + + def visit_float(self, cursor: TreeCursor): + ret = {"type": "number"} + ret["value"] = float(cursor.node.text.decode()) + + return ret + + def visit_integer(self, cursor: TreeCursor): + ret = {"type": "number"} + ret["value"] = float(cursor.node.text.decode()) + + return ret + + def visit_ttc_binop(self, cursor: TreeCursor): + ######################################################################### + # (intermediary_ttc_expr) ('+'|'-'|'*'|'/'|'^') (intermediary_ttc_expr) # + ######################################################################### + + # grab first (intermediary_ttc_expr) + lhs = self._visit_intermediary_ttc_expr(cursor) + cursor.goto_next_sibling() + + # grab operation type + operation = cursor.node.text.decode() + operation_type = 'addition' if operation == '+' else \ + 'subtraction' if operation == '-' else \ + 'multiplication' if operation == '*' else \ + 'multiplication' if operation == '/' else \ + 'exponentiation' + cursor.goto_next_sibling() + + # grab second (intermediary_ttc_expr) + rhs = self._visit_intermediary_ttc_expr(cursor) + + return {"type":operation_type, "lhs":lhs, "rhs": rhs} + + def visit_ttc_distribution(self, cursor: TreeCursor): + ############################################ + # (id) '(' (number)* ( ',' (number) )* ')' # + ############################################ + + # grab (id) + name = cursor.node.text.decode() + cursor.goto_next_sibling() + + # skip '(' + cursor.goto_next_sibling() + # parse function arguments + args = [] + while (cursor.node.type in ('float', 'integer')): + # obtain the number + arg = self.visit(cursor) + args.append(arg) + # move to next symbol, if it's not a comma then done + if (cursor.node.text.decode() != ','): + break + # otherwise, ignore the comma + cursor.goto_next_sibling() + + return { + "type": "function", + "name": name, + "arguments": args + } + + ''' + TODO - grammar might need to be updated + + def visit_preconditions(self, cursor: TreeCursor): + ####################################### + # '<-' (asset_expr) (',' (asset_expr) )* # + ####################################### + + # Skip '->' + cursor.goto_next_sibling() + + ret = {} + ret["overrides"] = True + ret["stepExpressions"] = [self.visit(cursor)] + + while (cursor.goto_next_sibling()): # check if we have a ',' + cursor.goto_next_sibling() # ignore the ',' + ret["stepExpressions"].append(self.visit(cursor)) + + return ret + + def visit_asset_expr(self,cursor: TreeCursor): + return self._intermediary_visit_reaches(cursor) + + def _intermediary_visit_reaches(self, cursor: TreeCursor): + ############################################################################################################################################# + # '(' (_intermediary_visit_reaches) ')' | (id) | (asset_variable_substitution) | (asset_expr_binop) | (asset_expr_unop) | (asset_expr_type) # + ############################################################################################################################################# + + # The objective of this function is to mimick the _inline_asset_expr + # In other words, this function will figure out the type of the node it just received, + # pretending that it was an _inline_asset_expr + + ret = {} + if (cursor.node.type==identifier): + ret["type"] = "field" + ret["name"] = cursor.node.text + elif (cursor.node.text == '('): + ret = self.visit(_intermediary_visit_reaches) + else: + ret = self.visit(cursor) + + return ret + + def visit_asset_variable_substitution(self, cursor: TreeCursor): + ################ + # (id) '(' ')' # + ################ + + return { + "type": "variable", + "name": self.cursor.text + } + + def visit_asset_expr_type(self, cursor: TreeCursor): + ############################## + # (inline_expr) '[' (id) ']' # + ############################## + + ''' diff --git a/examples/visitor/main.py b/examples/visitor/main.py index a6d43d6..0a0d331 100644 --- a/examples/visitor/main.py +++ b/examples/visitor/main.py @@ -1,11 +1,36 @@ -from simple import MalCompiler +#from simple import MalCompiler # or -# from fast import MalCompiler +from fast import MalCompiler # Example Python source code source_code = b''' #version: "1.2.3" +category Test +developer info : "something" +{ + asset foo { + let a = b + let b = c + let c = d + | testStep + @ tomas + { C, A } + [ test(5.5) + 1 - test2(6)^7 / (8 * wrong()) + 999 ] + developer info : "tomas2" + modeler info : "tomas3" + } + abstract asset bar { } + asset bar1 extends bar { } + abstract asset foo1 extends foo { } +} +category Test1 { +} +''' +''' + // + // + // ''' # Run the visitor pattern on the tree diff --git a/grammar.js b/grammar.js index 29145ef..50086a6 100644 --- a/grammar.js +++ b/grammar.js @@ -171,7 +171,7 @@ module.exports = grammar({ ttc_distribution: $ => seq( field('id', $.identifier), '(', - field('values', commaSep1($._number)), + field('values', optional(commaSep1($._number))), ')', ), From 304121ac136ff6b6bc2ebd7aee032f7bb92f6796 Mon Sep 17 00:00:00 2001 From: Tomas Fonseca Date: Thu, 1 May 2025 13:58:18 +0200 Subject: [PATCH 18/45] feat: Implemented visitor for preconditions. Also updated grammar, since the group operations had mismatched priorities. According to the ANTLR version, union, intersection and difference should all have the lowest priority, followed by collection and the highest priority is transitive and subtype. --- examples/visitor/fast.py | 144 ++++++++++++++++++++++++++++++++------- grammar.js | 6 +- 2 files changed, 123 insertions(+), 27 deletions(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index ec1c924..19f4dea 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -1,4 +1,4 @@ -from tree_sitter import TreeCursor +from tree_sitter import TreeCursor, Range from typing import Tuple from lang import PARSER as parser @@ -99,7 +99,6 @@ def _skip(self, cursor: TreeCursor) -> ASTNode | list[ASTNode] | None: case _: return values - # Concrete visitor to process function definitions class MalCompiler(ParseTreeVisitor): def compile(self, source: bytes): @@ -223,7 +222,7 @@ def visit_asset_declaration(self, cursor: TreeCursor, category: str) -> ASTNode: variables, attackSteps = [], [] if (cursor.node.is_named): variables, attackSteps = self.visit(cursor) - + return {"name": name, "meta": meta, "category": category, @@ -305,6 +304,7 @@ def visit_attack_step(self, cursor: TreeCursor) -> ASTNode: # visit ttc # TODO ttc = self.visit(cursor) + cursor.goto_next_sibling() meta = {} while (cursor.node.type == 'meta'): @@ -320,8 +320,7 @@ def visit_attack_step(self, cursor: TreeCursor) -> ASTNode: requires = None if (cursor.node.type == 'preconditions' ): - # TODO visit preconditions - pass + requires = self.visit(cursor) reaches = None if (cursor.node.type == 'reaches' ): @@ -474,15 +473,12 @@ def visit_ttc_distribution(self, cursor: TreeCursor): "arguments": args } - ''' - TODO - grammar might need to be updated - def visit_preconditions(self, cursor: TreeCursor): - ####################################### + ########################################## # '<-' (asset_expr) (',' (asset_expr) )* # - ####################################### + ########################################## - # Skip '->' + # Skip '<-' cursor.goto_next_sibling() ret = {} @@ -496,11 +492,11 @@ def visit_preconditions(self, cursor: TreeCursor): return ret def visit_asset_expr(self,cursor: TreeCursor): - return self._intermediary_visit_reaches(cursor) + return self._visit_inline_asset_expr(cursor) - def _intermediary_visit_reaches(self, cursor: TreeCursor): + def _visit_inline_asset_expr(self, cursor: TreeCursor): ############################################################################################################################################# - # '(' (_intermediary_visit_reaches) ')' | (id) | (asset_variable_substitution) | (asset_expr_binop) | (asset_expr_unop) | (asset_expr_type) # + # '(' (_inline_asset_expr) ')' | (id) | (asset_variable_substitution) | (asset_expr_binop) | (asset_expr_unop) | (asset_expr_type) # ############################################################################################################################################# # The objective of this function is to mimick the _inline_asset_expr @@ -508,11 +504,13 @@ def _intermediary_visit_reaches(self, cursor: TreeCursor): # pretending that it was an _inline_asset_expr ret = {} - if (cursor.node.type==identifier): - ret["type"] = "field" - ret["name"] = cursor.node.text - elif (cursor.node.text == '('): - ret = self.visit(_intermediary_visit_reaches) + + if (cursor.node.type=='identifier'): + ret["type"] = self._resolve_part_ID_type(cursor) + ret["name"] = cursor.node.text.decode() + elif (cursor.node.text.decode() == '('): + cursor.goto_next_sibling() # ignore the '(' + ret = self._visit_inline_asset_expr(cursor) else: ret = self.visit(cursor) @@ -525,12 +523,110 @@ def visit_asset_variable_substitution(self, cursor: TreeCursor): return { "type": "variable", - "name": self.cursor.text + "name": self.cursor.text.decode() } def visit_asset_expr_type(self, cursor: TreeCursor): - ############################## - # (inline_expr) '[' (id) ']' # - ############################## + ##################################### + # (_inline_asset_expr) '[' (id) ']' # + ##################################### + + # On the ANTLR version, we would visit the subtypes from left to right, + # so we would have to store them recursively. However, in the TreeSitter + # version, we are starting from right to left, so we can just visit + # the `lhs` and return the current subtype + + # Visit the inline expr + stepExpression = self._visit_inline_asset_expr(cursor) + cursor.goto_next_sibling() + + # Skip '[' + cursor.goto_next_sibling() - ''' + # Get the subType + subType = cursor.node.text.decode() + + return { + "type": "subType", + "subType": subType, + "stepExpression": stepExpression + } + + def visit_asset_expr_binop(self, cursor: TreeCursor): + ######################################################################## + # (_inline_asset_expr) ( '\/' | '/\' | '-' | '.') (_inline_asset_expr) # + ######################################################################## + + # Get the lhs + lhs = self._visit_inline_asset_expr(cursor) + cursor.goto_next_sibling() + + # Get the type of operation + optype = 'collect' if cursor.node.text.decode()=='.' \ + else 'union' if cursor.node.text.decode()=='\\/' \ + else 'intersection' if cursor.node.text.decode()=='/\\' \ + else 'difference' + cursor.goto_next_sibling() + + # Get the rhs + rhs = self._visit_inline_asset_expr(cursor) + return { + "type": optype, + "lhs": lhs, + "rhs": rhs + } + + def visit_asset_expr_unop(self, cursor: TreeCursor): + ############################# + # (_inline_asset_expr) '*' # + ############################# + + # Get the associated expression + expr = self._visit_inline_asset_expr(cursor) + cursor.goto_next_sibling() + + return { + "type": "transitive", + "stepExpression": expr + } + + def _resolve_part_ID_type(self, cursor: TreeCursor): + # Figure out if we have a `field` or an `attackStep` + original_node = cursor.node + + parent_node = original_node.parent + + while parent_node and parent_node.type != 'reaching': + # The idea is to go up the tree. If we find a "reaching" node, + # we still need to determine if it's a field or a an attackStep + parent_node = parent_node.parent + + if not parent_node: + # If we never find a "reaching" node, eventually we will go to + # the top of the tree, and we won't be able to go further up. + # In this case, we originally were in a `let` or `precondition`, + # which only accepts fields + return "field" + + # We want to know if there is any `.` after the context. + # If there is, we have a field (as an attackStep does not + # have attributes) + # + # To do this, we will find the start position of the the original + # node in the text. Each rule matches to one line in the end, + # so this node will be in the same row as its parent node and in + # a column inside the range of columns of its parent. So, we + # just have to split the whole text of the parent starting at the + # original node's position and iterate from there until the end of + # the text. + + original_node_column = original_node.start_point + tokenStream = parent_node.text + tokenStream_split = tokenStream[original_node_column:] + for char in tokenStream_split: + if char == '.': + return "field" # Only a field can have attributes + if char == ',': + return "attackStep" # A `,` means we are starting a new reaches + + return "attackStep" diff --git a/grammar.js b/grammar.js index 50086a6..d3571e8 100644 --- a/grammar.js +++ b/grammar.js @@ -227,9 +227,9 @@ module.exports = grammar({ asset_expr_binop: $ => choice( ...[ ['\\/', 'binary_plus'], - ['/\\', 'binary_mul'], - ['-', 'binary_mul'], - ['.', 'binary_exp'], + ['/\\', 'binary_plus'], + ['-', 'binary_plus'], + ['.', 'binary_mul'], ].map(([operator, precedence, associativity]) => (associativity === 'right' ? prec.right : prec.left)(precedence, seq( field('left', $._inline_asset_expr), From 0a7eb4a3cde29a6e0f5d3abe4c9df2fd825a4a17 Mon Sep 17 00:00:00 2001 From: Tomas Fonseca Date: Thu, 1 May 2025 14:49:34 +0200 Subject: [PATCH 19/45] feat: Implemented visitor patter for reaches expression. --- examples/visitor/fast.py | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index 19f4dea..6a955c9 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -302,7 +302,6 @@ def visit_attack_step(self, cursor: TreeCursor) -> ASTNode: ttc = None if (cursor.node.type == 'ttc'): # visit ttc - # TODO ttc = self.visit(cursor) cursor.goto_next_sibling() @@ -321,11 +320,13 @@ def visit_attack_step(self, cursor: TreeCursor) -> ASTNode: requires = None if (cursor.node.type == 'preconditions' ): requires = self.visit(cursor) + cursor.goto_next_sibling() reaches = None - if (cursor.node.type == 'reaches' ): + if (cursor.node.type == 'reaching'): # TODO visit reaches - pass + reaches = self.visit(cursor) + cursor.goto_next_sibling() ret = { "name":name, @@ -338,6 +339,7 @@ def visit_attack_step(self, cursor: TreeCursor) -> ASTNode: "requires":requires, "reaches": reaches, } + return ("step", ret) def visit_cias(self, cursor: TreeCursor): @@ -490,7 +492,27 @@ def visit_preconditions(self, cursor: TreeCursor): ret["stepExpressions"].append(self.visit(cursor)) return ret - + + def visit_reaching(self, cursor: TreeCursor): + ################################################ + # ( '+>' | '->' ) (reaches) ( ',' (reaches) )* # + ################################################ + + ret = {} + + # Get type of reaches + ret["overrides"] = True if cursor.node.text.decode()=='->' else False + cursor.goto_next_sibling() + + # Visit the steps + ret["stepExpressions"] = [self.visit(cursor)] + + while (cursor.goto_next_sibling()): # check if we have a ',' + cursor.goto_next_sibling() # ignore the ',' + ret["stepExpressions"].append(self.visit(cursor)) + + return ret + def visit_asset_expr(self,cursor: TreeCursor): return self._visit_inline_asset_expr(cursor) @@ -620,13 +642,15 @@ def _resolve_part_ID_type(self, cursor: TreeCursor): # original node's position and iterate from there until the end of # the text. - original_node_column = original_node.start_point + original_node_column = original_node.start_point.column tokenStream = parent_node.text tokenStream_split = tokenStream[original_node_column:] for char in tokenStream_split: + char = chr(char) if char == '.': return "field" # Only a field can have attributes if char == ',': return "attackStep" # A `,` means we are starting a new reaches return "attackStep" + From 4ee8987172c81d0ca39476f8164fb1cc29315a25 Mon Sep 17 00:00:00 2001 From: Tomas Fonseca Date: Sat, 3 May 2025 12:36:58 +0200 Subject: [PATCH 20/45] feat: Visitor for associations. --- examples/visitor/fast.py | 163 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 161 insertions(+), 2 deletions(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index 6a955c9..61a48f8 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -218,7 +218,7 @@ def visit_asset_declaration(self, cursor: TreeCursor, category: str) -> ASTNode: # skip '{' cursor.goto_next_sibling() - # TODO visit asset_definition + # visit asset_definition variables, attackSteps = [], [] if (cursor.node.is_named): variables, attackSteps = self.visit(cursor) @@ -324,7 +324,6 @@ def visit_attack_step(self, cursor: TreeCursor) -> ASTNode: reaches = None if (cursor.node.type == 'reaching'): - # TODO visit reaches reaches = self.visit(cursor) cursor.goto_next_sibling() @@ -654,3 +653,163 @@ def _resolve_part_ID_type(self, cursor: TreeCursor): return "attackStep" + def visit_associations_declaration(self, cursor: TreeCursor): + ######################################### + # 'associations' '{' (association)* '}' # + ######################################### + + # skip 'associations' + cursor.goto_next_sibling() + + # skip '{' + cursor.goto_next_sibling() + + # visit all associations + associations = [] + while cursor.node.text.decode() != '}': + associations.append(self.visit(cursor)) + cursor.goto_next_sibling() + + return ('associations', associations) + + def visit_association(self, cursor: TreeCursor): + ############################################################################################## + # (id) '[' (id) ']' (multiplicity) '<--' (id) '-->' (multiplicity) '[' (id) ']' (id) (meta)* # + ############################################################################################## + + # Get 1st id - left asset + left_asset = cursor.node.text.decode() + cursor.goto_next_sibling() + + # skip '[' + cursor.goto_next_sibling() + + # Get 2nd id - left field + left_field = cursor.node.text.decode() + cursor.goto_next_sibling() + + # skip ']' + cursor.goto_next_sibling() + + # Get left multiplicity + left_multiplicity = self.visit(cursor) + cursor.goto_next_sibling() + + # skip '<--' + cursor.goto_next_sibling() + + # Get 3rd id - name of the association + name = cursor.node.text.decode() + cursor.goto_next_sibling() + + # skip '-->' + cursor.goto_next_sibling() + + # Get right multiplicity + right_multiplicity = self.visit(cursor) + cursor.goto_next_sibling() + + # skip '[' + cursor.goto_next_sibling() + + # Get 4th id - right field + right_field = cursor.node.text.decode() + cursor.goto_next_sibling() + + # skip ']' + cursor.goto_next_sibling() + + # Get 5th id - right asset + right_asset = cursor.node.text.decode() + + # Get all metas + meta = {} + while cursor.goto_next_sibling(): + res = self.visit(cursor) + meta[res[0]] = res[1] + + association = { + "name" : name, + "meta" : meta, + "leftAsset" : left_asset, + "leftField" : left_field, + "leftMultiplicity" : left_multiplicity, + "rightAsset" : right_asset, + "rightField" : right_field, + "rightMultiplicity" : right_multiplicity, + } + + self._process_multitudes(association) + + return association + + def visit_multiplicity(self, cursor: TreeCursor): + ############################################### + # (_multiplicity_atom) | (multiplicity_range) # + ############################################### + + if cursor.node.type == 'multiplicity_range': + return self.visit(cursor) + + # Otherwise we need to visit an intermediary function for + # atomic multiplicity expressions + min = self._visit_multiplicity_atom(cursor) + return { + "min": min, + "max": None, + } + + def visit_multiplicity_range(self, cursor: TreeCursor): + ################################################## + # (_multiplicity_atom) '..' (_multiplicity_atom) # + ################################################## + + min = self._visit_multiplicity_atom(cursor) + cursor.goto_next_sibling() + + # skip '..' + cursor.goto_next_sibling() + + max = self._visit_multiplicity_atom(cursor) + + return { + "min": min, + "max": max, + } + + def _visit_multiplicity_atom(self, cursor: TreeCursor): + ###################### + # (integer) | (star) # + ###################### + return cursor.node.text.decode() + + def _process_multitudes(self, association): + mult_keys = [ + # start the multatoms from right to left to make sure the rules + # below get applied cleanly + "rightMultiplicity.max", + "rightMultiplicity.min", + "leftMultiplicity.max", + "leftMultiplicity.min", + ] + + for mult_key in mult_keys: + key, subkey = mult_key.split(".") + + # upper limit equals lower limit if not given + if subkey == "max" and association[key][subkey] is None: + association[key][subkey] = association[key]["min"] + + if association[key][subkey] == "*": + # 'any' as lower limit means start from 0 + if subkey == "min": + association[key][subkey] = 0 + + # 'any' as upper limit means not limit + else: + association[key][subkey] = None + + # cast numerical strings to integers + if (multatom := association[key][subkey]) and multatom.isdigit(): + association[key][subkey] = int(association[key][subkey]) + From 08709464cc0f31867f2f113a3cfafe76cfb7c1ba Mon Sep 17 00:00:00 2001 From: Tomas Fonseca Date: Sat, 3 May 2025 13:23:06 +0200 Subject: [PATCH 21/45] feat: Visitor for include. --- examples/visitor/fast.py | 41 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index 61a48f8..a60d4ee 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -1,11 +1,42 @@ from tree_sitter import TreeCursor, Range from typing import Tuple +from collections.abc import MutableMapping, MutableSequence +from pathlib import Path from lang import PARSER as parser ASTNode = Tuple[str, object] class ParseTreeVisitor: + def __init__(self): + self.current_file: Path = None + self.visited_files: set[Path] = set() + self.path_stack: list[Path] = [] + + def compile(self, malfile: Path | str): + current_file = Path(malfile) + + if not current_file.is_absolute() and self.path_stack: + # Only for the first file self.path_stack will be empty. + current_file = self.path_stack[-1] / current_file + + if current_file in self.visited_files: + # Avoid infinite loops due to recursive includes + return {} + + self.visited_files.add(current_file) + self.path_stack.append(current_file.parent) + + result = None + with open(current_file, 'rb') as f: + source = f.read() + tree = parser.parse(source) + result = self.visitMal(tree.walk()) + + self.path_stack.pop() + + return result + def visit(self, cursor, params = None): function_name = f'visit_{cursor.node.type}' # obtain the appropriate function visitor = getattr(self, function_name, self.skip) @@ -43,6 +74,13 @@ def visitMal(self, cursor: TreeCursor) -> ASTNode | list[ASTNode] | None: langspec[key].update(value) elif key == "associations": langspec[key].extend(value) + elif key == "include": + included_file = self.compile(value) + for k, v in langspec.items(): + if isinstance(v, MutableMapping): + langspec[k].update(included_file.get(k, {})) + if isinstance(v, MutableSequence) and k in included_file: + langspec[k].extend(included_file[k]) # Go back to declaration cursor.goto_parent() @@ -101,9 +139,6 @@ def _skip(self, cursor: TreeCursor) -> ASTNode | list[ASTNode] | None: # Concrete visitor to process function definitions class MalCompiler(ParseTreeVisitor): - def compile(self, source: bytes): - tree = parser.parse(source) - self.visitMal(tree.walk()) # Named visit_{rule name in grammar.js} def visit_define_declaration(self, cursor: TreeCursor) -> ASTNode: From 84dc4ec0eb27a896bd8a6f1bbe3cde28b1022458 Mon Sep 17 00:00:00 2001 From: Tomas Fonseca Date: Sat, 3 May 2025 23:42:53 +0200 Subject: [PATCH 22/45] feat: Visitor for detectors. Also updated grammar to allow for multiple detectors. --- examples/visitor/fast.py | 84 +++++++++++++++++++++++++++++++++++++--- grammar.js | 2 +- 2 files changed, 79 insertions(+), 7 deletions(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index a60d4ee..45af225 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -304,9 +304,9 @@ def visit_asset_variable(self, cursor: TreeCursor) -> ASTNode: return ("variable", ret) def visit_attack_step(self, cursor: TreeCursor) -> ASTNode: - ############################################################################################################### + ############################################################################################################## # (step_type) (id) ( '@' (id) )* ( '{' (cias) '}' )? (ttc)? (meta)* (detector)? (preconditions)? (reaches)? # - ############################################################################################################### + ############################################################################################################## # grab (step_type) step_type = cursor.node.text.decode() @@ -348,12 +348,14 @@ def visit_attack_step(self, cursor: TreeCursor) -> ASTNode: break detectors = {} - if (cursor.node.type == 'detector' ): - # TODO visit detector - pass + while (cursor.node.type == 'detector'): + detector = self.visit(cursor) + detector[detector['name']] = detector + if not cursor.goto_next_sibling(): # in case there is nothing after the meta + break requires = None - if (cursor.node.type == 'preconditions' ): + if (cursor.node.type == 'preconditions'): requires = self.visit(cursor) cursor.goto_next_sibling() @@ -376,6 +378,76 @@ def visit_attack_step(self, cursor: TreeCursor) -> ASTNode: return ("step", ret) + def visit_detector(self, cursor: TreeCursor): + #################################################################### + # ('!' | '//!') (detector_name)? (detector_context) (type)? (ttc)? # + #################################################################### + + # skip bang + cursor.goto_next_sibling() + + # grab detector_name + detector_name = None + if cursor.field_name == 'name': + detector_name = cursor.node.text.decode() + cursor.goto_next_sibling() + + # grab detector_context + detector_context = self.visit(cursor) + cursor.goto_next_sibling() + + # grab id + detector_type = None + if cursor.field_name == 'type': + detector_name = cursor.node.text.decode() + cursor.goto_next_sibling() + + # grab ttc + detector_ttc = None + if cursor.field_name == 'ttc': + detector_ttc = self.visit(ttc) + cursor.goto_next_sibling() + + return { + "name": detector_name, + "context": detector_context, + "type": detector_type, + "tprate": detector_ttc, + } + + def visit_detector_context(self, cursor: TreeCursor): + #################################################################### + # '(' (detector_context_asset) (',' (detector_context_asset))* ')' # + #################################################################### + + # skip '(' + cursor.goto_next_sibling() + + # grab detector_context_asset + context = {} + label, asset = self.visit(cursor) + context[label] = asset + cursor.goto_next_sibling() + + while cursor.node.text.decode() != ')': + # skip ',' + cursor.goto_next_sibling() + # grab another detector_context_asset + label, asset = self.visit(cursor) + context[label] = asset + cursor.goto_next_sibling() + + return context + + def visit_detector_context_asset(self, cursor: TreeCursor): + ############### + # (type) (id) # + ############### + asset = cursor.node.text.decode() + label = cursor.node.text.decode() + + return (label, asset) + def visit_cias(self, cursor: TreeCursor): ###################### # (cia) (',' (cia))* # diff --git a/grammar.js b/grammar.js index d3571e8..faba020 100644 --- a/grammar.js +++ b/grammar.js @@ -102,7 +102,7 @@ module.exports = grammar({ ))), optional(field('ttc', $.ttc)), field('meta', repeat($.meta)), - optional(field('detector', $.detector)), + optional(field('detector', repeat($.detector))), optional(field('preconditions', $.preconditions)), optional(field('reaches', $.reaching)), ), From 5f25042d448246be78d67a597583eece9ce034f9 Mon Sep 17 00:00:00 2001 From: Tomas Fonseca Date: Sun, 4 May 2025 18:02:26 +0200 Subject: [PATCH 23/45] fix: Corrected code to match original compiler output --- examples/visitor/fast.py | 72 ++++++++++++++++++++++++++++++++++------ 1 file changed, 61 insertions(+), 11 deletions(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index 45af225..a907309 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -59,6 +59,9 @@ def visitMal(self, cursor: TreeCursor) -> ASTNode | list[ASTNode] | None: cursor.goto_first_child() while True: + while (cursor.node.type == 'comment'): + cursor.goto_next_sibling() + # Obtain node type of declaration cursor.goto_first_child() @@ -137,6 +140,9 @@ def _skip(self, cursor: TreeCursor) -> ASTNode | list[ASTNode] | None: case _: return values + def visit_comment(self, cursor: TreeCursor, params=None): + return (None, None) + # Concrete visitor to process function definitions class MalCompiler(ParseTreeVisitor): @@ -199,6 +205,16 @@ def visit_category_declaration(self, cursor: TreeCursor) -> ASTNode: return ("categories", ([category], assets)) + def visit_include_declaration(self, cursor: TreeCursor): + #################### + # 'include' (file) # + #################### + + # skip 'include' + cursor.goto_next_sibling() + + return ("include", cursor.node.text.decode().strip('"')) + def visit_meta(self, cursor: TreeCursor) -> ASTNode: ############################ # (id) 'info' ':' (string) # @@ -297,7 +313,12 @@ def visit_asset_variable(self, cursor: TreeCursor) -> ASTNode: # grab id ret["name"] = cursor.node.text.decode() - ret["stepExpression"] = None + cursor.goto_next_sibling() + + # skip '=' + cursor.goto_next_sibling() + + ret["stepExpression"] = self.visit(cursor) # TODO visit step expression @@ -309,7 +330,12 @@ def visit_attack_step(self, cursor: TreeCursor) -> ASTNode: ############################################################################################################## # grab (step_type) - step_type = cursor.node.text.decode() + step_type = 'and' if cursor.node.text.decode() == '&' \ + else 'or' if cursor.node.text.decode() == '|' \ + else 'defense' if cursor.node.text.decode() == '#' \ + else 'exist' if cursor.node.text.decode() == 'E' \ + else 'notexist' if cursor.node.text.decode() == '!E' \ + else cursor.node.text.decode() cursor.goto_next_sibling() # grab (id) @@ -511,20 +537,23 @@ def _visit_intermediary_ttc_expr(self, cursor: TreeCursor): # if we have an id, just return it elif (cursor.node.type == 'identifier'): - return cursor.node.text.decode() + text = cursor.node.text.decode() + return { + "type": "function", + "name": text, + "arguments": [] + } # otherwise visit the node return self.visit(cursor) def visit_float(self, cursor: TreeCursor): - ret = {"type": "number"} - ret["value"] = float(cursor.node.text.decode()) + ret = float(cursor.node.text.decode()) return ret def visit_integer(self, cursor: TreeCursor): - ret = {"type": "number"} - ret["value"] = float(cursor.node.text.decode()) + ret = float(cursor.node.text.decode()) return ret @@ -651,7 +680,7 @@ def visit_asset_variable_substitution(self, cursor: TreeCursor): return { "type": "variable", - "name": self.cursor.text.decode() + "name": cursor.node.text.decode() } def visit_asset_expr_type(self, cursor: TreeCursor): @@ -748,11 +777,32 @@ def _resolve_part_ID_type(self, cursor: TreeCursor): # original node's position and iterate from there until the end of # the text. + # The following logic was implemented to deal with how TreeSitter + # deals with indents and new lines + + # We start by obtaining the column where the target node starts, original_node_column = original_node.start_point.column - tokenStream = parent_node.text - tokenStream_split = tokenStream[original_node_column:] + + # We get the parent's text and split it into the original + # lines (as written in the code) + tokenStream = parent_node.text.decode() + tokenStream = tokenStream.split('\n') + tokenStream_split = None + + # If the parent and the target are defined in the same line, + # then we must remove the start point from the original column, + # since TreeSitter deletes the indent + if original_node.start_point.row == parent_node.start_point.row: + tokenStream_split = tokenStream[0] + original_node_column = original_node.start_point.column - parent_node.start_point.column + # However, if they are in different rows, the indent must be included, + # so we use the same column + else: + tokenStream_split = tokenStream[original_node.start_point.row-parent_node.start_point.row] + + # Afterwards, we just do the normal checks, knowing what column to start in + tokenStream_split = tokenStream_split[original_node_column+len(original_node.text.decode()):] for char in tokenStream_split: - char = chr(char) if char == '.': return "field" # Only a field can have attributes if char == ',': From d9cc3bc0e4c274db7b4d8e59b46070ee7e13e7f6 Mon Sep 17 00:00:00 2001 From: Tomas Fonseca Date: Mon, 5 May 2025 11:54:02 +0200 Subject: [PATCH 24/45] feat: TreeSitter visitors finished. Currently, the TreeSitter compiles the coreLang and produces the exact same output as the ANTLR version. The biggest change is that instead of using cursor.goto_next_sibling(), an auxiliary method was created to avoid comment nodes which still appear in the AST. The grammar was updated to allow for multiple tags. --- examples/visitor/fast.py | 198 +++++++++++++++++++++------------------ grammar.js | 2 +- 2 files changed, 110 insertions(+), 90 deletions(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index a907309..31dec18 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -6,6 +6,22 @@ ASTNode = Tuple[str, object] +''' +This function is crucial to use instead of cursor.goto_sibling() + +Although the `comment` node is included as an extra in the +TreeSitter grammar, it still shows up in the AST. +For this reason, this function exists to go to the next node, +while ignoring `comment` node. + +It returns a boolean which states if there are any nodes left +and if the current node is not a comment. +''' +def go_to_sibling(cursor: TreeCursor) -> bool: + found_sibling = cursor.goto_next_sibling() + while cursor.node.type=='comment' and found_sibling: + found_sibling = cursor.goto_next_sibling() + return found_sibling and cursor.node.type!='comment' class ParseTreeVisitor: def __init__(self): @@ -60,7 +76,7 @@ def visitMal(self, cursor: TreeCursor) -> ASTNode | list[ASTNode] | None: while True: while (cursor.node.type == 'comment'): - cursor.goto_next_sibling() + go_to_sibling(cursor) # Obtain node type of declaration cursor.goto_first_child() @@ -89,7 +105,7 @@ def visitMal(self, cursor: TreeCursor) -> ASTNode | list[ASTNode] | None: cursor.goto_parent() # Attempt to move to next declaration. If not possible, done processing - if not cursor.goto_next_sibling(): + if not go_to_sibling(cursor): break for key in ("categories", "assets", "associations"): @@ -129,7 +145,7 @@ def _skip(self, cursor: TreeCursor) -> ASTNode | list[ASTNode] | None: values = [] if visitor_value := self.visit(cursor): values.append(visitor_value) - while cursor.goto_next_sibling(): + while go_to_sibling(cursor): if visitor_value := self.visit(cursor): values.append(visitor_value) match len(values): @@ -153,13 +169,13 @@ def visit_define_declaration(self, cursor: TreeCursor) -> ASTNode: ############################### # skip '#' node - cursor.goto_next_sibling() + go_to_sibling(cursor) # grab (identity) node key = cursor.node.text # next node - cursor.goto_next_sibling() + go_to_sibling(cursor) # skip ':' node - cursor.goto_next_sibling() + go_to_sibling(cursor) # grab (string) node value = cursor.node.text @@ -173,11 +189,11 @@ def visit_category_declaration(self, cursor: TreeCursor) -> ASTNode: category = {} # skip 'category' - cursor.goto_next_sibling() + go_to_sibling(cursor) # grab (identity) category["name"] = cursor.node.text.decode() # next node - cursor.goto_next_sibling() + go_to_sibling(cursor) # grab (meta) # @@ -187,21 +203,21 @@ def visit_category_declaration(self, cursor: TreeCursor) -> ASTNode: while (cursor.node.is_named): info = self.visit(cursor) meta[info[0]] = info[1] - cursor.goto_next_sibling() + go_to_sibling(cursor) category["meta"] = meta # skip '{' node - cursor.goto_next_sibling() + go_to_sibling(cursor) # grab (asset) assets = [] while (cursor.node.is_named): asset = self.visit(cursor, category["name"]) assets.append(asset) - cursor.goto_next_sibling() + go_to_sibling(cursor) # next node and skip '}' node - cursor.goto_next_sibling(), cursor.goto_next_sibling() + go_to_sibling(cursor), cursor.goto_next_sibling() return ("categories", ([category], assets)) @@ -211,7 +227,7 @@ def visit_include_declaration(self, cursor: TreeCursor): #################### # skip 'include' - cursor.goto_next_sibling() + go_to_sibling(cursor) return ("include", cursor.node.text.decode().strip('"')) @@ -224,11 +240,11 @@ def visit_meta(self, cursor: TreeCursor) -> ASTNode: id = cursor.node.text.decode() # next node - cursor.goto_next_sibling() + go_to_sibling(cursor) # skip 'info' node - cursor.goto_next_sibling() + go_to_sibling(cursor) # skip ':' node - cursor.goto_next_sibling() + go_to_sibling(cursor) # grab (string) node info_string = cursor.node.text.decode().strip('"') @@ -243,31 +259,31 @@ def visit_asset_declaration(self, cursor: TreeCursor, category: str) -> ASTNode: # grab (abstract)? isAbstract = cursor.node.text.decode() == 'abstract' if (isAbstract): - cursor.goto_next_sibling() # We must go to 'asset' + go_to_sibling(cursor) # We must go to 'asset' # skip 'asset' - cursor.goto_next_sibling() + go_to_sibling(cursor) # grab (id) name = cursor.node.text.decode() - cursor.goto_next_sibling() + go_to_sibling(cursor) # grab (extends id)? superAsset = None if (cursor.node.text.decode() == 'extends'): - cursor.goto_next_sibling() # move to the id + go_to_sibling(cursor) # move to the id superAsset = cursor.node.text.decode() # get the text - cursor.goto_next_sibling() # move to the meta + go_to_sibling(cursor) # move to the meta # grab (meta)* meta = {} while (cursor.node.is_named): info = self.visit(cursor) meta[info[0]] = info[1] - cursor.goto_next_sibling() + go_to_sibling(cursor) # skip '{' - cursor.goto_next_sibling() + go_to_sibling(cursor) # visit asset_definition variables, attackSteps = [], [] @@ -296,7 +312,7 @@ def visit_asset_definition(self, cursor: TreeCursor) -> ASTNode: elif definition=='step': steps.append(result) - if not cursor.goto_next_sibling(): + if not go_to_sibling(cursor): break return (variables, steps) @@ -309,14 +325,14 @@ def visit_asset_variable(self, cursor: TreeCursor) -> ASTNode: ret = {} # skip 'let' - cursor.goto_next_sibling() + go_to_sibling(cursor) # grab id ret["name"] = cursor.node.text.decode() - cursor.goto_next_sibling() + go_to_sibling(cursor) # skip '=' - cursor.goto_next_sibling() + go_to_sibling(cursor) ret["stepExpression"] = self.visit(cursor) @@ -334,61 +350,61 @@ def visit_attack_step(self, cursor: TreeCursor) -> ASTNode: else 'or' if cursor.node.text.decode() == '|' \ else 'defense' if cursor.node.text.decode() == '#' \ else 'exist' if cursor.node.text.decode() == 'E' \ - else 'notexist' if cursor.node.text.decode() == '!E' \ + else 'notExist' if cursor.node.text.decode() == '!E' \ else cursor.node.text.decode() - cursor.goto_next_sibling() + go_to_sibling(cursor) # grab (id) name = cursor.node.text.decode() - cursor.goto_next_sibling() + go_to_sibling(cursor) # process all ( '@' (id) ) we might have tags = [] # TODO change grammar to make (@ id)* instead of (@ id)? while (cursor.node.text.decode() == '@'): - cursor.goto_next_sibling() # skip '@' + go_to_sibling(cursor) # skip '@' tags.append(cursor.node.text.decode()) # grab (id) - if not cursor.goto_next_sibling(): # move to next symbol, break if last + if not go_to_sibling(cursor): # move to next symbol, break if last break # process all ( '{' (cias) '}' ) we might have risk = None if (cursor.node.text.decode() == '{'): - cursor.goto_next_sibling() # skip '{' + go_to_sibling(cursor) # skip '{' risk = self.visit(cursor) # grab (cias) - cursor.goto_next_sibling() # go to '}' - cursor.goto_next_sibling() # and skip it + go_to_sibling(cursor) # go to '}' + go_to_sibling(cursor) # and skip it ttc = None if (cursor.node.type == 'ttc'): # visit ttc ttc = self.visit(cursor) - cursor.goto_next_sibling() + go_to_sibling(cursor) meta = {} while (cursor.node.type == 'meta'): info = self.visit(cursor) meta[info[0]] = info[1] - if not cursor.goto_next_sibling(): # in case there is nothing after the meta + if not go_to_sibling(cursor): # in case there is nothing after the meta break detectors = {} while (cursor.node.type == 'detector'): detector = self.visit(cursor) detector[detector['name']] = detector - if not cursor.goto_next_sibling(): # in case there is nothing after the meta + if not go_to_sibling(cursor): # in case there is nothing after the meta break requires = None if (cursor.node.type == 'preconditions'): requires = self.visit(cursor) - cursor.goto_next_sibling() + go_to_sibling(cursor) reaches = None if (cursor.node.type == 'reaching'): reaches = self.visit(cursor) - cursor.goto_next_sibling() + go_to_sibling(cursor) ret = { "name":name, @@ -410,29 +426,29 @@ def visit_detector(self, cursor: TreeCursor): #################################################################### # skip bang - cursor.goto_next_sibling() + go_to_sibling(cursor) # grab detector_name detector_name = None if cursor.field_name == 'name': detector_name = cursor.node.text.decode() - cursor.goto_next_sibling() + go_to_sibling(cursor) # grab detector_context detector_context = self.visit(cursor) - cursor.goto_next_sibling() + go_to_sibling(cursor) # grab id detector_type = None if cursor.field_name == 'type': detector_name = cursor.node.text.decode() - cursor.goto_next_sibling() + go_to_sibling(cursor) # grab ttc detector_ttc = None if cursor.field_name == 'ttc': detector_ttc = self.visit(ttc) - cursor.goto_next_sibling() + go_to_sibling(cursor) return { "name": detector_name, @@ -447,21 +463,21 @@ def visit_detector_context(self, cursor: TreeCursor): #################################################################### # skip '(' - cursor.goto_next_sibling() + go_to_sibling(cursor) # grab detector_context_asset context = {} label, asset = self.visit(cursor) context[label] = asset - cursor.goto_next_sibling() + go_to_sibling(cursor) while cursor.node.text.decode() != ')': # skip ',' - cursor.goto_next_sibling() + go_to_sibling(cursor) # grab another detector_context_asset label, asset = self.visit(cursor) context[label] = asset - cursor.goto_next_sibling() + go_to_sibling(cursor) return context @@ -488,12 +504,12 @@ def visit_cias(self, cursor: TreeCursor): val = self.visit(cursor) risk.update(val) - ret = cursor.goto_next_sibling() + ret = go_to_sibling(cursor) if not ret: # no more ',' -> done break # Otherwise, process the next CIA - cursor.goto_next_sibling() + go_to_sibling(cursor) return risk @@ -521,7 +537,7 @@ def visit_ttc(self, cursor: TreeCursor): ################################## # skip '[' - cursor.goto_next_sibling() + go_to_sibling(cursor) return self._visit_intermediary_ttc_expr(cursor) @@ -532,8 +548,11 @@ def _visit_intermediary_ttc_expr(self, cursor: TreeCursor): # check if we have '(', in this case it's a parenthesized expression if (cursor.node.text.decode() == '('): - cursor.goto_next_sibling() # skip '(' - return self._visit_intermediary_ttc_expr(cursor) # visit the expression + go_to_sibling(cursor) # skip '(' + result = self._visit_intermediary_ttc_expr(cursor) # visit the expression + go_to_sibling(cursor) # skip ')' + return result + # if we have an id, just return it elif (cursor.node.type == 'identifier'): @@ -564,7 +583,7 @@ def visit_ttc_binop(self, cursor: TreeCursor): # grab first (intermediary_ttc_expr) lhs = self._visit_intermediary_ttc_expr(cursor) - cursor.goto_next_sibling() + go_to_sibling(cursor) # grab operation type operation = cursor.node.text.decode() @@ -573,7 +592,7 @@ def visit_ttc_binop(self, cursor: TreeCursor): 'multiplication' if operation == '*' else \ 'multiplication' if operation == '/' else \ 'exponentiation' - cursor.goto_next_sibling() + go_to_sibling(cursor) # grab second (intermediary_ttc_expr) rhs = self._visit_intermediary_ttc_expr(cursor) @@ -587,10 +606,10 @@ def visit_ttc_distribution(self, cursor: TreeCursor): # grab (id) name = cursor.node.text.decode() - cursor.goto_next_sibling() + go_to_sibling(cursor) # skip '(' - cursor.goto_next_sibling() + go_to_sibling(cursor) # parse function arguments args = [] @@ -602,7 +621,7 @@ def visit_ttc_distribution(self, cursor: TreeCursor): if (cursor.node.text.decode() != ','): break # otherwise, ignore the comma - cursor.goto_next_sibling() + go_to_sibling(cursor) return { "type": "function", @@ -616,14 +635,14 @@ def visit_preconditions(self, cursor: TreeCursor): ########################################## # Skip '<-' - cursor.goto_next_sibling() + go_to_sibling(cursor) ret = {} ret["overrides"] = True ret["stepExpressions"] = [self.visit(cursor)] - while (cursor.goto_next_sibling()): # check if we have a ',' - cursor.goto_next_sibling() # ignore the ',' + while (go_to_sibling(cursor)): # check if we have a ',' + go_to_sibling(cursor) # ignore the ',' ret["stepExpressions"].append(self.visit(cursor)) return ret @@ -637,13 +656,13 @@ def visit_reaching(self, cursor: TreeCursor): # Get type of reaches ret["overrides"] = True if cursor.node.text.decode()=='->' else False - cursor.goto_next_sibling() + go_to_sibling(cursor) # Visit the steps ret["stepExpressions"] = [self.visit(cursor)] - while (cursor.goto_next_sibling()): # check if we have a ',' - cursor.goto_next_sibling() # ignore the ',' + while (go_to_sibling(cursor)): # check if we have a ',' + go_to_sibling(cursor) # ignore the ',' ret["stepExpressions"].append(self.visit(cursor)) return ret @@ -666,8 +685,9 @@ def _visit_inline_asset_expr(self, cursor: TreeCursor): ret["type"] = self._resolve_part_ID_type(cursor) ret["name"] = cursor.node.text.decode() elif (cursor.node.text.decode() == '('): - cursor.goto_next_sibling() # ignore the '(' + go_to_sibling(cursor) # ignore the '(' ret = self._visit_inline_asset_expr(cursor) + go_to_sibling(cursor) # ignore the ')' else: ret = self.visit(cursor) @@ -695,10 +715,10 @@ def visit_asset_expr_type(self, cursor: TreeCursor): # Visit the inline expr stepExpression = self._visit_inline_asset_expr(cursor) - cursor.goto_next_sibling() + go_to_sibling(cursor) # Skip '[' - cursor.goto_next_sibling() + go_to_sibling(cursor) # Get the subType subType = cursor.node.text.decode() @@ -716,14 +736,14 @@ def visit_asset_expr_binop(self, cursor: TreeCursor): # Get the lhs lhs = self._visit_inline_asset_expr(cursor) - cursor.goto_next_sibling() + go_to_sibling(cursor) # Get the type of operation optype = 'collect' if cursor.node.text.decode()=='.' \ else 'union' if cursor.node.text.decode()=='\\/' \ else 'intersection' if cursor.node.text.decode()=='/\\' \ else 'difference' - cursor.goto_next_sibling() + go_to_sibling(cursor) # Get the rhs rhs = self._visit_inline_asset_expr(cursor) @@ -740,7 +760,7 @@ def visit_asset_expr_unop(self, cursor: TreeCursor): # Get the associated expression expr = self._visit_inline_asset_expr(cursor) - cursor.goto_next_sibling() + go_to_sibling(cursor) return { "type": "transitive", @@ -816,16 +836,16 @@ def visit_associations_declaration(self, cursor: TreeCursor): ######################################### # skip 'associations' - cursor.goto_next_sibling() + go_to_sibling(cursor) # skip '{' - cursor.goto_next_sibling() + go_to_sibling(cursor) # visit all associations associations = [] while cursor.node.text.decode() != '}': associations.append(self.visit(cursor)) - cursor.goto_next_sibling() + go_to_sibling(cursor) return ('associations', associations) @@ -836,52 +856,52 @@ def visit_association(self, cursor: TreeCursor): # Get 1st id - left asset left_asset = cursor.node.text.decode() - cursor.goto_next_sibling() + go_to_sibling(cursor) # skip '[' - cursor.goto_next_sibling() + go_to_sibling(cursor) # Get 2nd id - left field left_field = cursor.node.text.decode() - cursor.goto_next_sibling() + go_to_sibling(cursor) # skip ']' - cursor.goto_next_sibling() + go_to_sibling(cursor) # Get left multiplicity left_multiplicity = self.visit(cursor) - cursor.goto_next_sibling() + go_to_sibling(cursor) # skip '<--' - cursor.goto_next_sibling() + go_to_sibling(cursor) # Get 3rd id - name of the association name = cursor.node.text.decode() - cursor.goto_next_sibling() + go_to_sibling(cursor) # skip '-->' - cursor.goto_next_sibling() + go_to_sibling(cursor) # Get right multiplicity right_multiplicity = self.visit(cursor) - cursor.goto_next_sibling() + go_to_sibling(cursor) # skip '[' - cursor.goto_next_sibling() + go_to_sibling(cursor) # Get 4th id - right field right_field = cursor.node.text.decode() - cursor.goto_next_sibling() + go_to_sibling(cursor) # skip ']' - cursor.goto_next_sibling() + go_to_sibling(cursor) # Get 5th id - right asset right_asset = cursor.node.text.decode() # Get all metas meta = {} - while cursor.goto_next_sibling(): + while go_to_sibling(cursor): res = self.visit(cursor) meta[res[0]] = res[1] @@ -922,10 +942,10 @@ def visit_multiplicity_range(self, cursor: TreeCursor): ################################################## min = self._visit_multiplicity_atom(cursor) - cursor.goto_next_sibling() + go_to_sibling(cursor) # skip '..' - cursor.goto_next_sibling() + go_to_sibling(cursor) max = self._visit_multiplicity_atom(cursor) diff --git a/grammar.js b/grammar.js index faba020..052a38e 100644 --- a/grammar.js +++ b/grammar.js @@ -94,7 +94,7 @@ module.exports = grammar({ '!E', )), field('id', $.identifier), - optional(field('tag', seq('@', $.identifier))), + optional(field('tag', repeat(seq('@', $.identifier)))), optional(field('cias', seq( '{', $.cias, From 080f98e3991faef32af42599ed6b5df97ee99d15 Mon Sep 17 00:00:00 2001 From: Tomas Fonseca Date: Thu, 8 May 2025 15:35:32 +0200 Subject: [PATCH 25/45] feat: Implemented analyzer. The analyzer was added to the visitor patterns and the visitor was slightly adjusted for some minor mistakes. There are currently two analyzer tests which fail, due to how TreeSitter processes grammar, since it no longer throws the errors as ANTLR does. --- examples/visitor/distributions.py | 115 +++ examples/visitor/fast.py | 39 +- examples/visitor/mal_analyzer.py | 784 ++++++++++++++++++ examples/visitor/tests/__init__.py | 0 examples/visitor/tests/conftest.py | 11 + .../test_abstract_asset_1.mal | 7 + .../test_abstract_asset_2.mal | 8 + .../test_abstract_asset_3.mal | 8 + .../test_abstract_asset_4.mal | 7 + .../append_test_files/test_append_1.mal | 36 + .../append_test_files/test_append_2.mal | 41 + .../append_test_files/test_append_3.mal | 41 + .../append_test_files/test_append_4.mal | 44 + .../append_test_files/test_append_5.mal | 44 + .../append_test_files/test_append_6.mal | 41 + .../append_test_files/test_append_7.mal | 41 + .../asset_test_files/test_assets_1.mal | 6 + .../asset_test_files/test_assets_2.mal | 7 + .../asset_test_files/test_assets_3.mal | 8 + .../asset_test_files/test_assets_4.mal | 10 + .../asset_test_files/test_assets_5.mal | 10 + .../asset_test_files/test_assets_6.mal | 5 + .../asset_test_files/test_assets_6_aux.mal | 7 + .../asset_test_files/test_assets_7.mal | 5 + .../asset_test_files/test_assets_7_aux.mal | 6 + .../asset_test_files/test_assets_8.mal | 5 + .../asset_test_files/test_assets_8_aux.mal | 6 + .../test_association_1.mal | 11 + .../test_association_2.mal | 11 + .../test_association_3.mal | 10 + .../test_association_4.mal | 19 + .../test_association_5.mal | 19 + .../test_association_6.mal | 9 + .../category_test_files/test_category_1.mal | 5 + .../category_test_files/test_category_2.mal | 6 + .../collect_test_files/test_collect_1.mal | 26 + .../collect_test_files/test_collect_10.mal | 86 ++ .../collect_test_files/test_collect_2.mal | 26 + .../collect_test_files/test_collect_3.mal | 38 + .../collect_test_files/test_collect_4.mal | 38 + .../collect_test_files/test_collect_5.mal | 41 + .../collect_test_files/test_collect_6.mal | 83 ++ .../collect_test_files/test_collect_7.mal | 86 ++ .../collect_test_files/test_collect_8.mal | 86 ++ .../collect_test_files/test_collect_9.mal | 86 ++ .../define_test_files/test_define_1.mal | 1 + .../define_test_files/test_define_2.mal | 1 + .../define_test_files/test_define_3.mal | 2 + .../define_test_files/test_define_4.mal | 2 + .../define_test_files/test_define_5.mal | 3 + .../define_test_files/test_define_6.mal | 3 + .../define_test_files/test_define_7.mal | 4 + .../define_test_files/test_define_8.mal | 3 + .../exists_test_files/test_exists_1.mal | 18 + .../exists_test_files/test_exists_2.mal | 17 + .../exists_test_files/test_exists_3.mal | 20 + .../exists_test_files/test_exists_4.mal | 18 + .../exists_test_files/test_exists_5.mal | 18 + .../exists_test_files/test_exists_6.mal | 18 + .../exists_test_files/test_exists_7.mal | 18 + .../exists_test_files/test_exists_8.mal | 18 + .../extend_test_files/test_extends_1.mal | 8 + .../extend_test_files/test_extends_2.mal | 7 + .../extend_test_files/test_extends_3.mal | 11 + .../extend_test_files/test_extends_4.mal | 5 + .../extend_test_files/test_extends_4_aux.mal | 6 + .../fields_test_files/test_fields_1.mal | 13 + .../fields_test_files/test_fields_2.mal | 13 + .../fields_test_files/test_fields_3.mal | 15 + .../include_test_files/test_include_1.mal | 1 + .../include_test_files/test_include_2.mal | 1 + .../include_test_files/test_include_2_aux.mal | 2 + .../include_test_files/test_include_3.mal | 3 + .../include_test_files/test_include_3_aux.mal | 2 + .../include_test_files/test_include_4.mal | 2 + .../include_test_files/test_include_4_aux.mal | 2 + .../include_test_files/test_include_5.mal | 3 + .../test_include_5_aux1.mal | 1 + .../test_include_5_aux2.mal | 1 + .../include_test_files/test_include_6.mal | 5 + .../include_test_files/test_include_7.mal | 4 + .../include_test_files/test_include_8.mal | 4 + .../test_include_8_aux1.mal | 1 + .../test_include_8_aux2.mal | 1 + .../include_test_files/test_include_empty.mal | 1 + .../info_test_files/test_asset_info_1.mal | 9 + .../info_test_files/test_asset_info_10.mal | 30 + .../info_test_files/test_asset_info_11.mal | 31 + .../info_test_files/test_asset_info_12.mal | 21 + .../info_test_files/test_asset_info_13.mal | 19 + .../info_test_files/test_asset_info_14.mal | 12 + .../info_test_files/test_asset_info_15.mal | 17 + .../info_test_files/test_asset_info_2.mal | 10 + .../info_test_files/test_asset_info_3.mal | 13 + .../info_test_files/test_asset_info_4.mal | 13 + .../info_test_files/test_asset_info_5.mal | 15 + .../info_test_files/test_asset_info_6.mal | 16 + .../info_test_files/test_asset_info_7.mal | 17 + .../info_test_files/test_asset_info_8.mal | 24 + .../info_test_files/test_asset_info_9.mal | 29 + .../fixtures/let_test_files/test_let_1.mal | 23 + .../fixtures/let_test_files/test_let_10.mal | 18 + .../fixtures/let_test_files/test_let_2.mal | 23 + .../fixtures/let_test_files/test_let_3.mal | 15 + .../fixtures/let_test_files/test_let_4.mal | 19 + .../fixtures/let_test_files/test_let_5.mal | 19 + .../fixtures/let_test_files/test_let_6.mal | 17 + .../fixtures/let_test_files/test_let_7.mal | 15 + .../fixtures/let_test_files/test_let_8.mal | 15 + .../fixtures/let_test_files/test_let_9.mal | 15 + .../operation_test_files/test_operation_1.mal | 30 + .../test_operation_10.mal | 29 + .../test_operation_11.mal | 29 + .../test_operation_12.mal | 29 + .../test_operation_13.mal | 30 + .../test_operation_14.mal | 34 + .../test_operation_15.mal | 30 + .../test_operation_16.mal | 29 + .../test_operation_17.mal | 29 + .../test_operation_18.mal | 29 + .../test_operation_19.mal | 29 + .../operation_test_files/test_operation_2.mal | 29 + .../test_operation_20.mal | 30 + .../test_operation_21.mal | 34 + .../test_operation_22.mal | 40 + .../operation_test_files/test_operation_3.mal | 29 + .../operation_test_files/test_operation_4.mal | 29 + .../operation_test_files/test_operation_5.mal | 29 + .../operation_test_files/test_operation_6.mal | 30 + .../operation_test_files/test_operation_7.mal | 34 + .../operation_test_files/test_operation_8.mal | 30 + .../operation_test_files/test_operation_9.mal | 29 + .../test_probability_distributions_1.mal | 9 + .../test_probability_distributions_10.mal | 9 + .../test_probability_distributions_11.mal | 9 + .../test_probability_distributions_12.mal | 9 + .../test_probability_distributions_13.mal | 9 + .../test_probability_distributions_14.mal | 9 + .../test_probability_distributions_15.mal | 9 + .../test_probability_distributions_16.mal | 9 + .../test_probability_distributions_17.mal | 9 + .../test_probability_distributions_18.mal | 9 + .../test_probability_distributions_19.mal | 9 + .../test_probability_distributions_2.mal | 9 + .../test_probability_distributions_20.mal | 9 + .../test_probability_distributions_21.mal | 9 + .../test_probability_distributions_22.mal | 12 + .../test_probability_distributions_23.mal | 12 + .../test_probability_distributions_24.mal | 9 + .../test_probability_distributions_3.mal | 9 + .../test_probability_distributions_4.mal | 9 + .../test_probability_distributions_5.mal | 9 + .../test_probability_distributions_6.mal | 9 + .../test_probability_distributions_7.mal | 9 + .../test_probability_distributions_8.mal | 9 + .../test_probability_distributions_9.mal | 9 + .../reaches_test_files/test_reaches_1.mal | 34 + .../reaches_test_files/test_reaches_2.mal | 41 + .../reaches_test_files/test_reaches_3.mal | 41 + .../reaches_test_files/test_reaches_4.mal | 41 + .../reaches_test_files/test_reaches_5.mal | 41 + .../reaches_test_files/test_reaches_6.mal | 41 + .../require_test_files/test_require_1.mal | 21 + .../require_test_files/test_require_2.mal | 19 + .../require_test_files/test_require_3.mal | 20 + .../require_test_files/test_require_4.mal | 23 + .../require_test_files/test_require_5.mal | 23 + .../require_test_files/test_require_6.mal | 21 + .../require_test_files/test_require_7.mal | 84 ++ .../risk_type_test_files/test_risk_type_1.mal | 13 + .../risk_type_test_files/test_risk_type_2.mal | 12 + .../risk_type_test_files/test_risk_type_3.mal | 18 + .../risk_type_test_files/test_risk_type_4.mal | 17 + .../fixtures/step_test_files/test_step_1.mal | 12 + .../fixtures/step_test_files/test_step_2.mal | 11 + .../fixtures/step_test_files/test_step_3.mal | 11 + .../fixtures/step_test_files/test_step_4.mal | 14 + .../fixtures/step_test_files/test_step_5.mal | 14 + .../steps_test_files/test_steps_1.mal | 14 + .../steps_test_files/test_steps_10.mal | 18 + .../steps_test_files/test_steps_11.mal | 15 + .../steps_test_files/test_steps_12.mal | 13 + .../steps_test_files/test_steps_12_aux1.mal | 5 + .../steps_test_files/test_steps_12_aux2.mal | 6 + .../steps_test_files/test_steps_13.mal | 13 + .../steps_test_files/test_steps_13_aux1.mal | 5 + .../steps_test_files/test_steps_13_aux2.mal | 6 + .../steps_test_files/test_steps_14.mal | 26 + .../steps_test_files/test_steps_15.mal | 21 + .../steps_test_files/test_steps_2.mal | 12 + .../steps_test_files/test_steps_3.mal | 19 + .../steps_test_files/test_steps_4.mal | 17 + .../steps_test_files/test_steps_5.mal | 15 + .../steps_test_files/test_steps_6.mal | 15 + .../steps_test_files/test_steps_7.mal | 24 + .../steps_test_files/test_steps_8.mal | 25 + .../steps_test_files/test_steps_9.mal | 18 + .../test_substitution_1.mal | 27 + .../test_substitution_2.mal | 30 + .../test_substitution_3.mal | 27 + .../test_substitution_4.mal | 31 + .../test_substitution_5.mal | 33 + .../test_substitution_6.mal | 32 + .../test_substitution_7.mal | 24 + .../subtype_test_files/test_subtype_1.mal | 28 + .../subtype_test_files/test_subtype_2.mal | 29 + .../subtype_test_files/test_subtype_3.mal | 32 + .../subtype_test_files/test_subtype_4.mal | 29 + .../subtype_test_files/test_subtype_5.mal | 30 + .../test_transitive_1.mal | 26 + .../test_transitive_2.mal | 27 + .../test_transitive_3.mal | 30 + .../test_transitive_4.mal | 35 + .../test_transitive_5.mal | 27 + .../fixtures/ttc_test_files/test_ttc_1.mal | 10 + .../fixtures/ttc_test_files/test_ttc_10.mal | 10 + .../fixtures/ttc_test_files/test_ttc_11.mal | 10 + .../fixtures/ttc_test_files/test_ttc_12.mal | 10 + .../fixtures/ttc_test_files/test_ttc_13.mal | 10 + .../fixtures/ttc_test_files/test_ttc_14.mal | 10 + .../fixtures/ttc_test_files/test_ttc_15.mal | 10 + .../fixtures/ttc_test_files/test_ttc_16.mal | 10 + .../fixtures/ttc_test_files/test_ttc_17.mal | 10 + .../fixtures/ttc_test_files/test_ttc_18.mal | 10 + .../fixtures/ttc_test_files/test_ttc_19.mal | 10 + .../fixtures/ttc_test_files/test_ttc_2.mal | 10 + .../fixtures/ttc_test_files/test_ttc_20.mal | 10 + .../fixtures/ttc_test_files/test_ttc_21.mal | 10 + .../fixtures/ttc_test_files/test_ttc_22.mal | 10 + .../fixtures/ttc_test_files/test_ttc_23.mal | 10 + .../fixtures/ttc_test_files/test_ttc_24.mal | 10 + .../fixtures/ttc_test_files/test_ttc_25.mal | 10 + .../fixtures/ttc_test_files/test_ttc_26.mal | 10 + .../fixtures/ttc_test_files/test_ttc_27.mal | 10 + .../fixtures/ttc_test_files/test_ttc_28.mal | 10 + .../fixtures/ttc_test_files/test_ttc_29.mal | 10 + .../fixtures/ttc_test_files/test_ttc_3.mal | 10 + .../fixtures/ttc_test_files/test_ttc_30.mal | 10 + .../fixtures/ttc_test_files/test_ttc_31.mal | 10 + .../fixtures/ttc_test_files/test_ttc_32.mal | 10 + .../fixtures/ttc_test_files/test_ttc_33.mal | 10 + .../fixtures/ttc_test_files/test_ttc_34.mal | 10 + .../fixtures/ttc_test_files/test_ttc_35.mal | 12 + .../fixtures/ttc_test_files/test_ttc_36.mal | 10 + .../fixtures/ttc_test_files/test_ttc_37.mal | 12 + .../fixtures/ttc_test_files/test_ttc_38.mal | 10 + .../fixtures/ttc_test_files/test_ttc_39.mal | 12 + .../fixtures/ttc_test_files/test_ttc_4.mal | 10 + .../fixtures/ttc_test_files/test_ttc_40.mal | 10 + .../fixtures/ttc_test_files/test_ttc_41.mal | 12 + .../fixtures/ttc_test_files/test_ttc_42.mal | 10 + .../fixtures/ttc_test_files/test_ttc_43.mal | 12 + .../fixtures/ttc_test_files/test_ttc_44.mal | 10 + .../fixtures/ttc_test_files/test_ttc_45.mal | 12 + .../fixtures/ttc_test_files/test_ttc_46.mal | 10 + .../fixtures/ttc_test_files/test_ttc_47.mal | 12 + .../fixtures/ttc_test_files/test_ttc_48.mal | 10 + .../fixtures/ttc_test_files/test_ttc_49.mal | 12 + .../fixtures/ttc_test_files/test_ttc_5.mal | 10 + .../fixtures/ttc_test_files/test_ttc_50.mal | 10 + .../fixtures/ttc_test_files/test_ttc_51.mal | 12 + .../fixtures/ttc_test_files/test_ttc_52.mal | 10 + .../fixtures/ttc_test_files/test_ttc_53.mal | 12 + .../fixtures/ttc_test_files/test_ttc_54.mal | 10 + .../fixtures/ttc_test_files/test_ttc_6.mal | 10 + .../fixtures/ttc_test_files/test_ttc_7.mal | 10 + .../fixtures/ttc_test_files/test_ttc_8.mal | 10 + .../fixtures/ttc_test_files/test_ttc_9.mal | 10 + .../tests/mal_analyzer_test_wrapper.py | 54 ++ .../visitor/tests/test_mal_abstract_asset.py | 67 ++ examples/visitor/tests/test_mal_append.py | 82 ++ examples/visitor/tests/test_mal_assets.py | 89 ++ .../visitor/tests/test_mal_association.py | 85 ++ examples/visitor/tests/test_mal_category.py | 35 + examples/visitor/tests/test_mal_collect.py | 123 +++ examples/visitor/tests/test_mal_define.py | 89 ++ examples/visitor/tests/test_mal_exists.py | 88 ++ examples/visitor/tests/test_mal_extends.py | 63 ++ examples/visitor/tests/test_mal_fields.py | 48 ++ examples/visitor/tests/test_mal_include.py | 94 +++ examples/visitor/tests/test_mal_info.py | 192 +++++ examples/visitor/tests/test_mal_let.py | 152 ++++ examples/visitor/tests/test_mal_operations.py | 267 ++++++ .../test_mal_probability_distributions.py | 272 ++++++ examples/visitor/tests/test_mal_reaches.py | 72 ++ examples/visitor/tests/test_mal_require.py | 90 ++ examples/visitor/tests/test_mal_risk_type.py | 58 ++ examples/visitor/tests/test_mal_step.py | 76 ++ examples/visitor/tests/test_mal_steps.py | 181 ++++ .../visitor/tests/test_mal_substitution.py | 87 ++ examples/visitor/tests/test_mal_subtype.py | 66 ++ examples/visitor/tests/test_mal_transitive.py | 67 ++ examples/visitor/tests/test_mal_ttc.py | 568 +++++++++++++ 293 files changed, 8624 insertions(+), 8 deletions(-) create mode 100644 examples/visitor/distributions.py create mode 100644 examples/visitor/mal_analyzer.py create mode 100644 examples/visitor/tests/__init__.py create mode 100644 examples/visitor/tests/conftest.py create mode 100644 examples/visitor/tests/fixtures/abstract_asset_test_files/test_abstract_asset_1.mal create mode 100644 examples/visitor/tests/fixtures/abstract_asset_test_files/test_abstract_asset_2.mal create mode 100644 examples/visitor/tests/fixtures/abstract_asset_test_files/test_abstract_asset_3.mal create mode 100644 examples/visitor/tests/fixtures/abstract_asset_test_files/test_abstract_asset_4.mal create mode 100644 examples/visitor/tests/fixtures/append_test_files/test_append_1.mal create mode 100644 examples/visitor/tests/fixtures/append_test_files/test_append_2.mal create mode 100644 examples/visitor/tests/fixtures/append_test_files/test_append_3.mal create mode 100644 examples/visitor/tests/fixtures/append_test_files/test_append_4.mal create mode 100644 examples/visitor/tests/fixtures/append_test_files/test_append_5.mal create mode 100644 examples/visitor/tests/fixtures/append_test_files/test_append_6.mal create mode 100644 examples/visitor/tests/fixtures/append_test_files/test_append_7.mal create mode 100644 examples/visitor/tests/fixtures/asset_test_files/test_assets_1.mal create mode 100644 examples/visitor/tests/fixtures/asset_test_files/test_assets_2.mal create mode 100644 examples/visitor/tests/fixtures/asset_test_files/test_assets_3.mal create mode 100644 examples/visitor/tests/fixtures/asset_test_files/test_assets_4.mal create mode 100644 examples/visitor/tests/fixtures/asset_test_files/test_assets_5.mal create mode 100644 examples/visitor/tests/fixtures/asset_test_files/test_assets_6.mal create mode 100644 examples/visitor/tests/fixtures/asset_test_files/test_assets_6_aux.mal create mode 100644 examples/visitor/tests/fixtures/asset_test_files/test_assets_7.mal create mode 100644 examples/visitor/tests/fixtures/asset_test_files/test_assets_7_aux.mal create mode 100644 examples/visitor/tests/fixtures/asset_test_files/test_assets_8.mal create mode 100644 examples/visitor/tests/fixtures/asset_test_files/test_assets_8_aux.mal create mode 100644 examples/visitor/tests/fixtures/association_test_files/test_association_1.mal create mode 100644 examples/visitor/tests/fixtures/association_test_files/test_association_2.mal create mode 100644 examples/visitor/tests/fixtures/association_test_files/test_association_3.mal create mode 100644 examples/visitor/tests/fixtures/association_test_files/test_association_4.mal create mode 100644 examples/visitor/tests/fixtures/association_test_files/test_association_5.mal create mode 100644 examples/visitor/tests/fixtures/association_test_files/test_association_6.mal create mode 100644 examples/visitor/tests/fixtures/category_test_files/test_category_1.mal create mode 100644 examples/visitor/tests/fixtures/category_test_files/test_category_2.mal create mode 100644 examples/visitor/tests/fixtures/collect_test_files/test_collect_1.mal create mode 100644 examples/visitor/tests/fixtures/collect_test_files/test_collect_10.mal create mode 100644 examples/visitor/tests/fixtures/collect_test_files/test_collect_2.mal create mode 100644 examples/visitor/tests/fixtures/collect_test_files/test_collect_3.mal create mode 100644 examples/visitor/tests/fixtures/collect_test_files/test_collect_4.mal create mode 100644 examples/visitor/tests/fixtures/collect_test_files/test_collect_5.mal create mode 100644 examples/visitor/tests/fixtures/collect_test_files/test_collect_6.mal create mode 100644 examples/visitor/tests/fixtures/collect_test_files/test_collect_7.mal create mode 100644 examples/visitor/tests/fixtures/collect_test_files/test_collect_8.mal create mode 100644 examples/visitor/tests/fixtures/collect_test_files/test_collect_9.mal create mode 100644 examples/visitor/tests/fixtures/define_test_files/test_define_1.mal create mode 100644 examples/visitor/tests/fixtures/define_test_files/test_define_2.mal create mode 100644 examples/visitor/tests/fixtures/define_test_files/test_define_3.mal create mode 100644 examples/visitor/tests/fixtures/define_test_files/test_define_4.mal create mode 100644 examples/visitor/tests/fixtures/define_test_files/test_define_5.mal create mode 100644 examples/visitor/tests/fixtures/define_test_files/test_define_6.mal create mode 100644 examples/visitor/tests/fixtures/define_test_files/test_define_7.mal create mode 100644 examples/visitor/tests/fixtures/define_test_files/test_define_8.mal create mode 100644 examples/visitor/tests/fixtures/exists_test_files/test_exists_1.mal create mode 100644 examples/visitor/tests/fixtures/exists_test_files/test_exists_2.mal create mode 100644 examples/visitor/tests/fixtures/exists_test_files/test_exists_3.mal create mode 100644 examples/visitor/tests/fixtures/exists_test_files/test_exists_4.mal create mode 100644 examples/visitor/tests/fixtures/exists_test_files/test_exists_5.mal create mode 100644 examples/visitor/tests/fixtures/exists_test_files/test_exists_6.mal create mode 100644 examples/visitor/tests/fixtures/exists_test_files/test_exists_7.mal create mode 100644 examples/visitor/tests/fixtures/exists_test_files/test_exists_8.mal create mode 100644 examples/visitor/tests/fixtures/extend_test_files/test_extends_1.mal create mode 100644 examples/visitor/tests/fixtures/extend_test_files/test_extends_2.mal create mode 100644 examples/visitor/tests/fixtures/extend_test_files/test_extends_3.mal create mode 100644 examples/visitor/tests/fixtures/extend_test_files/test_extends_4.mal create mode 100644 examples/visitor/tests/fixtures/extend_test_files/test_extends_4_aux.mal create mode 100644 examples/visitor/tests/fixtures/fields_test_files/test_fields_1.mal create mode 100644 examples/visitor/tests/fixtures/fields_test_files/test_fields_2.mal create mode 100644 examples/visitor/tests/fixtures/fields_test_files/test_fields_3.mal create mode 100644 examples/visitor/tests/fixtures/include_test_files/test_include_1.mal create mode 100644 examples/visitor/tests/fixtures/include_test_files/test_include_2.mal create mode 100644 examples/visitor/tests/fixtures/include_test_files/test_include_2_aux.mal create mode 100644 examples/visitor/tests/fixtures/include_test_files/test_include_3.mal create mode 100644 examples/visitor/tests/fixtures/include_test_files/test_include_3_aux.mal create mode 100644 examples/visitor/tests/fixtures/include_test_files/test_include_4.mal create mode 100644 examples/visitor/tests/fixtures/include_test_files/test_include_4_aux.mal create mode 100644 examples/visitor/tests/fixtures/include_test_files/test_include_5.mal create mode 100644 examples/visitor/tests/fixtures/include_test_files/test_include_5_aux1.mal create mode 100644 examples/visitor/tests/fixtures/include_test_files/test_include_5_aux2.mal create mode 100644 examples/visitor/tests/fixtures/include_test_files/test_include_6.mal create mode 100644 examples/visitor/tests/fixtures/include_test_files/test_include_7.mal create mode 100644 examples/visitor/tests/fixtures/include_test_files/test_include_8.mal create mode 100644 examples/visitor/tests/fixtures/include_test_files/test_include_8_aux1.mal create mode 100644 examples/visitor/tests/fixtures/include_test_files/test_include_8_aux2.mal create mode 100644 examples/visitor/tests/fixtures/include_test_files/test_include_empty.mal create mode 100644 examples/visitor/tests/fixtures/info_test_files/test_asset_info_1.mal create mode 100644 examples/visitor/tests/fixtures/info_test_files/test_asset_info_10.mal create mode 100644 examples/visitor/tests/fixtures/info_test_files/test_asset_info_11.mal create mode 100644 examples/visitor/tests/fixtures/info_test_files/test_asset_info_12.mal create mode 100644 examples/visitor/tests/fixtures/info_test_files/test_asset_info_13.mal create mode 100644 examples/visitor/tests/fixtures/info_test_files/test_asset_info_14.mal create mode 100644 examples/visitor/tests/fixtures/info_test_files/test_asset_info_15.mal create mode 100644 examples/visitor/tests/fixtures/info_test_files/test_asset_info_2.mal create mode 100644 examples/visitor/tests/fixtures/info_test_files/test_asset_info_3.mal create mode 100644 examples/visitor/tests/fixtures/info_test_files/test_asset_info_4.mal create mode 100644 examples/visitor/tests/fixtures/info_test_files/test_asset_info_5.mal create mode 100644 examples/visitor/tests/fixtures/info_test_files/test_asset_info_6.mal create mode 100644 examples/visitor/tests/fixtures/info_test_files/test_asset_info_7.mal create mode 100644 examples/visitor/tests/fixtures/info_test_files/test_asset_info_8.mal create mode 100644 examples/visitor/tests/fixtures/info_test_files/test_asset_info_9.mal create mode 100644 examples/visitor/tests/fixtures/let_test_files/test_let_1.mal create mode 100644 examples/visitor/tests/fixtures/let_test_files/test_let_10.mal create mode 100644 examples/visitor/tests/fixtures/let_test_files/test_let_2.mal create mode 100644 examples/visitor/tests/fixtures/let_test_files/test_let_3.mal create mode 100644 examples/visitor/tests/fixtures/let_test_files/test_let_4.mal create mode 100644 examples/visitor/tests/fixtures/let_test_files/test_let_5.mal create mode 100644 examples/visitor/tests/fixtures/let_test_files/test_let_6.mal create mode 100644 examples/visitor/tests/fixtures/let_test_files/test_let_7.mal create mode 100644 examples/visitor/tests/fixtures/let_test_files/test_let_8.mal create mode 100644 examples/visitor/tests/fixtures/let_test_files/test_let_9.mal create mode 100644 examples/visitor/tests/fixtures/operation_test_files/test_operation_1.mal create mode 100644 examples/visitor/tests/fixtures/operation_test_files/test_operation_10.mal create mode 100644 examples/visitor/tests/fixtures/operation_test_files/test_operation_11.mal create mode 100644 examples/visitor/tests/fixtures/operation_test_files/test_operation_12.mal create mode 100644 examples/visitor/tests/fixtures/operation_test_files/test_operation_13.mal create mode 100644 examples/visitor/tests/fixtures/operation_test_files/test_operation_14.mal create mode 100644 examples/visitor/tests/fixtures/operation_test_files/test_operation_15.mal create mode 100644 examples/visitor/tests/fixtures/operation_test_files/test_operation_16.mal create mode 100644 examples/visitor/tests/fixtures/operation_test_files/test_operation_17.mal create mode 100644 examples/visitor/tests/fixtures/operation_test_files/test_operation_18.mal create mode 100644 examples/visitor/tests/fixtures/operation_test_files/test_operation_19.mal create mode 100644 examples/visitor/tests/fixtures/operation_test_files/test_operation_2.mal create mode 100644 examples/visitor/tests/fixtures/operation_test_files/test_operation_20.mal create mode 100644 examples/visitor/tests/fixtures/operation_test_files/test_operation_21.mal create mode 100644 examples/visitor/tests/fixtures/operation_test_files/test_operation_22.mal create mode 100644 examples/visitor/tests/fixtures/operation_test_files/test_operation_3.mal create mode 100644 examples/visitor/tests/fixtures/operation_test_files/test_operation_4.mal create mode 100644 examples/visitor/tests/fixtures/operation_test_files/test_operation_5.mal create mode 100644 examples/visitor/tests/fixtures/operation_test_files/test_operation_6.mal create mode 100644 examples/visitor/tests/fixtures/operation_test_files/test_operation_7.mal create mode 100644 examples/visitor/tests/fixtures/operation_test_files/test_operation_8.mal create mode 100644 examples/visitor/tests/fixtures/operation_test_files/test_operation_9.mal create mode 100644 examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_1.mal create mode 100644 examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_10.mal create mode 100644 examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_11.mal create mode 100644 examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_12.mal create mode 100644 examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_13.mal create mode 100644 examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_14.mal create mode 100644 examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_15.mal create mode 100644 examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_16.mal create mode 100644 examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_17.mal create mode 100644 examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_18.mal create mode 100644 examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_19.mal create mode 100644 examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_2.mal create mode 100644 examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_20.mal create mode 100644 examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_21.mal create mode 100644 examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_22.mal create mode 100644 examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_23.mal create mode 100644 examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_24.mal create mode 100644 examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_3.mal create mode 100644 examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_4.mal create mode 100644 examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_5.mal create mode 100644 examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_6.mal create mode 100644 examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_7.mal create mode 100644 examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_8.mal create mode 100644 examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_9.mal create mode 100644 examples/visitor/tests/fixtures/reaches_test_files/test_reaches_1.mal create mode 100644 examples/visitor/tests/fixtures/reaches_test_files/test_reaches_2.mal create mode 100644 examples/visitor/tests/fixtures/reaches_test_files/test_reaches_3.mal create mode 100644 examples/visitor/tests/fixtures/reaches_test_files/test_reaches_4.mal create mode 100644 examples/visitor/tests/fixtures/reaches_test_files/test_reaches_5.mal create mode 100644 examples/visitor/tests/fixtures/reaches_test_files/test_reaches_6.mal create mode 100644 examples/visitor/tests/fixtures/require_test_files/test_require_1.mal create mode 100644 examples/visitor/tests/fixtures/require_test_files/test_require_2.mal create mode 100644 examples/visitor/tests/fixtures/require_test_files/test_require_3.mal create mode 100644 examples/visitor/tests/fixtures/require_test_files/test_require_4.mal create mode 100644 examples/visitor/tests/fixtures/require_test_files/test_require_5.mal create mode 100644 examples/visitor/tests/fixtures/require_test_files/test_require_6.mal create mode 100644 examples/visitor/tests/fixtures/require_test_files/test_require_7.mal create mode 100644 examples/visitor/tests/fixtures/risk_type_test_files/test_risk_type_1.mal create mode 100644 examples/visitor/tests/fixtures/risk_type_test_files/test_risk_type_2.mal create mode 100644 examples/visitor/tests/fixtures/risk_type_test_files/test_risk_type_3.mal create mode 100644 examples/visitor/tests/fixtures/risk_type_test_files/test_risk_type_4.mal create mode 100644 examples/visitor/tests/fixtures/step_test_files/test_step_1.mal create mode 100644 examples/visitor/tests/fixtures/step_test_files/test_step_2.mal create mode 100644 examples/visitor/tests/fixtures/step_test_files/test_step_3.mal create mode 100644 examples/visitor/tests/fixtures/step_test_files/test_step_4.mal create mode 100644 examples/visitor/tests/fixtures/step_test_files/test_step_5.mal create mode 100644 examples/visitor/tests/fixtures/steps_test_files/test_steps_1.mal create mode 100644 examples/visitor/tests/fixtures/steps_test_files/test_steps_10.mal create mode 100644 examples/visitor/tests/fixtures/steps_test_files/test_steps_11.mal create mode 100644 examples/visitor/tests/fixtures/steps_test_files/test_steps_12.mal create mode 100644 examples/visitor/tests/fixtures/steps_test_files/test_steps_12_aux1.mal create mode 100644 examples/visitor/tests/fixtures/steps_test_files/test_steps_12_aux2.mal create mode 100644 examples/visitor/tests/fixtures/steps_test_files/test_steps_13.mal create mode 100644 examples/visitor/tests/fixtures/steps_test_files/test_steps_13_aux1.mal create mode 100644 examples/visitor/tests/fixtures/steps_test_files/test_steps_13_aux2.mal create mode 100644 examples/visitor/tests/fixtures/steps_test_files/test_steps_14.mal create mode 100644 examples/visitor/tests/fixtures/steps_test_files/test_steps_15.mal create mode 100644 examples/visitor/tests/fixtures/steps_test_files/test_steps_2.mal create mode 100644 examples/visitor/tests/fixtures/steps_test_files/test_steps_3.mal create mode 100644 examples/visitor/tests/fixtures/steps_test_files/test_steps_4.mal create mode 100644 examples/visitor/tests/fixtures/steps_test_files/test_steps_5.mal create mode 100644 examples/visitor/tests/fixtures/steps_test_files/test_steps_6.mal create mode 100644 examples/visitor/tests/fixtures/steps_test_files/test_steps_7.mal create mode 100644 examples/visitor/tests/fixtures/steps_test_files/test_steps_8.mal create mode 100644 examples/visitor/tests/fixtures/steps_test_files/test_steps_9.mal create mode 100644 examples/visitor/tests/fixtures/substitution_test_files/test_substitution_1.mal create mode 100644 examples/visitor/tests/fixtures/substitution_test_files/test_substitution_2.mal create mode 100644 examples/visitor/tests/fixtures/substitution_test_files/test_substitution_3.mal create mode 100644 examples/visitor/tests/fixtures/substitution_test_files/test_substitution_4.mal create mode 100644 examples/visitor/tests/fixtures/substitution_test_files/test_substitution_5.mal create mode 100644 examples/visitor/tests/fixtures/substitution_test_files/test_substitution_6.mal create mode 100644 examples/visitor/tests/fixtures/substitution_test_files/test_substitution_7.mal create mode 100644 examples/visitor/tests/fixtures/subtype_test_files/test_subtype_1.mal create mode 100644 examples/visitor/tests/fixtures/subtype_test_files/test_subtype_2.mal create mode 100644 examples/visitor/tests/fixtures/subtype_test_files/test_subtype_3.mal create mode 100644 examples/visitor/tests/fixtures/subtype_test_files/test_subtype_4.mal create mode 100644 examples/visitor/tests/fixtures/subtype_test_files/test_subtype_5.mal create mode 100644 examples/visitor/tests/fixtures/transitive_test_files/test_transitive_1.mal create mode 100644 examples/visitor/tests/fixtures/transitive_test_files/test_transitive_2.mal create mode 100644 examples/visitor/tests/fixtures/transitive_test_files/test_transitive_3.mal create mode 100644 examples/visitor/tests/fixtures/transitive_test_files/test_transitive_4.mal create mode 100644 examples/visitor/tests/fixtures/transitive_test_files/test_transitive_5.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_1.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_10.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_11.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_12.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_13.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_14.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_15.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_16.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_17.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_18.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_19.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_2.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_20.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_21.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_22.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_23.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_24.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_25.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_26.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_27.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_28.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_29.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_3.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_30.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_31.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_32.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_33.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_34.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_35.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_36.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_37.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_38.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_39.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_4.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_40.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_41.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_42.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_43.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_44.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_45.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_46.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_47.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_48.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_49.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_5.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_50.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_51.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_52.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_53.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_54.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_6.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_7.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_8.mal create mode 100644 examples/visitor/tests/fixtures/ttc_test_files/test_ttc_9.mal create mode 100644 examples/visitor/tests/mal_analyzer_test_wrapper.py create mode 100644 examples/visitor/tests/test_mal_abstract_asset.py create mode 100644 examples/visitor/tests/test_mal_append.py create mode 100644 examples/visitor/tests/test_mal_assets.py create mode 100644 examples/visitor/tests/test_mal_association.py create mode 100644 examples/visitor/tests/test_mal_category.py create mode 100644 examples/visitor/tests/test_mal_collect.py create mode 100644 examples/visitor/tests/test_mal_define.py create mode 100644 examples/visitor/tests/test_mal_exists.py create mode 100644 examples/visitor/tests/test_mal_extends.py create mode 100644 examples/visitor/tests/test_mal_fields.py create mode 100644 examples/visitor/tests/test_mal_include.py create mode 100644 examples/visitor/tests/test_mal_info.py create mode 100644 examples/visitor/tests/test_mal_let.py create mode 100644 examples/visitor/tests/test_mal_operations.py create mode 100644 examples/visitor/tests/test_mal_probability_distributions.py create mode 100644 examples/visitor/tests/test_mal_reaches.py create mode 100644 examples/visitor/tests/test_mal_require.py create mode 100644 examples/visitor/tests/test_mal_risk_type.py create mode 100644 examples/visitor/tests/test_mal_step.py create mode 100644 examples/visitor/tests/test_mal_steps.py create mode 100644 examples/visitor/tests/test_mal_substitution.py create mode 100644 examples/visitor/tests/test_mal_subtype.py create mode 100644 examples/visitor/tests/test_mal_transitive.py create mode 100644 examples/visitor/tests/test_mal_ttc.py diff --git a/examples/visitor/distributions.py b/examples/visitor/distributions.py new file mode 100644 index 0000000..2339b92 --- /dev/null +++ b/examples/visitor/distributions.py @@ -0,0 +1,115 @@ +class DistributionsException(Exception): + def __init__(self, error_message): + self._error_message = error_message + super().__init__(self._error_message) + +class Distributions: + def validate(distribution_name: str, params: list) -> None: + match distribution_name: + case 'Bernoulli': + Bernoulli.validate(params) + case 'Binomial': + Binomial.validate(params) + case 'Exponential': + Exponential.validate(params) + case 'Gamma': + Gamma.validate(params) + case 'LogNormal': + LogNormal.validate(params) + case 'Pareto': + Pareto.validate(params) + case 'TruncatedNormal': + TruncatedNormal.validate(params) + case 'Uniform': + Uniform.validate(params) + case 'Enabled' | 'Disabled' | 'Zero' | 'Infinity' | 'EasyAndCertain' | \ + 'EasyAndUncertain' | 'HardAndCertain' | 'HardAndUncertain' | \ + 'VeryHardAndCertain' | 'VeryHardAndUncertain': + Combination.validate(params) + case _: + err_msg = f"Distribution {distribution_name} is not supported" + raise(DistributionsException(err_msg)) + +class Bernoulli: + def validate(params: list) -> None: + if (not params or len(params)!=1): + err_msg = "Expected exactly one parameter (probability), for Bernoulli distribution" + raise(DistributionsException(err_msg)) + if not 0<=params[0]<=1: + err_msg = f"{params[0]} is not in valid range '0 <= probability <= 1', for Bernoulli distribution" + raise(DistributionsException(err_msg)) + +class Binomial: + def validate(params: list) -> None: + if (not params or len(params)!=2): + err_msg = "Expected exactly two parameters (trials, probability), for Binomial distribution" + raise(DistributionsException(err_msg)) + if not 0<=params[1]<=1: + err_msg = f"{params[1]} is not in valid range '0 <= probability <= 1', for Binomial distribution" + raise(DistributionsException(err_msg)) + +class Exponential: + def validate(params: list) -> None: + if (not params or len(params)!=1): + err_msg = "Expected exactly one parameter (lambda), for Exponential distribution" + raise(DistributionsException(err_msg)) + if params[0]<=0: + err_msg = f"{params[0]} is not in valid range 'lambda > 0', for Exponential distribution" + raise(DistributionsException(err_msg)) + +class Gamma: + def validate(params: list) -> None: + if (not params or len(params)!=2): + err_msg = "Expected exactly two parameters (shape, scale), for Gamma distribution" + raise(DistributionsException(err_msg)) + if params[0]<=0: + err_msg = f"{params[0]} is not in valid range 'shape > 0', for Gamma distribution" + raise(DistributionsException(err_msg)) + if params[1]<=0: + err_msg = f"{params[1]} is not in valid range 'scale > 0', for Gamma distribution" + raise(DistributionsException(err_msg)) + +class LogNormal: + def validate(params: list) -> None: + if (not params or len(params)!=2): + err_msg = "Expected exactly two parameters (mean, standardDeviation), for LogNormal distribution" + raise(DistributionsException(err_msg)) + if params[1]<=0: + err_msg = f"{params[1]} is not in valid range 'standardDeviation > 0', for LogNormal distribution" + raise(DistributionsException(err_msg)) + +class Pareto: + def validate(params: list) -> None: + if (not params or len(params)!=2): + err_msg = "Expected exactly two parameters (min, shape), for Pareto distribution" + raise(DistributionsException(err_msg)) + if params[0]<=0: + err_msg = f"{params[0]} is not in valid range 'min > 0', for Pareto distribution" + raise(DistributionsException(err_msg)) + if params[1]<=0: + err_msg = f"{params[1]} is not in valid range 'shape > 0', for Pareto distribution" + raise(DistributionsException(err_msg)) + +class TruncatedNormal: + def validate(params: list) -> None: + if (not params or len(params)!=2): + err_msg = "Expected exactly two parameters (mean, standardDeviation), for TruncatedNormal distribution" + raise(DistributionsException(err_msg)) + if params[1]<=0: + err_msg = f"{params[1]} is not in valid range 'standardDeviation > 0', for TruncatedNormal distribution" + raise(DistributionsException(err_msg)) + +class Uniform: + def validate(params: list) -> None: + if (not params or len(params)!=2): + err_msg = "Expected exactly two parameters (min, max), for Uniform distribution" + raise(DistributionsException(err_msg)) + if params[0] > params[1]: + err_msg = f"({params[0]}, {params[1]}) does not meet requirement 'min <= max', for Uniform distribution" + raise(DistributionsException(err_msg)) + +class Combination: + def validate(params: list) -> None: + if (params and len(params)!=0): + err_msg = "Expected exactly zero parameters, for combination distributions" + raise(DistributionsException(err_msg)) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index 31dec18..55c30f4 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -3,11 +3,12 @@ from collections.abc import MutableMapping, MutableSequence from pathlib import Path from lang import PARSER as parser +from mal_analyzer import malAnalyzer ASTNode = Tuple[str, object] ''' -This function is crucial to use instead of cursor.goto_sibling() +This function is crucial to use instead of cursor.goto_next_sibling() Although the `comment` node is included as an extra in the TreeSitter grammar, it still shows up in the AST. @@ -28,6 +29,7 @@ def __init__(self): self.current_file: Path = None self.visited_files: set[Path] = set() self.path_stack: list[Path] = [] + self.analyzer = malAnalyzer() def compile(self, malfile: Path | str): current_file = Path(malfile) @@ -47,7 +49,7 @@ def compile(self, malfile: Path | str): with open(current_file, 'rb') as f: source = f.read() tree = parser.parse(source) - result = self.visitMal(tree.walk()) + result = self.visit(tree.walk()) self.path_stack.pop() @@ -58,11 +60,26 @@ def visit(self, cursor, params = None): visitor = getattr(self, function_name, self.skip) hasChild = cursor.goto_first_child() # enter node's children result = visitor(cursor) if not params else visitor(cursor, params) + if hasChild: cursor.goto_parent() # leave node's children + + analyzer_method_name: str = f'check_{cursor.node.type}' + analyzer_method: function | None = getattr(self.analyzer, analyzer_method_name, None) + + if analyzer_method: + arguments = analyzer_method.__code__.co_argcount + if arguments in [2, 3]: + { + 3: lambda: analyzer_method(cursor.node, result), + 2: lambda: analyzer_method(cursor.node) + }[arguments]() + else: + raise ValueError(f'Unexpected number of arguments: {arguments}') + return result - def visitMal(self, cursor: TreeCursor) -> ASTNode | list[ASTNode] | None: + def visit_source_file(self, cursor: TreeCursor) -> ASTNode | list[ASTNode] | None: langspec = { "formatVersion": "1.0.0", "defines": {}, @@ -72,10 +89,8 @@ def visitMal(self, cursor: TreeCursor) -> ASTNode | list[ASTNode] | None: } # Go to first declaration - cursor.goto_first_child() - while True: - while (cursor.node.type == 'comment'): + if (cursor.node.type == 'comment'): go_to_sibling(cursor) # Obtain node type of declaration @@ -117,7 +132,7 @@ def visitMal(self, cursor: TreeCursor) -> ASTNode | list[ASTNode] | None: return langspec - def skip(self, _): + def skip(self, _,): pass def _visit(self, cursor: TreeCursor) -> ASTNode | list[ASTNode] | None: @@ -562,6 +577,13 @@ def _visit_intermediary_ttc_expr(self, cursor: TreeCursor): "name": text, "arguments": [] } + + # if we have a number (integer/float) we need to construct + # the dictionary correctly + elif (cursor.node.type == 'float' or cursor.node.type=='integer'): + ret = {"type": "number"} + ret['value'] = self.visit(cursor) + return ret # otherwise visit the node return self.visit(cursor) @@ -590,7 +612,7 @@ def visit_ttc_binop(self, cursor: TreeCursor): operation_type = 'addition' if operation == '+' else \ 'subtraction' if operation == '-' else \ 'multiplication' if operation == '*' else \ - 'multiplication' if operation == '/' else \ + 'division' if operation == '/' else \ 'exponentiation' go_to_sibling(cursor) @@ -618,6 +640,7 @@ def visit_ttc_distribution(self, cursor: TreeCursor): arg = self.visit(cursor) args.append(arg) # move to next symbol, if it's not a comma then done + go_to_sibling(cursor) if (cursor.node.text.decode() != ','): break # otherwise, ignore the comma diff --git a/examples/visitor/mal_analyzer.py b/examples/visitor/mal_analyzer.py new file mode 100644 index 0000000..2c9b41c --- /dev/null +++ b/examples/visitor/mal_analyzer.py @@ -0,0 +1,784 @@ +import logging +import re +from tree_sitter import Node +from distributions import Distributions, DistributionsException +from typing import Any, Tuple, List + +class malAnalyzerException(Exception): + def __init__(self, error_message): + self._error_message = error_message + super().__init__(self._error_message) + +class malAnalyzer(): + ''' + A class to preform syntax-checks for MAL. + ''' + + def __init__(self, *args, **kwargs) -> None: + self._error: bool = False + self._warn: bool = False + self._preform_post_analysis = 0 + + self._defines: dict = {} + self._assets: dict = {} + self._category: dict = {} + self._metas: dict = {} + self._steps: dict = {} + self._vars: dict = {} + self._associations: dict = {} + + self._all_associations = [] + self._current_vars = [] + self._include_stack = [] + + self._error_msg:str = "" + + super().__init__(*args, **kwargs) + + def _raise_analyzer_exception(self, error_msg:str): + logging.error(error_msg) + raise malAnalyzerException(error_msg) + + def has_error(self) -> bool: + return self._error + + def has_warning(self) -> bool: + return self._warn + + def _post_analysis(self) -> None: + ''' + Perform a post-analysis to confirm that the + mandatory fields and relations are met. + ''' + self._analyse_defines() + self._analyse_extends() + self._analyse_abstract() + self._analyse_parents() + self._analyse_association() + self._analyse_steps() + self._analyse_fields() + self._analyse_variables() + self._analyse_reaches() + + def _analyse_defines(self) -> None: + ''' + Check for mandatory defines: ID & Version + ''' + if 'id' in self._defines.keys(): + define_value: str = self._defines['id']['value'] + if (len(define_value) == 0): + error_msg = 'Define \'id\' cannot be empty' + self._raise_analyzer_exception(error_msg) + else: + error_msg = 'Missing required define \'#id: ""\'' + self._raise_analyzer_exception(error_msg) + + if 'version' in self._defines.keys(): + version: str = self._defines['version']['value'] + if not re.match(r"\d+\.\d+\.\d+", version): + error_msg = 'Define \'version\' must be valid semantic versioning without pre-release identifier and build metadata' + self._raise_analyzer_exception(error_msg) + else: + error_msg = 'Missing required define \'#version: ""\'' + self._raise_analyzer_exception(error_msg) + + def _analyse_extends(self) -> None: + ''' + For all assets which extend another, verify if the extended asset exists + ''' + raise_error: bool = False + extend_asset_name: str = '' + for asset in self._assets: + asset_node: Node = self._assets[asset]['node'] + if(asset_node.child_by_field_name('extends')): + # Next sibling is the identifier itself + extend_asset_name = asset_node.child_by_field_name('extends').next_sibling.text.decode() + if(not extend_asset_name in self._assets): + ''' + Do we need to check if the extended asset is + in the same category? If so we can load the asset + and check it's parent + ''' + error_msg = f'Asset \'{extend_asset_name}\' not defined' + self._raise_analyzer_exception(error_msg) + + def _analyse_abstract(self) -> None: + ''' + For every abstract asset, verify if it is extended by another asset + ''' + for parent in self._assets: + parent_node: Node = self._assets[parent]['node'] + parent_node_name: str = parent_node.child_by_field_name('id').text.decode() + if(parent_node.children[0].text.decode()=='abstract'): + found: bool = False + for extendee in self._assets: + extendee_node: Node = self._assets[extendee]['node'] + extendee_node_extender = extendee_node.child_by_field_name('extends') + if(extendee_node_extender and \ + extendee_node_extender.next_sibling.text.decode() == parent_node_name): + found = True + break + if not found: + self._warn = True + logging.warning(f'Asset \'{parent_node_name}\' is abstract but never extended to') + + def _analyse_parents(self) -> None: + ''' + Verify if there are circular extend relations + ''' + error: bool = False + for asset in self._assets: + parents: list[str] = [] + parent_node: malParser.AssetContext = self._assets[asset]['node'] + while (parent_node and parent_node.type=='asset_declaration'): + parent_name: str = parent_node.child_by_field_name('id').text.decode() + if (parent_name in parents): + error_msg: str = ' -> '.join(parents) + error_msg += f' -> {parent_name}' + error_msg = f'Asset \'{parent_name}\' extends in loop \'{error_msg}\'' + self._raise_analyzer_exception(error_msg) + parents.append(parent_name) + parent_node = self._get_assets_extendee(parent_node) + + def _get_assets_extendee(self, node: Node) -> Node: + ''' + Verifies if the current asset extends another and, if so, return the parent's context + ''' + if (node.child_by_field_name('extends')): + extender_node = node.child_by_field_name('extends') + extender_node_name = extender_node.next_sibling.text.decode() + return self._assets[extender_node_name]['node'] + return None + + def _analyse_reaches(self) -> None: + ''' + For every attackStep in every asset, verify if the prerequisites point to assets and that the reaches point to + attack steps + ''' + for asset in self._assets.keys(): + attack_steps = self._assets[asset]['obj']['attackSteps'] + for attack_step in attack_steps: + if (attack_step['type'] in ['exist', 'notExist']): + if (attack_step['ttc']): + error_msg = f'Attack step of type \'{attack_step["type"]}\' must not have TTC' + self._raise_analyzer_exception(error_msg) + if (attack_step['requires']): + # Verify if every requires expression returns an asset + for expr in attack_step['requires']['stepExpressions']: + if not self._check_to_asset(asset, expr): + error_msg = f"Line {self._steps[asset][attack_step['name']]['node'].start_point.row}: " + \ + f"All expressions in requires ('<-') must point to a valid asset" + self._raise_analyzer_exception(self._error_msg + error_msg) + else: + error_msg = f'Attack step of type \'{attack_step["type"]}\' must have require \'<-\'' + self._raise_analyzer_exception(error_msg) + elif (attack_step['requires']): + error_msg = 'Require \'<-\' may only be defined for attack step type exist \'E\' or not-exist \'!E\'' + self._raise_analyzer_exception(error_msg) + if (attack_step['reaches']): + # Verify if every reaches expresion returns an attack step + for expr in attack_step['reaches']['stepExpressions']: + if not self._check_to_step(asset, expr): + error_msg = f"Line {self._steps[asset][attack_step['name']]['node'].start_point.row}: " + \ + f"All expressions in reaches ('->') must point to a valid attack step" + self._raise_analyzer_exception(self._error_msg + error_msg) + + def _analyse_association(self) -> None: + ''' + For every association, verify if the assets exist + ''' + for association in self._all_associations: + leftAsset = association['association']['leftAsset'] + rightAsset= association['association']['rightAsset'] + + if (not leftAsset in self._assets.keys()): + error_msg =f'Left asset \'{leftAsset}\' is not defined' + self._raise_analyzer_exception(error_msg) + if (not rightAsset in self._assets.keys()): + error_msg = f'Right asset \'{leftAsset}\' is not defined' + self._raise_analyzer_exception(error_msg) + + def _analyse_fields(self) -> None: + ''' + Update a variable's fields (associations) to include its parents associations. + Also checks if an association has been defined more than once in a hierarchy + ''' + for asset in self._assets.keys(): + parents = self._get_parents(self._assets[asset]['node']) + for parent in parents: + for association in self._all_associations: + leftAsset = association['association']['leftAsset'] + rightAsset= association['association']['rightAsset'] + if leftAsset==parent: + rightField = association['association']['rightField'] + self._add_field(parent, asset, rightField, association) + if rightAsset==parent: + leftField = association['association']['leftField'] + self._add_field(parent, asset, leftField, association) + + def _add_field(self, parent: str, asset: str, field: str, association: dict): + # Check that this asset does not have an assoication with the same name + if asset not in self._associations or field not in self._associations[asset]: + # Check if there isn't a step with the same name + step_node = self._has_step(asset, field) + if not step_node: + if not asset in self._associations.keys(): + self._associations[asset] = {field: {k: association[k] for k in ["association", "node"]}} + else: + self._associations[asset][field] = {k: association[k] for k in ["association", "node"]} + # Otherwise, this will be an error + else: + error_msg = f'Field {field} previously defined as an attack step at {step_node.start_point.row}' + self._raise_analyzer_exception(error_msg) + # Association field was already defined for this asset + else: + error_msg = f'Field {parent}.{field} previously defined at {self._associations[asset][field]['node'].start_point.row}' + self._raise_analyzer_exception(error_msg) + + def _has_step(self, asset, field): + if asset in self._steps.keys() and field in self._steps[asset]: + return self._steps[asset][field]['node'] + return None + + def _variable_to_asset(self, asset: str, var: str): + ''' + Checks if there is no cycle in the variables and verifies that it points to + an existing asset + ''' + if var not in self._current_vars: + self._current_vars.append(var) + res = self._check_to_asset(asset, self._vars[asset][var]['var']['stepExpression']) + self._current_vars.pop() + return res + + cycle = '->'.join(self._current_vars)+'->'+var + error_msg = f'Variable \'{var}\' contains cycle {cycle}' + self._raise_analyzer_exception(error_msg) + + def _analyse_variables(self): + ''' + This function will verify if an asset which extends another does not redefine a variable. + It also updates the list of variables for an asset to includes its parent's variables + + Once that is done, we need to guarantee that the variable points to an asset and that + there are no loops in the variables, i.e. a variable does not somehow reference itself + ''' + for asset in self._assets.keys(): + parents = self._get_parents(self._assets[asset]['node']) + parents.pop() # The last element is the asset itself, no need to check again if variable is defined twice + for parent in parents: + if parent not in self._vars.keys(): + continue # If parent has no variables, we don't need to do anything + if asset not in self._vars.keys(): + self._vars[asset] = self._vars[parent] # If asset has no variables, just inherit its parents variables + continue + # Otherwise, we do need to check if variables are defined more than once + for var in self._vars[asset].keys(): + if parent in self._vars.keys() and var in self._vars[parent].keys() and self._vars[asset][var]['node']!=self._vars[parent][var]['node']: + error_msg = f'Variable \'{var}\' previously defined at {self._vars[parent][var]['node'].start_point.row}' + self._raise_analyzer_exception(error_msg) + self._vars[asset].update(self._vars[parent]) + + # If the current asset has variables, we want to check they point to an asset + if asset in self._vars.keys(): + for var in self._vars[asset].keys(): + if self._variable_to_asset(asset, var)==None: + error_msg = f'Variable \'{var}\' defined at {self._vars[asset][var]['node'].start_point.row} does not point to an asset' + self._raise_analyzer_exception(self._error_msg + error_msg) + + def _check_to_step(self, asset, expr) -> None: + ''' + Given a reaches, verify if the expression resolves to a valid AttackStep for an existing Asset + ''' + match (expr['type']): + # Returns an attackStep if it exists for this asset + case 'attackStep': + if (asset in self._assets.keys()): + for attackStep in self._steps[asset].keys(): + if (attackStep == expr['name']): + return self._steps[asset][attackStep]['step'] + error_msg = f'Attack step \'{expr["name"]}\' not defined for asset \'{asset}\'' + self._raise_analyzer_exception(error_msg) + # Returns an attackStep if it exists for the asset returned by the lhs expression + case 'collect': + if (left_target := self._check_to_asset(asset, expr['lhs'])): + return self._check_to_step(left_target, expr['rhs']) + return None + case _: + error_msg='Last step is not attack step' + self._raise_analyzer_exception(error_msg) + + def _check_to_asset(self, asset, expr) -> None: + ''' + Verify if the expression resolves to an existing Asset + ''' + match (expr['type']): + # field - verify if asset exists via associations + case 'field': + return self._check_field_expr(asset, expr) + # variable - verify if there is a variable with this name + case 'variable': + return self._check_variable_expr(asset, expr) + # collect - return asset pointed by all the parts in the expression + case 'collect': + return self._check_collect_expr(asset, expr) + # set - verify if the assets in the operation have an common ancestor + case 'union' | 'intersection' | 'difference': + return self._check_set_expr(asset, expr) + # transitive - verify if the asset before * (STAR) exists + case 'transitive': + return self._check_transitive_expr(asset, expr) + # subtype - verifies if the asset inside [] is a child from the asset preceding it + case 'subType': + return self._check_sub_type_expr(asset, expr) + case _: + logging.error(f'Unexpected expression \'{expr["type"]}\'') + self._error = True + return None + + def _check_field_expr(self, asset, expr): + ''' + Check if an asset exists by checking the associations for the current asset + ''' + if asset in self._associations.keys(): + for association in self._associations[asset].keys(): + association = self._associations[asset][association]['association'] + if (expr['name'] == association['leftField']): + if (self._get_asset_name(association['leftAsset'])): + return association['leftAsset'] + if (expr['name'] == association['rightField']): + if (self._get_asset_name(association['rightAsset'])): + return association['rightAsset'] + + # Verify if there is a variable defined with the same name; possible the user forgot to call it + extra="" + if (asset in self._vars.keys() and expr['name'] in self._vars[asset].keys()): + extra=f', did you mean the variable \'{expr['name']}()\'?' + self._warn = True + + self._error_msg = f'Field \'{expr["name"]}\' not defined for asset \'{asset}\''+extra+'\n' + + def _check_variable_expr(self, asset, expr): + ''' + Check if there is a variable reference in this asset with the user identifier. + ''' + if (asset in self._vars.keys() and expr['name'] in self._vars[asset].keys()): + return self._variable_to_asset(asset, expr['name']) + + self._error_msg = f'Variable \'{expr["name"]}\' is not defined\n' + return None + + def _check_collect_expr(self, asset, expr): + ''' + Iteratively, retrieve the asset pointed by the leftmost expression and, recursively, check the rhs associated + with each lhs. + ''' + if (left_target := self._check_to_asset(asset, expr['lhs'])): + return self._check_to_asset(left_target, expr['rhs']) + return None + + def _check_set_expr(self, asset, expr) -> None: + ''' + Obtains the assets pointed by boths hs's and verifies if they have a common ancestor + ''' + lhs_target = self._check_to_asset(asset, expr['lhs']) + rhs_target = self._check_to_asset(asset, expr['rhs']) + if (not lhs_target or not rhs_target): + return None + + if (target := self._get_LCA(lhs_target, rhs_target)): + return target + + self._error_msg = f'Types \'{lhs_target}\' and \'{rhs_target}\' have no common ancestor\n' + return None + + def _get_LCA(self, lhs_target, rhs_target): + ''' + Receives two assets and verifies if they have an ancestor in common + ''' + if (self._is_child(lhs_target, rhs_target)): + return lhs_target + elif (self._is_child(rhs_target, lhs_target)): + return rhs_target + else: + lhs_node = self._assets[lhs_target]['node'] + rhs_node = self._assets[rhs_target]['node'] + lhs_parent_node = self._get_assets_extendee(lhs_node) + rhs_parent_node = self._get_assets_extendee(rhs_node) + if (not lhs_parent_node or not rhs_parent_node): + return None + return self._get_LCA(lhs_parent_node.child_by_field_name('id').text.decode(), rhs_parent_node.child_by_field_name('id').text.decode()) + + def _check_sub_type_expr(self, asset, expr) -> None: + ''' + Given expr[ID], obtains the assets given by expr and ID and verifies if ID is + a child of expr + ''' + target = self._check_to_asset(asset, expr['stepExpression']) + if (not target): + return None + + if (asset_type := self._get_asset_name(expr['subType'])): + if (self._is_child(target, asset_type)): + return asset_type + + self._error_msg = f'Asset \'{asset_type}\' cannot be of type \'{target}\'\n' + return None + + def _check_transitive_expr(self, asset, expr) -> None: + ''' + Given expr*, obtain the asset given by expr and verify if it is a child of the current asset + ''' + if (res := self._check_to_asset(asset, expr['stepExpression'])): + if (self._is_child(asset,res)): + return res + + self._error_msg = f'Previous asset \'{asset}\' is not of type \'{res}\'\n' + return None + + def _is_child(self, parent_name, child_name): + ''' + Receives two assets and verifies if one extends the other + ''' + if (parent_name == child_name): + return True + + if (valid_asset := self._get_asset_name(child_name)): + asset_node: Node = self._assets[valid_asset]['node'] + if (parent_node := self._get_assets_extendee(asset_node)): + child_parent_name = self._get_asset_name(parent_node.child_by_field_name('id').text.decode()) + return self._is_child(parent_name, child_parent_name) + + return False + + def _get_parents(self, node: Node) -> List[dict[str, Node]]: + ''' + Given an asset, obtain its parents in inverse order. + I.e., A->B->C returns [C,B,A] for asset A + ''' + parents = [node.child_by_field_name('id').text.decode()] + while node.child_by_field_name('extends'): + parent_name = node.child_by_field_name('extends').next_sibling.text.decode() + if parent_name in parents: + break + parents.insert(0, parent_name) + node = self._assets[parent_name]['node'] + return parents + + def _get_asset_name(self, name): + if (name in self._assets.keys()): + return name + + logging.error(f'Asset \'{name}\' not defined') + self._error = True + return None + + def _analyse_steps(self) -> None: + ''' + For each asset, obtain its parents and analyse each step + ''' + for asset in self._assets.keys(): + parents = self._get_parents(self._assets[asset]['node']) + self._read_steps(asset, parents) + + def _attackStep_seen_in_parent(self, attackStep: str, seen_steps: List) -> str: + ''' + Given a list of parent scopes, verify if the attackStep has been defined + ''' + for parent, parent_scope in seen_steps: + if attackStep in parent_scope: + return parent + return None + + def _read_steps(self, asset: str, parents: List) -> None: + ''' + For an asset, check if every step is properly defined in accordance to its hierarchy, i.e. if any of the asset's parents + also defines this step + ''' + + seen_steps = [] + for parent in parents: + # If this parent has no steps, skip it + if parent not in self._steps.keys(): + continue + + current_steps = [] + for attackStep in self._steps[parent].keys(): + # Verify if attackStep has not been defined in the current asset + if attackStep not in current_steps: + # Verify if attackStep has not been defined in any parent asset + prevDef_parent = self._attackStep_seen_in_parent(attackStep, seen_steps) + if not prevDef_parent: + # Since this attackStep has never been defined, it must either not reach or reach with '->' + attackStep_node = self._steps[parent][attackStep]['node'] + attackStep_node_reaches = attackStep_node.child_by_field_name('reaches') + if (not attackStep_node_reaches or attackStep_node_reaches.child_by_field_name('operator').text.decode()=='->'): + # Valid step + current_steps.append(attackStep) + else: + # Step was defined using '+>', but there is nothing to inherit from + error_msg = f'Cannot inherit attack step \'{attackStep}\' without previous definition' + self._raise_analyzer_exception(error_msg) + else: + # Step was previously defined in a parent + # So it must be of the same type (&, |, #, E, !E) + attackStep_node = self._steps[parent][attackStep]['node'] + parent_attackStep_node = self._steps[prevDef_parent][attackStep]['node'] + if attackStep_node.child_by_field_name('step_type').text==parent_attackStep_node.child_by_field_name('step_type').text: + # Valid step + current_steps.append(attackStep) + else: + # Invalid, type mismatches that of parent + error_msg = f"Cannot override attack step \'{attackStep}\' previously defined " + \ + f"at {parent_attackStep_node.start_point.row} with different type \'{attackStep_node.child_by_field_name('step_type').text.decode()}\' " + \ + f"=/= \'{parent_attackStep_node.child_by_field_name('step_type').text.decode()}\'" + self._raise_analyzer_exception(error_msg) + seen_steps.append((parent,current_steps)) + + for parent, steps in seen_steps: + for step in steps: + if asset not in self._steps.keys(): + self._steps[asset] = {step: self._steps[parent][step]} + else: + self._steps[asset][step] = self._steps[parent][step] + + def check_source_file(self, node: Node) -> None: + ''' + We only want to preform _post_analysis as the very last step. + ''' + if (self._preform_post_analysis==0): + self._post_analysis() + else: + self._include_stack.pop() + self._preform_post_analysis -= 1 + + def check_asset_declaration(self, node: Node, asset: dict) -> None: + ''' + Given an asset, verify if it has been previously defined in the same category + + { + 'asset': + { + 'node': node, + 'obj' : dict, + 'parent': + { + 'name': str, + 'node': node, + } + } + } + ''' + asset_name = asset['name'] + category_name = node.parent.child_by_field_name('id').text.decode() + + if (not asset_name): + logging.error(f"Asset was defined without a name at line {node.start_point.row}") + self._error = True + return + + # Check if asset was previously defined in the same category. + if asset_name in self._assets.keys(): + prev_asset_line = self._assets[asset_name]['node'].start_point.row + error_msg = f"Asset '{asset_name}' previously defined at {prev_asset_line}" + self._raise_analyzer_exception(error_msg) + else: + self._assets[asset_name] = {'node': node, 'obj': asset, 'parent': {'name': category_name,'node': node.parent}} + + def check_meta(self, node: Node, data: Tuple[str, str]) -> None: + ''' + Given a meta, verify if it was previously defined for the same type (category, asset, step or association) + ''' + + meta_name, _ = data + + # Check if we don't have the metas for this parent (category, asset, step or association) + if node.parent not in self._metas.keys(): + self._metas[node.parent] = {meta_name:node} + # Check if the new meta is not already defined + elif node.parent in self._metas.keys() and meta_name not in self._metas[node.parent]: + self._metas[node.parent][meta_name] = node + # Otherwise, throw error + else: + prev_node = self._metas[node.parent][meta_name] + error_msg = f'Metadata {meta_name} previously defined at {prev_node.start_point.row}' + self._raise_analyzer_exception(error_msg) + + def check_category_declaration(self, node: Node, data: Tuple[str, Tuple[List, Any]]) -> None: + ''' + Given a category, verify if it has a name and if contains metadata or assets + ''' + _, [[category], assets] = data + + # TODO: is this really needed? doesn't the grammar prevent this? + if(str(category['name']) == '>'): + category_line = node.start_point.row + logging.error(f'Category has no name at line {category_line}') + self._error = True + return + + if len(category['meta']) == 0 and len(assets) == 0: + logging.warning(f'Category \'{category["name"]}\' contains no assets or metadata') + + self._category[category['name']] = {'node': node, 'obj': {'category': category, 'assets': assets}} + + def check_define_declaration(self, node: Node, data: Tuple[str, dict]) -> None: + ''' + Given a new define, verify if it has been previously defined + ''' + _, obj = data + key, value = list(obj.items())[0] + + # ID and version can be defined multiple times + if(key!='id' and key!='version' and key in self._defines.keys()): + prev_define_line = self._defines[key]['node'].start_point.row + error_msg = f'Define \'{key}\' previously defined at line {prev_define_line}' + self._raise_analyzer_exception(error_msg) + + self._defines[key] = {'node': node, 'value': value} + + def check_include_declaration(self, node: Node, data: Tuple[str, str]) -> None: + ''' + When an include is found, it triggers the analysis of a new MAL file. To prevent + checkMal from being performed before all files have been analysed, we increment + the variable and, every time the file is finished being analysed, it is decreased + again (in checkMal()). This prevents out-of-order analysis. + ''' + self._preform_post_analysis += 1 + + include_file = node.child_by_field_name('file').text.decode() + if include_file in self._include_stack: + cycle = '->'.join([file.replace('"',"") for file in self._include_stack])+' -> '+include_file.replace('"',"") + error_msg = f'Include sequence contains cycle: {cycle}' + self._raise_analyzer_exception(error_msg) + self._include_stack.append(include_file) + + def check_attack_step(self, node: Node, step: dict) -> None: + ''' + Given a step, check if it is already defined in the current asset. Otherwise, add it to the list of + steps related to this asset + ''' + _, step = step + + step_name = step['name'] + asset_name = node.parent.parent.child_by_field_name('id').text.decode() + + # Check if asset has no steps + if not asset_name in self._steps.keys(): + self._steps[asset_name] = {step_name: {'node': node, 'step': step}} + # If so, check if the there is no step with this name in the current asset + elif not step_name in self._steps[asset_name].keys(): + self._steps[asset_name][step_name] = {'node': node, 'step': step} + # Otherwise, log error + else: + prev_node = self._steps[asset_name][step_name]['node'] + error_msg = f'Attack step \'{step_name}\' previously defined at {prev_node.start_point.row}' + self._raise_analyzer_exception(error_msg) + + self._validate_CIA(node, step) + self._validate_TTC(node, asset_name, step) + + def _validate_CIA(self, node: Node, step: dict) -> None: + ''' + Given a step, check if it has CIAs. In that case, verify if the step is not of type + defense and that it does not have repeated CIAs. + ''' + if not node.child_by_field_name('cias'): + return + + step_name = step['name'] + asset_name = node.parent.parent.child_by_field_name('id').text.decode() + + if (step['type'] == 'defense' or step['type'] == 'exist' or step['type'] == 'notExist'): + error_msg = f'Line {node.start_point.row}: {step['type']}: Defenses cannot have CIA classifications' + self._raise_analyzer_exception(error_msg) + + index = 0 + cias = [] + + # Get the CIAs node and iterate over the individual CIA + cias_node = node.child_by_field_name('cias').next_sibling + for cia in cias_node.named_children: + letter = cia.text.decode() + + if (letter in cias): + logging.warning(f'Attack step {asset_name}.{step_name} contains duplicate classification {letter}') + self._warn = True + return + cias.append(letter) + + def _validate_TTC(self, node: Node, asset_name, step: dict) -> None: + if not step['ttc']: + return + match step['type']: + case 'defense': + if (step['ttc']['type'] != 'function'): + error_msg = f'Defense {asset_name}.{step["name"]} may not have advanced TTC expressions' + self._raise_analyzer_exception(error_msg) + + match step['ttc']['name']: + case 'Enabled' | 'Disabled' | 'Bernoulli': + try: + Distributions.validate(step['ttc']['name'], step['ttc']['arguments']) + except DistributionsException as e: + self._raise_analyzer_exception(e._error_message) + case _: + error_msg = f'Defense {asset_name}.{step["name"]} may only have \'Enabled\', \'Disabled\', or \'Bernoulli(p)\' as TTC' + self._raise_analyzer_exception(error_msg) + case 'exist' | 'notExist': + # This should log error, but it happens later in the code + pass + case _: + self._check_TTC_expr(step['ttc']) + + def _check_TTC_expr(self, expr, isSubDivExp = False): + match expr['type']: + case 'subtraction' | 'exponentiation' | 'division': + self._check_TTC_expr(expr['lhs'], True) + self._check_TTC_expr(expr['rhs'], True) + case 'multiplication' | 'addition': + self._check_TTC_expr(expr['lhs'], False) + self._check_TTC_expr(expr['rhs'], False) + case 'function': + if (expr['name'] in ['Enabled', 'Disabled']): + error_msg = 'Distributions \'Enabled\' or \'Disabled\' may not be used as TTC values in \'&\' and \'|\' attack steps' + self._raise_analyzer_exception(error_msg) + if (isSubDivExp and expr['name'] in ['Bernoulli', 'EasyAndUncertain']): + error_msg = f'TTC distribution \'{expr["name"]}\' is not available in subtraction, division or exponential expressions.' + self._raise_analyzer_exception(error_msg) + try: + Distributions.validate(expr['name'], expr['arguments']) + except DistributionsException as e: + self._raise_analyzer_exception(e._error_message) + case 'number': + # Always ok + pass + case _: + error_msg = f'Unexpected expression {expr}' + self._raise_analyzer_exception(error_msg) + + def check_association(self, node: Node, association: dict): + self._all_associations.append({'name': association['name'], 'association': association,'node':node}) + + def check_asset_variable(self, node: Node, var: dict) -> None: + ''' + This checks if the variable has been defined in the current asset. + + self._vars = { + : { + : {'node': , 'var' } + } + } + ''' + _, var = var + parent = node.parent.parent # Twice to skip asset_definition + asset_name: str = str(parent.child_by_field_name('id').text.decode()) + var_name: str = var['name'] + if (asset_name not in self._vars.keys()): + self._vars[asset_name] = {var_name: {'node': node, 'var': var}} + elif (var_name not in self._vars[asset_name]): + self._vars[asset_name][var_name] = {'node': node, 'var': var} + else: + prev_define_line = self._vars[asset_name][var_name]['node'].start_point.row + error_msg = f'Variable \'{var_name}\' previously defined at line {prev_define_line}' + self._raise_analyzer_exception(error_msg) diff --git a/examples/visitor/tests/__init__.py b/examples/visitor/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/examples/visitor/tests/conftest.py b/examples/visitor/tests/conftest.py new file mode 100644 index 0000000..0d9a974 --- /dev/null +++ b/examples/visitor/tests/conftest.py @@ -0,0 +1,11 @@ +import pytest +import os + +@pytest.fixture(scope="module") +def setup_test_environment(request): + """Runs once before all tests and temporarily sets the working directory to use the file tests.""" + old_dir = os.getcwd() + TEST_DIR = request.param + os.chdir(TEST_DIR) + yield # Run tests + os.chdir(old_dir) diff --git a/examples/visitor/tests/fixtures/abstract_asset_test_files/test_abstract_asset_1.mal b/examples/visitor/tests/fixtures/abstract_asset_test_files/test_abstract_asset_1.mal new file mode 100644 index 0000000..6db2c57 --- /dev/null +++ b/examples/visitor/tests/fixtures/abstract_asset_test_files/test_abstract_asset_1.mal @@ -0,0 +1,7 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + abstract asset {} +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/abstract_asset_test_files/test_abstract_asset_2.mal b/examples/visitor/tests/fixtures/abstract_asset_test_files/test_abstract_asset_2.mal new file mode 100644 index 0000000..e546c2c --- /dev/null +++ b/examples/visitor/tests/fixtures/abstract_asset_test_files/test_abstract_asset_2.mal @@ -0,0 +1,8 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + abstract asset Foo {} + asset Bar extends Foo {} +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/abstract_asset_test_files/test_abstract_asset_3.mal b/examples/visitor/tests/fixtures/abstract_asset_test_files/test_abstract_asset_3.mal new file mode 100644 index 0000000..1bb4064 --- /dev/null +++ b/examples/visitor/tests/fixtures/abstract_asset_test_files/test_abstract_asset_3.mal @@ -0,0 +1,8 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + abstract asset Foo {} + abstract asset Bar extends Foo {} + asset Baz extends Bar {} +} diff --git a/examples/visitor/tests/fixtures/abstract_asset_test_files/test_abstract_asset_4.mal b/examples/visitor/tests/fixtures/abstract_asset_test_files/test_abstract_asset_4.mal new file mode 100644 index 0000000..def1ae5 --- /dev/null +++ b/examples/visitor/tests/fixtures/abstract_asset_test_files/test_abstract_asset_4.mal @@ -0,0 +1,7 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + abstract asset Foo {} + asset Bar {} +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/append_test_files/test_append_1.mal b/examples/visitor/tests/fixtures/append_test_files/test_append_1.mal new file mode 100644 index 0000000..155a902 --- /dev/null +++ b/examples/visitor/tests/fixtures/append_test_files/test_append_1.mal @@ -0,0 +1,36 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + | access + } + + asset Machine { + | machineStep + } + + asset Computer extends Machine + { + | machineStep + +> computerStep + + | computerStep + } + + asset Server extends Machine + { + | overwhelm + } + + asset Lenovo extends Computer { + | lenovoStep + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Network [network] 1 <-- L --> * [servers] Server +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/append_test_files/test_append_2.mal b/examples/visitor/tests/fixtures/append_test_files/test_append_2.mal new file mode 100644 index 0000000..397279a --- /dev/null +++ b/examples/visitor/tests/fixtures/append_test_files/test_append_2.mal @@ -0,0 +1,41 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + | access + } + + asset Machine { + | machineStep + } + + asset Computer extends Machine + { + | machineStep + +> computerStep, + server.overwhelm, + shutDown + + + | computerStep + + | shutDown + } + + asset Server extends Machine + { + | overwhelm + } + + asset Lenovo extends Computer { + | lenovoStep + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Server [server] 1 <-- L --> * [hosts] Computer +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/append_test_files/test_append_3.mal b/examples/visitor/tests/fixtures/append_test_files/test_append_3.mal new file mode 100644 index 0000000..bc9c819 --- /dev/null +++ b/examples/visitor/tests/fixtures/append_test_files/test_append_3.mal @@ -0,0 +1,41 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + | access + } + + asset Machine { + | machineStep + } + + asset Computer extends Machine + { + | machineStep + +> computerStep, + server.WRONG_ATTACK_STEP, // WRONG!!! + shutDown + + + | computerStep + + | shutDown + } + + asset Server extends Machine + { + | overwhelm + } + + asset Lenovo extends Computer { + | lenovoStep + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Server [server] 1 <-- L --> * [hosts] Computer +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/append_test_files/test_append_4.mal b/examples/visitor/tests/fixtures/append_test_files/test_append_4.mal new file mode 100644 index 0000000..e0ce0ac --- /dev/null +++ b/examples/visitor/tests/fixtures/append_test_files/test_append_4.mal @@ -0,0 +1,44 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + | access + } + + asset Machine { + | machineStep + + | anotherMachineStep + } + + asset Computer extends Machine + { + | machineStep + +> computerStep, + server.overwhelm, + anotherMachineStep, + shutDown + + + | computerStep + + | shutDown + } + + asset Server extends Machine + { + | overwhelm + } + + asset Lenovo extends Computer { + | lenovoStep + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Server [server] 1 <-- L --> * [hosts] Computer +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/append_test_files/test_append_5.mal b/examples/visitor/tests/fixtures/append_test_files/test_append_5.mal new file mode 100644 index 0000000..9217dd0 --- /dev/null +++ b/examples/visitor/tests/fixtures/append_test_files/test_append_5.mal @@ -0,0 +1,44 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + | access + } + + asset Machine { + | machineStep + + | anotherMachineStep + } + + asset Computer extends Machine + { + | machineStep + +> computerStep, + server.overwhelm, + lenovoStep, + shutDown + + + | computerStep + + | shutDown + } + + asset Server extends Machine + { + | overwhelm + } + + asset Lenovo extends Computer { + | lenovoStep + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Server [server] 1 <-- L --> * [hosts] Computer +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/append_test_files/test_append_6.mal b/examples/visitor/tests/fixtures/append_test_files/test_append_6.mal new file mode 100644 index 0000000..59d4eb4 --- /dev/null +++ b/examples/visitor/tests/fixtures/append_test_files/test_append_6.mal @@ -0,0 +1,41 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + | access + } + + asset Machine { + | machineStep + } + + asset Computer extends Machine + { + | machineStep + +> computerStep, + server, + shutDown + + + | computerStep + + | shutDown + } + + asset Server extends Machine + { + | overwhelm + } + + asset Lenovo extends Computer { + | lenovoStep + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Server [server] 1 <-- L --> * [hosts] Computer +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/append_test_files/test_append_7.mal b/examples/visitor/tests/fixtures/append_test_files/test_append_7.mal new file mode 100644 index 0000000..088d53d --- /dev/null +++ b/examples/visitor/tests/fixtures/append_test_files/test_append_7.mal @@ -0,0 +1,41 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + | access + } + + asset Machine { + | machineStep + } + + asset Computer extends Machine + { + | lenovoStep + +> computerStep, + server.overwhelm, + shutDown + + + | computerStep + + | shutDown + } + + asset Server extends Machine + { + | overwhelm + } + + asset Lenovo extends Computer { + | lenovoStep + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Server [server] 1 <-- L --> * [hosts] Computer +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/asset_test_files/test_assets_1.mal b/examples/visitor/tests/fixtures/asset_test_files/test_assets_1.mal new file mode 100644 index 0000000..36ddca7 --- /dev/null +++ b/examples/visitor/tests/fixtures/asset_test_files/test_assets_1.mal @@ -0,0 +1,6 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset {} +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/asset_test_files/test_assets_2.mal b/examples/visitor/tests/fixtures/asset_test_files/test_assets_2.mal new file mode 100644 index 0000000..517fc65 --- /dev/null +++ b/examples/visitor/tests/fixtures/asset_test_files/test_assets_2.mal @@ -0,0 +1,7 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Test {} +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/asset_test_files/test_assets_3.mal b/examples/visitor/tests/fixtures/asset_test_files/test_assets_3.mal new file mode 100644 index 0000000..957659e --- /dev/null +++ b/examples/visitor/tests/fixtures/asset_test_files/test_assets_3.mal @@ -0,0 +1,8 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Test {} + asset Test {} +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/asset_test_files/test_assets_4.mal b/examples/visitor/tests/fixtures/asset_test_files/test_assets_4.mal new file mode 100644 index 0000000..cdc4b7d --- /dev/null +++ b/examples/visitor/tests/fixtures/asset_test_files/test_assets_4.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Test {} +} +category System { + asset Test {} +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/asset_test_files/test_assets_5.mal b/examples/visitor/tests/fixtures/asset_test_files/test_assets_5.mal new file mode 100644 index 0000000..2b65ad0 --- /dev/null +++ b/examples/visitor/tests/fixtures/asset_test_files/test_assets_5.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Test {} +} +category AnotherSystem { + asset Test {} +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/asset_test_files/test_assets_6.mal b/examples/visitor/tests/fixtures/asset_test_files/test_assets_6.mal new file mode 100644 index 0000000..f049d27 --- /dev/null +++ b/examples/visitor/tests/fixtures/asset_test_files/test_assets_6.mal @@ -0,0 +1,5 @@ +include "./test_assets_6_aux.mal" + +category System { + asset Test {} +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/asset_test_files/test_assets_6_aux.mal b/examples/visitor/tests/fixtures/asset_test_files/test_assets_6_aux.mal new file mode 100644 index 0000000..8929ae0 --- /dev/null +++ b/examples/visitor/tests/fixtures/asset_test_files/test_assets_6_aux.mal @@ -0,0 +1,7 @@ +// Auxiliary file for the test +#version:"0.0.0" +#id: "org.mal-lang.testAnalyzer" + +category AnotherSystem { + asset AnotherTest {} +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/asset_test_files/test_assets_7.mal b/examples/visitor/tests/fixtures/asset_test_files/test_assets_7.mal new file mode 100644 index 0000000..0e99369 --- /dev/null +++ b/examples/visitor/tests/fixtures/asset_test_files/test_assets_7.mal @@ -0,0 +1,5 @@ +include "test_assets_7_aux.mal" + +category System { + asset Test {} +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/asset_test_files/test_assets_7_aux.mal b/examples/visitor/tests/fixtures/asset_test_files/test_assets_7_aux.mal new file mode 100644 index 0000000..1eba428 --- /dev/null +++ b/examples/visitor/tests/fixtures/asset_test_files/test_assets_7_aux.mal @@ -0,0 +1,6 @@ +#version:"0.0.0" +#id: "org.mal-lang.testAnalyzer" + +category AnotherSystem { + asset Test {} +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/asset_test_files/test_assets_8.mal b/examples/visitor/tests/fixtures/asset_test_files/test_assets_8.mal new file mode 100644 index 0000000..b2fa844 --- /dev/null +++ b/examples/visitor/tests/fixtures/asset_test_files/test_assets_8.mal @@ -0,0 +1,5 @@ +include "test_assets_8_aux.mal" + +category System { + asset Test {} +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/asset_test_files/test_assets_8_aux.mal b/examples/visitor/tests/fixtures/asset_test_files/test_assets_8_aux.mal new file mode 100644 index 0000000..a90acf2 --- /dev/null +++ b/examples/visitor/tests/fixtures/asset_test_files/test_assets_8_aux.mal @@ -0,0 +1,6 @@ +#version:"0.0.0" +#id: "org.mal-lang.testAnalyzer" + +category System { + asset Test {} +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/association_test_files/test_association_1.mal b/examples/visitor/tests/fixtures/association_test_files/test_association_1.mal new file mode 100644 index 0000000..8668f84 --- /dev/null +++ b/examples/visitor/tests/fixtures/association_test_files/test_association_1.mal @@ -0,0 +1,11 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 {} + asset Asset2 {} +} +associations { + Asset1 [foo] * <-- connects --> * [bar] Asset2 +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/association_test_files/test_association_2.mal b/examples/visitor/tests/fixtures/association_test_files/test_association_2.mal new file mode 100644 index 0000000..f1a0224 --- /dev/null +++ b/examples/visitor/tests/fixtures/association_test_files/test_association_2.mal @@ -0,0 +1,11 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 {} +} + +associations { + Asset1 [foo] * <-- connects --> * [bar] Asset2 +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/association_test_files/test_association_3.mal b/examples/visitor/tests/fixtures/association_test_files/test_association_3.mal new file mode 100644 index 0000000..ac8315e --- /dev/null +++ b/examples/visitor/tests/fixtures/association_test_files/test_association_3.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset2 {} +} +associations { + Asset1 [foo] * <-- connects --> * [bar] Asset2 +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/association_test_files/test_association_4.mal b/examples/visitor/tests/fixtures/association_test_files/test_association_4.mal new file mode 100644 index 0000000..ba2abd3 --- /dev/null +++ b/examples/visitor/tests/fixtures/association_test_files/test_association_4.mal @@ -0,0 +1,19 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category Example { + asset Asset1 + { + | compromise + -> b.compromise + } + asset Asset2 + { + | compromise + } +} +associations +{ + Asset1 [a] * <-- L --> * [b] Asset2 +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/association_test_files/test_association_5.mal b/examples/visitor/tests/fixtures/association_test_files/test_association_5.mal new file mode 100644 index 0000000..d7b47a9 --- /dev/null +++ b/examples/visitor/tests/fixtures/association_test_files/test_association_5.mal @@ -0,0 +1,19 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category Example { + asset Asset1 + { + | compromise + -> b.compromise + } + asset Asset2 + { + | compromise + } +} +associations +{ + Asset1 [a] * <-- L --> * [c] Asset2 +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/association_test_files/test_association_6.mal b/examples/visitor/tests/fixtures/association_test_files/test_association_6.mal new file mode 100644 index 0000000..41d933f --- /dev/null +++ b/examples/visitor/tests/fixtures/association_test_files/test_association_6.mal @@ -0,0 +1,9 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { +} +associations { + Asset1 [foo] * <-- connects --> * [bar] Asset2 +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/category_test_files/test_category_1.mal b/examples/visitor/tests/fixtures/category_test_files/test_category_1.mal new file mode 100644 index 0000000..360c0ff --- /dev/null +++ b/examples/visitor/tests/fixtures/category_test_files/test_category_1.mal @@ -0,0 +1,5 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category Test {} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/category_test_files/test_category_2.mal b/examples/visitor/tests/fixtures/category_test_files/test_category_2.mal new file mode 100644 index 0000000..ddb2d64 --- /dev/null +++ b/examples/visitor/tests/fixtures/category_test_files/test_category_2.mal @@ -0,0 +1,6 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category Test {} +category Test {} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/collect_test_files/test_collect_1.mal b/examples/visitor/tests/fixtures/collect_test_files/test_collect_1.mal new file mode 100644 index 0000000..36b1f9e --- /dev/null +++ b/examples/visitor/tests/fixtures/collect_test_files/test_collect_1.mal @@ -0,0 +1,26 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + let hostsOperatingSystems = hosts.operatingSystems + | access + } + + asset Computer + { + | shutDown + } + + asset OperatingSystem + { + | attack + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Computer [computer] 1 <-- L --> * [operatingSystems] OperatingSystem +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/collect_test_files/test_collect_10.mal b/examples/visitor/tests/fixtures/collect_test_files/test_collect_10.mal new file mode 100644 index 0000000..cde9006 --- /dev/null +++ b/examples/visitor/tests/fixtures/collect_test_files/test_collect_10.mal @@ -0,0 +1,86 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + let thisNetworkHosts = hosts + | access + // Error (no longer common ancestor) + // | + // v + -> thisNetworkHosts().(operatingSystems[Windows] \/ operatingSystems[Linux] - operatingSystems[WindowsVista]).fileSystems.folders.subfolders*.(configfiles /\ nonrootfiles).open + } + + asset Computer + { + | shutDown + } + + asset OperatingSystem + { + | attack + } + + asset Linux extends OperatingSystem + { + | linuxStep + } + + asset Windows extends OperatingSystem + { + | windowsStep + } + + asset WindowsVista extends Windows + { + | windowsVistaStep + } + + asset FileSystem + { + | compromise + } + + asset Folder + { + | folderStep + } + + asset SubFolder extends Folder + { + | subFolderStep + } + + asset File + { + | open + } + + asset ConfigFile extends File + { + | openConfigFile + } + + asset RootFile extends File + { + | openRootFile + } + + asset NonRootFile // GONE!!! extends File + { + | openNonRootFile + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Computer [computer] 1 <-- L --> * [operatingSystems] OperatingSystem + OperatingSystem [os] 1 <-- L --> 1..* [fileSystems] FileSystem + FileSystem [fs] 1 <-- L --> * [folders] Folder + Folder [parent] 1 <-- L --> * [subfolders] SubFolder + SubFolder [location] 1 <-- L --> * [configfiles] ConfigFile + SubFolder [location] 1 <-- L --> * [rootfiles] RootFile + SubFolder [location] 1 <-- L --> * [nonrootfiles] NonRootFile +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/collect_test_files/test_collect_2.mal b/examples/visitor/tests/fixtures/collect_test_files/test_collect_2.mal new file mode 100644 index 0000000..9eb02d4 --- /dev/null +++ b/examples/visitor/tests/fixtures/collect_test_files/test_collect_2.mal @@ -0,0 +1,26 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + | access + -> hosts.operatingSystems.attack + } + + asset Computer + { + | shutDown + } + + asset OperatingSystem + { + | attack + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Computer [computer] 1 <-- L --> * [operatingSystems] OperatingSystem +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/collect_test_files/test_collect_3.mal b/examples/visitor/tests/fixtures/collect_test_files/test_collect_3.mal new file mode 100644 index 0000000..c21082e --- /dev/null +++ b/examples/visitor/tests/fixtures/collect_test_files/test_collect_3.mal @@ -0,0 +1,38 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + let hostsOperatingSystems = hosts.operatingSystems.fileSystems.files + | access + } + + asset Computer + { + | shutDown + } + + asset OperatingSystem + { + | attack + } + + asset FileSystem + { + | compromise + } + + asset File + { + | open + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Computer [computer] 1 <-- L --> * [operatingSystems] OperatingSystem + OperatingSystem [os] 1 <-- L --> 1..* [fileSystems] FileSystem + FileSystem [fs] 1 <-- L --> * [files] File +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/collect_test_files/test_collect_4.mal b/examples/visitor/tests/fixtures/collect_test_files/test_collect_4.mal new file mode 100644 index 0000000..954bd78 --- /dev/null +++ b/examples/visitor/tests/fixtures/collect_test_files/test_collect_4.mal @@ -0,0 +1,38 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + | access + -> hosts.operatingSystems.fileSystems.files.open + } + + asset Computer + { + | shutDown + } + + asset OperatingSystem + { + | attack + } + + asset FileSystem + { + | compromise + } + + asset File + { + | open + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Computer [computer] 1 <-- L --> * [operatingSystems] OperatingSystem + OperatingSystem [os] 1 <-- L --> 1..* [fileSystems] FileSystem + FileSystem [fs] 1 <-- L --> * [files] File +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/collect_test_files/test_collect_5.mal b/examples/visitor/tests/fixtures/collect_test_files/test_collect_5.mal new file mode 100644 index 0000000..f59a3d0 --- /dev/null +++ b/examples/visitor/tests/fixtures/collect_test_files/test_collect_5.mal @@ -0,0 +1,41 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + | access + // Error + // | + // V + -> hosts.operatingSystems.fileSystems.files + } + + asset Computer + { + | shutDown + } + + asset OperatingSystem + { + | attack + } + + asset FileSystem + { + | compromise + } + + asset File + { + | open + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Computer [computer] 1 <-- L --> * [operatingSystems] OperatingSystem + // GONE! OperatingSystem [os] 1 <-- L --> 1..* [fileSystems] FileSystem + FileSystem [fs] 1 <-- L --> * [files] File +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/collect_test_files/test_collect_6.mal b/examples/visitor/tests/fixtures/collect_test_files/test_collect_6.mal new file mode 100644 index 0000000..491f797 --- /dev/null +++ b/examples/visitor/tests/fixtures/collect_test_files/test_collect_6.mal @@ -0,0 +1,83 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + let thisNetworkHosts = hosts + | access + -> thisNetworkHosts().(operatingSystems[Windows] \/ operatingSystems[Linux] - operatingSystems[WindowsVista]).fileSystems.folders.subfolders*.(configfiles /\ nonrootfiles).open + } + + asset Computer + { + | shutDown + } + + asset OperatingSystem + { + | attack + } + + asset Linux extends OperatingSystem + { + | linuxStep + } + + asset Windows extends OperatingSystem + { + | windowsStep + } + + asset WindowsVista extends Windows + { + | windowsVistaStep + } + + asset FileSystem + { + | compromise + } + + asset Folder + { + | folderStep + } + + asset SubFolder extends Folder + { + | subFolderStep + } + + asset File + { + | open + } + + asset ConfigFile extends File + { + | openConfigFile + } + + asset RootFile extends File + { + | openRootFile + } + + asset NonRootFile extends File + { + | openNonRootFile + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Computer [computer] 1 <-- L --> * [operatingSystems] OperatingSystem + OperatingSystem [os] 1 <-- L --> 1..* [fileSystems] FileSystem + FileSystem [fs] 1 <-- L --> * [folders] Folder + Folder [parent] 1 <-- L --> * [subfolders] SubFolder + SubFolder [location] 1 <-- L --> * [configfiles] ConfigFile + SubFolder [location] 1 <-- L --> * [rootfiles] RootFile + SubFolder [location] 1 <-- L --> * [nonrootfiles] NonRootFile +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/collect_test_files/test_collect_7.mal b/examples/visitor/tests/fixtures/collect_test_files/test_collect_7.mal new file mode 100644 index 0000000..87e6565 --- /dev/null +++ b/examples/visitor/tests/fixtures/collect_test_files/test_collect_7.mal @@ -0,0 +1,86 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + let thisNetworkHosts = hosts + | access + // This is wrong + // | + // v + -> thisNetworkHosts().(operatingSystems[Windows] \/ operatingSystems[Linux] - operatingSystems[WindowsVista]).fileSystems.folders.subfolders*.(configfiles /\ nonrootfiles).open + } + + asset Computer + { + | shutDown + } + + asset OperatingSystem + { + | attack + } + + asset Linux extends OperatingSystem + { + | linuxStep + } + + asset Windows extends OperatingSystem + { + | windowsStep + } + + asset WindowsVista // GONE!!! extends Windows + { + | windowsVistaStep + } + + asset FileSystem + { + | compromise + } + + asset Folder + { + | folderStep + } + + asset SubFolder extends Folder + { + | subFolderStep + } + + asset File + { + | open + } + + asset ConfigFile extends File + { + | openConfigFile + } + + asset RootFile extends File + { + | openRootFile + } + + asset NonRootFile extends File + { + | openNonRootFile + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Computer [computer] 1 <-- L --> * [operatingSystems] OperatingSystem + OperatingSystem [os] 1 <-- L --> 1..* [fileSystems] FileSystem + FileSystem [fs] 1 <-- L --> * [folders] Folder + Folder [parent] 1 <-- L --> * [subfolders] SubFolder + SubFolder [location] 1 <-- L --> * [configfiles] ConfigFile + SubFolder [location] 1 <-- L --> * [rootfiles] RootFile + SubFolder [location] 1 <-- L --> * [nonrootfiles] NonRootFile +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/collect_test_files/test_collect_8.mal b/examples/visitor/tests/fixtures/collect_test_files/test_collect_8.mal new file mode 100644 index 0000000..be03995 --- /dev/null +++ b/examples/visitor/tests/fixtures/collect_test_files/test_collect_8.mal @@ -0,0 +1,86 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + let thisNetworkHosts = hosts + | access + // This is wrong (no such association) + // | + // v + -> thisNetworkHosts().(operatingSystems[Windows] \/ operatingSystems[Linux] - operatingSystems[WindowsVista]).fileSystems.folders.subfolders*.(configfiles /\ nonrootfiles).open + } + + asset Computer + { + | shutDown + } + + asset OperatingSystem + { + | attack + } + + asset Linux extends OperatingSystem + { + | linuxStep + } + + asset Windows extends OperatingSystem + { + | windowsStep + } + + asset WindowsVista extends Windows + { + | windowsVistaStep + } + + asset FileSystem + { + | compromise + } + + asset Folder + { + | folderStep + } + + asset SubFolder extends Folder + { + | subFolderStep + } + + asset File + { + | open + } + + asset ConfigFile extends File + { + | openConfigFile + } + + asset RootFile extends File + { + | openRootFile + } + + asset NonRootFile extends File + { + | openNonRootFile + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Computer [computer] 1 <-- L --> * [operatingSystems] OperatingSystem + // GONE!!!! OperatingSystem [os] 1 <-- L --> 1..* [fileSystems] FileSystem + FileSystem [fs] 1 <-- L --> * [folders] Folder + Folder [parent] 1 <-- L --> * [subfolders] SubFolder + SubFolder [location] 1 <-- L --> * [configfiles] ConfigFile + SubFolder [location] 1 <-- L --> * [rootfiles] RootFile + SubFolder [location] 1 <-- L --> * [nonrootfiles] NonRootFile +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/collect_test_files/test_collect_9.mal b/examples/visitor/tests/fixtures/collect_test_files/test_collect_9.mal new file mode 100644 index 0000000..bc18f15 --- /dev/null +++ b/examples/visitor/tests/fixtures/collect_test_files/test_collect_9.mal @@ -0,0 +1,86 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + let thisNetworkHosts = hosts + | access + // Error (no longer child of folder) + // | + // v + -> thisNetworkHosts().(operatingSystems[Windows] \/ operatingSystems[Linux] - operatingSystems[WindowsVista]).fileSystems.folders.subfolders*.(configfiles /\ nonrootfiles).open + } + + asset Computer + { + | shutDown + } + + asset OperatingSystem + { + | attack + } + + asset Linux extends OperatingSystem + { + | linuxStep + } + + asset Windows extends OperatingSystem + { + | windowsStep + } + + asset WindowsVista extends Windows + { + | windowsVistaStep + } + + asset FileSystem + { + | compromise + } + + asset Folder + { + | folderStep + } + + asset SubFolder // GONE!!! extends Folder + { + | subFolderStep + } + + asset File + { + | open + } + + asset ConfigFile extends File + { + | openConfigFile + } + + asset RootFile extends File + { + | openRootFile + } + + asset NonRootFile extends File + { + | openNonRootFile + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Computer [computer] 1 <-- L --> * [operatingSystems] OperatingSystem + OperatingSystem [os] 1 <-- L --> 1..* [fileSystems] FileSystem + FileSystem [fs] 1 <-- L --> * [folders] Folder + Folder [parent] 1 <-- L --> * [subfolders] SubFolder + SubFolder [location] 1 <-- L --> * [configfiles] ConfigFile + SubFolder [location] 1 <-- L --> * [rootfiles] RootFile + SubFolder [location] 1 <-- L --> * [nonrootfiles] NonRootFile +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/define_test_files/test_define_1.mal b/examples/visitor/tests/fixtures/define_test_files/test_define_1.mal new file mode 100644 index 0000000..302cf62 --- /dev/null +++ b/examples/visitor/tests/fixtures/define_test_files/test_define_1.mal @@ -0,0 +1 @@ +#version:"0.0.0" \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/define_test_files/test_define_2.mal b/examples/visitor/tests/fixtures/define_test_files/test_define_2.mal new file mode 100644 index 0000000..3a6a002 --- /dev/null +++ b/examples/visitor/tests/fixtures/define_test_files/test_define_2.mal @@ -0,0 +1 @@ +#id: "org.mal-lang.testAnalyzer" \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/define_test_files/test_define_3.mal b/examples/visitor/tests/fixtures/define_test_files/test_define_3.mal new file mode 100644 index 0000000..cdba44c --- /dev/null +++ b/examples/visitor/tests/fixtures/define_test_files/test_define_3.mal @@ -0,0 +1,2 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"version1" \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/define_test_files/test_define_4.mal b/examples/visitor/tests/fixtures/define_test_files/test_define_4.mal new file mode 100644 index 0000000..0017387 --- /dev/null +++ b/examples/visitor/tests/fixtures/define_test_files/test_define_4.mal @@ -0,0 +1,2 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/define_test_files/test_define_5.mal b/examples/visitor/tests/fixtures/define_test_files/test_define_5.mal new file mode 100644 index 0000000..b674a97 --- /dev/null +++ b/examples/visitor/tests/fixtures/define_test_files/test_define_5.mal @@ -0,0 +1,3 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" +#version:"1.0.0" \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/define_test_files/test_define_6.mal b/examples/visitor/tests/fixtures/define_test_files/test_define_6.mal new file mode 100644 index 0000000..a447acd --- /dev/null +++ b/examples/visitor/tests/fixtures/define_test_files/test_define_6.mal @@ -0,0 +1,3 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" +#key:"value" \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/define_test_files/test_define_7.mal b/examples/visitor/tests/fixtures/define_test_files/test_define_7.mal new file mode 100644 index 0000000..9147085 --- /dev/null +++ b/examples/visitor/tests/fixtures/define_test_files/test_define_7.mal @@ -0,0 +1,4 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" +#key:"value" +#key:"value" \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/define_test_files/test_define_8.mal b/examples/visitor/tests/fixtures/define_test_files/test_define_8.mal new file mode 100644 index 0000000..b674a97 --- /dev/null +++ b/examples/visitor/tests/fixtures/define_test_files/test_define_8.mal @@ -0,0 +1,3 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" +#version:"1.0.0" \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/exists_test_files/test_exists_1.mal b/examples/visitor/tests/fixtures/exists_test_files/test_exists_1.mal new file mode 100644 index 0000000..a013790 --- /dev/null +++ b/examples/visitor/tests/fixtures/exists_test_files/test_exists_1.mal @@ -0,0 +1,18 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + E step1 + <- a3 + !E step2 + <- a2 + } + asset Asset2 {} + asset Asset3 {} +} +associations { + Asset1 [a1] * <-- connects --> * [a3] Asset3 + Asset1 [a1] * <-- connects --> * [a2] Asset2 +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/exists_test_files/test_exists_2.mal b/examples/visitor/tests/fixtures/exists_test_files/test_exists_2.mal new file mode 100644 index 0000000..a338cd4 --- /dev/null +++ b/examples/visitor/tests/fixtures/exists_test_files/test_exists_2.mal @@ -0,0 +1,17 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + E step1 + <- a3 + -> wrongStep + } + asset Asset2 {} + asset Asset3 {} +} +associations { + Asset1 [a1] * <-- connects --> * [a3] Asset3 + Asset1 [a1] * <-- connects --> * [a2] Asset2 +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/exists_test_files/test_exists_3.mal b/examples/visitor/tests/fixtures/exists_test_files/test_exists_3.mal new file mode 100644 index 0000000..91db393 --- /dev/null +++ b/examples/visitor/tests/fixtures/exists_test_files/test_exists_3.mal @@ -0,0 +1,20 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + E step1 + <- a2 + } + asset Asset2 {} + asset Asset3 {} +} +associations { + Asset1 [a1] * <-- connects --> * [a3] Asset3 + + // COMMENTED + // | + // V + //Asset1 [a1] * <-- connects --> * [a2] Asset2 +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/exists_test_files/test_exists_4.mal b/examples/visitor/tests/fixtures/exists_test_files/test_exists_4.mal new file mode 100644 index 0000000..1635f17 --- /dev/null +++ b/examples/visitor/tests/fixtures/exists_test_files/test_exists_4.mal @@ -0,0 +1,18 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + !E step1 + <- a2.attack + } + asset Asset2 { + & attack + } + asset Asset3 {} +} +associations { + Asset1 [a1] * <-- connects --> * [a3] Asset3 + Asset1 [a1] * <-- connects --> * [a2] Asset2 +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/exists_test_files/test_exists_5.mal b/examples/visitor/tests/fixtures/exists_test_files/test_exists_5.mal new file mode 100644 index 0000000..cfd8805 --- /dev/null +++ b/examples/visitor/tests/fixtures/exists_test_files/test_exists_5.mal @@ -0,0 +1,18 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + E step1 [Bernoulli(0.2)] + <- a2 + } + asset Asset2 { + & attack + } + asset Asset3 {} +} +associations { + Asset1 [a1] * <-- connects --> * [a3] Asset3 + Asset1 [a1] * <-- connects --> * [a2] Asset2 +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/exists_test_files/test_exists_6.mal b/examples/visitor/tests/fixtures/exists_test_files/test_exists_6.mal new file mode 100644 index 0000000..6592baa --- /dev/null +++ b/examples/visitor/tests/fixtures/exists_test_files/test_exists_6.mal @@ -0,0 +1,18 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + !E step1 [Bernoulli(0.2)] + <- a2 + } + asset Asset2 { + & attack + } + asset Asset3 {} +} +associations { + Asset1 [a1] * <-- connects --> * [a3] Asset3 + Asset1 [a1] * <-- connects --> * [a2] Asset2 +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/exists_test_files/test_exists_7.mal b/examples/visitor/tests/fixtures/exists_test_files/test_exists_7.mal new file mode 100644 index 0000000..c77676e --- /dev/null +++ b/examples/visitor/tests/fixtures/exists_test_files/test_exists_7.mal @@ -0,0 +1,18 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + E step1 + -> a2.attack + } + asset Asset2 { + & attack + } + asset Asset3 {} +} +associations { + Asset1 [a1] * <-- connects --> * [a3] Asset3 + Asset1 [a1] * <-- connects --> * [a2] Asset2 +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/exists_test_files/test_exists_8.mal b/examples/visitor/tests/fixtures/exists_test_files/test_exists_8.mal new file mode 100644 index 0000000..4e28ef2 --- /dev/null +++ b/examples/visitor/tests/fixtures/exists_test_files/test_exists_8.mal @@ -0,0 +1,18 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + & step1 + <- a2.attack + } + asset Asset2 { + & attack + } + asset Asset3 {} +} +associations { + Asset1 [a1] * <-- connects --> * [a3] Asset3 + Asset1 [a1] * <-- connects --> * [a2] Asset2 +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/extend_test_files/test_extends_1.mal b/examples/visitor/tests/fixtures/extend_test_files/test_extends_1.mal new file mode 100644 index 0000000..bf7e480 --- /dev/null +++ b/examples/visitor/tests/fixtures/extend_test_files/test_extends_1.mal @@ -0,0 +1,8 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem {} + asset Linux extends OperatingSystem {} +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/extend_test_files/test_extends_2.mal b/examples/visitor/tests/fixtures/extend_test_files/test_extends_2.mal new file mode 100644 index 0000000..fd0c948 --- /dev/null +++ b/examples/visitor/tests/fixtures/extend_test_files/test_extends_2.mal @@ -0,0 +1,7 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Foo1 extends Foo2 {} +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/extend_test_files/test_extends_3.mal b/examples/visitor/tests/fixtures/extend_test_files/test_extends_3.mal new file mode 100644 index 0000000..7165164 --- /dev/null +++ b/examples/visitor/tests/fixtures/extend_test_files/test_extends_3.mal @@ -0,0 +1,11 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Foo1 extends Foo2 {} + asset Foo2 extends Foo3 {} + asset Foo3 extends Foo4 {} + asset Foo4 extends Foo5 {} + asset Foo5 extends Foo1 {} +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/extend_test_files/test_extends_4.mal b/examples/visitor/tests/fixtures/extend_test_files/test_extends_4.mal new file mode 100644 index 0000000..edc6cd7 --- /dev/null +++ b/examples/visitor/tests/fixtures/extend_test_files/test_extends_4.mal @@ -0,0 +1,5 @@ +include "test_extends_4_aux.mal" + +category System { + asset SubTest extends Test {} +} diff --git a/examples/visitor/tests/fixtures/extend_test_files/test_extends_4_aux.mal b/examples/visitor/tests/fixtures/extend_test_files/test_extends_4_aux.mal new file mode 100644 index 0000000..a90acf2 --- /dev/null +++ b/examples/visitor/tests/fixtures/extend_test_files/test_extends_4_aux.mal @@ -0,0 +1,6 @@ +#version:"0.0.0" +#id: "org.mal-lang.testAnalyzer" + +category System { + asset Test {} +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/fields_test_files/test_fields_1.mal b/examples/visitor/tests/fixtures/fields_test_files/test_fields_1.mal new file mode 100644 index 0000000..aa9aebd --- /dev/null +++ b/examples/visitor/tests/fixtures/fields_test_files/test_fields_1.mal @@ -0,0 +1,13 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 {} + asset Asset2 extends Asset1 {} + asset Asset3 {} +} +associations { + Asset1 [a1] * <-- connects --> * [a3] Asset3 + Asset2 [a2] * <-- connects --> * [a3_again] Asset3 +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/fields_test_files/test_fields_2.mal b/examples/visitor/tests/fixtures/fields_test_files/test_fields_2.mal new file mode 100644 index 0000000..401ed31 --- /dev/null +++ b/examples/visitor/tests/fixtures/fields_test_files/test_fields_2.mal @@ -0,0 +1,13 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 {} + asset Asset2 extends Asset1 {} + asset Asset3 {} +} +associations { + Asset1 [a1] * <-- connects --> * [a3] Asset3 + Asset2 [a2] * <-- connects --> * [a3] Asset3 +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/fields_test_files/test_fields_3.mal b/examples/visitor/tests/fixtures/fields_test_files/test_fields_3.mal new file mode 100644 index 0000000..dbe612d --- /dev/null +++ b/examples/visitor/tests/fixtures/fields_test_files/test_fields_3.mal @@ -0,0 +1,15 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 {} + asset Asset2 extends Asset1 { + | attack + } + asset Asset3 {} +} +associations { + Asset1 [a1] * <-- connects --> * [a3] Asset3 + Asset2 [a2] * <-- connects --> * [attack] Asset3 +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/include_test_files/test_include_1.mal b/examples/visitor/tests/fixtures/include_test_files/test_include_1.mal new file mode 100644 index 0000000..5178a94 --- /dev/null +++ b/examples/visitor/tests/fixtures/include_test_files/test_include_1.mal @@ -0,0 +1 @@ +include "test_include_empty.mal" \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/include_test_files/test_include_2.mal b/examples/visitor/tests/fixtures/include_test_files/test_include_2.mal new file mode 100644 index 0000000..1b1e756 --- /dev/null +++ b/examples/visitor/tests/fixtures/include_test_files/test_include_2.mal @@ -0,0 +1 @@ +include "test_include_2_aux.mal" \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/include_test_files/test_include_2_aux.mal b/examples/visitor/tests/fixtures/include_test_files/test_include_2_aux.mal new file mode 100644 index 0000000..0017387 --- /dev/null +++ b/examples/visitor/tests/fixtures/include_test_files/test_include_2_aux.mal @@ -0,0 +1,2 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/include_test_files/test_include_3.mal b/examples/visitor/tests/fixtures/include_test_files/test_include_3.mal new file mode 100644 index 0000000..66136a8 --- /dev/null +++ b/examples/visitor/tests/fixtures/include_test_files/test_include_3.mal @@ -0,0 +1,3 @@ +include "test_include_3_aux.mal" +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/include_test_files/test_include_3_aux.mal b/examples/visitor/tests/fixtures/include_test_files/test_include_3_aux.mal new file mode 100644 index 0000000..0017387 --- /dev/null +++ b/examples/visitor/tests/fixtures/include_test_files/test_include_3_aux.mal @@ -0,0 +1,2 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/include_test_files/test_include_4.mal b/examples/visitor/tests/fixtures/include_test_files/test_include_4.mal new file mode 100644 index 0000000..f1861c0 --- /dev/null +++ b/examples/visitor/tests/fixtures/include_test_files/test_include_4.mal @@ -0,0 +1,2 @@ +include "test_include_4_aux.mal" +#key: "test" \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/include_test_files/test_include_4_aux.mal b/examples/visitor/tests/fixtures/include_test_files/test_include_4_aux.mal new file mode 100644 index 0000000..0017387 --- /dev/null +++ b/examples/visitor/tests/fixtures/include_test_files/test_include_4_aux.mal @@ -0,0 +1,2 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/include_test_files/test_include_5.mal b/examples/visitor/tests/fixtures/include_test_files/test_include_5.mal new file mode 100644 index 0000000..69295db --- /dev/null +++ b/examples/visitor/tests/fixtures/include_test_files/test_include_5.mal @@ -0,0 +1,3 @@ +include "test_include_5_aux1.mal" +include "test_include_5_aux2.mal" +#key: "test" \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/include_test_files/test_include_5_aux1.mal b/examples/visitor/tests/fixtures/include_test_files/test_include_5_aux1.mal new file mode 100644 index 0000000..302cf62 --- /dev/null +++ b/examples/visitor/tests/fixtures/include_test_files/test_include_5_aux1.mal @@ -0,0 +1 @@ +#version:"0.0.0" \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/include_test_files/test_include_5_aux2.mal b/examples/visitor/tests/fixtures/include_test_files/test_include_5_aux2.mal new file mode 100644 index 0000000..3a6a002 --- /dev/null +++ b/examples/visitor/tests/fixtures/include_test_files/test_include_5_aux2.mal @@ -0,0 +1 @@ +#id: "org.mal-lang.testAnalyzer" \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/include_test_files/test_include_6.mal b/examples/visitor/tests/fixtures/include_test_files/test_include_6.mal new file mode 100644 index 0000000..4007c3a --- /dev/null +++ b/examples/visitor/tests/fixtures/include_test_files/test_include_6.mal @@ -0,0 +1,5 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +include "test_include_empty.mal" +include "test_include_empty.mal" \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/include_test_files/test_include_7.mal b/examples/visitor/tests/fixtures/include_test_files/test_include_7.mal new file mode 100644 index 0000000..c9e46bd --- /dev/null +++ b/examples/visitor/tests/fixtures/include_test_files/test_include_7.mal @@ -0,0 +1,4 @@ +include "test_include_empty.mal" + +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/include_test_files/test_include_8.mal b/examples/visitor/tests/fixtures/include_test_files/test_include_8.mal new file mode 100644 index 0000000..9447b48 --- /dev/null +++ b/examples/visitor/tests/fixtures/include_test_files/test_include_8.mal @@ -0,0 +1,4 @@ +include "test_include_8_aux1.mal" + +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/include_test_files/test_include_8_aux1.mal b/examples/visitor/tests/fixtures/include_test_files/test_include_8_aux1.mal new file mode 100644 index 0000000..4f80845 --- /dev/null +++ b/examples/visitor/tests/fixtures/include_test_files/test_include_8_aux1.mal @@ -0,0 +1 @@ +include "test_include_8_aux2.mal" \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/include_test_files/test_include_8_aux2.mal b/examples/visitor/tests/fixtures/include_test_files/test_include_8_aux2.mal new file mode 100644 index 0000000..f4dfa56 --- /dev/null +++ b/examples/visitor/tests/fixtures/include_test_files/test_include_8_aux2.mal @@ -0,0 +1 @@ +include "test_include_8.mal" \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/include_test_files/test_include_empty.mal b/examples/visitor/tests/fixtures/include_test_files/test_include_empty.mal new file mode 100644 index 0000000..6c1b6ba --- /dev/null +++ b/examples/visitor/tests/fixtures/include_test_files/test_include_empty.mal @@ -0,0 +1 @@ +// Purposely left empty \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/info_test_files/test_asset_info_1.mal b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_1.mal new file mode 100644 index 0000000..8f470c2 --- /dev/null +++ b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_1.mal @@ -0,0 +1,9 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Foo + random info: "Hello" + {} +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/info_test_files/test_asset_info_10.mal b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_10.mal new file mode 100644 index 0000000..c8faa11 --- /dev/null +++ b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_10.mal @@ -0,0 +1,30 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System + random info: "This is a category" +{ + asset Foo + random info: "Hello" + { + | compromise + random info: "Hello from the attack step" + } +} + +category AnotherSystem + random info: "This is another category" +{ + asset Bar + random info: "Hello from another category" + { + | compromise + random info: "Hello from another attack step" + } +} + +associations { + Foo [foo] 1 <-- RandomAssociation --> 0 [bar] Bar + random info: "This is an association" + random info: "This is another comment on association" +} diff --git a/examples/visitor/tests/fixtures/info_test_files/test_asset_info_11.mal b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_11.mal new file mode 100644 index 0000000..b20e078 --- /dev/null +++ b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_11.mal @@ -0,0 +1,31 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System + random info: "This is a category" +{ + asset Foo + random info: "Hello" + { + | compromise + random info: "Hello from the attack step" + } +} + +category AnotherSystem + random info: "This is another category" +{ + asset Bar + random info: "Hello from another category" + { + | compromise + random info: "Hello from another attack step" + } +} + +associations { + Foo [foo] 1 <-- RandomAssociation --> 0 [bar] Bar + random info: "This is an association" + Foo [foos] * <-- AnotherRandomAssociation --> * [bars] Bar + random info: "This is another association" +} diff --git a/examples/visitor/tests/fixtures/info_test_files/test_asset_info_12.mal b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_12.mal new file mode 100644 index 0000000..f06916f --- /dev/null +++ b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_12.mal @@ -0,0 +1,21 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System + random info: "This is a category" +{ + asset Foo + random info: "Hello" + { + | compromise + random info: "Hello from the attack step" + } + + asset Bar + random info: "Hello from Bar!" + { + | compromise + random info: "Hello from Bar's attack step" + } +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/info_test_files/test_asset_info_13.mal b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_13.mal new file mode 100644 index 0000000..03d5823 --- /dev/null +++ b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_13.mal @@ -0,0 +1,19 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System + random info: "This is a category" + modeler info: "This is to trick" + random info: "This is the same category" +{ + asset Foo + random info: "Hello" + { + & compromise + random info: "Hello from the attack step" + | beforeCompromise + random info: "Stepping stone to compromise" + -> compromise + } +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/info_test_files/test_asset_info_14.mal b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_14.mal new file mode 100644 index 0000000..73d9a14 --- /dev/null +++ b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_14.mal @@ -0,0 +1,12 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Foo + random info: "Hello" + { + | compromise + random info: "Hello from the attack step" + } +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/info_test_files/test_asset_info_15.mal b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_15.mal new file mode 100644 index 0000000..9781201 --- /dev/null +++ b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_15.mal @@ -0,0 +1,17 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System + random info: "This is a category" +{ + asset Foo + random info: "Hello" + { + & compromise + random info: "Hello from the attack step" + | beforeCompromise + random info: "Stepping stone to compromise" + -> compromise + } +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/info_test_files/test_asset_info_2.mal b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_2.mal new file mode 100644 index 0000000..79e71f5 --- /dev/null +++ b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_2.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Foo + random info: "Hello" + random info: "Hello once more!" + {} +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/info_test_files/test_asset_info_3.mal b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_3.mal new file mode 100644 index 0000000..85e6a6f --- /dev/null +++ b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_3.mal @@ -0,0 +1,13 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Foo + random info: "Hello" + { + | compromise + random info: "Hello from the attack step" + random info: "Hello from the attack step once more" + } +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/info_test_files/test_asset_info_4.mal b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_4.mal new file mode 100644 index 0000000..2463c0e --- /dev/null +++ b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_4.mal @@ -0,0 +1,13 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Foo + random info: "Hello" + { + | compromise + random info: "Hello from the attack step" + another_random info: "Hello from the attack step once more" + } +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/info_test_files/test_asset_info_5.mal b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_5.mal new file mode 100644 index 0000000..a5e4c56 --- /dev/null +++ b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_5.mal @@ -0,0 +1,15 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System + random info: "This is a category" +{ + asset Foo + random info: "Hello" + { + | compromise + random info: "Hello from the attack step" + another_random info: "Hello from the attack step once more" + } +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/info_test_files/test_asset_info_6.mal b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_6.mal new file mode 100644 index 0000000..709f65c --- /dev/null +++ b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_6.mal @@ -0,0 +1,16 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System + random info: "This is a category" + random info: "This is a repetition" +{ + asset Foo + random info: "Hello" + { + | compromise + random info: "Hello from the attack step" + another_random info: "Hello from the attack step once more" + } +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/info_test_files/test_asset_info_7.mal b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_7.mal new file mode 100644 index 0000000..cb515bf --- /dev/null +++ b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_7.mal @@ -0,0 +1,17 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System + random info: "This is a category" + another_random info: "This is more" +{ + asset Foo + random info: "Hello" + another_random info: "Hello again" + { + | compromise + random info: "Hello from the attack step" + another_random info: "Hello from the attack step once more" + } +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/info_test_files/test_asset_info_8.mal b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_8.mal new file mode 100644 index 0000000..cceeebe --- /dev/null +++ b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_8.mal @@ -0,0 +1,24 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System + random info: "This is a category" +{ + asset Foo + random info: "Hello" + { + | compromise + random info: "Hello from the attack step" + } +} + +category AnotherSystem + random info: "This is another category" +{ + asset Bar + random info: "Hello from another category" + { + | compromise + random info: "Hello from another attack step" + } +} diff --git a/examples/visitor/tests/fixtures/info_test_files/test_asset_info_9.mal b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_9.mal new file mode 100644 index 0000000..8795d1b --- /dev/null +++ b/examples/visitor/tests/fixtures/info_test_files/test_asset_info_9.mal @@ -0,0 +1,29 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System + random info: "This is a category" +{ + asset Foo + random info: "Hello" + { + | compromise + random info: "Hello from the attack step" + } +} + +category AnotherSystem + random info: "This is another category" +{ + asset Bar + random info: "Hello from another category" + { + | compromise + random info: "Hello from another attack step" + } +} + +associations { + Foo [foo] 1 <-- RandomAssociation --> 0 [bar] Bar + random info: "This is an association" +} diff --git a/examples/visitor/tests/fixtures/let_test_files/test_let_1.mal b/examples/visitor/tests/fixtures/let_test_files/test_let_1.mal new file mode 100644 index 0000000..9938bdd --- /dev/null +++ b/examples/visitor/tests/fixtures/let_test_files/test_let_1.mal @@ -0,0 +1,23 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Platform { + | access + } + asset Computer { + let components = software \/ hardware + | access + } + asset Software extends Platform { + | compromise + } + asset Hardware extends Platform { + | overheat + } +} +associations { + Computer [host] 1 <-- Programs --> * [software] Software + Computer [host] 1 <-- SpecificHardware --> * [hardware] Hardware +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/let_test_files/test_let_10.mal b/examples/visitor/tests/fixtures/let_test_files/test_let_10.mal new file mode 100644 index 0000000..d1f0334 --- /dev/null +++ b/examples/visitor/tests/fixtures/let_test_files/test_let_10.mal @@ -0,0 +1,18 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + let component = asset3 + } + asset Asset2 extends Asset1 { + } + asset Asset3 extends Asset2 { + } + asset Asset4 extends Asset3 { + let component = asset3 + } +} +associations { + Asset1 [asset1] 1 <-- One --> 1 [asset3] Asset3 +} diff --git a/examples/visitor/tests/fixtures/let_test_files/test_let_2.mal b/examples/visitor/tests/fixtures/let_test_files/test_let_2.mal new file mode 100644 index 0000000..690bd3d --- /dev/null +++ b/examples/visitor/tests/fixtures/let_test_files/test_let_2.mal @@ -0,0 +1,23 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Platform { + | access + } + asset Computer { + let component = software + let component = hardware + | access + } + asset Software extends Platform { + | compromise + } + asset Hardware extends Platform { + | overheat + } +} +associations { + Computer [host] 1 <-- Programs --> * [software] Software + Computer [host] 1 <-- SpecificHardware --> * [hardware] Hardware +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/let_test_files/test_let_3.mal b/examples/visitor/tests/fixtures/let_test_files/test_let_3.mal new file mode 100644 index 0000000..eed9e9c --- /dev/null +++ b/examples/visitor/tests/fixtures/let_test_files/test_let_3.mal @@ -0,0 +1,15 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer { + let component = hardware.overheat + } + asset Hardware { + | overheat + } +} +associations { + Computer [host] 1 <-- SpecificHardware --> * [hardware] Hardware +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/let_test_files/test_let_4.mal b/examples/visitor/tests/fixtures/let_test_files/test_let_4.mal new file mode 100644 index 0000000..5561cbb --- /dev/null +++ b/examples/visitor/tests/fixtures/let_test_files/test_let_4.mal @@ -0,0 +1,19 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + let component = asset3 + } + asset Asset2 extends Asset1 { + let another_component = asset4 + } + asset Asset3 { + } + asset Asset4 { + } +} +associations { + Asset1 [asset1] 1 <-- One --> 1 [asset3] Asset3 + Asset2 [asset2] 1 <-- Two --> 1 [asset4] Asset4 +} diff --git a/examples/visitor/tests/fixtures/let_test_files/test_let_5.mal b/examples/visitor/tests/fixtures/let_test_files/test_let_5.mal new file mode 100644 index 0000000..a583732 --- /dev/null +++ b/examples/visitor/tests/fixtures/let_test_files/test_let_5.mal @@ -0,0 +1,19 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + let component = asset3 + } + asset Asset2 extends Asset1 { + let component = asset4 + } + asset Asset3 { + } + asset Asset4 { + } +} +associations { + Asset1 [asset1] 1 <-- One --> 1 [asset3] Asset3 + Asset2 [asset2] 1 <-- Two --> 1 [asset4] Asset4 +} diff --git a/examples/visitor/tests/fixtures/let_test_files/test_let_6.mal b/examples/visitor/tests/fixtures/let_test_files/test_let_6.mal new file mode 100644 index 0000000..a10c976 --- /dev/null +++ b/examples/visitor/tests/fixtures/let_test_files/test_let_6.mal @@ -0,0 +1,17 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + let component1 = component2() + let component2 = component1() + } + asset Asset3 { + } + asset Asset4 { + } +} +associations { + Asset1 [asset1] 1 <-- One --> 1 [asset3] Asset3 + Asset1 [asset1] 1 <-- Two --> 1 [asset4] Asset4 +} diff --git a/examples/visitor/tests/fixtures/let_test_files/test_let_7.mal b/examples/visitor/tests/fixtures/let_test_files/test_let_7.mal new file mode 100644 index 0000000..b27ddc8 --- /dev/null +++ b/examples/visitor/tests/fixtures/let_test_files/test_let_7.mal @@ -0,0 +1,15 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + } + asset Asset3 extends Asset1 { + let component = asset4 + } + asset Asset4 { + } +} +associations { + Asset3 [asset3] 1 <-- One --> 1 [asset4] Asset4 +} diff --git a/examples/visitor/tests/fixtures/let_test_files/test_let_8.mal b/examples/visitor/tests/fixtures/let_test_files/test_let_8.mal new file mode 100644 index 0000000..f10e921 --- /dev/null +++ b/examples/visitor/tests/fixtures/let_test_files/test_let_8.mal @@ -0,0 +1,15 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + } + asset Asset3 extends Asset1 { + let component = asset4 + } + asset Asset4 { + } +} +associations { + Asset1 [asset1] 1 <-- One --> 1 [asset4] Asset4 +} diff --git a/examples/visitor/tests/fixtures/let_test_files/test_let_9.mal b/examples/visitor/tests/fixtures/let_test_files/test_let_9.mal new file mode 100644 index 0000000..40178f1 --- /dev/null +++ b/examples/visitor/tests/fixtures/let_test_files/test_let_9.mal @@ -0,0 +1,15 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + let component = asset4 + } + asset Asset3 extends Asset1 { + } + asset Asset4 { + } +} +associations { + Asset1 [asset1] 1 <-- One --> 1 [asset4] Asset4 +} diff --git a/examples/visitor/tests/fixtures/operation_test_files/test_operation_1.mal b/examples/visitor/tests/fixtures/operation_test_files/test_operation_1.mal new file mode 100644 index 0000000..19b2ce7 --- /dev/null +++ b/examples/visitor/tests/fixtures/operation_test_files/test_operation_1.mal @@ -0,0 +1,30 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + let allTargets = operatingSystems[Windows] /\ operatingSystems[Linux] + | findWindowsAndLinux + -> allTargets().attack + } + + abstract asset OperatingSystem + { + | attack + } + asset Windows extends OperatingSystem + { + | foundWindows + } + asset Linux extends OperatingSystem + { + | foundLinux + } +} + +associations +{ + Computer [computers] * <-- L --> 0..1 [operatingSystems] OperatingSystem +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/operation_test_files/test_operation_10.mal b/examples/visitor/tests/fixtures/operation_test_files/test_operation_10.mal new file mode 100644 index 0000000..2edb6bb --- /dev/null +++ b/examples/visitor/tests/fixtures/operation_test_files/test_operation_10.mal @@ -0,0 +1,29 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + | findWindowsAndLinux + -> (computers.operatingSystems[Windows] \/ computers.operatingSystems[Linux]) + } + + abstract asset OperatingSystem + { + | attack + } + asset Windows extends OperatingSystem + { + | foundWindows + } + asset Linux extends OperatingSystem + { + | foundLinux + } +} + +associations +{ + Computer [computers] * <-- L --> 0..1 [operatingSystems] OperatingSystem +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/operation_test_files/test_operation_11.mal b/examples/visitor/tests/fixtures/operation_test_files/test_operation_11.mal new file mode 100644 index 0000000..6300371 --- /dev/null +++ b/examples/visitor/tests/fixtures/operation_test_files/test_operation_11.mal @@ -0,0 +1,29 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + | findWindowsAndLinux + -> (computers.operatingSystems[Windows] \/ computers.operatingSystems[Linux]).foundWindows + } + + abstract asset OperatingSystem + { + | attack + } + asset Windows extends OperatingSystem + { + | foundWindows + } + asset Linux extends OperatingSystem + { + | foundLinux + } +} + +associations +{ + Computer [computers] * <-- L --> 0..1 [operatingSystems] OperatingSystem +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/operation_test_files/test_operation_12.mal b/examples/visitor/tests/fixtures/operation_test_files/test_operation_12.mal new file mode 100644 index 0000000..edbe255 --- /dev/null +++ b/examples/visitor/tests/fixtures/operation_test_files/test_operation_12.mal @@ -0,0 +1,29 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + let targets = windows \/ linux + } + + abstract asset OperatingSystem + { + | attack + } + asset Windows + { + | attack + } + asset Linux + { + | attack + } +} + +associations +{ + Computer [computers] * <-- L --> 0..1 [linux] Linux + Computer [computers] * <-- L --> 0..1 [windows] Windows +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/operation_test_files/test_operation_13.mal b/examples/visitor/tests/fixtures/operation_test_files/test_operation_13.mal new file mode 100644 index 0000000..a8aaa28 --- /dev/null +++ b/examples/visitor/tests/fixtures/operation_test_files/test_operation_13.mal @@ -0,0 +1,30 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network + { + let allComputers = computers[ThinkPad] \/ computers[Asus] + | access + -> allComputers().compromise + } + + asset Machine { + | compromise + } + + asset Computer extends Machine { + } + + asset ThinkPad extends Computer { + } + + asset Asus extends Computer { + } +} + +associations +{ + Network [network] 1 <-- L --> * [computers] Computer +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/operation_test_files/test_operation_14.mal b/examples/visitor/tests/fixtures/operation_test_files/test_operation_14.mal new file mode 100644 index 0000000..6eea7df --- /dev/null +++ b/examples/visitor/tests/fixtures/operation_test_files/test_operation_14.mal @@ -0,0 +1,34 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + | do + -> (windows \/ linux).softwareStep + } + + abstract asset Software { + | softwareStep + } + + abstract asset OperatingSystem extends Software + { + | attack + } + asset Windows extends OperatingSystem + { + | attack + } + asset Linux extends OperatingSystem + { + | attack + } +} + +associations +{ + Computer [computers] * <-- L --> 0..1 [linux] Linux + Computer [computers] * <-- L --> 0..1 [windows] Windows +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/operation_test_files/test_operation_15.mal b/examples/visitor/tests/fixtures/operation_test_files/test_operation_15.mal new file mode 100644 index 0000000..ff05509 --- /dev/null +++ b/examples/visitor/tests/fixtures/operation_test_files/test_operation_15.mal @@ -0,0 +1,30 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + let allTargets = operatingSystems[Windows] - operatingSystems[Linux] + | findWindowsAndLinux + -> allTargets().attack + } + + abstract asset OperatingSystem + { + | attack + } + asset Windows extends OperatingSystem + { + | foundWindows + } + asset Linux extends OperatingSystem + { + | foundLinux + } +} + +associations +{ + Computer [computers] * <-- L --> 0..1 [operatingSystems] OperatingSystem +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/operation_test_files/test_operation_16.mal b/examples/visitor/tests/fixtures/operation_test_files/test_operation_16.mal new file mode 100644 index 0000000..ae008e9 --- /dev/null +++ b/examples/visitor/tests/fixtures/operation_test_files/test_operation_16.mal @@ -0,0 +1,29 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + | findWindowsAndLinux + -> (operatingSystems[Windows] - operatingSystems[Linux]).attack + } + + abstract asset OperatingSystem + { + | attack + } + asset Windows extends OperatingSystem + { + | foundWindows + } + asset Linux extends OperatingSystem + { + | foundLinux + } +} + +associations +{ + Computer [computers] * <-- L --> 0..1 [operatingSystems] OperatingSystem +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/operation_test_files/test_operation_17.mal b/examples/visitor/tests/fixtures/operation_test_files/test_operation_17.mal new file mode 100644 index 0000000..f63080f --- /dev/null +++ b/examples/visitor/tests/fixtures/operation_test_files/test_operation_17.mal @@ -0,0 +1,29 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + | findWindowsAndLinux + -> (computers.operatingSystems[Windows] - computers.operatingSystems[Linux]) + } + + abstract asset OperatingSystem + { + | attack + } + asset Windows extends OperatingSystem + { + | foundWindows + } + asset Linux extends OperatingSystem + { + | foundLinux + } +} + +associations +{ + Computer [computers] * <-- L --> 0..1 [operatingSystems] OperatingSystem +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/operation_test_files/test_operation_18.mal b/examples/visitor/tests/fixtures/operation_test_files/test_operation_18.mal new file mode 100644 index 0000000..0b7cb65 --- /dev/null +++ b/examples/visitor/tests/fixtures/operation_test_files/test_operation_18.mal @@ -0,0 +1,29 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + | findWindowsAndLinux + -> (computers.operatingSystems[Windows] - computers.operatingSystems[Linux]).foundWindows + } + + abstract asset OperatingSystem + { + | attack + } + asset Windows extends OperatingSystem + { + | foundWindows + } + asset Linux extends OperatingSystem + { + | foundLinux + } +} + +associations +{ + Computer [computers] * <-- L --> 0..1 [operatingSystems] OperatingSystem +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/operation_test_files/test_operation_19.mal b/examples/visitor/tests/fixtures/operation_test_files/test_operation_19.mal new file mode 100644 index 0000000..5459315 --- /dev/null +++ b/examples/visitor/tests/fixtures/operation_test_files/test_operation_19.mal @@ -0,0 +1,29 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + let targets = windows - linux + } + + abstract asset OperatingSystem + { + | attack + } + asset Windows + { + | attack + } + asset Linux + { + | attack + } +} + +associations +{ + Computer [computers] * <-- L --> 0..1 [linux] Linux + Computer [computers] * <-- L --> 0..1 [windows] Windows +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/operation_test_files/test_operation_2.mal b/examples/visitor/tests/fixtures/operation_test_files/test_operation_2.mal new file mode 100644 index 0000000..2aa5464 --- /dev/null +++ b/examples/visitor/tests/fixtures/operation_test_files/test_operation_2.mal @@ -0,0 +1,29 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + | findWindowsAndLinux + -> (operatingSystems[Windows] /\ operatingSystems[Linux]).attack + } + + abstract asset OperatingSystem + { + | attack + } + asset Windows extends OperatingSystem + { + | foundWindows + } + asset Linux extends OperatingSystem + { + | foundLinux + } +} + +associations +{ + Computer [computers] * <-- L --> 0..1 [operatingSystems] OperatingSystem +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/operation_test_files/test_operation_20.mal b/examples/visitor/tests/fixtures/operation_test_files/test_operation_20.mal new file mode 100644 index 0000000..b525a2c --- /dev/null +++ b/examples/visitor/tests/fixtures/operation_test_files/test_operation_20.mal @@ -0,0 +1,30 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network + { + let allComputers = computers[ThinkPad] - computers[Asus] + | access + -> allComputers().compromise + } + + asset Machine { + | compromise + } + + asset Computer extends Machine { + } + + asset ThinkPad extends Computer { + } + + asset Asus extends Computer { + } +} + +associations +{ + Network [network] 1 <-- L --> * [computers] Computer +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/operation_test_files/test_operation_21.mal b/examples/visitor/tests/fixtures/operation_test_files/test_operation_21.mal new file mode 100644 index 0000000..d49db1f --- /dev/null +++ b/examples/visitor/tests/fixtures/operation_test_files/test_operation_21.mal @@ -0,0 +1,34 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + | do + -> (windows - linux).softwareStep + } + + abstract asset Software { + | softwareStep + } + + abstract asset OperatingSystem extends Software + { + | attack + } + asset Windows extends OperatingSystem + { + | attack + } + asset Linux extends OperatingSystem + { + | attack + } +} + +associations +{ + Computer [computers] * <-- L --> 0..1 [linux] Linux + Computer [computers] * <-- L --> 0..1 [windows] Windows +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/operation_test_files/test_operation_22.mal b/examples/visitor/tests/fixtures/operation_test_files/test_operation_22.mal new file mode 100644 index 0000000..6f1df6c --- /dev/null +++ b/examples/visitor/tests/fixtures/operation_test_files/test_operation_22.mal @@ -0,0 +1,40 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Main + { + | do + -> (((grandchild \/ child) /\ parent) - grandparent).bigAttack + } + + asset Generator { + | bigAttack + } + + asset Grandparent extends Generator { + | attack + } + + asset Parent extends Grandparent + { + | attack + } + asset Child extends Parent + { + | attack + } + asset Grandchild extends Child + { + | attack + } +} + +associations +{ + Main [host] * <-- L --> 0..1 [grandparent] Grandparent + Main [host1] * <-- L --> 0..1 [parent] Parent + Main [host2] * <-- L --> 0..1 [child] Child + Main [host3] * <-- L --> 0..1 [grandchild] Grandchild +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/operation_test_files/test_operation_3.mal b/examples/visitor/tests/fixtures/operation_test_files/test_operation_3.mal new file mode 100644 index 0000000..07a1f61 --- /dev/null +++ b/examples/visitor/tests/fixtures/operation_test_files/test_operation_3.mal @@ -0,0 +1,29 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + | findWindowsAndLinux + -> (computers.operatingSystems[Windows] /\ computers.operatingSystems[Linux]) + } + + abstract asset OperatingSystem + { + | attack + } + asset Windows extends OperatingSystem + { + | foundWindows + } + asset Linux extends OperatingSystem + { + | foundLinux + } +} + +associations +{ + Computer [computers] * <-- L --> 0..1 [operatingSystems] OperatingSystem +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/operation_test_files/test_operation_4.mal b/examples/visitor/tests/fixtures/operation_test_files/test_operation_4.mal new file mode 100644 index 0000000..148eab8 --- /dev/null +++ b/examples/visitor/tests/fixtures/operation_test_files/test_operation_4.mal @@ -0,0 +1,29 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + | findWindowsAndLinux + -> (computers.operatingSystems[Windows] /\ computers.operatingSystems[Linux]).foundWindows + } + + abstract asset OperatingSystem + { + | attack + } + asset Windows extends OperatingSystem + { + | foundWindows + } + asset Linux extends OperatingSystem + { + | foundLinux + } +} + +associations +{ + Computer [computers] * <-- L --> 0..1 [operatingSystems] OperatingSystem +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/operation_test_files/test_operation_5.mal b/examples/visitor/tests/fixtures/operation_test_files/test_operation_5.mal new file mode 100644 index 0000000..64f5647 --- /dev/null +++ b/examples/visitor/tests/fixtures/operation_test_files/test_operation_5.mal @@ -0,0 +1,29 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + let targets = windows /\ linux + } + + abstract asset OperatingSystem + { + | attack + } + asset Windows + { + | attack + } + asset Linux + { + | attack + } +} + +associations +{ + Computer [computers] * <-- L --> 0..1 [linux] Linux + Computer [computers] * <-- L --> 0..1 [windows] Windows +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/operation_test_files/test_operation_6.mal b/examples/visitor/tests/fixtures/operation_test_files/test_operation_6.mal new file mode 100644 index 0000000..a8aaa28 --- /dev/null +++ b/examples/visitor/tests/fixtures/operation_test_files/test_operation_6.mal @@ -0,0 +1,30 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network + { + let allComputers = computers[ThinkPad] \/ computers[Asus] + | access + -> allComputers().compromise + } + + asset Machine { + | compromise + } + + asset Computer extends Machine { + } + + asset ThinkPad extends Computer { + } + + asset Asus extends Computer { + } +} + +associations +{ + Network [network] 1 <-- L --> * [computers] Computer +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/operation_test_files/test_operation_7.mal b/examples/visitor/tests/fixtures/operation_test_files/test_operation_7.mal new file mode 100644 index 0000000..7a892da --- /dev/null +++ b/examples/visitor/tests/fixtures/operation_test_files/test_operation_7.mal @@ -0,0 +1,34 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + | do + -> (windows /\ linux).softwareStep + } + + abstract asset Software { + | softwareStep + } + + abstract asset OperatingSystem extends Software + { + | attack + } + asset Windows extends OperatingSystem + { + | attack + } + asset Linux extends OperatingSystem + { + | attack + } +} + +associations +{ + Computer [computers] * <-- L --> 0..1 [linux] Linux + Computer [computers] * <-- L --> 0..1 [windows] Windows +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/operation_test_files/test_operation_8.mal b/examples/visitor/tests/fixtures/operation_test_files/test_operation_8.mal new file mode 100644 index 0000000..6eea399 --- /dev/null +++ b/examples/visitor/tests/fixtures/operation_test_files/test_operation_8.mal @@ -0,0 +1,30 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + let allTargets = operatingSystems[Windows] \/ operatingSystems[Linux] + | findWindowsAndLinux + -> allTargets().attack + } + + abstract asset OperatingSystem + { + | attack + } + asset Windows extends OperatingSystem + { + | foundWindows + } + asset Linux extends OperatingSystem + { + | foundLinux + } +} + +associations +{ + Computer [computers] * <-- L --> 0..1 [operatingSystems] OperatingSystem +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/operation_test_files/test_operation_9.mal b/examples/visitor/tests/fixtures/operation_test_files/test_operation_9.mal new file mode 100644 index 0000000..07369a4 --- /dev/null +++ b/examples/visitor/tests/fixtures/operation_test_files/test_operation_9.mal @@ -0,0 +1,29 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + | findWindowsAndLinux + -> (operatingSystems[Windows] \/ operatingSystems[Linux]).attack + } + + abstract asset OperatingSystem + { + | attack + } + asset Windows extends OperatingSystem + { + | foundWindows + } + asset Linux extends OperatingSystem + { + | foundLinux + } +} + +associations +{ + Computer [computers] * <-- L --> 0..1 [operatingSystems] OperatingSystem +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_1.mal b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_1.mal new file mode 100644 index 0000000..99f5c39 --- /dev/null +++ b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_1.mal @@ -0,0 +1,9 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem {} + asset Linux extends OperatingSystem { + | login [Gamma(0.2, 0.5) ^ Exponential(0.1)] + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_10.mal b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_10.mal new file mode 100644 index 0000000..279e7a2 --- /dev/null +++ b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_10.mal @@ -0,0 +1,9 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem {} + asset Linux extends OperatingSystem { + | login [Gamma(0, 0.5) / Exponential(0.1)] + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_11.mal b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_11.mal new file mode 100644 index 0000000..a8e4133 --- /dev/null +++ b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_11.mal @@ -0,0 +1,9 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem {} + asset Linux extends OperatingSystem { + | login [Bernoulli(0.2) / Exponential(0.1)] + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_12.mal b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_12.mal new file mode 100644 index 0000000..942fcaf --- /dev/null +++ b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_12.mal @@ -0,0 +1,9 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem {} + asset Linux extends OperatingSystem { + | login [EasyAndUncertain / Exponential(0.1)] + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_13.mal b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_13.mal new file mode 100644 index 0000000..b2a1ef4 --- /dev/null +++ b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_13.mal @@ -0,0 +1,9 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem {} + asset Linux extends OperatingSystem { + | login [Gamma(0.2, 0.5) + Exponential(0.1)] + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_14.mal b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_14.mal new file mode 100644 index 0000000..dcc8155 --- /dev/null +++ b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_14.mal @@ -0,0 +1,9 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem {} + asset Linux extends OperatingSystem { + | login [Gamma(0, 0.5) + Exponential(0.1)] + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_15.mal b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_15.mal new file mode 100644 index 0000000..62a29f4 --- /dev/null +++ b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_15.mal @@ -0,0 +1,9 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem {} + asset Linux extends OperatingSystem { + | login [Bernoulli(0.5) + Exponential(0.1)] + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_16.mal b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_16.mal new file mode 100644 index 0000000..5e50535 --- /dev/null +++ b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_16.mal @@ -0,0 +1,9 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem {} + asset Linux extends OperatingSystem { + | login [Gamma(0.2, 0.5) * Exponential(0.1)] + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_17.mal b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_17.mal new file mode 100644 index 0000000..84d8ea6 --- /dev/null +++ b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_17.mal @@ -0,0 +1,9 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem {} + asset Linux extends OperatingSystem { + | login [Gamma(0, 0.5) * Exponential(0.1)] + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_18.mal b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_18.mal new file mode 100644 index 0000000..32f91ea --- /dev/null +++ b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_18.mal @@ -0,0 +1,9 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem {} + asset Linux extends OperatingSystem { + | login [Bernoulli(0.2) * Exponential(0.1)] + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_19.mal b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_19.mal new file mode 100644 index 0000000..7845870 --- /dev/null +++ b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_19.mal @@ -0,0 +1,9 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem {} + asset Linux extends OperatingSystem { + | login [Bernoulli(0.2) * (Exponential(0.1) + Gamma(0.2, 0.5) / (TruncatedNormal(0.5,0.8) ^ Pareto(0.1,0.1))) - 4 * (Uniform(0.1,0.5) - EasyAndCertain) / Binomial(5, 0.6)] + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_2.mal b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_2.mal new file mode 100644 index 0000000..9c367b2 --- /dev/null +++ b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_2.mal @@ -0,0 +1,9 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem {} + asset Linux extends OperatingSystem { + | login [Gamma(0, 0.2) ^ Exponential(0.1)] + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_20.mal b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_20.mal new file mode 100644 index 0000000..116a52d --- /dev/null +++ b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_20.mal @@ -0,0 +1,9 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem {} + asset Linux extends OperatingSystem { + | login [Bernoulli(0.2) * (Exponential(0.1) ^ (EasyAndCertain + (Bernoulli(0.2) + EasyAndUncertain)) / (VeryHardAndUncertain * VeryHardAndCertain) - Gamma(0.2, 0.77))] + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_21.mal b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_21.mal new file mode 100644 index 0000000..ccebec6 --- /dev/null +++ b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_21.mal @@ -0,0 +1,9 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem {} + asset Linux extends OperatingSystem { + | login [Bernoulli(0.2) * (Exponential(0.1) - (Bernoulli(0.4) * 20 + EasyAndUncertain))] + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_22.mal b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_22.mal new file mode 100644 index 0000000..bae6c0e --- /dev/null +++ b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_22.mal @@ -0,0 +1,12 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem {} + asset Linux extends OperatingSystem { + // WRONG!!! + // | + // v + | login [Bernoulli(0.2) * (Exponential(0.1) / (Gamma(0.5, 0.2) * EasyAndCertain - (LogNormal(0.1, 0.45) ^ 5) * Uniform(0.4, 0.3)))] + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_23.mal b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_23.mal new file mode 100644 index 0000000..c4fd742 --- /dev/null +++ b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_23.mal @@ -0,0 +1,12 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem {} + asset Linux extends OperatingSystem { + // WRONG!!! + // | + // v + | login [Bernoulli(0.2) * (Exponential(0.1) ^ (EasyAndCertain + (Bernoulli(0.2) + EasyAndUncertain)) / (VeryHardAndUncertain * Enabled) - Gamma(0.2, 0.77))] + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_24.mal b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_24.mal new file mode 100644 index 0000000..653c4ff --- /dev/null +++ b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_24.mal @@ -0,0 +1,9 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem {} + asset Linux extends OperatingSystem { + | login [Bernoulli(0.2) * (Exponential(0.1) + Gamma(0.2, 0.5) / (TruncatedNormal(0.5,0.8) ^ Pareto(0.1,0.1))) - 4 * (Uniform(0.1,0.5) - EasyAndCertain) ^ Bernoulli(0.5)] + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_3.mal b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_3.mal new file mode 100644 index 0000000..520626b --- /dev/null +++ b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_3.mal @@ -0,0 +1,9 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem {} + asset Linux extends OperatingSystem { + | login [Bernoulli(0.5) ^ Exponential(0.1)] + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_4.mal b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_4.mal new file mode 100644 index 0000000..ec42f9b --- /dev/null +++ b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_4.mal @@ -0,0 +1,9 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem {} + asset Linux extends OperatingSystem { + | login [EasyAndUncertain ^ Exponential(0.1)] + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_5.mal b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_5.mal new file mode 100644 index 0000000..b2ff2f6 --- /dev/null +++ b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_5.mal @@ -0,0 +1,9 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem {} + asset Linux extends OperatingSystem { + | login [Gamma(0.2, 0.5) - Exponential(0.1)] + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_6.mal b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_6.mal new file mode 100644 index 0000000..b6ac0ee --- /dev/null +++ b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_6.mal @@ -0,0 +1,9 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem {} + asset Linux extends OperatingSystem { + | login [Gamma(0, 0.5) - Exponential(0.1)] + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_7.mal b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_7.mal new file mode 100644 index 0000000..d7a2ba5 --- /dev/null +++ b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_7.mal @@ -0,0 +1,9 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem {} + asset Linux extends OperatingSystem { + | login [Bernoulli(0.5) - Exponential(0.1)] + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_8.mal b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_8.mal new file mode 100644 index 0000000..e8da7c6 --- /dev/null +++ b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_8.mal @@ -0,0 +1,9 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem {} + asset Linux extends OperatingSystem { + | login [EasyAndUncertain - Exponential(0.1)] + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_9.mal b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_9.mal new file mode 100644 index 0000000..1836f22 --- /dev/null +++ b/examples/visitor/tests/fixtures/probability_distributions_test_files/test_probability_distributions_9.mal @@ -0,0 +1,9 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem {} + asset Linux extends OperatingSystem { + | login [Gamma(0.2, 0.5) / Exponential(0.1)] + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/reaches_test_files/test_reaches_1.mal b/examples/visitor/tests/fixtures/reaches_test_files/test_reaches_1.mal new file mode 100644 index 0000000..21cb890 --- /dev/null +++ b/examples/visitor/tests/fixtures/reaches_test_files/test_reaches_1.mal @@ -0,0 +1,34 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + | access + -> hosts.shutDown + } + + asset Machine { + | machineStep + } + + asset Computer extends Machine + { + | shutDown + } + + asset Server extends Machine + { + | overwhelm + } + + asset Lenovo extends Computer { + | lenovoStep + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Network [network] 1 <-- L --> * [servers] Server +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/reaches_test_files/test_reaches_2.mal b/examples/visitor/tests/fixtures/reaches_test_files/test_reaches_2.mal new file mode 100644 index 0000000..274e4cf --- /dev/null +++ b/examples/visitor/tests/fixtures/reaches_test_files/test_reaches_2.mal @@ -0,0 +1,41 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + | access + -> hosts.shutDown, + servers.overwhelm, + routers.dropAllPackets + } + + asset Machine { + | machineStep + } + + asset Computer extends Machine + { + | shutDown + } + + asset Server extends Machine + { + | overwhelm + } + + asset Router extends Machine { + | dropAllPackets + } + + asset Lenovo extends Computer { + | lenovoStep + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Network [network] 1 <-- L --> * [servers] Server + Network [network] 1 <-- L --> * [routers] Router +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/reaches_test_files/test_reaches_3.mal b/examples/visitor/tests/fixtures/reaches_test_files/test_reaches_3.mal new file mode 100644 index 0000000..40a2c59 --- /dev/null +++ b/examples/visitor/tests/fixtures/reaches_test_files/test_reaches_3.mal @@ -0,0 +1,41 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + | access + -> hosts.shutDown, + servers.WRONG_ATTACK_STEP, // <- WRONG!!! + routers.dropAllPackets + } + + asset Machine { + | machineStep + } + + asset Computer extends Machine + { + | shutDown + } + + asset Server extends Machine + { + | overwhelm + } + + asset Router extends Machine { + | dropAllPackets + } + + asset Lenovo extends Computer { + | lenovoStep + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Network [network] 1 <-- L --> * [servers] Server + Network [network] 1 <-- L --> * [routers] Router +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/reaches_test_files/test_reaches_4.mal b/examples/visitor/tests/fixtures/reaches_test_files/test_reaches_4.mal new file mode 100644 index 0000000..7396cb5 --- /dev/null +++ b/examples/visitor/tests/fixtures/reaches_test_files/test_reaches_4.mal @@ -0,0 +1,41 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + | access + -> hosts.shutDown, + servers.machineStep, + routers.dropAllPackets + } + + asset Machine { + | machineStep + } + + asset Computer extends Machine + { + | shutDown + } + + asset Server extends Machine + { + | overwhelm + } + + asset Router extends Machine { + | dropAllPackets + } + + asset Lenovo extends Computer { + | lenovoStep + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Network [network] 1 <-- L --> * [servers] Server + Network [network] 1 <-- L --> * [routers] Router +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/reaches_test_files/test_reaches_5.mal b/examples/visitor/tests/fixtures/reaches_test_files/test_reaches_5.mal new file mode 100644 index 0000000..30add68 --- /dev/null +++ b/examples/visitor/tests/fixtures/reaches_test_files/test_reaches_5.mal @@ -0,0 +1,41 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + | access + -> servers.overwhelm, + hosts.lenovoStep, + routers.dropAllPackets + } + + asset Machine { + | machineStep + } + + asset Computer extends Machine + { + | shutDown + } + + asset Server extends Machine + { + | overwhelm + } + + asset Router extends Machine { + | dropAllPackets + } + + asset Lenovo extends Computer { + | lenovoStep + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Network [network] 1 <-- L --> * [servers] Server + Network [network] 1 <-- L --> * [routers] Router +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/reaches_test_files/test_reaches_6.mal b/examples/visitor/tests/fixtures/reaches_test_files/test_reaches_6.mal new file mode 100644 index 0000000..b797672 --- /dev/null +++ b/examples/visitor/tests/fixtures/reaches_test_files/test_reaches_6.mal @@ -0,0 +1,41 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + | access + -> hosts.shutDown, + servers.overwhelm, + routers + } + + asset Machine { + | machineStep + } + + asset Computer extends Machine + { + | shutDown + } + + asset Server extends Machine + { + | overwhelm + } + + asset Router extends Machine { + | dropAllPackets + } + + asset Lenovo extends Computer { + | lenovoStep + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Network [network] 1 <-- L --> * [servers] Server + Network [network] 1 <-- L --> * [routers] Router +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/require_test_files/test_require_1.mal b/examples/visitor/tests/fixtures/require_test_files/test_require_1.mal new file mode 100644 index 0000000..9bd593e --- /dev/null +++ b/examples/visitor/tests/fixtures/require_test_files/test_require_1.mal @@ -0,0 +1,21 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 + { + E step1 + <- a3 + -> step + !E step2 + <- a2 + | step + } + asset Asset2 {} + asset Asset3 {} +} +associations { + Asset1 [a1] * <-- connects --> * [a3] Asset3 + Asset1 [a1] * <-- connects --> * [a2] Asset2 +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/require_test_files/test_require_2.mal b/examples/visitor/tests/fixtures/require_test_files/test_require_2.mal new file mode 100644 index 0000000..2fc0839 --- /dev/null +++ b/examples/visitor/tests/fixtures/require_test_files/test_require_2.mal @@ -0,0 +1,19 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 + { + E step1 + <- a3, a2 + -> step + | step + } + asset Asset2 {} + asset Asset3 {} +} +associations { + Asset1 [a1] * <-- connects --> * [a3] Asset3 + Asset1 [a1] * <-- connects --> * [a2] Asset2 +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/require_test_files/test_require_3.mal b/examples/visitor/tests/fixtures/require_test_files/test_require_3.mal new file mode 100644 index 0000000..4042f63 --- /dev/null +++ b/examples/visitor/tests/fixtures/require_test_files/test_require_3.mal @@ -0,0 +1,20 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 + { + E step1 + <- a3, + a4 // <- WRONG!!! + -> step + | step + } + asset Asset2 {} + asset Asset3 {} +} +associations { + Asset1 [a1] * <-- connects --> * [a3] Asset3 + Asset1 [a1] * <-- connects --> * [a2] Asset2 +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/require_test_files/test_require_4.mal b/examples/visitor/tests/fixtures/require_test_files/test_require_4.mal new file mode 100644 index 0000000..e94d13f --- /dev/null +++ b/examples/visitor/tests/fixtures/require_test_files/test_require_4.mal @@ -0,0 +1,23 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset0 { + | randomStep + } + + asset Asset1 extends Asset0 + { + E step1 + <- a3, + a2 + -> step + | step + } + asset Asset2 {} + asset Asset3 {} +} +associations { + Asset1 [a1] * <-- connects --> * [a3] Asset3 + Asset0 [a0] * <-- connects --> * [a2] Asset2 +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/require_test_files/test_require_5.mal b/examples/visitor/tests/fixtures/require_test_files/test_require_5.mal new file mode 100644 index 0000000..6c06d8c --- /dev/null +++ b/examples/visitor/tests/fixtures/require_test_files/test_require_5.mal @@ -0,0 +1,23 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset0 extends Asset1 { + | randomStep + } + + asset Asset1 + { + E step1 + <- a3, + a2 + -> step + | step + } + asset Asset2 {} + asset Asset3 {} +} +associations { + Asset1 [a1] * <-- connects --> * [a3] Asset3 + Asset0 [a0] * <-- connects --> * [a2] Asset2 +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/require_test_files/test_require_6.mal b/examples/visitor/tests/fixtures/require_test_files/test_require_6.mal new file mode 100644 index 0000000..6f9adfc --- /dev/null +++ b/examples/visitor/tests/fixtures/require_test_files/test_require_6.mal @@ -0,0 +1,21 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 + { + E step1 + <- a3, a2.asset2_Step // <- WRONG!!! + -> step + | step + } + asset Asset2 { + | asset2_Step + } + asset Asset3 {} +} +associations { + Asset1 [a1] * <-- connects --> * [a3] Asset3 + Asset1 [a1] * <-- connects --> * [a2] Asset2 +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/require_test_files/test_require_7.mal b/examples/visitor/tests/fixtures/require_test_files/test_require_7.mal new file mode 100644 index 0000000..ea8a1ca --- /dev/null +++ b/examples/visitor/tests/fixtures/require_test_files/test_require_7.mal @@ -0,0 +1,84 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + let thisNetworkHosts = hosts + E access + <- thisNetworkHosts().(operatingSystems[Windows] \/ operatingSystems[Linux] - operatingSystems[WindowsVista]).fileSystems.folders.subfolders*.(configfiles /\ nonrootfiles) + -> hosts.shutDown + } + + asset Computer + { + | shutDown + } + + asset OperatingSystem + { + | attack + } + + asset Linux extends OperatingSystem + { + | linuxStep + } + + asset Windows extends OperatingSystem + { + | windowsStep + } + + asset WindowsVista extends Windows + { + | windowsVistaStep + } + + asset FileSystem + { + | compromise + } + + asset Folder + { + | folderStep + } + + asset SubFolder extends Folder + { + | subFolderStep + } + + asset File + { + | open + } + + asset ConfigFile extends File + { + | openConfigFile + } + + asset RootFile extends File + { + | openRootFile + } + + asset NonRootFile extends File + { + | openNonRootFile + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Computer [computer] 1 <-- L --> * [operatingSystems] OperatingSystem + OperatingSystem [os] 1 <-- L --> 1..* [fileSystems] FileSystem + FileSystem [fs] 1 <-- L --> * [folders] Folder + Folder [parent] 1 <-- L --> * [subfolders] SubFolder + SubFolder [location] 1 <-- L --> * [configfiles] ConfigFile + SubFolder [location] 1 <-- L --> * [rootfiles] RootFile + SubFolder [location] 1 <-- L --> * [nonrootfiles] NonRootFile +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/risk_type_test_files/test_risk_type_1.mal b/examples/visitor/tests/fixtures/risk_type_test_files/test_risk_type_1.mal new file mode 100644 index 0000000..08c6b85 --- /dev/null +++ b/examples/visitor/tests/fixtures/risk_type_test_files/test_risk_type_1.mal @@ -0,0 +1,13 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset CIA_TEST + { + | readOnly {C} + | readAndAppend {C, I} + | appendAndRead {I, C} + | fullAccess {C, I, A} + } +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/risk_type_test_files/test_risk_type_2.mal b/examples/visitor/tests/fixtures/risk_type_test_files/test_risk_type_2.mal new file mode 100644 index 0000000..1cb5636 --- /dev/null +++ b/examples/visitor/tests/fixtures/risk_type_test_files/test_risk_type_2.mal @@ -0,0 +1,12 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset CIA_TEST + { + | readOnly {C} + | readAndAppend {C, I, I} + | fullAccess {C, I, A} + } +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/risk_type_test_files/test_risk_type_3.mal b/examples/visitor/tests/fixtures/risk_type_test_files/test_risk_type_3.mal new file mode 100644 index 0000000..923eeff --- /dev/null +++ b/examples/visitor/tests/fixtures/risk_type_test_files/test_risk_type_3.mal @@ -0,0 +1,18 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset CIA_TEST + { + E step {C} + <- mock + } + + asset Mock { + } +} + +association { + CIA_TEST [test] 1 <-- L --> 1 [mock] Mock +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/risk_type_test_files/test_risk_type_4.mal b/examples/visitor/tests/fixtures/risk_type_test_files/test_risk_type_4.mal new file mode 100644 index 0000000..682572b --- /dev/null +++ b/examples/visitor/tests/fixtures/risk_type_test_files/test_risk_type_4.mal @@ -0,0 +1,17 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset CIA_TEST + { + # step {C} + } + + asset Mock { + } +} + +association { + CIA_TEST [test] 1 <-- L --> 1 [mock] Mock +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/step_test_files/test_step_1.mal b/examples/visitor/tests/fixtures/step_test_files/test_step_1.mal new file mode 100644 index 0000000..0f93afe --- /dev/null +++ b/examples/visitor/tests/fixtures/step_test_files/test_step_1.mal @@ -0,0 +1,12 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Test + { + | step1 + | step2 + | step3 + } +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/step_test_files/test_step_2.mal b/examples/visitor/tests/fixtures/step_test_files/test_step_2.mal new file mode 100644 index 0000000..4bfc003 --- /dev/null +++ b/examples/visitor/tests/fixtures/step_test_files/test_step_2.mal @@ -0,0 +1,11 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Test + { + | step1 + & step1 + } +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/step_test_files/test_step_3.mal b/examples/visitor/tests/fixtures/step_test_files/test_step_3.mal new file mode 100644 index 0000000..55682cd --- /dev/null +++ b/examples/visitor/tests/fixtures/step_test_files/test_step_3.mal @@ -0,0 +1,11 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Test + { + | step1 + | step1 + } +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/step_test_files/test_step_4.mal b/examples/visitor/tests/fixtures/step_test_files/test_step_4.mal new file mode 100644 index 0000000..f5f8dd1 --- /dev/null +++ b/examples/visitor/tests/fixtures/step_test_files/test_step_4.mal @@ -0,0 +1,14 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Test + { + | step1 + -> step3 + | step2 + -> step3 + | step3 + } +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/step_test_files/test_step_5.mal b/examples/visitor/tests/fixtures/step_test_files/test_step_5.mal new file mode 100644 index 0000000..8b033f9 --- /dev/null +++ b/examples/visitor/tests/fixtures/step_test_files/test_step_5.mal @@ -0,0 +1,14 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Test + { + | step1 + } + asset AnotherTest + { + | step1 + } +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/steps_test_files/test_steps_1.mal b/examples/visitor/tests/fixtures/steps_test_files/test_steps_1.mal new file mode 100644 index 0000000..7170848 --- /dev/null +++ b/examples/visitor/tests/fixtures/steps_test_files/test_steps_1.mal @@ -0,0 +1,14 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Test + { + | guessPassword + -> authenticate + | stealPassword + -> authenticate + | authenticate + } +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/steps_test_files/test_steps_10.mal b/examples/visitor/tests/fixtures/steps_test_files/test_steps_10.mal new file mode 100644 index 0000000..23ddf3e --- /dev/null +++ b/examples/visitor/tests/fixtures/steps_test_files/test_steps_10.mal @@ -0,0 +1,18 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Machine { + | compromise + } + + asset Computer extends Machine { + | stealCredentials + } + + asset Thinkpad extends Computer { + & compromise + +> shutDown + & shutDown + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/steps_test_files/test_steps_11.mal b/examples/visitor/tests/fixtures/steps_test_files/test_steps_11.mal new file mode 100644 index 0000000..494c838 --- /dev/null +++ b/examples/visitor/tests/fixtures/steps_test_files/test_steps_11.mal @@ -0,0 +1,15 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem + { + | spyware + } + + asset Linux + { + & spyware + } +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/steps_test_files/test_steps_12.mal b/examples/visitor/tests/fixtures/steps_test_files/test_steps_12.mal new file mode 100644 index 0000000..dedd301 --- /dev/null +++ b/examples/visitor/tests/fixtures/steps_test_files/test_steps_12.mal @@ -0,0 +1,13 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +include "test_steps_12_aux2.mal" + +category System { + asset Thinkpad extends Computer { + | compromise + +> logIn + & logIn + } +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/steps_test_files/test_steps_12_aux1.mal b/examples/visitor/tests/fixtures/steps_test_files/test_steps_12_aux1.mal new file mode 100644 index 0000000..2b162c1 --- /dev/null +++ b/examples/visitor/tests/fixtures/steps_test_files/test_steps_12_aux1.mal @@ -0,0 +1,5 @@ +category System { + asset Machine { + | compromise + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/steps_test_files/test_steps_12_aux2.mal b/examples/visitor/tests/fixtures/steps_test_files/test_steps_12_aux2.mal new file mode 100644 index 0000000..30603d7 --- /dev/null +++ b/examples/visitor/tests/fixtures/steps_test_files/test_steps_12_aux2.mal @@ -0,0 +1,6 @@ +include "test_steps_12_aux1.mal" +category System { + asset Computer extends Machine { + & logKeyStrokes + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/steps_test_files/test_steps_13.mal b/examples/visitor/tests/fixtures/steps_test_files/test_steps_13.mal new file mode 100644 index 0000000..7f13138 --- /dev/null +++ b/examples/visitor/tests/fixtures/steps_test_files/test_steps_13.mal @@ -0,0 +1,13 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +include "test_steps_13_aux2.mal" + +category System { + asset Thinkpad extends Computer { + & compromise + +> logIn + & logIn + } +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/steps_test_files/test_steps_13_aux1.mal b/examples/visitor/tests/fixtures/steps_test_files/test_steps_13_aux1.mal new file mode 100644 index 0000000..2b162c1 --- /dev/null +++ b/examples/visitor/tests/fixtures/steps_test_files/test_steps_13_aux1.mal @@ -0,0 +1,5 @@ +category System { + asset Machine { + | compromise + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/steps_test_files/test_steps_13_aux2.mal b/examples/visitor/tests/fixtures/steps_test_files/test_steps_13_aux2.mal new file mode 100644 index 0000000..6921b8b --- /dev/null +++ b/examples/visitor/tests/fixtures/steps_test_files/test_steps_13_aux2.mal @@ -0,0 +1,6 @@ +include "test_steps_13_aux1.mal" +category System { + asset Computer extends Machine { + & logKeyStrokes + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/steps_test_files/test_steps_14.mal b/examples/visitor/tests/fixtures/steps_test_files/test_steps_14.mal new file mode 100644 index 0000000..c72203a --- /dev/null +++ b/examples/visitor/tests/fixtures/steps_test_files/test_steps_14.mal @@ -0,0 +1,26 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + + +category System { + asset Asset1 { + | step1 + } + + asset Asset2 extends Asset1 { + | step2 + } + + asset Asset3 extends Asset2 { + | step3 + } + + asset Asset4 extends Asset3 { + | step4 + } +} + +associations +{ +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/steps_test_files/test_steps_15.mal b/examples/visitor/tests/fixtures/steps_test_files/test_steps_15.mal new file mode 100644 index 0000000..38d30ec --- /dev/null +++ b/examples/visitor/tests/fixtures/steps_test_files/test_steps_15.mal @@ -0,0 +1,21 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + + +category System { + asset Linux { + E hasCamera + <- hardware[Camera] + -> hijackCamera + | hijackCamera + } + asset Camera { + | photo + } +} + +associations +{ + Linux [linux] * <-- L --> * [hardware] Camera +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/steps_test_files/test_steps_2.mal b/examples/visitor/tests/fixtures/steps_test_files/test_steps_2.mal new file mode 100644 index 0000000..a24c161 --- /dev/null +++ b/examples/visitor/tests/fixtures/steps_test_files/test_steps_2.mal @@ -0,0 +1,12 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Linux + { + | spyware + +> readBashHistory + & readBashHistory + } +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/steps_test_files/test_steps_3.mal b/examples/visitor/tests/fixtures/steps_test_files/test_steps_3.mal new file mode 100644 index 0000000..5e6b65a --- /dev/null +++ b/examples/visitor/tests/fixtures/steps_test_files/test_steps_3.mal @@ -0,0 +1,19 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem + { + | spyware + -> logKeystrokes + | logKeystrokes + } + + asset Linux + { + | spyware + +> readBashHistory + & readBashHistory + } +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/steps_test_files/test_steps_4.mal b/examples/visitor/tests/fixtures/steps_test_files/test_steps_4.mal new file mode 100644 index 0000000..61e5de2 --- /dev/null +++ b/examples/visitor/tests/fixtures/steps_test_files/test_steps_4.mal @@ -0,0 +1,17 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem + { + | spyware + } + + asset Linux + { + & logIn + -> access + & access + } +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/steps_test_files/test_steps_5.mal b/examples/visitor/tests/fixtures/steps_test_files/test_steps_5.mal new file mode 100644 index 0000000..c100a74 --- /dev/null +++ b/examples/visitor/tests/fixtures/steps_test_files/test_steps_5.mal @@ -0,0 +1,15 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem + { + & spyware + } + + asset Linux extends OperatingSystem + { + | spyware + } +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/steps_test_files/test_steps_6.mal b/examples/visitor/tests/fixtures/steps_test_files/test_steps_6.mal new file mode 100644 index 0000000..b1aee76 --- /dev/null +++ b/examples/visitor/tests/fixtures/steps_test_files/test_steps_6.mal @@ -0,0 +1,15 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset OperatingSystem + { + | spyware + } + + asset Linux extends OperatingSystem + { + & spyware + } +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/steps_test_files/test_steps_7.mal b/examples/visitor/tests/fixtures/steps_test_files/test_steps_7.mal new file mode 100644 index 0000000..5fddb04 --- /dev/null +++ b/examples/visitor/tests/fixtures/steps_test_files/test_steps_7.mal @@ -0,0 +1,24 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + E compromiseCamera + <- camera + } + + asset ThinkPad extends Computer + { + !E compromiseCamera + <- camera + } + + asset Camera { + | turnOn + } +} + +associations { + Computer [computer] 1 <-- CameraUsage --> 1 [camera] Camera +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/steps_test_files/test_steps_8.mal b/examples/visitor/tests/fixtures/steps_test_files/test_steps_8.mal new file mode 100644 index 0000000..834d113 --- /dev/null +++ b/examples/visitor/tests/fixtures/steps_test_files/test_steps_8.mal @@ -0,0 +1,25 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + !E noCamera + <- camera + } + + asset ThinkPad extends Computer + { + E noCamera + <- camera + } + + asset Camera { + | turnOn + } +} + +associations { + Computer [computer] 1 <-- CameraUsage --> 1 [camera] Camera +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/steps_test_files/test_steps_9.mal b/examples/visitor/tests/fixtures/steps_test_files/test_steps_9.mal new file mode 100644 index 0000000..5fc2333 --- /dev/null +++ b/examples/visitor/tests/fixtures/steps_test_files/test_steps_9.mal @@ -0,0 +1,18 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Machine { + | compromise + } + + asset Computer extends Machine { + | stealCredentials + } + + asset Thinkpad extends Computer { + | compromise + +> shutDown + & shutDown + } +} diff --git a/examples/visitor/tests/fixtures/substitution_test_files/test_substitution_1.mal b/examples/visitor/tests/fixtures/substitution_test_files/test_substitution_1.mal new file mode 100644 index 0000000..751116c --- /dev/null +++ b/examples/visitor/tests/fixtures/substitution_test_files/test_substitution_1.mal @@ -0,0 +1,27 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + let hostsOperatingSystems = hosts.operatingSystems + | access + -> hostsOperatingSystems().attack + } + + asset Computer + { + | shutDown + } + + asset OperatingSystem + { + | attack + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Computer [computer] 1 <-- L --> * [operatingSystems] OperatingSystem +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/substitution_test_files/test_substitution_2.mal b/examples/visitor/tests/fixtures/substitution_test_files/test_substitution_2.mal new file mode 100644 index 0000000..896ae87 --- /dev/null +++ b/examples/visitor/tests/fixtures/substitution_test_files/test_substitution_2.mal @@ -0,0 +1,30 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + // COMMENTED + // | + // v + // let hostsOperatingSystems = hosts.operatingSystems + | access + -> hostsOperatingSystems().attack + } + + asset Computer + { + | shutDown + } + + asset OperatingSystem + { + | attack + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Computer [computer] 1 <-- L --> * [operatingSystems] OperatingSystem +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/substitution_test_files/test_substitution_3.mal b/examples/visitor/tests/fixtures/substitution_test_files/test_substitution_3.mal new file mode 100644 index 0000000..1f856f2 --- /dev/null +++ b/examples/visitor/tests/fixtures/substitution_test_files/test_substitution_3.mal @@ -0,0 +1,27 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + let hostsOperatingSystems = hosts.operatingSystems + | access + -> hostsOperatingSystems.attack + } + + asset Computer + { + | shutDown + } + + asset OperatingSystem + { + | attack + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Computer [computer] 1 <-- L --> * [operatingSystems] OperatingSystem +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/substitution_test_files/test_substitution_4.mal b/examples/visitor/tests/fixtures/substitution_test_files/test_substitution_4.mal new file mode 100644 index 0000000..a2edf04 --- /dev/null +++ b/examples/visitor/tests/fixtures/substitution_test_files/test_substitution_4.mal @@ -0,0 +1,31 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + let hostsOperatingSystems = hosts.operatingSystems + | access + } + + asset SubNet extends Network { + | accessParent + -> hostsOperatingSystems().attack + } + + asset Computer + { + | shutDown + } + + asset OperatingSystem + { + | attack + } +} + +associations +{ + Network [network] 1 <-- L --> * [hosts] Computer + Computer [computer] 1 <-- L --> * [operatingSystems] OperatingSystem +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/substitution_test_files/test_substitution_5.mal b/examples/visitor/tests/fixtures/substitution_test_files/test_substitution_5.mal new file mode 100644 index 0000000..785fbf5 --- /dev/null +++ b/examples/visitor/tests/fixtures/substitution_test_files/test_substitution_5.mal @@ -0,0 +1,33 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Hardware { + | overHeat + } + asset Machine { + let hardwareComponents = components + | access + } + + asset Computer extends Machine { + | turnOff + } + + asset Lenovo extends Computer + { + | shutDown + } + + asset LenovoThinkPad extends Lenovo + { + | attack + -> hardwareComponents().overHeat + } +} + +associations +{ + Machine [host] 1 <-- L --> * [components] Hardware +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/substitution_test_files/test_substitution_6.mal b/examples/visitor/tests/fixtures/substitution_test_files/test_substitution_6.mal new file mode 100644 index 0000000..b68ba50 --- /dev/null +++ b/examples/visitor/tests/fixtures/substitution_test_files/test_substitution_6.mal @@ -0,0 +1,32 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Network { + | accessChild + -> hostsOperatingSystems().attack + } + + asset SubNet extends Network { + let hostsOperatingSystems = hosts.operatingSystems + | acces + -> hostsOperatingSystems().attack + } + + asset Computer + { + | shutDown + } + + asset OperatingSystem + { + | attack + } +} + +associations +{ + SubNet [network] 1 <-- L --> * [hosts] Computer + Computer [computer] 1 <-- L --> * [operatingSystems] OperatingSystem +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/substitution_test_files/test_substitution_7.mal b/examples/visitor/tests/fixtures/substitution_test_files/test_substitution_7.mal new file mode 100644 index 0000000..851f956 --- /dev/null +++ b/examples/visitor/tests/fixtures/substitution_test_files/test_substitution_7.mal @@ -0,0 +1,24 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Hardware { + let physicalComponents = components + | overHeat + } + + asset PhysicalComponent { + | destroy + } + + asset Computer { + | attack + -> physicalComponents().destroy + } +} + +associations +{ + Hardware [host] 1 <-- L --> * [components] PhysicalComponent +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/subtype_test_files/test_subtype_1.mal b/examples/visitor/tests/fixtures/subtype_test_files/test_subtype_1.mal new file mode 100644 index 0000000..48f8312 --- /dev/null +++ b/examples/visitor/tests/fixtures/subtype_test_files/test_subtype_1.mal @@ -0,0 +1,28 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + let windowsOSes = operatingSystems[Windows] + } + + abstract asset OperatingSystem + { + | attack + } + asset Windows extends OperatingSystem + { + | foundWindows + } + asset Linux extends OperatingSystem + { + | foundLinux + } +} + +associations +{ + Computer [computers] * <-- L --> 0..1 [operatingSystems] OperatingSystem +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/subtype_test_files/test_subtype_2.mal b/examples/visitor/tests/fixtures/subtype_test_files/test_subtype_2.mal new file mode 100644 index 0000000..866ff42 --- /dev/null +++ b/examples/visitor/tests/fixtures/subtype_test_files/test_subtype_2.mal @@ -0,0 +1,29 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + | attack + -> operatingSystems[Windows].foundWindows + } + + abstract asset OperatingSystem + { + | attack + } + asset Windows extends OperatingSystem + { + | foundWindows + } + asset Linux extends OperatingSystem + { + | foundLinux + } +} + +associations +{ + Computer [computers] * <-- L --> 0..1 [operatingSystems] OperatingSystem +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/subtype_test_files/test_subtype_3.mal b/examples/visitor/tests/fixtures/subtype_test_files/test_subtype_3.mal new file mode 100644 index 0000000..f8d5f42 --- /dev/null +++ b/examples/visitor/tests/fixtures/subtype_test_files/test_subtype_3.mal @@ -0,0 +1,32 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + | attack + -> operatingSystems[Windows].foundWindows + } + + abstract asset OperatingSystem + { + | attack + } + // COMMENTED + // | + // v + asset Windows // extends OperatingSystem + { + | foundWindows + } + asset Linux extends OperatingSystem + { + | foundLinux + } +} + +associations +{ + Computer [computers] * <-- L --> 0..1 [operatingSystems] OperatingSystem +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/subtype_test_files/test_subtype_4.mal b/examples/visitor/tests/fixtures/subtype_test_files/test_subtype_4.mal new file mode 100644 index 0000000..0b23f88 --- /dev/null +++ b/examples/visitor/tests/fixtures/subtype_test_files/test_subtype_4.mal @@ -0,0 +1,29 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + | attack + -> operatingSystems[Windows].foundLinux + } + + abstract asset OperatingSystem + { + | attack + } + asset Windows extends OperatingSystem + { + | foundWindows + } + asset Linux extends OperatingSystem + { + | foundLinux + } +} + +associations +{ + Computer [computers] * <-- L --> 0..1 [operatingSystems] OperatingSystem +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/subtype_test_files/test_subtype_5.mal b/examples/visitor/tests/fixtures/subtype_test_files/test_subtype_5.mal new file mode 100644 index 0000000..1b774b1 --- /dev/null +++ b/examples/visitor/tests/fixtures/subtype_test_files/test_subtype_5.mal @@ -0,0 +1,30 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + | attack + -> operatingSystems[WindowsVistaProfessional].foundWindowsVistaProfessional + } + + abstract asset OperatingSystem + { + | attack + } + asset Windows extends OperatingSystem + { + | foundWindows + } + asset WindowsVista extends Windows { + } + asset WindowsVistaProfessional extends WindowsVista { + | foundWindowsVistaProfessional + } +} + +associations +{ + Computer [computers] * <-- L --> 0..1 [operatingSystems] OperatingSystem +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/transitive_test_files/test_transitive_1.mal b/examples/visitor/tests/fixtures/transitive_test_files/test_transitive_1.mal new file mode 100644 index 0000000..8c90d7c --- /dev/null +++ b/examples/visitor/tests/fixtures/transitive_test_files/test_transitive_1.mal @@ -0,0 +1,26 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + | openAllSubFolders + -> folders.subFolder*.access + } + + asset Folder + { + } + + asset SubFolder extends Folder + { + | access + } +} + +associations +{ + Computer [host] * <-- L --> 0..1 [folders] Folder + Folder [parent] 1 <-- L --> 0..* [subFolder] SubFolder +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/transitive_test_files/test_transitive_2.mal b/examples/visitor/tests/fixtures/transitive_test_files/test_transitive_2.mal new file mode 100644 index 0000000..ba9436a --- /dev/null +++ b/examples/visitor/tests/fixtures/transitive_test_files/test_transitive_2.mal @@ -0,0 +1,27 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + let recursive_subfolders = folders.subFolder* + | openAllSubFolders + -> recursive_subfolders().access + } + + asset Folder + { + } + + asset SubFolder extends Folder + { + | access + } +} + +associations +{ + Computer [host] * <-- L --> 0..1 [folders] Folder + Folder [parent] 1 <-- L --> 0..* [subFolder] SubFolder +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/transitive_test_files/test_transitive_3.mal b/examples/visitor/tests/fixtures/transitive_test_files/test_transitive_3.mal new file mode 100644 index 0000000..7a93444 --- /dev/null +++ b/examples/visitor/tests/fixtures/transitive_test_files/test_transitive_3.mal @@ -0,0 +1,30 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + let recursive_subfolders = folders.subFolder* + | openAllSubFolders + -> recursive_subfolders().access + } + + asset Folder + { + } + + // COMMENTED + // | + // v + asset SubFolder // extends Folder + { + | access + } +} + +associations +{ + Computer [host] * <-- L --> 0..1 [folders] Folder + Folder [parent] 1 <-- L --> 0..* [subFolder] SubFolder +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/transitive_test_files/test_transitive_4.mal b/examples/visitor/tests/fixtures/transitive_test_files/test_transitive_4.mal new file mode 100644 index 0000000..eaad6de --- /dev/null +++ b/examples/visitor/tests/fixtures/transitive_test_files/test_transitive_4.mal @@ -0,0 +1,35 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + let recursive_subfolders = fileSystem.fileSystemEntries.folders.subFolder* + | openAllSubFolders + -> recursive_subfolders().access + } + + asset FileSystem { + } + + asset FileSystemEntries { + } + + asset Folder + { + } + + asset SubFolder extends Folder + { + | access + } +} + +associations +{ + Computer [host] * <-- L --> 0..1 [fileSystem] FileSystem + FileSystem [host] * <-- L --> 0..1 [fileSystemEntries] FileSystemEntries + Folder [folders] * <-- L --> 0..1 [holder] FileSystemEntries + Folder [parent] 1 <-- L --> 0..* [subFolder] SubFolder +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/transitive_test_files/test_transitive_5.mal b/examples/visitor/tests/fixtures/transitive_test_files/test_transitive_5.mal new file mode 100644 index 0000000..90240b3 --- /dev/null +++ b/examples/visitor/tests/fixtures/transitive_test_files/test_transitive_5.mal @@ -0,0 +1,27 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Computer + { + let recursive_subfolders = folders.subFolder* + | openAllSubFolders + -> recursive_subfolders().wrongStep + } + + asset Folder + { + } + + asset SubFolder extends Folder + { + | access + } +} + +associations +{ + Computer [host] * <-- L --> 0..1 [folders] Folder + Folder [parent] 1 <-- L --> 0..* [subFolder] SubFolder +} + \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_1.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_1.mal new file mode 100644 index 0000000..95ecded --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_1.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + # test [Bernoulli(0.2)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_10.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_10.mal new file mode 100644 index 0000000..8f4bf76 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_10.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Exponential(4, 5)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_11.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_11.mal new file mode 100644 index 0000000..fdc95e8 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_11.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Exponential()] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_12.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_12.mal new file mode 100644 index 0000000..4d2e4e2 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_12.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Exponential(0)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_13.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_13.mal new file mode 100644 index 0000000..4ed2909 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_13.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Gamma(0.1, 0.5)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_14.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_14.mal new file mode 100644 index 0000000..22f2464 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_14.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Gamma(0.1, 0.5, 0.10)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_15.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_15.mal new file mode 100644 index 0000000..fac3dd7 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_15.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Gamma(0.1)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_16.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_16.mal new file mode 100644 index 0000000..da000eb --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_16.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Gamma(0, 0.2)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_17.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_17.mal new file mode 100644 index 0000000..0b3affb --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_17.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Gamma(0.2, 0)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_18.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_18.mal new file mode 100644 index 0000000..5a0fdee --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_18.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [LogNormal(0.1, 0.5)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_19.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_19.mal new file mode 100644 index 0000000..b03ced4 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_19.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [LogNormal(0.1, 0.5, 0.10)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_2.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_2.mal new file mode 100644 index 0000000..3d8f104 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_2.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + # test [Bernoulli(0.2, 0.33)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_20.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_20.mal new file mode 100644 index 0000000..95dd927 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_20.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [LogNormal()] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_21.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_21.mal new file mode 100644 index 0000000..90b5b23 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_21.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [LogNormal(0.5, 0)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_22.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_22.mal new file mode 100644 index 0000000..91033a5 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_22.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Pareto(0.1, 0.2)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_23.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_23.mal new file mode 100644 index 0000000..feec462 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_23.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Pareto(0.1, 0.2, 0.3)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_24.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_24.mal new file mode 100644 index 0000000..0b37f15 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_24.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Pareto(0.1)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_25.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_25.mal new file mode 100644 index 0000000..ac0f903 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_25.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Pareto(0, 0.2)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_26.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_26.mal new file mode 100644 index 0000000..91c338e --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_26.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Pareto(0.1, 0)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_27.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_27.mal new file mode 100644 index 0000000..8fab6df --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_27.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [TruncatedNormal(2.6, 0.2)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_28.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_28.mal new file mode 100644 index 0000000..57eb782 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_28.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [TruncatedNormal(2.6, 0.2, 0.6)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_29.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_29.mal new file mode 100644 index 0000000..3f8f1a1 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_29.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [TruncatedNormal()] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_3.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_3.mal new file mode 100644 index 0000000..e742349 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_3.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + # test [Bernoulli()] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_30.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_30.mal new file mode 100644 index 0000000..a773add --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_30.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [TruncatedNormal(2.6, 0)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_31.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_31.mal new file mode 100644 index 0000000..2256cd5 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_31.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Uniform(2,3)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_32.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_32.mal new file mode 100644 index 0000000..91f1301 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_32.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Uniform(2,3,4)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_33.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_33.mal new file mode 100644 index 0000000..86d78ab --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_33.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Uniform(2)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_34.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_34.mal new file mode 100644 index 0000000..aa236bd --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_34.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Uniform(5,4)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_35.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_35.mal new file mode 100644 index 0000000..5720fd1 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_35.mal @@ -0,0 +1,12 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Infinity()] + -> done + | test1 [Infinity] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_36.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_36.mal new file mode 100644 index 0000000..ea29592 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_36.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Infinity(2)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_37.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_37.mal new file mode 100644 index 0000000..b3ac759 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_37.mal @@ -0,0 +1,12 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Zero()] + -> done + | test1 [Zero] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_38.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_38.mal new file mode 100644 index 0000000..393b2a0 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_38.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Zero(2)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_39.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_39.mal new file mode 100644 index 0000000..629ed5a --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_39.mal @@ -0,0 +1,12 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [EasyAndCertain()] + -> done + | test1 [EasyAndCertain] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_4.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_4.mal new file mode 100644 index 0000000..673d79b --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_4.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + # test [Bernoulli(2)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_40.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_40.mal new file mode 100644 index 0000000..cc1636e --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_40.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [EasyAndCertain(2)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_41.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_41.mal new file mode 100644 index 0000000..11bb64b --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_41.mal @@ -0,0 +1,12 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [EasyAndUncertain()] + -> done + | test1 [EasyAndUncertain] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_42.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_42.mal new file mode 100644 index 0000000..166d31e --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_42.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [EasyAndUncertain(2)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_43.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_43.mal new file mode 100644 index 0000000..64a7779 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_43.mal @@ -0,0 +1,12 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [HardAndCertain()] + -> done + | test1 [HardAndCertain] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_44.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_44.mal new file mode 100644 index 0000000..b882a04 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_44.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [HardAndCertain(2)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_45.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_45.mal new file mode 100644 index 0000000..bd7d214 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_45.mal @@ -0,0 +1,12 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [HardAndUncertain()] + -> done + | test1 [HardAndUncertain] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_46.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_46.mal new file mode 100644 index 0000000..4e51734 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_46.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [HardAndUncertain(2)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_47.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_47.mal new file mode 100644 index 0000000..39ea938 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_47.mal @@ -0,0 +1,12 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [VeryHardAndCertain()] + -> done + | test1 [VeryHardAndCertain] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_48.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_48.mal new file mode 100644 index 0000000..9736995 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_48.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [VeryHardAndCertain(2)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_49.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_49.mal new file mode 100644 index 0000000..243dfa7 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_49.mal @@ -0,0 +1,12 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [VeryHardAndUncertain()] + -> done + | test1 [VeryHardAndUncertain] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_5.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_5.mal new file mode 100644 index 0000000..a9aabda --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_5.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Binomial(10, 0.2)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_50.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_50.mal new file mode 100644 index 0000000..b5de61e --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_50.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [VeryHardAndUncertain(2)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_51.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_51.mal new file mode 100644 index 0000000..51620c2 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_51.mal @@ -0,0 +1,12 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + # test [Enabled()] + -> done + # test1 [Enabled] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_52.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_52.mal new file mode 100644 index 0000000..2c75b14 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_52.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + # test [Enabled(2)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_53.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_53.mal new file mode 100644 index 0000000..0974716 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_53.mal @@ -0,0 +1,12 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + # test [Disabled()] + -> done + # test1 [Disabled] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_54.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_54.mal new file mode 100644 index 0000000..c94a541 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_54.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + # test [Disabled(2)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_6.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_6.mal new file mode 100644 index 0000000..171c62e --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_6.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Binomial(10, 0.2, 2)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_7.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_7.mal new file mode 100644 index 0000000..0c092bc --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_7.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Binomial(2)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_8.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_8.mal new file mode 100644 index 0000000..9980640 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_8.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Binomial(10, 2)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_9.mal b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_9.mal new file mode 100644 index 0000000..aa00ed0 --- /dev/null +++ b/examples/visitor/tests/fixtures/ttc_test_files/test_ttc_9.mal @@ -0,0 +1,10 @@ +#id: "org.mal-lang.testAnalyzer" +#version:"0.0.0" + +category System { + asset Asset1 { + | test [Exponential(4.5)] + -> done + | done + } +} \ No newline at end of file diff --git a/examples/visitor/tests/mal_analyzer_test_wrapper.py b/examples/visitor/tests/mal_analyzer_test_wrapper.py new file mode 100644 index 0000000..b021e5d --- /dev/null +++ b/examples/visitor/tests/mal_analyzer_test_wrapper.py @@ -0,0 +1,54 @@ +from fast import MalCompiler +from mal_analyzer import malAnalyzer, malAnalyzerException + +import os +import pytest +import re +from pathlib import Path + +class AnalyzerTestWrapper(malAnalyzer): + def __init__(self, input_string: str = None, test_file: str = None, error_msg: str = None) -> None: + super().__init__() + + self.compiler = MalCompiler() + try: + if error_msg: + with pytest.raises(malAnalyzerException, match=re.escape(error_msg)): + self._result = self.compiler.compile(test_file) + else: + self._result = self.compiler.compile(test_file) + except SyntaxError: + self._error = True + except RuntimeError: + self._error = True + + def test(self, + error:bool=False, + warn:bool=False, + defines:list=[], + categories:list=[], + assets:list=[], + lets:list=[], + associations:list=[], + steps: list=[]): + assert(self.compiler.analyzer.has_error() == error) + if (warn): + assert(self.compiler.analyzer.has_warning() == warn) + if (defines): + assert(set(defines) == set(self.compiler.analyzer._defines.keys())) + if (categories): + assert(set(categories) == set(self.compiler.analyzer._category.keys())) + if (assets): + assert(set(assets) == set(self.compiler.analyzer._assets.keys())) + if (lets): + assert(set(self.compiler.analyzer._vars.keys())==set([asset for asset, _ in lets])) + for asset, variables in lets: + assert(set(variables)==set(self.compiler.analyzer._vars[asset].keys())) + if (associations): + assert(set(self.compiler.analyzer._associations.keys())==set([asset for asset, _ in associations])) + for asset, association_list in associations: + assert(set(association_list)==set(self.compiler.analyzer._associations[asset].keys())) + if (steps): + assert(set(self.compiler.analyzer._steps.keys())==set([asset for asset, _ in steps])) + for asset, step_list in steps: + assert(set(step_list)==set(self.compiler.analyzer._steps[asset].keys())) diff --git a/examples/visitor/tests/test_mal_abstract_asset.py b/examples/visitor/tests/test_mal_abstract_asset.py new file mode 100644 index 0000000..c586f12 --- /dev/null +++ b/examples/visitor/tests/test_mal_abstract_asset.py @@ -0,0 +1,67 @@ +from .mal_analyzer_test_wrapper import AnalyzerTestWrapper + +from pathlib import Path +import pytest +import os + +''' +A file to test different cases of the `abstract` instruction in MAL. +''' + +@pytest.mark.usefixtures("setup_test_environment") +@pytest.mark.parametrize("setup_test_environment", [Path(__file__).parent / "fixtures/abstract_asset_test_files"], indirect=True) + +# TODO: is this test really needed? Doesn't the grammar prevent this kind of situation? +def test_abstract_assets_1() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines abstract asset without name. + ''' + AnalyzerTestWrapper( + test_file="test_abstract_asset_1.mal" + ).test( + error=True, + defines=['id', 'version'], + categories=['System'] + ) + +def test_abstract_assets_2() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines abstract asset with name. + Extends asset with abstract asset. + ''' + AnalyzerTestWrapper( + test_file="test_abstract_asset_2.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Foo', 'Bar'] + ) + +def test_abstract_assets_3() -> None: + ''' + Test if chain of abstract extentions works + ''' + AnalyzerTestWrapper( + test_file="test_abstract_asset_3.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Foo','Bar','Baz'] + ) + +def test_abstract_assets_4() -> None: + ''' + Abstract asset is never extended + ''' + AnalyzerTestWrapper( + test_file="test_abstract_asset_4.mal" + ).test( + warn=True, + defines=['id','version'], + categories=['System'], + assets=['Foo','Bar'] + ) \ No newline at end of file diff --git a/examples/visitor/tests/test_mal_append.py b/examples/visitor/tests/test_mal_append.py new file mode 100644 index 0000000..0ebba6f --- /dev/null +++ b/examples/visitor/tests/test_mal_append.py @@ -0,0 +1,82 @@ +from .mal_analyzer_test_wrapper import AnalyzerTestWrapper + +from pathlib import Path +import pytest + +# This file aims to test the append operator (+>) in MAL. Since a lot of it is already tested in the `steps` test file, +# the objective is to test if the general functionality is working (much like the tests for reaches (->)) + +@pytest.mark.usefixtures("setup_test_environment") +@pytest.mark.parametrize("setup_test_environment", [Path(__file__).parent / "fixtures/append_test_files"], indirect=True) + +def test_append_1() -> None: + ''' + Test append correctly + ''' + AnalyzerTestWrapper( + test_file='test_append_1.mal' + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Network', 'Computer', 'Machine', 'Lenovo', 'Server'] + ) + +def test_append_2() -> None: + ''' + Test append correctly with many steps appended + ''' + AnalyzerTestWrapper( + test_file='test_append_2.mal' + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Network', 'Computer', 'Machine', 'Lenovo', 'Server'] + ) + +def test_append_3() -> None: + ''' + Test append with wrong steps + ''' + AnalyzerTestWrapper( + test_file='test_append_3.mal', + error_msg="Attack step 'WRONG_ATTACK_STEP' not defined for asset 'Server'" + ) + +def test_append_4() -> None: + ''' + Test append with attack step from parent + ''' + AnalyzerTestWrapper( + test_file='test_append_4.mal' + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Network', 'Computer', 'Machine', 'Lenovo', 'Server'] + ) + +def test_append_5() -> None: + ''' + Test append with attack step from child + ''' + AnalyzerTestWrapper( + test_file='test_append_5.mal', + error_msg="Attack step 'lenovoStep' not defined for asset 'Computer'" + ) + +def test_append_6() -> None: + ''' + Test append not pointing to attack step + ''' + AnalyzerTestWrapper( + test_file='test_append_6.mal', + error_msg="Attack step 'server' not defined for asset 'Computer'" + ) + +def test_append_7() -> None: + ''' + Test append to a child's step + ''' + AnalyzerTestWrapper( + test_file='test_append_7.mal', + error_msg="Cannot inherit attack step 'lenovoStep' without previous definition" + ) diff --git a/examples/visitor/tests/test_mal_assets.py b/examples/visitor/tests/test_mal_assets.py new file mode 100644 index 0000000..c60fe57 --- /dev/null +++ b/examples/visitor/tests/test_mal_assets.py @@ -0,0 +1,89 @@ +from .mal_analyzer_test_wrapper import AnalyzerTestWrapper + +from pathlib import Path +import pytest +import os + +''' +A file to test different cases of the `asset` instruction in MAL. +''' + +@pytest.mark.usefixtures("setup_test_environment") +@pytest.mark.parametrize("setup_test_environment", [Path(__file__).parent / "fixtures/asset_test_files"], indirect=True) + +def test_assets_1() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines asset with name. + ''' + AnalyzerTestWrapper( + test_file="test_assets_2.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Test'] + ) + +def test_assets_2() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines asset twice. + ''' + AnalyzerTestWrapper( + test_file="test_assets_3.mal", + error_msg ="Asset 'Test' previously defined at 4" + ) + +def test_assets_3() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines asset twice. + ''' + AnalyzerTestWrapper( + test_file="test_assets_4.mal", + error_msg ="Asset 'Test' previously defined at 4" + ) + +def test_assets_4() -> None: + ''' + Defines same asset in different categories + ''' + AnalyzerTestWrapper( + test_file="test_assets_5.mal", + error_msg ="Asset 'Test' previously defined at 4" + ) + +def test_assets_5() -> None: + ''' + Defines assets correctly in different files + ''' + + AnalyzerTestWrapper( + test_file="test_assets_6.mal" + ).test( + defines=['id', 'version'], + categories=['System','AnotherSystem'], + assets=['Test','AnotherTest'], + ) + +def test_assets_6() -> None: + ''' + Defines same asset in different files in different categories + ''' + + AnalyzerTestWrapper( + test_file="test_assets_7.mal", + error_msg ="Asset 'Test' previously defined at 4" + ) + +def test_assets_7() -> None: + ''' + Defines same asset in different files in same category + ''' + AnalyzerTestWrapper( + test_file="test_assets_8.mal", + error_msg ="Asset 'Test' previously defined at 4" + ) diff --git a/examples/visitor/tests/test_mal_association.py b/examples/visitor/tests/test_mal_association.py new file mode 100644 index 0000000..acdcca3 --- /dev/null +++ b/examples/visitor/tests/test_mal_association.py @@ -0,0 +1,85 @@ +from .mal_analyzer_test_wrapper import AnalyzerTestWrapper + +from pathlib import Path +import pytest + +''' +A file to test different cases of the `association` instruction in MAL. +''' + +@pytest.mark.usefixtures("setup_test_environment") +@pytest.mark.parametrize("setup_test_environment", [Path(__file__).parent / "fixtures/association_test_files"], indirect=True) + +def test_association_1() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines two asset with name. + Defines an association between the assets. + ''' + AnalyzerTestWrapper( + test_file="test_association_1.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1', 'Asset2'] + ) + +def test_association_2() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines one asset with name. + Defines an association between the asset + and one undefined right asset. + ''' + AnalyzerTestWrapper( + test_file="test_association_2.mal", + error_msg="Right asset 'Asset1' is not defined" + ) + +def test_association_3() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines one asset with name. + Defines an association between the asset + and one undefined left asset. + ''' + AnalyzerTestWrapper( + test_file="test_association_3.mal", + error_msg="Left asset 'Asset1' is not defined" + ) + +def test_association_4() -> None: + ''' + Creates an association correctly and tries to access an attack step via association + ''' + AnalyzerTestWrapper( + test_file="test_association_4.mal" + ).test( + defines=['id', 'version'], + categories=['Example'], + assets=['Asset1', 'Asset2'] + ) + +def test_association_5() -> None: + ''' + Creates an association correctly and tries to access an attack step via association which is not defined + ''' + AnalyzerTestWrapper( + test_file="test_association_5.mal", + error_msg="Field 'b' not defined for asset 'Asset1'\n" + \ + "Line 6: All expressions in reaches ('->') must point to a valid attack step" + ) + +def test_association_6() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines an association between undefined assets. + ''' + AnalyzerTestWrapper( + test_file="test_association_6.mal", + error_msg="Left asset 'Asset1' is not defined" + ) diff --git a/examples/visitor/tests/test_mal_category.py b/examples/visitor/tests/test_mal_category.py new file mode 100644 index 0000000..65f57f7 --- /dev/null +++ b/examples/visitor/tests/test_mal_category.py @@ -0,0 +1,35 @@ +from .mal_analyzer_test_wrapper import AnalyzerTestWrapper + +from pathlib import Path +import pytest + +''' +A file to test different cases of the `category` instruction in MAL. +''' + +@pytest.mark.usefixtures("setup_test_environment") +@pytest.mark.parametrize("setup_test_environment", [Path(__file__).parent / "fixtures/category_test_files"], indirect=True) + +def test_category_1() -> None: + ''' + Defines correct version and ID. + Defines category with name. + ''' + AnalyzerTestWrapper( + test_file="test_category_1.mal" + ).test( + defines=['id', 'version'], + categories=['Test'] + ) + +def test_category_2() -> None: + ''' + Defines correct version and ID. + Defines category with same name twice. + ''' + AnalyzerTestWrapper( + test_file="test_category_2.mal" + ).test( + defines=['id', 'version'], + categories=['Test'] + ) \ No newline at end of file diff --git a/examples/visitor/tests/test_mal_collect.py b/examples/visitor/tests/test_mal_collect.py new file mode 100644 index 0000000..ec2ac84 --- /dev/null +++ b/examples/visitor/tests/test_mal_collect.py @@ -0,0 +1,123 @@ +from .mal_analyzer_test_wrapper import AnalyzerTestWrapper + +from pathlib import Path +import pytest + +# This file aims to test the collect operator (X.A) in MAL + +@pytest.mark.usefixtures("setup_test_environment") +@pytest.mark.parametrize("setup_test_environment", [Path(__file__).parent / "fixtures/collect_test_files"], indirect=True) + +def test_collect_1() -> None: + ''' + Test collect correctly (used in variable) + ''' + AnalyzerTestWrapper( + test_file='test_collect_1.mal' + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Network', 'Computer', 'OperatingSystem'] + ) + +def test_collect_2() -> None: + ''' + Test collect correctly (used in step) + ''' + AnalyzerTestWrapper( + test_file="test_collect_2.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Network', 'Computer', 'OperatingSystem'] + ) + +def test_collect_3() -> None: + ''' + Test complex collect correctly (used in variable) + ''' + AnalyzerTestWrapper( + test_file="test_collect_3.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Network', 'Computer', 'OperatingSystem', 'FileSystem', 'File'] + ) + +def test_collect_4() -> None: + ''' + Test complex collect correctly (used in step) + ''' + AnalyzerTestWrapper( + test_file="test_collect_4.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Network', 'Computer', 'OperatingSystem', 'FileSystem', 'File'] + ) + +def test_collect_5() -> None: + ''' + Test correctly with non-existing field + ''' + AnalyzerTestWrapper( + test_file="test_collect_5.mal", + error_msg="Field 'fileSystems' not defined for asset 'OperatingSystem'\n" + \ + "Line 5: All expressions in reaches ('->') must point to a valid attack step" + ) + +# Since many tests require that collect works correctly, the objective of the following tests is to check that +# using many expressions in the same collect works properly and any error inside the expression itself is noticed. + +def test_collect_6() -> None: + ''' + Test complex set of expressions + ''' + AnalyzerTestWrapper( + test_file="test_collect_6.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Network', 'Computer', 'OperatingSystem', 'Linux', 'Windows', 'WindowsVista', + 'FileSystem', 'SubFolder', 'Folder', 'File', 'ConfigFile', 'RootFile', 'NonRootFile'] + ) + +def test_collect_7() -> None: + ''' + Test complex set of expressions with error + ''' + AnalyzerTestWrapper( + test_file="test_collect_7.mal", + error_msg="Asset 'WindowsVista' cannot be of type 'OperatingSystem'\n" +\ + "Line 6: All expressions in reaches ('->') must point to a valid attack step" + ) + +def test_collect_8() -> None: + ''' + Test complex set of expressions with error (field without existing association) + ''' + AnalyzerTestWrapper( + test_file="test_collect_8.mal", + error_msg="Field 'fileSystems' not defined for asset 'OperatingSystem'\n" + \ + "Line 6: All expressions in reaches ('->') must point to a valid attack step" + ) + +def test_collect_9() -> None: + ''' + Test complex set of expressions with error (transitive step without hierarchy relationship) + ''' + AnalyzerTestWrapper( + test_file="test_collect_9.mal", + error_msg="Previous asset 'Folder' is not of type 'SubFolder'\n" + \ + "Line 6: All expressions in reaches ('->') must point to a valid attack step" + ) + +def test_collect_10() -> None: + ''' + Test complex set of expressions with error (no common ancestor) + ''' + AnalyzerTestWrapper( + test_file="test_collect_10.mal", + error_msg="Types 'ConfigFile' and 'NonRootFile' have no common ancestor\n" + \ + "Line 6: All expressions in reaches ('->') must point to a valid attack step" + ) diff --git a/examples/visitor/tests/test_mal_define.py b/examples/visitor/tests/test_mal_define.py new file mode 100644 index 0000000..7354fa7 --- /dev/null +++ b/examples/visitor/tests/test_mal_define.py @@ -0,0 +1,89 @@ +from .mal_analyzer_test_wrapper import AnalyzerTestWrapper + +from pathlib import Path +import pytest + +''' +A file to test different cases of the `define` instruction in MAL. +''' + +@pytest.mark.usefixtures("setup_test_environment") +@pytest.mark.parametrize("setup_test_environment", [Path(__file__).parent / "fixtures/define_test_files"], indirect=True) + +def test_define_1() -> None: + ''' + Defines only version. + ''' + AnalyzerTestWrapper( + test_file="test_define_1.mal", + error_msg = 'Missing required define \'#id: ""\'' + ) + +def test_define_2() -> None: + ''' + Defines only ID. + ''' + AnalyzerTestWrapper( + test_file="test_define_2.mal", + error_msg='Missing required define \'#version: ""\'' + ) + +def test_define_3() -> None: + ''' + Defines correct ID but wrong version. + ''' + AnalyzerTestWrapper( + test_file="test_define_3.mal", + error_msg='Define \'version\' must be valid semantic versioning without pre-release identifier and build metadata' + ) + +def test_define_4() -> None: + ''' + Defines correct version and ID. + ''' + AnalyzerTestWrapper( + test_file="test_define_4.mal" + ).test( + defines=['id', 'version'] + ) + +def test_define_5() -> None: + ''' + Defines correct version and ID, but version twice. + ''' + AnalyzerTestWrapper( + test_file="test_define_5.mal" + ).test( + defines=['id', 'version'] + ) + +def test_define_6() -> None: + ''' + Defines correct version, ID. + Defines Key with value. + ''' + AnalyzerTestWrapper( + test_file="test_define_6.mal" + ).test( + defines=['id', 'version', 'key'] + ) + +def test_define_7() -> None: + ''' + Defines correct version, ID. + Defines Key with value twice. + ''' + AnalyzerTestWrapper( + test_file="test_define_7.mal", + error_msg="Define 'key' previously defined at line 2" + ) + +def test_define_8() -> None: + ''' + Defines correct version and ID, but id twice. + ''' + AnalyzerTestWrapper( + test_file="test_define_8.mal" + ).test( + defines=['id', 'version'] + ) \ No newline at end of file diff --git a/examples/visitor/tests/test_mal_exists.py b/examples/visitor/tests/test_mal_exists.py new file mode 100644 index 0000000..8477c0a --- /dev/null +++ b/examples/visitor/tests/test_mal_exists.py @@ -0,0 +1,88 @@ +from .mal_analyzer_test_wrapper import AnalyzerTestWrapper + +from pathlib import Path +import pytest + +''' +A file to test existance operators (E and !E) in MAL +''' + +@pytest.mark.usefixtures("setup_test_environment") +@pytest.mark.parametrize("setup_test_environment", [Path(__file__).parent / "fixtures/exists_test_files"], indirect=True) + +def test_exists_1() -> None: + ''' + Correctly define defenses + ''' + AnalyzerTestWrapper( + test_file="test_exists_1.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1','Asset2','Asset3'], + ) + +def test_exists_2() -> None: + ''' + Test existance with a reach with a non-existing attack step + ''' + AnalyzerTestWrapper( + test_file="test_exists_2.mal", + error_msg="Attack step 'wrongStep' not defined for asset 'Asset1'" + ) + +def test_exists_3() -> None: + ''' + Test existence with non-existing asset + ''' + AnalyzerTestWrapper( + test_file="test_exists_3.mal", + error_msg="Field 'a2' not defined for asset 'Asset1'\n" + \ + "Line 5: All expressions in requires ('<-') must point to a valid asset" + ) + +def test_exists_4() -> None: + ''' + Test existence with a requires which points to a step + ''' + AnalyzerTestWrapper( + test_file="test_exists_4.mal", + error_msg="Field 'attack' not defined for asset 'Asset2'\n" + \ + "Line 5: All expressions in requires ('<-') must point to a valid asset" + ) + +def test_exists_5() -> None: + ''' + Test existence with a TTC expression + ''' + AnalyzerTestWrapper( + test_file="test_exists_5.mal", + error_msg="Attack step of type 'exist' must not have TTC" + ) + +def test_exists_6() -> None: + ''' + Test non-existence with a TTC expression + ''' + AnalyzerTestWrapper( + test_file="test_exists_6.mal", + error_msg = "Attack step of type 'notExist' must not have TTC" + ) + +def test_exists_7() -> None: + ''' + Test existence without a requires + ''' + AnalyzerTestWrapper( + test_file="test_exists_7.mal", + error_msg="Attack step of type 'exist' must have require '<-'" + ) + +def test_exists_8() -> None: + ''' + Test normal step with a requires + ''' + AnalyzerTestWrapper( + test_file="test_exists_8.mal", + error_msg="Require '<-' may only be defined for attack step type exist 'E' or not-exist '!E'" + ) diff --git a/examples/visitor/tests/test_mal_extends.py b/examples/visitor/tests/test_mal_extends.py new file mode 100644 index 0000000..61555b2 --- /dev/null +++ b/examples/visitor/tests/test_mal_extends.py @@ -0,0 +1,63 @@ +from .mal_analyzer_test_wrapper import AnalyzerTestWrapper + +import os +import pytest +from pathlib import Path + +''' +A file to test different cases of the `extends` instruction in MAL. +''' + +@pytest.mark.usefixtures("setup_test_environment") +@pytest.mark.parametrize("setup_test_environment", [Path(__file__).parent / "fixtures/extend_test_files"], indirect=True) + +def test_extends_1() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines asset with name. + Defines asset with extends. + ''' + AnalyzerTestWrapper( + test_file="test_extends_1.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['OperatingSystem', 'Linux'] + ) + +def test_extends_2() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines asset with name. + Extends asset with undefined asset. + ''' + AnalyzerTestWrapper( + test_file="test_extends_2.mal", + error_msg = "Asset \'Foo2\' not defined" + ) + +def test_extends_3() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines asset with name. + Tests circular dependency with extends + ''' + AnalyzerTestWrapper( + test_file="test_extends_3.mal", + error_msg = "Asset 'Foo1' extends in loop 'Foo1 -> Foo2 -> Foo3 -> Foo4 -> Foo5 -> Foo1'" + ) + +def test_extends_4() -> None: + ''' + Tests valid extends across files + ''' + AnalyzerTestWrapper( + test_file="test_extends_4.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Test','SubTest'], + ) diff --git a/examples/visitor/tests/test_mal_fields.py b/examples/visitor/tests/test_mal_fields.py new file mode 100644 index 0000000..14bd23d --- /dev/null +++ b/examples/visitor/tests/test_mal_fields.py @@ -0,0 +1,48 @@ +from .mal_analyzer_test_wrapper import AnalyzerTestWrapper + +from pathlib import Path +import pytest + +''' +A file to test fields in MAL +''' + +@pytest.mark.usefixtures("setup_test_environment") +@pytest.mark.parametrize("setup_test_environment", [Path(__file__).parent / "fixtures/fields_test_files"], indirect=True) + +def test_fields_1() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines associations correctly + ''' + AnalyzerTestWrapper( + test_file="test_fields_1.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1','Asset2','Asset3'], + associations=[('Asset1',['a3']), ('Asset2',['a3','a3_again']), ('Asset3',['a1','a2'])] + ) + +def test_fields_2() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines association in child with same name as parent + ''' + AnalyzerTestWrapper( + test_file="test_fields_2.mal", + error_msg="Field Asset2.a3 previously defined at 9" + ) + +def test_fields_3() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines association with same name as attack step + ''' + AnalyzerTestWrapper( + test_file="test_fields_3.mal", + error_msg = "Field attack previously defined as an attack step at 6" + ) diff --git a/examples/visitor/tests/test_mal_include.py b/examples/visitor/tests/test_mal_include.py new file mode 100644 index 0000000..bd587e1 --- /dev/null +++ b/examples/visitor/tests/test_mal_include.py @@ -0,0 +1,94 @@ +from .mal_analyzer_test_wrapper import AnalyzerTestWrapper + +from pathlib import Path +import pytest +import os + +''' +A file to test different cases of the `include` instruction in MAL. +''' + +@pytest.mark.usefixtures("setup_test_environment") +@pytest.mark.parametrize("setup_test_environment", [Path(__file__).parent / "fixtures/include_test_files"], indirect=True) + +def test_include_1() -> None: + ''' + Missing keys ID and version. + ''' + AnalyzerTestWrapper( + test_file="test_include_1.mal", + error_msg = 'Missing required define \'#id: ""\'' + ) + +def test_include_2() -> None: + ''' + Including file with ID and version. + ''' + AnalyzerTestWrapper( + test_file="test_include_2.mal" + ).test( + defines=['id', 'version'] + ) + +def test_include_3() -> None: + ''' + Including file with ID and version. + Defining ID and version both files (this is ok). + ''' + AnalyzerTestWrapper( + test_file="test_include_3.mal" + ).test( + defines=['id', 'version'] + ) + +def test_include_4() -> None: + ''' + Including file with ID and version. + Defining key with value. + ''' + AnalyzerTestWrapper( + test_file="test_include_4.mal" + ).test( + defines=['id', 'version', 'key'] + ) + +def test_include_5() -> None: + ''' + Including one file with ID and another with version. + Defining key with value. + ''' + AnalyzerTestWrapper( + test_file="test_include_5.mal" + ).test( + defines=['id', 'version', 'key'] + ) + +def test_include_6() -> None: + ''' + Include same file twice. + ''' + AnalyzerTestWrapper( + test_file="test_include_6.mal" + ).test( + defines=['id', 'version'] + ) + +def test_include_7() -> None: + ''' + Defining keys ID and version after include. + ''' + AnalyzerTestWrapper( + test_file="test_include_7.mal" + ).test( + defines=['id', 'version'] + ) + +# TODO this might have been fixed by the compiler itself +def test_include_8() -> None: + ''' + Test if circular includes are noticed + ''' + AnalyzerTestWrapper( + test_file="test_include_8.mal", + error_msg="Include sequence contains cycle: test_include_8_aux1.mal->test_include_8_aux2.mal->test_include_8.mal -> test_include_8_aux1.mal" + ) \ No newline at end of file diff --git a/examples/visitor/tests/test_mal_info.py b/examples/visitor/tests/test_mal_info.py new file mode 100644 index 0000000..5658791 --- /dev/null +++ b/examples/visitor/tests/test_mal_info.py @@ -0,0 +1,192 @@ +from .mal_analyzer_test_wrapper import AnalyzerTestWrapper + +from pathlib import Path +import pytest + +''' +A file to test different cases of the `info` instruction in MAL. +''' + +@pytest.mark.usefixtures("setup_test_environment") +@pytest.mark.parametrize("setup_test_environment", [Path(__file__).parent / "fixtures/info_test_files"], indirect=True) + +def test_asset_info_1() -> None: + ''' + Defines asset with name. + Defines random info. (this should be allowed as to not break previous custom metas) + ''' + AnalyzerTestWrapper( + test_file="test_asset_info_1.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Foo'] + ) + +def test_asset_info_2() -> None: + ''' + Defines asset with name. + Defines random info twice. + ''' + AnalyzerTestWrapper( + test_file="test_asset_info_2.mal", + error_msg = "Metadata random previously defined at 5" + ) + +def test_asset_info_3() -> None: + ''' + Defines asset with name. + Defines random info in asset and attack step twice. + ''' + AnalyzerTestWrapper( + test_file="test_asset_info_3.mal", + error_msg = "Metadata random previously defined at 8" + ) + +def test_asset_info_4() -> None: + ''' + Defines asset with name. + Defines random info in asset and attack step. + ''' + AnalyzerTestWrapper( + test_file="test_asset_info_4.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Foo'] + ) + +def test_asset_info_5() -> None: + ''' + Defines asset with name. + Defines random info in asset, attack step and category. + ''' + AnalyzerTestWrapper( + test_file="test_asset_info_5.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Foo'] + ) + +def test_asset_info_6() -> None: + ''' + Defines asset with name. + Defines random info in asset, attack step and category twice. + ''' + AnalyzerTestWrapper( + test_file="test_asset_info_6.mal", + error_msg = "Metadata random previously defined at 4" + ) + +def test_asset_info_7() -> None: + ''' + Defines asset with name. + Defines random info in asset, attack step and category. + ''' + AnalyzerTestWrapper( + test_file="test_asset_info_7.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Foo'] + ) + +def test_asset_info_8() -> None: + ''' + Defines asset with name. + Defines random info in asset, attack step and category for two different categories. + ''' + AnalyzerTestWrapper( + test_file="test_asset_info_8.mal" + ).test( + defines=['id', 'version'], + categories=['System','AnotherSystem'], + assets=['Foo','Bar'] + ) + +def test_asset_info_9() -> None: + ''' + Defines asset with name. + Defines random info in asset, attack step, category and association + ''' + AnalyzerTestWrapper( + test_file="test_asset_info_9.mal" + ).test( + defines=['id', 'version'], + categories=['System','AnotherSystem'], + assets=['Foo','Bar'] + ) + +def test_asset_info_10() -> None: + ''' + Defines asset with name. + Defines random info in asset, attack step, category and twice in the association + ''' + AnalyzerTestWrapper( + test_file="test_asset_info_10.mal", + error_msg = "Metadata random previously defined at 27" + ) + +def test_asset_info_11() -> None: + ''' + Defines asset with name. + Defines random info in asset, attack step, category and association + ''' + AnalyzerTestWrapper( + test_file="test_asset_info_11.mal" + ).test( + defines=['id', 'version'], + categories=['System','AnotherSystem'], + assets=['Foo','Bar'] + ) + +def test_asset_info_12() -> None: + ''' + Defines asset with name. + Defines random info in two assets in the same category. + ''' + AnalyzerTestWrapper( + test_file="test_asset_info_12.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Foo','Bar'] + ) + + +def test_asset_info_13() -> None: + ''' + Defines asset with name. + Defines random info in asset twice but with a different meta between them + ''' + AnalyzerTestWrapper( + test_file="test_asset_info_13.mal", + error_msg = "Metadata random previously defined at 4" + ) + +def test_asset_info_14() -> None: + ''' + Defines asset with name. + Defines random info in asset and attack step. + ''' + AnalyzerTestWrapper( + test_file="test_asset_info_14.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Foo'] + ) + +def test_asset_info_15() -> None: + ''' + Defines asset with name. + Defines random info in two steps in the same asset. + ''' + AnalyzerTestWrapper( + test_file="test_asset_info_15.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Foo'] + ) diff --git a/examples/visitor/tests/test_mal_let.py b/examples/visitor/tests/test_mal_let.py new file mode 100644 index 0000000..80aa89e --- /dev/null +++ b/examples/visitor/tests/test_mal_let.py @@ -0,0 +1,152 @@ +from .mal_analyzer_test_wrapper import AnalyzerTestWrapper + +from pathlib import Path +import pytest + +''' +A file to test different cases of the `let` instruction in MAL. +''' + +@pytest.mark.usefixtures("setup_test_environment") +@pytest.mark.parametrize("setup_test_environment", [Path(__file__).parent / "fixtures/let_test_files"], indirect=True) + +def test_let_1() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines asset with name. + Defines let. + ''' + AnalyzerTestWrapper( + test_file="test_let_1.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Computer','Platform','Software','Hardware'], + lets=[('Computer', ['components'])] + ) + +def test_let_2() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines two assets with name. + Defines same let twice. + ''' + AnalyzerTestWrapper( + test_file="test_let_2.mal", + error_msg = 'Variable \'component\' previously defined at line 8' + ) + +def test_let_3() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines asset with name. + Defines let not pointing to asset. + ''' + AnalyzerTestWrapper( + test_file="test_let_3.mal", + error_msg="Variable 'component' defined at 5 does not point to an asset" + ) + +def test_let_4() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines asset with name. + Defines let in asset in a hierarchy. + ''' + AnalyzerTestWrapper( + test_file="test_let_4.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1','Asset2','Asset3','Asset4'], + lets=[('Asset1', ['component']),('Asset2', ['component','another_component'])] + ) + + +def test_let_5() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines asset with name. + Redefines let in asset in a hierarchy. + ''' + AnalyzerTestWrapper( + test_file="test_let_5.mal", + error_msg = 'Variable \'component\' previously defined at 5' + ) + +def test_let_6() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines asset with name. + Defines let in circular manner. + ''' + AnalyzerTestWrapper( + test_file="test_let_6.mal", + error_msg="Variable 'component1' contains cycle component1->component2->component1" + ) + +def test_let_7() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines asset with name. + Defines let when a parent has no association. + ''' + AnalyzerTestWrapper( + test_file="test_let_7.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1','Asset3','Asset4'], + lets=[('Asset3', ['component'])] + ) + +def test_let_8() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines asset with name. + Defines let using a parents association. + ''' + AnalyzerTestWrapper( + test_file="test_let_8.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1','Asset3','Asset4'], + lets=[('Asset3', ['component'])] + ) + +def test_let_9() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines asset with name. + Defines let only in a parent. + ''' + AnalyzerTestWrapper( + test_file="test_let_9.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1','Asset3','Asset4'], + lets=[('Asset1', ['component']),('Asset3', ['component'])] + ) + +def test_let_10() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines asset with name. + Redefines the exact same let in asset in a hierarchy. + ''' + AnalyzerTestWrapper( + test_file="test_let_10.mal", + error_msg="Variable 'component' previously defined at 5" + ) diff --git a/examples/visitor/tests/test_mal_operations.py b/examples/visitor/tests/test_mal_operations.py new file mode 100644 index 0000000..583a1f7 --- /dev/null +++ b/examples/visitor/tests/test_mal_operations.py @@ -0,0 +1,267 @@ +from .mal_analyzer_test_wrapper import AnalyzerTestWrapper + +from pathlib import Path +import pytest + +''' +File to test set operations (/\\ and \\/ and -) +''' + +@pytest.mark.usefixtures("setup_test_environment") +@pytest.mark.parametrize("setup_test_environment", [Path(__file__).parent / "fixtures/operation_test_files"], indirect=True) + +# TESTS FOR /\ +def test_operation_1() -> None: + ''' + Test /\\ correctly (used in variable) + ''' + AnalyzerTestWrapper( + test_file="test_operation_1.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Computer', 'Windows', 'Linux', 'OperatingSystem'] + ) + +def test_operation_2() -> None: + ''' + Test /\\ correctly (used directly in step) + ''' + AnalyzerTestWrapper( + test_file="test_operation_2.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Computer', 'Windows', 'Linux', 'OperatingSystem'] + ) + +def test_operation_3() -> None: + ''' + Test /\\ directly in the step but do not point to a step (only point to asset) + ''' + AnalyzerTestWrapper( + test_file="test_operation_3.mal", + error_msg="Last step is not attack step" + ) + +def test_operation_4() -> None: + ''' + Test /\\ directly in the step but do not use an attack step belonging to the LCA + ''' + AnalyzerTestWrapper( + test_file="test_operation_4.mal", + error_msg="Attack step 'foundWindows' not defined for asset 'OperatingSystem'" + ) + +def test_operation_5() -> None: + ''' + Test /\\ in variable but use assets without an LCA + ''' + AnalyzerTestWrapper( + test_file="test_operation_5.mal", + error_msg="Types 'Windows' and 'Linux' have no common ancestor\n" + \ + "Variable 'targets' defined at 6 does not point to an asset" + ) + +def test_operation_6() -> None: + ''' + Test /\\ directly in the step but use assets without an LCA + ''' + AnalyzerTestWrapper( + test_file="test_operation_6.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Network', 'Machine', 'Computer', 'ThinkPad', 'Asus'] + ) + +def test_operation_7() -> None: + ''' + Test /\\ directly in the step using an attack step from the LCA's parent + ''' + AnalyzerTestWrapper( + test_file="test_operation_7.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Computer', 'Windows', 'Linux', 'OperatingSystem', 'Software'] + ) + + + + + + +# Tests for \/ +def test_operation_8() -> None: + ''' + Test \\/ correctly (used in variable) + ''' + AnalyzerTestWrapper( + test_file="test_operation_8.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Computer', 'Windows', 'Linux', 'OperatingSystem'] + ) + +def test_operation_9() -> None: + ''' + Test \\/ correctly (used directly in step) + ''' + AnalyzerTestWrapper( + test_file="test_operation_9.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Computer', 'Windows', 'Linux', 'OperatingSystem'] + ) + +def test_operation_10() -> None: + ''' + Test \\/ directly in the step but do not point to a step (only point to asset) + ''' + AnalyzerTestWrapper( + test_file="test_operation_10.mal", + error_msg="Last step is not attack step" + ) + +def test_operation_11() -> None: + ''' + Test \\/ directly in the step but do not use an attack step belonging to the LCA + ''' + AnalyzerTestWrapper( + test_file="test_operation_11.mal", + error_msg="Attack step 'foundWindows' not defined for asset 'OperatingSystem'" + ) + +def test_operation_12() -> None: + ''' + Test \\/ in variable but use assets without an LCA + ''' + AnalyzerTestWrapper( + test_file="test_operation_12.mal", + error_msg="Types 'Windows' and 'Linux' have no common ancestor\n" + \ + "Variable 'targets' defined at 6 does not point to an asset" + ) + +def test_operation_13() -> None: + ''' + Test \\/ directly in the step but use assets without an LCA + ''' + AnalyzerTestWrapper( + test_file="test_operation_13.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Network', 'Machine', 'Computer', 'ThinkPad', 'Asus'] + ) + +def test_operation_14() -> None: + ''' + Test \\/ directly in the step using an attack step from the LCA's parent + ''' + AnalyzerTestWrapper( + test_file="test_operation_14.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Computer', 'Windows', 'Linux', 'OperatingSystem', 'Software'] + ) + + + + + +# TESTS FOR - +def test_operation_15() -> None: + ''' + Test - correctly (used in variable) + ''' + AnalyzerTestWrapper( + test_file="test_operation_15.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Computer', 'Windows', 'Linux', 'OperatingSystem'] + ) + +def test_operation_16() -> None: + ''' + Test - correctly (used directly in step) + ''' + AnalyzerTestWrapper( + test_file="test_operation_16.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Computer', 'Windows', 'Linux', 'OperatingSystem'] + ) + +def test_operation_17() -> None: + ''' + Test - directly in the step but do not point to a step (only point to asset) + ''' + AnalyzerTestWrapper( + test_file="test_operation_17.mal", + error_msg="Last step is not attack step" + ) + +def test_operation_18() -> None: + ''' + Test - directly in the step but do not use an attack step belonging to the LCA + ''' + AnalyzerTestWrapper( + test_file="test_operation_18.mal", + error_msg="Attack step 'foundWindows' not defined for asset 'OperatingSystem'" + ) + +def test_operation_19() -> None: + ''' + Test - directly in the step but use assets without an LCA + ''' + AnalyzerTestWrapper( + test_file="test_operation_19.mal", + error_msg="Types 'Windows' and 'Linux' have no common ancestor\n" + \ + "Variable 'targets' defined at 6 does not point to an asset" + ) + +def test_operation_20() -> None: + ''' + Test - directly in the step but use assets without an LCA + ''' + AnalyzerTestWrapper( + test_file="test_operation_20.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Network', 'Machine', 'Computer', 'ThinkPad', 'Asus'] + ) + +def test_operation_21() -> None: + ''' + Test - directly in the step using an attack step from the LCA's parent + ''' + AnalyzerTestWrapper( + test_file="test_operation_21.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Computer', 'Windows', 'Linux', 'OperatingSystem', 'Software'] + ) + + + + +# General functionality test +def test_operation_22() -> None: + ''' + Test complex operation + ''' + AnalyzerTestWrapper( + test_file="test_operation_22.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Main','Generator','Grandparent','Parent','Child','Grandchild'] + ) \ No newline at end of file diff --git a/examples/visitor/tests/test_mal_probability_distributions.py b/examples/visitor/tests/test_mal_probability_distributions.py new file mode 100644 index 0000000..e0ca0b5 --- /dev/null +++ b/examples/visitor/tests/test_mal_probability_distributions.py @@ -0,0 +1,272 @@ +from .mal_analyzer_test_wrapper import AnalyzerTestWrapper + +from pathlib import Path +import pytest + +''' +File to test complex Time To Compromise (TTC) expressions in MAL + +While 'test_mal_ttc' tests individual expressions, this file will test the same expressions +when used together +''' + +@pytest.mark.usefixtures("setup_test_environment") +@pytest.mark.parametrize("setup_test_environment", [Path(__file__).parent / "fixtures/probability_distributions_test_files/"], indirect=True) + +# Basic exponentiation tests + +def test_probability_distributions_1() -> None: + ''' + Test correct exponentiation + ''' + AnalyzerTestWrapper( + test_file='test_probability_distributions_1.mal' + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['OperatingSystem', 'Linux'] + ) + +def test_probability_distributions_2() -> None: + ''' + Test exponentiation with an expression with the wrong parameters + ''' + AnalyzerTestWrapper( + test_file='test_probability_distributions_2.mal', + error_msg="0 is not in valid range 'shape > 0', for Gamma distribution" + ) + +def test_probability_distributions_3() -> None: + ''' + Test exponentiation with Bernoulli + ''' + AnalyzerTestWrapper( + test_file='test_probability_distributions_3.mal', + error_msg="TTC distribution 'Bernoulli' is not available in subtraction, division or exponential expressions." + ) + +def test_probability_distributions_4() -> None: + ''' + Test exponentiation with EasyAndUncertaion + ''' + AnalyzerTestWrapper( + test_file='test_probability_distributions_4.mal', + error_msg="TTC distribution 'EasyAndUncertain' is not available in subtraction, division or exponential expressions." + ) + +# Basic subtraction tests + +def test_probability_distributions_5() -> None: + ''' + Test correct subtraction + ''' + AnalyzerTestWrapper( + test_file='test_probability_distributions_5.mal' + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['OperatingSystem', 'Linux'] + ) + +def test_probability_distributions_6() -> None: + ''' + Test subtraction with an expression with the wrong parameters + ''' + AnalyzerTestWrapper( + test_file='test_probability_distributions_6.mal', + error_msg="0 is not in valid range 'shape > 0', for Gamma distribution" + ) + +def test_probability_distributions_7() -> None: + ''' + Test subtraction with Bernoulli + ''' + AnalyzerTestWrapper( + test_file='test_probability_distributions_7.mal', + error_msg="TTC distribution 'Bernoulli' is not available in subtraction, division or exponential expressions." + ) + +def test_probability_distributions_8() -> None: + ''' + Test subtraction with EasyAndUncertaion + ''' + AnalyzerTestWrapper( + test_file='test_probability_distributions_8.mal', + error_msg="TTC distribution 'EasyAndUncertain' is not available in subtraction, division or exponential expressions." + ) + +# Basic division tests + +def test_probability_distributions_9() -> None: + ''' + Test correct division + ''' + AnalyzerTestWrapper( + test_file='test_probability_distributions_9.mal' + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['OperatingSystem', 'Linux'] + ) + +def test_probability_distributions_10() -> None: + ''' + Test division with an expression with the wrong parameters + ''' + AnalyzerTestWrapper( + test_file='test_probability_distributions_10.mal', + error_msg="0 is not in valid range 'shape > 0', for Gamma distribution" + ) + +def test_probability_distributions_11() -> None: + ''' + Test division with Bernoulli + ''' + AnalyzerTestWrapper( + test_file='test_probability_distributions_11.mal', + error_msg="TTC distribution 'Bernoulli' is not available in subtraction, division or exponential expressions." + ) + +def test_probability_distributions_12() -> None: + ''' + Test division with EasyAndUncertaion + ''' + AnalyzerTestWrapper( + test_file='test_probability_distributions_12.mal', + error_msg="TTC distribution 'EasyAndUncertain' is not available in subtraction, division or exponential expressions." + ) + +# Basic addition tests + +def test_probability_distributions_13() -> None: + ''' + Test correct addition + ''' + AnalyzerTestWrapper( + test_file='test_probability_distributions_13.mal' + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['OperatingSystem', 'Linux'] + ) + +def test_probability_distributions_14() -> None: + ''' + Test addition with an expression with the wrong parameters + ''' + AnalyzerTestWrapper( + test_file='test_probability_distributions_14.mal', + error_msg="0 is not in valid range 'shape > 0', for Gamma distribution" + ) + +def test_probability_distributions_15() -> None: + ''' + Test addition with Bernoulli + ''' + AnalyzerTestWrapper( + test_file='test_probability_distributions_15.mal', + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['OperatingSystem', 'Linux'] + ) + +# Basic multiplication tests + +def test_probability_distributions_16() -> None: + ''' + Test correct multiplication + ''' + AnalyzerTestWrapper( + test_file='test_probability_distributions_16.mal' + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['OperatingSystem', 'Linux'] + ) + +def test_probability_distributions_17() -> None: + ''' + Test multiplication with an expression with the wrong parameters + ''' + AnalyzerTestWrapper( + test_file='test_probability_distributions_17.mal', + error_msg="0 is not in valid range 'shape > 0', for Gamma distribution" + ) + +def test_probability_distributions_18() -> None: + ''' + Test multiplication with Bernoulli + ''' + AnalyzerTestWrapper( + test_file='test_probability_distributions_18.mal', + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['OperatingSystem', 'Linux'] + ) + +# Complex operation tests + +def test_probability_distributions_19() -> None: + ''' + Test correct complex operation I + ''' + AnalyzerTestWrapper( + test_file='test_probability_distributions_19.mal', + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['OperatingSystem', 'Linux'] + ) + +def test_probability_distributions_20() -> None: + ''' + Test correct complex operation II + ''' + AnalyzerTestWrapper( + test_file='test_probability_distributions_20.mal', + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['OperatingSystem', 'Linux'] + ) + +def test_probability_distributions_21() -> None: + ''' + Test correct complex operation III + ''' + AnalyzerTestWrapper( + test_file='test_probability_distributions_21.mal', + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['OperatingSystem', 'Linux'] + ) + +def test_probability_distributions_22() -> None: + ''' + Test incorrect complex operation I + ''' + AnalyzerTestWrapper( + test_file='test_probability_distributions_22.mal', + error_msg="(0.4, 0.3) does not meet requirement 'min <= max', for Uniform distribution" + ) + +def test_probability_distributions_23() -> None: + ''' + Test incorrect complex operation II + ''' + AnalyzerTestWrapper( + test_file='test_probability_distributions_23.mal', + error_msg="Distributions 'Enabled' or 'Disabled' may not be used as TTC values in '&' and '|' attack steps" + ) + +def test_probability_distributions_24() -> None: + ''' + Test incorrect complex operation III + ''' + AnalyzerTestWrapper( + test_file='test_probability_distributions_24.mal', + error_msg="TTC distribution 'Bernoulli' is not available in subtraction, division or exponential expressions." + ) \ No newline at end of file diff --git a/examples/visitor/tests/test_mal_reaches.py b/examples/visitor/tests/test_mal_reaches.py new file mode 100644 index 0000000..66dc0f9 --- /dev/null +++ b/examples/visitor/tests/test_mal_reaches.py @@ -0,0 +1,72 @@ +from .mal_analyzer_test_wrapper import AnalyzerTestWrapper + +from pathlib import Path +import pytest + +# This file aims to test the reaches operator (->) in MAL + +@pytest.mark.usefixtures("setup_test_environment") +@pytest.mark.parametrize("setup_test_environment", [Path(__file__).parent / "fixtures/reaches_test_files"], indirect=True) + +def test_reaches_1() -> None: + ''' + Test reaches correctly + ''' + AnalyzerTestWrapper( + test_file='test_reaches_1.mal' + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Network', 'Computer', 'Machine', 'Lenovo', 'Server'] + ) + +def test_reaches_2() -> None: + ''' + Test many reaches in the same step + ''' + AnalyzerTestWrapper( + test_file='test_reaches_2.mal' + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Network', 'Computer', 'Machine', 'Lenovo', 'Server', 'Router'] + ) + +def test_reaches_3() -> None: + ''' + Test reaches with wrong attack step + ''' + AnalyzerTestWrapper( + test_file='test_reaches_3.mal', + error_msg= "Attack step 'WRONG_ATTACK_STEP' not defined for asset 'Server'" + ) + +def test_reaches_4() -> None: + ''' + Test reaches with attack step from father + ''' + AnalyzerTestWrapper( + test_file='test_reaches_4.mal' + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Network', 'Computer', 'Machine', 'Lenovo', 'Server', 'Router'] + ) + +def test_reaches_5() -> None: + ''' + Test reaches with attack step from child + ''' + AnalyzerTestWrapper( + test_file='test_reaches_5.mal', + error_msg="Attack step 'lenovoStep' not defined for asset 'Computer'" + ) + +def test_reaches_6() -> None: + ''' + Test reaches not pointing to attack step + ''' + AnalyzerTestWrapper( + test_file='test_reaches_6.mal', + error_msg="Attack step 'routers' not defined for asset 'Network'" + ) diff --git a/examples/visitor/tests/test_mal_require.py b/examples/visitor/tests/test_mal_require.py new file mode 100644 index 0000000..9e7d2d4 --- /dev/null +++ b/examples/visitor/tests/test_mal_require.py @@ -0,0 +1,90 @@ +from .mal_analyzer_test_wrapper import AnalyzerTestWrapper + +from pathlib import Path +import pytest + +# This file aims to test the require operator (<-) in MAL. Since a lot of it is already tested in the `exists` test file, +# the objective is to test if the general functionality is working (much like the tests for reaches (->)) + +@pytest.mark.usefixtures("setup_test_environment") +@pytest.mark.parametrize("setup_test_environment", [Path(__file__).parent / "fixtures/require_test_files"], indirect=True) + +def test_require_1() -> None: + ''' + Test require correctly + ''' + AnalyzerTestWrapper( + test_file='test_require_1.mal' + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1','Asset2','Asset3'] + ) + +def test_require_2() -> None: + ''' + Test require correctly with many assets required + ''' + AnalyzerTestWrapper( + test_file='test_require_2.mal' + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1','Asset2','Asset3'] + ) + +def test_require_3() -> None: + ''' + Test require with non-existing asset + ''' + AnalyzerTestWrapper( + test_file='test_require_3.mal', + error_msg="Field 'a4' not defined for asset 'Asset1'\n" + + "Line 6: All expressions in requires ('<-') must point to a valid asset" + ) + +def test_require_4() -> None: + ''' + Test require with asset from parent's association + ''' + AnalyzerTestWrapper( + test_file='test_require_4.mal' + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1','Asset2','Asset3', 'Asset0'] + ) + +def test_require_5() -> None: + ''' + Test require with asset from child's association + ''' + AnalyzerTestWrapper( + test_file='test_require_5.mal', + error_msg="Field 'a2' not defined for asset 'Asset1'\n" + + "Line 10: All expressions in requires ('<-') must point to a valid asset" + + ) + +def test_require_6() -> None: + ''' + Test require pointing to attack step + ''' + AnalyzerTestWrapper( + test_file='test_require_6.mal', + error_msg="Field 'asset2_Step' not defined for asset 'Asset2'\n" + \ + "Line 6: All expressions in requires ('<-') must point to a valid asset" + ) + +def test_require_7() -> None: + ''' + Test require using complex expression + ''' + AnalyzerTestWrapper( + test_file='test_require_7.mal' + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Network', 'Computer', 'OperatingSystem', 'Linux', 'Windows', 'WindowsVista', + 'FileSystem', 'SubFolder', 'Folder', 'File', 'ConfigFile', 'RootFile', 'NonRootFile'] + ) \ No newline at end of file diff --git a/examples/visitor/tests/test_mal_risk_type.py b/examples/visitor/tests/test_mal_risk_type.py new file mode 100644 index 0000000..cfa6d0f --- /dev/null +++ b/examples/visitor/tests/test_mal_risk_type.py @@ -0,0 +1,58 @@ +from .mal_analyzer_test_wrapper import AnalyzerTestWrapper + +from pathlib import Path +import pytest + +''' +A file to test different cases of the Risk type (C, I, A) instruction in MAL. +''' + +@pytest.mark.usefixtures("setup_test_environment") +@pytest.mark.parametrize("setup_test_environment", [Path(__file__).parent / "fixtures/risk_type_test_files"], indirect=True) + +def test_risk_type_1() -> None: + ''' + Defines risk types correctly + ''' + AnalyzerTestWrapper( + test_file="test_risk_type_1.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['CIA_TEST'] + ) + +def test_risk_type_2() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines asset with name. + Defines risk types. + define I twice + ''' + AnalyzerTestWrapper( + test_file="test_risk_type_2.mal" + ).test( + warn=True, + defines=['id', 'version'], + categories=['System'], + assets=['CIA_TEST'] + ) + +def test_risk_type_3() -> None: + ''' + Defines CIA for an existance step + ''' + AnalyzerTestWrapper( + test_file="test_risk_type_3.mal", + error_msg="Line 6: exist: Defenses cannot have CIA classifications" + ) + +def test_risk_type_4() -> None: + ''' + Defines CIA for a defense step + ''' + AnalyzerTestWrapper( + test_file="test_risk_type_4.mal", + error_msg="Line 6: defense: Defenses cannot have CIA classifications" + ) diff --git a/examples/visitor/tests/test_mal_step.py b/examples/visitor/tests/test_mal_step.py new file mode 100644 index 0000000..155ff81 --- /dev/null +++ b/examples/visitor/tests/test_mal_step.py @@ -0,0 +1,76 @@ +from .mal_analyzer_test_wrapper import AnalyzerTestWrapper + +from pathlib import Path +import pytest + +''' +A file to test different cases of the step creation in MAL, i.e. if step repetition in the same asset is detected +''' + +@pytest.mark.usefixtures("setup_test_environment") +@pytest.mark.parametrize("setup_test_environment", [Path(__file__).parent / "fixtures/step_test_files"], indirect=True) + +def test_step_1() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines asset with name. + Defines steps with name. + ''' + AnalyzerTestWrapper( + test_file="test_step_1.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Test'] + ) + +def test_step_2() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines asset with name. + Defines steps with same name and other type. + ''' + AnalyzerTestWrapper( + test_file="test_step_2.mal", + error_msg="Attack step 'step1' previously defined at 6" + ) + +def test_step_3() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines asset with name. + Defines steps with same name and same type. + ''' + AnalyzerTestWrapper( + test_file="test_step_3.mal", + error_msg="Attack step 'step1' previously defined at 6" + ) + +def test_step_4() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines asset with name. + ''' + AnalyzerTestWrapper( + test_file="test_step_4.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Test'] + ) + +def test_step_5() -> None: + ''' + Test if two assets with steps with the same name can exist + ''' + AnalyzerTestWrapper( + test_file="test_step_5.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Test','AnotherTest'] + ) \ No newline at end of file diff --git a/examples/visitor/tests/test_mal_steps.py b/examples/visitor/tests/test_mal_steps.py new file mode 100644 index 0000000..28d9239 --- /dev/null +++ b/examples/visitor/tests/test_mal_steps.py @@ -0,0 +1,181 @@ +from .mal_analyzer_test_wrapper import AnalyzerTestWrapper + +from pathlib import Path +import pytest +import os + +''' +A file to test different if steps respect the hierarchy of the assets, namely when using '+>' +''' + +@pytest.mark.usefixtures("setup_test_environment") +@pytest.mark.parametrize("setup_test_environment", [Path(__file__).parent / "fixtures/steps_test_files"], indirect=True) + +def test_steps_1() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines asset with name. + ''' + AnalyzerTestWrapper( + test_file="test_steps_1.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Test'] + ) + +def test_steps_2() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines asset with name. + Defines a step with '+>' when there isn't parent asset with that step + ''' + AnalyzerTestWrapper( + test_file="test_steps_2.mal", + error_msg="Cannot inherit attack step 'spyware' without previous definition" + ) + +def test_steps_3() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines asset with name. + Defines a step with '+>' when there is another asset with that step but it isn't extended + ''' + AnalyzerTestWrapper( + test_file="test_steps_3.mal", + error_msg="Cannot inherit attack step 'spyware' without previous definition" + ) + +def test_steps_4() -> None: + ''' + Define two assets which do not extend a parent and have steps without '+>' + ''' + AnalyzerTestWrapper( + test_file="test_steps_4.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Linux', 'OperatingSystem'] + ) + +def test_steps_5() -> None: + ''' + Define an asset with a step inherited from the parent but with different types (&) + ''' + AnalyzerTestWrapper( + test_file="test_steps_5.mal", + error_msg="Cannot override attack step 'spyware' previously defined at 6 with different type '|' =/= '&" + ) + +def test_steps_6() -> None: + ''' + Define an asset with a step inherited from the parent but with different types (|) + ''' + AnalyzerTestWrapper( + test_file="test_steps_6.mal", + error_msg="Cannot override attack step 'spyware' previously defined at 6 with different type '&' =/= '|'" + ) + +def test_steps_7() -> None: + ''' + Define an asset with a step inherited from the parent but with different types (E) + ''' + AnalyzerTestWrapper( + test_file="test_steps_7.mal", + error_msg="Cannot override attack step 'compromiseCamera' previously defined at 6 with different type '!E' =/= 'E'" + ) + +def test_steps_8() -> None: + ''' + Define an asset with a step inherited from the parent but with different types (!E) + ''' + AnalyzerTestWrapper( + test_file="test_steps_8.mal", + error_msg="Cannot override attack step 'noCamera' previously defined at 6 with different type 'E' =/= '!E'" + ) + +def test_steps_9() -> None: + ''' + Test '+>' in a longer hierarchy + ''' + AnalyzerTestWrapper( + test_file="test_steps_9.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Machine', 'Computer','Thinkpad'] + ) + +def test_steps_10() -> None: + ''' + Test wrong type of extend step in a longer hierarchy + ''' + AnalyzerTestWrapper( + test_file="test_steps_10.mal", + error_msg="Cannot override attack step 'compromise' previously defined at 5 with different type '&' =/= '|'" + ) + +def test_steps_11() -> None: + ''' + Defines correct version and ID. + Defines category with name. + Defines asset with name. + Tests if two steps with the same names in different assets with different types does not throw error + ''' + AnalyzerTestWrapper( + test_file="test_steps_11.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Linux', 'OperatingSystem'] + ) + +def test_steps_12() -> None: + ''' + Test if '+>' works if the extended asset is in another file + ''' + AnalyzerTestWrapper( + test_file="test_steps_12.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Machine', 'Computer','Thinkpad'] + ) + +def test_steps_13() -> None: + ''' + Test if mismatched step types works if the extended asset is in another file + ''' + AnalyzerTestWrapper( + test_file="test_steps_13.mal", + error_msg="Cannot override attack step 'compromise' previously defined at 2 with different type '&' =/= '|'" + ) + +def test_steps_14() -> None: + ''' + Test inherit parent steps + ''' + AnalyzerTestWrapper( + test_file="test_steps_14.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1', 'Asset2', 'Asset3', 'Asset4'], + steps = [('Asset1',['step1']), ('Asset2',['step1','step2']), ( + 'Asset3', ['step1','step2','step3']), ('Asset4',['step1','step2','step3','step4'])] + ) + +def test_steps_15() -> None: + ''' + A complex example which should work + ''' + AnalyzerTestWrapper( + test_file="test_steps_15.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Linux', 'Camera'] + ) \ No newline at end of file diff --git a/examples/visitor/tests/test_mal_substitution.py b/examples/visitor/tests/test_mal_substitution.py new file mode 100644 index 0000000..4238444 --- /dev/null +++ b/examples/visitor/tests/test_mal_substitution.py @@ -0,0 +1,87 @@ +from .mal_analyzer_test_wrapper import AnalyzerTestWrapper + +from pathlib import Path +import pytest + +''' +This file aims to test the call/substitution operator (A.X()) in MAL +''' + +@pytest.mark.usefixtures("setup_test_environment") +@pytest.mark.parametrize("setup_test_environment", [Path(__file__).parent / "fixtures/substitution_test_files"], indirect=True) + +def test_substitution_1() -> None: + ''' + Test substitution correctly + ''' + AnalyzerTestWrapper( + test_file="test_substitution_1.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Network', 'Computer', 'OperatingSystem'] + ) + +def test_substitution_2() -> None: + ''' + Test substitution with a non existing variable + ''' + AnalyzerTestWrapper( + test_file="test_substitution_2.mal", + error_msg="Variable 'hostsOperatingSystems' is not defined\n" + \ + "Line 9: All expressions in reaches ('->') must point to a valid attack step" + ) + +def test_substitution_3() -> None: + ''' + Test substitution with an existing variable, but forget to call it, i.e. do not use parenthesis + ''' + AnalyzerTestWrapper( + test_file="test_substitution_3.mal", + error_msg="Field 'hostsOperatingSystems' not defined for asset 'Network', did you mean the variable 'hostsOperatingSystems()'?\n" + \ + "Line 6: All expressions in reaches ('->') must point to a valid attack step" + ) + +def test_substitution_4() -> None: + ''' + Try to call a variable defined in the parent + ''' + AnalyzerTestWrapper( + test_file="test_substitution_4.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Network', 'SubNet', 'Computer', 'OperatingSystem'] + ) + +def test_substitution_5() -> None: + ''' + Try to call a variable defined in a parent in a complex hierarchy + ''' + AnalyzerTestWrapper( + test_file="test_substitution_5.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Hardware', 'Machine', 'Computer', 'Lenovo', 'LenovoThinkPad'] + ) + +def test_substitution_6() -> None: + ''' + Try to call a variable defined in the child + ''' + AnalyzerTestWrapper( + test_file="test_substitution_6.mal", + error_msg="Variable 'hostsOperatingSystems' is not defined\n" + \ + "Line 5: All expressions in reaches ('->') must point to a valid attack step" + ) + +def test_substitution_7() -> None: + ''' + Try to call a variable defined in another asset + ''' + AnalyzerTestWrapper( + test_file="test_substitution_7.mal", + error_msg="Variable 'physicalComponents' is not defined\n" + \ + "Line 14: All expressions in reaches ('->') must point to a valid attack step" + ) diff --git a/examples/visitor/tests/test_mal_subtype.py b/examples/visitor/tests/test_mal_subtype.py new file mode 100644 index 0000000..cd20c3f --- /dev/null +++ b/examples/visitor/tests/test_mal_subtype.py @@ -0,0 +1,66 @@ +from .mal_analyzer_test_wrapper import AnalyzerTestWrapper + +from pathlib import Path +import pytest + +''' +File to test the subtype expression in MAL +''' + +@pytest.mark.usefixtures("setup_test_environment") +@pytest.mark.parametrize("setup_test_environment", [Path(__file__).parent / "fixtures/subtype_test_files"], indirect=True) + +def test_subtype_1() -> None: + ''' + Test subtype correctly (defined in variable) + ''' + AnalyzerTestWrapper( + test_file="test_subtype_1.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Computer', 'Windows', 'Linux', 'OperatingSystem'] + ) + +def test_subtype_2() -> None: + ''' + Test subtype correctly (defined in step) + ''' + AnalyzerTestWrapper( + test_file="test_subtype_2.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Computer', 'Windows', 'Linux', 'OperatingSystem'] + ) + +def test_subtype_3() -> None: + ''' + Test subtype without inheritance relationship (given X[A], a is not a child of X) + ''' + AnalyzerTestWrapper( + test_file="test_subtype_3.mal", + error_msg="Asset 'Windows' cannot be of type 'OperatingSystem'\n" + \ + "Line 6: All expressions in reaches ('->') must point to a valid attack step" + ) + +def test_subtype_4() -> None: + ''' + Test subtype, but with a wrong attack step + ''' + AnalyzerTestWrapper( + test_file="test_subtype_4.mal", + error_msg="Attack step 'foundLinux' not defined for asset 'Windows'" + ) + +def test_subtype_5() -> None: + ''' + Test subtype in a long hierarchy + ''' + AnalyzerTestWrapper( + test_file="test_subtype_5.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Computer', 'Windows', 'WindowsVista', 'WindowsVistaProfessional', 'OperatingSystem'] + ) \ No newline at end of file diff --git a/examples/visitor/tests/test_mal_transitive.py b/examples/visitor/tests/test_mal_transitive.py new file mode 100644 index 0000000..8f0aa7a --- /dev/null +++ b/examples/visitor/tests/test_mal_transitive.py @@ -0,0 +1,67 @@ +from .mal_analyzer_test_wrapper import AnalyzerTestWrapper + +from pathlib import Path +import pytest + +''' +File to test the transitive step (X*.A) in MAL +''' + +@pytest.mark.usefixtures("setup_test_environment") +@pytest.mark.parametrize("setup_test_environment", [Path(__file__).parent / "fixtures/transitive_test_files"], indirect=True) + +def test_transitive_1() -> None: + ''' + Correctly define a transitive expression (in a step) + ''' + AnalyzerTestWrapper( + test_file="test_transitive_1.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Computer', 'Folder', 'SubFolder'] + ) + +def test_transitive_2() -> None: + ''' + Correctly define a transitive expression (in a variable) + ''' + AnalyzerTestWrapper( + test_file="test_transitive_2.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Computer', 'Folder', 'SubFolder'] + ) + +def test_transitive_3() -> None: + ''' + Create a transitive expression when there is no inheritance + relationship between X and A (A is not a child of X, given X.A*) + ''' + AnalyzerTestWrapper( + test_file="test_transitive_3.mal", + error_msg="Previous asset 'Folder' is not of type 'SubFolder'\n" + \ + "Variable 'recursive_subfolders' defined at 6 does not point to an asset" + ) + +def test_transitive_4() -> None: + ''' + Test transitive step in a long hierarchy + ''' + AnalyzerTestWrapper( + test_file="test_transitive_4.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Computer', 'FileSystem', 'FileSystemEntries', 'Folder', 'SubFolder'] + ) + +def test_transitive_5() -> None: + ''' + Define a transitive expression, but call it without a step belonging to the asset + ''' + AnalyzerTestWrapper( + test_file="test_transitive_5.mal", + error_msg="Attack step 'wrongStep' not defined for asset 'SubFolder'" + ) diff --git a/examples/visitor/tests/test_mal_ttc.py b/examples/visitor/tests/test_mal_ttc.py new file mode 100644 index 0000000..5a8780f --- /dev/null +++ b/examples/visitor/tests/test_mal_ttc.py @@ -0,0 +1,568 @@ +from .mal_analyzer_test_wrapper import AnalyzerTestWrapper + +from pathlib import Path +import pytest + +''' +File to test Time To Compromise (TTC) expressions in MAL +''' + +@pytest.mark.usefixtures("setup_test_environment") +@pytest.mark.parametrize("setup_test_environment", [Path(__file__).parent / "fixtures/ttc_test_files/"], indirect=True) + +# TESTS FOR BERNOULLI + +def test_ttc_1() -> None: + ''' + Test correct Bernoulli + ''' + AnalyzerTestWrapper( + test_file="test_ttc_1.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1'] + ) + +def test_ttc_2() -> None: + ''' + Test Bernoulli with more than one parameter + ''' + AnalyzerTestWrapper( + test_file="test_ttc_2.mal", + error_msg="Expected exactly one parameter (probability), for Bernoulli distribution" + ) + +def test_ttc_3() -> None: + ''' + Test Bernoulli without parameters + ''' + AnalyzerTestWrapper( + test_file="test_ttc_3.mal", + error_msg="Expected exactly one parameter (probability), for Bernoulli distribution" + ) + +def test_ttc_4() -> None: + ''' + Test Bernoulli with invalid parameter + ''' + AnalyzerTestWrapper( + test_file="test_ttc_4.mal", + error_msg="2.0 is not in valid range '0 <= probability <= 1', for Bernoulli distribution" + ) + +# TESTS FOR BINOMIAL + +def test_ttc_5() -> None: + ''' + Test correct Binomial + ''' + AnalyzerTestWrapper( + test_file="test_ttc_5.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1'] + ) + +def test_ttc_6() -> None: + ''' + Test Binomial with more than two parameters + ''' + AnalyzerTestWrapper( + test_file="test_ttc_6.mal", + error_msg="Expected exactly two parameters (trials, probability), for Binomial distribution" + ) + +def test_ttc_7() -> None: + ''' + Test Binomial with one parameter + ''' + AnalyzerTestWrapper( + test_file="test_ttc_7.mal", + error_msg="Expected exactly two parameters (trials, probability), for Binomial distribution" + ) + +def test_ttc_8() -> None: + ''' + Test Binomial with invalid parameter + ''' + AnalyzerTestWrapper( + test_file="test_ttc_8.mal", + error_msg="2.0 is not in valid range '0 <= probability <= 1', for Binomial distribution" + ) + +# TESTS FOR EXPONENTIAL + +def test_ttc_9() -> None: + ''' + Test correct Exponential + ''' + AnalyzerTestWrapper( + test_file="test_ttc_9.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1'] + ) + +def test_ttc_10() -> None: + ''' + Test Exponential with more than one parameter + ''' + AnalyzerTestWrapper( + test_file="test_ttc_10.mal", + error_msg = "Expected exactly one parameter (lambda), for Exponential distribution" + ) + +def test_ttc_11() -> None: + ''' + Test Exponential without parameters + ''' + AnalyzerTestWrapper( + test_file="test_ttc_11.mal", + error_msg = "Expected exactly one parameter (lambda), for Exponential distribution" + ) + +def test_ttc_12() -> None: + ''' + Test Exponential with invalid parameter + ''' + AnalyzerTestWrapper( + test_file="test_ttc_12.mal", + error_msg = "0 is not in valid range 'lambda > 0', for Exponential distribution" + ) + +# TESTS FOR GAMMA + +def test_ttc_13() -> None: + ''' + Test correct Gamma + ''' + AnalyzerTestWrapper( + test_file="test_ttc_13.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1'] + ) + +def test_ttc_14() -> None: + ''' + Test Gamma with more than two parameters + ''' + AnalyzerTestWrapper( + test_file="test_ttc_14.mal", + error_msg = "Expected exactly two parameters (shape, scale), for Gamma distribution" + ) + +def test_ttc_15() -> None: + ''' + Test Gamma with one parameter + ''' + AnalyzerTestWrapper( + test_file="test_ttc_15.mal", + error_msg = "Expected exactly two parameters (shape, scale), for Gamma distribution" + ) + +def test_ttc_16() -> None: + ''' + Test Gamma with invalid first parameter + ''' + AnalyzerTestWrapper( + test_file="test_ttc_16.mal", + error_msg = "0 is not in valid range 'shape > 0', for Gamma distribution" + ) + +def test_ttc_17() -> None: + ''' + Test Gamma with invalid second parameter + ''' + AnalyzerTestWrapper( + test_file="test_ttc_17.mal", + error_msg = "0 is not in valid range 'scale > 0', for Gamma distribution" + ) + +# TESTS FOR LOGNORMAL + +def test_ttc_18() -> None: + ''' + Test correct LogNormal + ''' + AnalyzerTestWrapper( + test_file="test_ttc_18.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1'] + ) + +def test_ttc_19() -> None: + ''' + Test LogNormal with more than two parameters + ''' + AnalyzerTestWrapper( + test_file="test_ttc_19.mal", + error_msg = "Expected exactly two parameters (mean, standardDeviation), for LogNormal distribution" + ) + +def test_ttc_20() -> None: + ''' + Test LogNormal with one parameter + ''' + AnalyzerTestWrapper( + test_file="test_ttc_20.mal", + error_msg = "Expected exactly two parameters (mean, standardDeviation), for LogNormal distribution" + ) + +def test_ttc_21() -> None: + ''' + Test LogNormal with invalid standardDeviation + ''' + AnalyzerTestWrapper( + test_file="test_ttc_21.mal", + error_msg = "0 is not in valid range 'standardDeviation > 0', for LogNormal distribution" + ) + +# TESTS FOR PARETO + +def test_ttc_22() -> None: + ''' + Test correct Pareto + ''' + AnalyzerTestWrapper( + test_file="test_ttc_22.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1'] + ) + +def test_ttc_23() -> None: + ''' + Test Pareto with more than two parameters + ''' + AnalyzerTestWrapper( + test_file="test_ttc_23.mal", + error_msg = "Expected exactly two parameters (min, shape), for Pareto distribution" + ) + +def test_ttc_24() -> None: + ''' + Test Pareto with one parameter + ''' + AnalyzerTestWrapper( + test_file="test_ttc_24.mal", + error_msg = "Expected exactly two parameters (min, shape), for Pareto distribution" + ) + +def test_ttc_25() -> None: + ''' + Test Pareto with invalid min + ''' + AnalyzerTestWrapper( + test_file="test_ttc_25.mal", + error_msg = "0 is not in valid range 'min > 0', for Pareto distribution" + ) + +def test_ttc_26() -> None: + ''' + Test Pareto with invalid shape + ''' + AnalyzerTestWrapper( + test_file="test_ttc_26.mal", + error_msg = "0 is not in valid range 'shape > 0', for Pareto distribution" + ) + +# TESTS FOR TRUNCATEDNORMAL + +def test_ttc_27() -> None: + ''' + Test correct TruncatedNormal + ''' + AnalyzerTestWrapper( + test_file="test_ttc_27.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1'] + ) + +def test_ttc_28() -> None: + ''' + Test TruncatedNormal with more than two parameters + ''' + AnalyzerTestWrapper( + test_file="test_ttc_28.mal", + error_msg = "Expected exactly two parameters (mean, standardDeviation), for TruncatedNormal distribution" + ) + +def test_ttc_29() -> None: + ''' + Test TruncatedNormal with one parameter + ''' + AnalyzerTestWrapper( + test_file="test_ttc_29.mal", + error_msg = "Expected exactly two parameters (mean, standardDeviation), for TruncatedNormal distribution" + ) + +def test_ttc_30() -> None: + ''' + Test TruncatedNormal with invalid standard deviation + ''' + AnalyzerTestWrapper( + test_file="test_ttc_30.mal", + error_msg = "0 is not in valid range 'standardDeviation > 0', for TruncatedNormal distribution" + ) + +# TESTS FOR UNIFORM + +def test_ttc_31() -> None: + ''' + Test correct Uniform + ''' + AnalyzerTestWrapper( + test_file="test_ttc_31.mal" + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1'] + ) + +def test_ttc_32() -> None: + ''' + Test Uniform with more than two parameters + ''' + AnalyzerTestWrapper( + test_file="test_ttc_32.mal", + error_msg = "Expected exactly two parameters (min, max), for Uniform distribution" + ) + +def test_ttc_33() -> None: + ''' + Test Uniform with one parameter + ''' + AnalyzerTestWrapper( + test_file="test_ttc_33.mal", + error_msg = "Expected exactly two parameters (min, max), for Uniform distribution" + ) + +def test_ttc_34() -> None: + ''' + Test Uniform with min greater than max + ''' + AnalyzerTestWrapper( + test_file="test_ttc_34.mal", + error_msg = "(5.0, 4.0) does not meet requirement 'min <= max', for Uniform distribution" + ) + +# TESTS FOR COMBINATIONS +def test_ttc_35() -> None: + ''' + Test correct Infinity + ''' + AnalyzerTestWrapper( + test_file="test_ttc_35.mal", + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1'] + ) + +def test_ttc_36() -> None: + ''' + Test incorrect Infinity + ''' + AnalyzerTestWrapper( + test_file="test_ttc_36.mal", + error_msg = "Expected exactly zero parameters, for combination distributions" + ) + +def test_ttc_37() -> None: + ''' + Test correct Zero + ''' + AnalyzerTestWrapper( + test_file="test_ttc_37.mal", + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1'] + ) + +def test_ttc_38() -> None: + ''' + Test incorrect Zero + ''' + AnalyzerTestWrapper( + test_file="test_ttc_38.mal", + error_msg = "Expected exactly zero parameters, for combination distributions" + ) + +def test_ttc_39() -> None: + ''' + Test correct EasyAndCertain + ''' + AnalyzerTestWrapper( + test_file="test_ttc_39.mal", + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1'] + ) + +def test_ttc_40() -> None: + ''' + Test incorrect EasyAndCertain + ''' + AnalyzerTestWrapper( + test_file="test_ttc_40.mal", + error_msg = "Expected exactly zero parameters, for combination distributions" + ) + +def test_ttc_41() -> None: + ''' + Test correct EasyAndUncertain + ''' + AnalyzerTestWrapper( + test_file="test_ttc_41.mal", + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1'] + ) + +def test_ttc_42() -> None: + ''' + Test incorrect EasyAndUncertain + ''' + AnalyzerTestWrapper( + test_file="test_ttc_42.mal", + error_msg = "Expected exactly zero parameters, for combination distributions" + ) + +def test_ttc_43() -> None: + ''' + Test correct HardAndCertain + ''' + AnalyzerTestWrapper( + test_file="test_ttc_43.mal", + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1'] + ) + +def test_ttc_44() -> None: + ''' + Test incorrect HardAndCertain + ''' + AnalyzerTestWrapper( + test_file="test_ttc_44.mal", + error_msg = "Expected exactly zero parameters, for combination distributions" + ) + +def test_ttc_45() -> None: + ''' + Test correct HardAndUncertain + ''' + AnalyzerTestWrapper( + test_file="test_ttc_45.mal", + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1'] + ) + +def test_ttc_46() -> None: + ''' + Test incorrect HardAndUncertain + ''' + AnalyzerTestWrapper( + test_file="test_ttc_46.mal", + error_msg = "Expected exactly zero parameters, for combination distributions" + ) + +def test_ttc_47() -> None: + ''' + Test correct VeryHardAndCertain + ''' + AnalyzerTestWrapper( + test_file="test_ttc_47.mal", + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1'] + ) + +def test_ttc_48() -> None: + ''' + Test incorrect VeryHardAndCertain + ''' + AnalyzerTestWrapper( + test_file="test_ttc_48.mal", + error_msg = "Expected exactly zero parameters, for combination distributions" + ) + +def test_ttc_49() -> None: + ''' + Test correct VeryHardAndUncertain + ''' + AnalyzerTestWrapper( + test_file="test_ttc_49.mal", + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1'] + ) + +def test_ttc_50() -> None: + ''' + Test incorrect VeryHardAndUncertain + ''' + AnalyzerTestWrapper( + test_file="test_ttc_50.mal", + error_msg = "Expected exactly zero parameters, for combination distributions" + ) + +def test_ttc_51() -> None: + ''' + Test correct Enabled + ''' + AnalyzerTestWrapper( + test_file="test_ttc_51.mal", + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1'] + ) + +def test_ttc_52() -> None: + ''' + Test incorrect Enabled + ''' + AnalyzerTestWrapper( + test_file="test_ttc_52.mal", + error_msg = "Expected exactly zero parameters, for combination distributions" + ) + +def test_ttc_53() -> None: + ''' + Test correct Disabled + ''' + AnalyzerTestWrapper( + test_file="test_ttc_53.mal", + ).test( + defines=['id', 'version'], + categories=['System'], + assets=['Asset1'] + ) + +def test_ttc_54() -> None: + ''' + Test incorrect Disabled + ''' + AnalyzerTestWrapper( + test_file="test_ttc_54.mal", + error_msg = "Expected exactly zero parameters, for combination distributions" + ) \ No newline at end of file From 896db1daf0a232a38d05a511f2b7aa4f75673a52 Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Tue, 13 May 2025 17:11:57 +0200 Subject: [PATCH 26/45] chore: generate grammar --- src/grammar.json | 80 +- src/node-types.json | 4 +- src/parser.c | 6235 ++++++++++++++++++++++--------------------- 3 files changed, 3223 insertions(+), 3096 deletions(-) diff --git a/src/grammar.json b/src/grammar.json index 5eb59cd..f6e5521 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -323,17 +323,20 @@ "type": "FIELD", "name": "tag", "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "@" - }, - { - "type": "SYMBOL", - "name": "identifier" - } - ] + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "@" + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + } } }, { @@ -404,8 +407,11 @@ "type": "FIELD", "name": "detector", "content": { - "type": "SYMBOL", - "name": "detector" + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "detector" + } } }, { @@ -813,27 +819,35 @@ "type": "FIELD", "name": "values", "content": { - "type": "SEQ", + "type": "CHOICE", "members": [ { - "type": "SYMBOL", - "name": "_number" + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_number" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_number" + } + ] + } + } + ] }, { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "_number" - } - ] - } + "type": "BLANK" } ] } @@ -1161,7 +1175,7 @@ }, { "type": "PREC_LEFT", - "value": "binary_mul", + "value": "binary_plus", "content": { "type": "SEQ", "members": [ @@ -1194,7 +1208,7 @@ }, { "type": "PREC_LEFT", - "value": "binary_mul", + "value": "binary_plus", "content": { "type": "SEQ", "members": [ @@ -1227,7 +1241,7 @@ }, { "type": "PREC_LEFT", - "value": "binary_exp", + "value": "binary_mul", "content": { "type": "SEQ", "members": [ diff --git a/src/node-types.json b/src/node-types.json index d686a3d..df3b832 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -461,7 +461,7 @@ ] }, "detector": { - "multiple": false, + "multiple": true, "required": false, "types": [ { @@ -1089,7 +1089,7 @@ }, "values": { "multiple": true, - "required": true, + "required": false, "types": [ { "type": ",", diff --git a/src/parser.c b/src/parser.c index 4fff3e4..23b6adc 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1,4 +1,4 @@ -/* Automatically generated by tree-sitter v0.25.1 */ +/* Automatically generated by tree-sitter v0.25.3 */ #include "tree_sitter/parser.h" @@ -7,9 +7,9 @@ #endif #define LANGUAGE_VERSION 15 -#define STATE_COUNT 324 +#define STATE_COUNT 323 #define LARGE_STATE_COUNT 2 -#define SYMBOL_COUNT 93 +#define SYMBOL_COUNT 95 #define ALIAS_COUNT 1 #define TOKEN_COUNT 46 #define EXTERNAL_TOKEN_COUNT 0 @@ -106,13 +106,15 @@ enum ts_symbol_identifiers { aux_sym_category_declaration_repeat1 = 84, aux_sym_category_declaration_repeat2 = 85, aux_sym_asset_definition_repeat1 = 86, - aux_sym_cias_repeat1 = 87, - aux_sym_detector_name_repeat1 = 88, - aux_sym_detector_context_repeat1 = 89, - aux_sym_preconditions_repeat1 = 90, - aux_sym_ttc_distribution_repeat1 = 91, - aux_sym_associations_declaration_repeat1 = 92, - alias_sym_meta_string = 93, + aux_sym_attack_step_repeat1 = 87, + aux_sym_attack_step_repeat2 = 88, + aux_sym_cias_repeat1 = 89, + aux_sym_detector_name_repeat1 = 90, + aux_sym_detector_context_repeat1 = 91, + aux_sym_preconditions_repeat1 = 92, + aux_sym_ttc_distribution_repeat1 = 93, + aux_sym_associations_declaration_repeat1 = 94, + alias_sym_meta_string = 95, }; static const char * const ts_symbol_names[] = { @@ -203,6 +205,8 @@ static const char * const ts_symbol_names[] = { [aux_sym_category_declaration_repeat1] = "category_declaration_repeat1", [aux_sym_category_declaration_repeat2] = "category_declaration_repeat2", [aux_sym_asset_definition_repeat1] = "asset_definition_repeat1", + [aux_sym_attack_step_repeat1] = "attack_step_repeat1", + [aux_sym_attack_step_repeat2] = "attack_step_repeat2", [aux_sym_cias_repeat1] = "cias_repeat1", [aux_sym_detector_name_repeat1] = "detector_name_repeat1", [aux_sym_detector_context_repeat1] = "detector_context_repeat1", @@ -300,6 +304,8 @@ static const TSSymbol ts_symbol_map[] = { [aux_sym_category_declaration_repeat1] = aux_sym_category_declaration_repeat1, [aux_sym_category_declaration_repeat2] = aux_sym_category_declaration_repeat2, [aux_sym_asset_definition_repeat1] = aux_sym_asset_definition_repeat1, + [aux_sym_attack_step_repeat1] = aux_sym_attack_step_repeat1, + [aux_sym_attack_step_repeat2] = aux_sym_attack_step_repeat2, [aux_sym_cias_repeat1] = aux_sym_cias_repeat1, [aux_sym_detector_name_repeat1] = aux_sym_detector_name_repeat1, [aux_sym_detector_context_repeat1] = aux_sym_detector_context_repeat1, @@ -658,6 +664,14 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = false, .named = false, }, + [aux_sym_attack_step_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_attack_step_repeat2] = { + .visible = false, + .named = false, + }, [aux_sym_cias_repeat1] = { .visible = false, .named = false, @@ -781,158 +795,158 @@ static const TSMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { [17] = {.index = 34, .length = 3}, [18] = {.index = 37, .length = 3}, [19] = {.index = 40, .length = 3}, - [20] = {.index = 43, .length = 2}, - [21] = {.index = 45, .length = 3}, + [20] = {.index = 43, .length = 3}, + [21] = {.index = 46, .length = 2}, [22] = {.index = 48, .length = 3}, - [23] = {.index = 51, .length = 4}, - [24] = {.index = 55, .length = 1}, - [25] = {.index = 56, .length = 1}, - [26] = {.index = 57, .length = 2}, - [27] = {.index = 59, .length = 4}, - [28] = {.index = 63, .length = 4}, - [29] = {.index = 67, .length = 4}, - [30] = {.index = 71, .length = 4}, - [31] = {.index = 75, .length = 4}, - [32] = {.index = 79, .length = 4}, - [33] = {.index = 83, .length = 4}, - [34] = {.index = 87, .length = 4}, - [35] = {.index = 91, .length = 4}, - [36] = {.index = 95, .length = 4}, - [37] = {.index = 99, .length = 4}, - [38] = {.index = 103, .length = 4}, - [39] = {.index = 107, .length = 4}, - [40] = {.index = 111, .length = 4}, - [41] = {.index = 115, .length = 2}, - [42] = {.index = 117, .length = 5}, - [43] = {.index = 122, .length = 5}, - [44] = {.index = 127, .length = 5}, - [45] = {.index = 132, .length = 5}, - [46] = {.index = 137, .length = 5}, - [47] = {.index = 142, .length = 5}, - [48] = {.index = 147, .length = 2}, - [49] = {.index = 149, .length = 2}, - [50] = {.index = 151, .length = 2}, - [51] = {.index = 153, .length = 2}, - [52] = {.index = 155, .length = 3}, - [53] = {.index = 158, .length = 5}, - [54] = {.index = 163, .length = 5}, - [55] = {.index = 168, .length = 5}, - [56] = {.index = 173, .length = 5}, - [57] = {.index = 178, .length = 5}, - [58] = {.index = 183, .length = 5}, - [59] = {.index = 188, .length = 5}, - [60] = {.index = 193, .length = 5}, - [61] = {.index = 198, .length = 5}, - [62] = {.index = 203, .length = 5}, - [63] = {.index = 208, .length = 5}, - [64] = {.index = 213, .length = 5}, - [65] = {.index = 218, .length = 1}, - [66] = {.index = 219, .length = 3}, - [67] = {.index = 222, .length = 6}, - [68] = {.index = 228, .length = 6}, - [69] = {.index = 234, .length = 6}, - [70] = {.index = 240, .length = 6}, - [71] = {.index = 246, .length = 6}, - [72] = {.index = 252, .length = 6}, - [73] = {.index = 258, .length = 6}, - [74] = {.index = 264, .length = 6}, - [75] = {.index = 270, .length = 6}, - [76] = {.index = 276, .length = 6}, - [77] = {.index = 282, .length = 6}, - [78] = {.index = 288, .length = 6}, - [79] = {.index = 294, .length = 6}, - [80] = {.index = 300, .length = 6}, - [81] = {.index = 306, .length = 6}, - [82] = {.index = 312, .length = 2}, - [83] = {.index = 314, .length = 3}, - [84] = {.index = 317, .length = 3}, - [85] = {.index = 320, .length = 3}, - [86] = {.index = 323, .length = 6}, - [87] = {.index = 329, .length = 6}, - [88] = {.index = 335, .length = 6}, - [89] = {.index = 341, .length = 6}, - [90] = {.index = 347, .length = 6}, - [91] = {.index = 353, .length = 2}, - [92] = {.index = 355, .length = 7}, - [93] = {.index = 362, .length = 7}, - [94] = {.index = 369, .length = 7}, - [95] = {.index = 376, .length = 7}, - [96] = {.index = 383, .length = 7}, - [97] = {.index = 390, .length = 7}, - [98] = {.index = 397, .length = 7}, - [99] = {.index = 404, .length = 7}, - [100] = {.index = 411, .length = 7}, - [101] = {.index = 418, .length = 7}, - [102] = {.index = 425, .length = 7}, - [103] = {.index = 432, .length = 7}, - [104] = {.index = 439, .length = 7}, - [105] = {.index = 446, .length = 7}, - [106] = {.index = 453, .length = 7}, - [107] = {.index = 460, .length = 7}, - [108] = {.index = 467, .length = 7}, - [109] = {.index = 474, .length = 7}, - [110] = {.index = 481, .length = 7}, - [111] = {.index = 488, .length = 7}, - [112] = {.index = 495, .length = 7}, - [113] = {.index = 502, .length = 4}, - [114] = {.index = 506, .length = 2}, - [115] = {.index = 508, .length = 7}, - [116] = {.index = 515, .length = 8}, - [117] = {.index = 523, .length = 8}, - [118] = {.index = 531, .length = 8}, - [119] = {.index = 539, .length = 8}, - [120] = {.index = 547, .length = 8}, - [121] = {.index = 555, .length = 8}, - [122] = {.index = 563, .length = 8}, - [123] = {.index = 571, .length = 8}, - [124] = {.index = 579, .length = 8}, - [125] = {.index = 587, .length = 8}, - [126] = {.index = 595, .length = 8}, - [127] = {.index = 603, .length = 8}, - [128] = {.index = 611, .length = 8}, - [129] = {.index = 619, .length = 8}, - [130] = {.index = 627, .length = 8}, - [131] = {.index = 635, .length = 8}, - [132] = {.index = 643, .length = 8}, - [133] = {.index = 651, .length = 8}, - [134] = {.index = 659, .length = 8}, - [135] = {.index = 667, .length = 8}, - [136] = {.index = 675, .length = 3}, - [137] = {.index = 678, .length = 9}, - [138] = {.index = 687, .length = 9}, - [139] = {.index = 696, .length = 9}, - [140] = {.index = 705, .length = 9}, - [141] = {.index = 714, .length = 9}, - [142] = {.index = 723, .length = 9}, - [143] = {.index = 732, .length = 9}, - [144] = {.index = 741, .length = 9}, - [145] = {.index = 750, .length = 9}, - [146] = {.index = 759, .length = 9}, - [147] = {.index = 768, .length = 9}, - [148] = {.index = 777, .length = 9}, - [149] = {.index = 786, .length = 9}, - [150] = {.index = 795, .length = 9}, - [151] = {.index = 804, .length = 9}, - [152] = {.index = 813, .length = 9}, - [153] = {.index = 822, .length = 7}, - [154] = {.index = 829, .length = 10}, - [155] = {.index = 839, .length = 10}, - [156] = {.index = 849, .length = 10}, - [157] = {.index = 859, .length = 10}, - [158] = {.index = 869, .length = 10}, - [159] = {.index = 879, .length = 10}, - [160] = {.index = 889, .length = 10}, - [161] = {.index = 899, .length = 10}, - [162] = {.index = 909, .length = 10}, - [163] = {.index = 919, .length = 10}, - [164] = {.index = 929, .length = 10}, - [165] = {.index = 939, .length = 8}, - [166] = {.index = 947, .length = 11}, - [167] = {.index = 958, .length = 11}, - [168] = {.index = 969, .length = 11}, - [169] = {.index = 980, .length = 11}, - [170] = {.index = 991, .length = 11}, - [171] = {.index = 1002, .length = 12}, + [23] = {.index = 51, .length = 3}, + [24] = {.index = 54, .length = 1}, + [25] = {.index = 55, .length = 1}, + [26] = {.index = 56, .length = 2}, + [27] = {.index = 58, .length = 4}, + [28] = {.index = 62, .length = 4}, + [29] = {.index = 66, .length = 4}, + [30] = {.index = 70, .length = 4}, + [31] = {.index = 74, .length = 4}, + [32] = {.index = 78, .length = 4}, + [33] = {.index = 82, .length = 4}, + [34] = {.index = 86, .length = 4}, + [35] = {.index = 90, .length = 4}, + [36] = {.index = 94, .length = 4}, + [37] = {.index = 98, .length = 4}, + [38] = {.index = 102, .length = 4}, + [39] = {.index = 106, .length = 4}, + [40] = {.index = 110, .length = 4}, + [41] = {.index = 114, .length = 4}, + [42] = {.index = 118, .length = 4}, + [43] = {.index = 122, .length = 4}, + [44] = {.index = 126, .length = 4}, + [45] = {.index = 130, .length = 4}, + [46] = {.index = 134, .length = 2}, + [47] = {.index = 136, .length = 5}, + [48] = {.index = 141, .length = 2}, + [49] = {.index = 143, .length = 2}, + [50] = {.index = 145, .length = 2}, + [51] = {.index = 147, .length = 2}, + [52] = {.index = 149, .length = 3}, + [53] = {.index = 152, .length = 5}, + [54] = {.index = 157, .length = 5}, + [55] = {.index = 162, .length = 5}, + [56] = {.index = 167, .length = 5}, + [57] = {.index = 172, .length = 5}, + [58] = {.index = 177, .length = 5}, + [59] = {.index = 182, .length = 5}, + [60] = {.index = 187, .length = 5}, + [61] = {.index = 192, .length = 5}, + [62] = {.index = 197, .length = 5}, + [63] = {.index = 202, .length = 5}, + [64] = {.index = 207, .length = 5}, + [65] = {.index = 212, .length = 5}, + [66] = {.index = 217, .length = 5}, + [67] = {.index = 222, .length = 5}, + [68] = {.index = 227, .length = 5}, + [69] = {.index = 232, .length = 5}, + [70] = {.index = 237, .length = 5}, + [71] = {.index = 242, .length = 5}, + [72] = {.index = 247, .length = 5}, + [73] = {.index = 252, .length = 5}, + [74] = {.index = 257, .length = 5}, + [75] = {.index = 262, .length = 1}, + [76] = {.index = 263, .length = 3}, + [77] = {.index = 266, .length = 6}, + [78] = {.index = 272, .length = 6}, + [79] = {.index = 278, .length = 6}, + [80] = {.index = 284, .length = 6}, + [81] = {.index = 290, .length = 6}, + [82] = {.index = 296, .length = 2}, + [83] = {.index = 298, .length = 3}, + [84] = {.index = 301, .length = 3}, + [85] = {.index = 304, .length = 3}, + [86] = {.index = 307, .length = 6}, + [87] = {.index = 313, .length = 6}, + [88] = {.index = 319, .length = 6}, + [89] = {.index = 325, .length = 6}, + [90] = {.index = 331, .length = 6}, + [91] = {.index = 337, .length = 6}, + [92] = {.index = 343, .length = 6}, + [93] = {.index = 349, .length = 6}, + [94] = {.index = 355, .length = 6}, + [95] = {.index = 361, .length = 6}, + [96] = {.index = 367, .length = 6}, + [97] = {.index = 373, .length = 6}, + [98] = {.index = 379, .length = 6}, + [99] = {.index = 385, .length = 6}, + [100] = {.index = 391, .length = 6}, + [101] = {.index = 397, .length = 6}, + [102] = {.index = 403, .length = 2}, + [103] = {.index = 405, .length = 7}, + [104] = {.index = 412, .length = 7}, + [105] = {.index = 419, .length = 7}, + [106] = {.index = 426, .length = 7}, + [107] = {.index = 433, .length = 7}, + [108] = {.index = 440, .length = 7}, + [109] = {.index = 447, .length = 7}, + [110] = {.index = 454, .length = 7}, + [111] = {.index = 461, .length = 7}, + [112] = {.index = 468, .length = 7}, + [113] = {.index = 475, .length = 4}, + [114] = {.index = 479, .length = 2}, + [115] = {.index = 481, .length = 7}, + [116] = {.index = 488, .length = 7}, + [117] = {.index = 495, .length = 7}, + [118] = {.index = 502, .length = 7}, + [119] = {.index = 509, .length = 7}, + [120] = {.index = 516, .length = 7}, + [121] = {.index = 523, .length = 7}, + [122] = {.index = 530, .length = 7}, + [123] = {.index = 537, .length = 7}, + [124] = {.index = 544, .length = 7}, + [125] = {.index = 551, .length = 7}, + [126] = {.index = 558, .length = 8}, + [127] = {.index = 566, .length = 8}, + [128] = {.index = 574, .length = 8}, + [129] = {.index = 582, .length = 8}, + [130] = {.index = 590, .length = 8}, + [131] = {.index = 598, .length = 8}, + [132] = {.index = 606, .length = 8}, + [133] = {.index = 614, .length = 8}, + [134] = {.index = 622, .length = 8}, + [135] = {.index = 630, .length = 8}, + [136] = {.index = 638, .length = 3}, + [137] = {.index = 641, .length = 8}, + [138] = {.index = 649, .length = 8}, + [139] = {.index = 657, .length = 8}, + [140] = {.index = 665, .length = 8}, + [141] = {.index = 673, .length = 8}, + [142] = {.index = 681, .length = 8}, + [143] = {.index = 689, .length = 8}, + [144] = {.index = 697, .length = 8}, + [145] = {.index = 705, .length = 8}, + [146] = {.index = 713, .length = 8}, + [147] = {.index = 721, .length = 8}, + [148] = {.index = 729, .length = 9}, + [149] = {.index = 738, .length = 9}, + [150] = {.index = 747, .length = 9}, + [151] = {.index = 756, .length = 9}, + [152] = {.index = 765, .length = 9}, + [153] = {.index = 774, .length = 9}, + [154] = {.index = 783, .length = 9}, + [155] = {.index = 792, .length = 9}, + [156] = {.index = 801, .length = 9}, + [157] = {.index = 810, .length = 9}, + [158] = {.index = 819, .length = 9}, + [159] = {.index = 828, .length = 9}, + [160] = {.index = 837, .length = 9}, + [161] = {.index = 846, .length = 9}, + [162] = {.index = 855, .length = 9}, + [163] = {.index = 864, .length = 7}, + [164] = {.index = 871, .length = 10}, + [165] = {.index = 881, .length = 10}, + [166] = {.index = 891, .length = 10}, + [167] = {.index = 901, .length = 10}, + [168] = {.index = 911, .length = 10}, + [169] = {.index = 921, .length = 10}, + [170] = {.index = 931, .length = 8}, + [171] = {.index = 939, .length = 11}, }; static const TSFieldMapEntry ts_field_map_entries[] = { @@ -971,450 +985,487 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_id, 2}, {field_meta, 3}, [22] = - {field_detector, 2}, {field_id, 1}, + {field_preconditions, 2}, {field_step_type, 0}, [25] = {field_id, 1}, - {field_preconditions, 2}, + {field_reaches, 2}, {field_step_type, 0}, [28] = {field_id, 1}, - {field_reaches, 2}, {field_step_type, 0}, + {field_ttc, 2}, [31] = {field_id, 1}, + {field_meta, 2}, {field_step_type, 0}, - {field_ttc, 2}, [34] = {field_id, 1}, - {field_meta, 2}, {field_step_type, 0}, + {field_tag, 2}, [37] = + {field_detector, 2}, + {field_id, 1}, + {field_step_type, 0}, + [40] = {field_extends, 2}, {field_extends, 3}, {field_id, 1}, - [40] = + [43] = {field_body, 4}, {field_id, 1}, {field_meta, 2}, - [43] = + [46] = {field_end, 2}, {field_start, 0}, - [45] = + [48] = {field_extends, 3}, {field_extends, 4}, {field_id, 2}, - [48] = + [51] = {field_body, 5}, {field_id, 2}, {field_meta, 3}, - [51] = - {field_id, 1}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - [55] = + [54] = {field_context, 1}, - [56] = + [55] = {field_condition, 1}, - [57] = + [56] = {field_operator, 0}, {field_reaches, 1}, - [59] = - {field_detector, 2}, + [58] = + {field_id, 1}, + {field_preconditions, 2}, + {field_reaches, 3}, + {field_step_type, 0}, + [62] = {field_id, 1}, {field_preconditions, 3}, {field_step_type, 0}, - [63] = - {field_detector, 2}, + {field_ttc, 2}, + [66] = {field_id, 1}, {field_reaches, 3}, {field_step_type, 0}, - [67] = + {field_ttc, 2}, + [70] = {field_id, 1}, - {field_preconditions, 2}, - {field_reaches, 3}, + {field_meta, 3}, {field_step_type, 0}, - [71] = + {field_ttc, 2}, + [74] = {field_detector, 3}, {field_id, 1}, {field_step_type, 0}, {field_ttc, 2}, - [75] = + [78] = {field_id, 1}, + {field_meta, 2}, {field_preconditions, 3}, {field_step_type, 0}, - {field_ttc, 2}, - [79] = + [82] = {field_id, 1}, + {field_meta, 2}, {field_reaches, 3}, {field_step_type, 0}, - {field_ttc, 2}, - [83] = + [86] = + {field_detector, 3}, + {field_id, 1}, + {field_meta, 2}, + {field_step_type, 0}, + [90] = + {field_id, 1}, + {field_preconditions, 3}, + {field_step_type, 0}, + {field_tag, 2}, + [94] = + {field_id, 1}, + {field_reaches, 3}, + {field_step_type, 0}, + {field_tag, 2}, + [98] = + {field_id, 1}, + {field_step_type, 0}, + {field_tag, 2}, + {field_ttc, 3}, + [102] = {field_id, 1}, {field_meta, 3}, {field_step_type, 0}, - {field_ttc, 2}, - [87] = + {field_tag, 2}, + [106] = {field_detector, 3}, {field_id, 1}, - {field_meta, 2}, {field_step_type, 0}, - [91] = + {field_tag, 2}, + [110] = + {field_detector, 2}, {field_id, 1}, - {field_meta, 2}, {field_preconditions, 3}, {field_step_type, 0}, - [95] = + [114] = + {field_detector, 2}, {field_id, 1}, - {field_meta, 2}, {field_reaches, 3}, {field_step_type, 0}, - [99] = + [118] = {field_body, 5}, {field_extends, 2}, {field_extends, 3}, {field_id, 1}, - [103] = + [122] = {field_extends, 2}, {field_extends, 3}, {field_id, 1}, {field_meta, 4}, - [107] = + [126] = {field_body, 6}, {field_extends, 3}, {field_extends, 4}, {field_id, 2}, - [111] = + [130] = {field_extends, 3}, {field_extends, 4}, {field_id, 2}, {field_meta, 5}, - [115] = + [134] = {field_expression, 0}, {field_operator, 1}, - [117] = + [136] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, {field_id, 1}, {field_step_type, 0}, - [122] = - {field_detector, 4}, - {field_id, 1}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - [127] = - {field_id, 1}, - {field_preconditions, 4}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - [132] = - {field_id, 1}, - {field_reaches, 4}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - [137] = - {field_id, 1}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 4}, - [142] = - {field_id, 1}, - {field_meta, 4}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - [147] = + [141] = {field_context, 2}, {field_name, 1}, - [149] = + [143] = {field_context, 1}, {field_type, 2}, - [151] = + [145] = {field_context, 1}, {field_ttc, 2}, - [153] = + [147] = {field_condition, 1}, {field_condition, 2}, - [155] = + [149] = {field_operator, 0}, {field_reaches, 1}, {field_reaches, 2}, - [158] = - {field_detector, 2}, + [152] = {field_id, 1}, {field_preconditions, 3}, {field_reaches, 4}, {field_step_type, 0}, - [163] = + {field_ttc, 2}, + [157] = + {field_id, 1}, + {field_meta, 3}, + {field_preconditions, 4}, + {field_step_type, 0}, + {field_ttc, 2}, + [162] = + {field_id, 1}, + {field_meta, 3}, + {field_reaches, 4}, + {field_step_type, 0}, + {field_ttc, 2}, + [167] = + {field_detector, 4}, + {field_id, 1}, + {field_meta, 3}, + {field_step_type, 0}, + {field_ttc, 2}, + [172] = {field_detector, 3}, {field_id, 1}, {field_preconditions, 4}, {field_step_type, 0}, {field_ttc, 2}, - [168] = + [177] = {field_detector, 3}, {field_id, 1}, {field_reaches, 4}, {field_step_type, 0}, {field_ttc, 2}, - [173] = + [182] = {field_id, 1}, + {field_meta, 2}, {field_preconditions, 3}, {field_reaches, 4}, {field_step_type, 0}, - {field_ttc, 2}, - [178] = + [187] = + {field_detector, 3}, + {field_id, 1}, + {field_meta, 2}, + {field_preconditions, 4}, + {field_step_type, 0}, + [192] = + {field_detector, 3}, + {field_id, 1}, + {field_meta, 2}, + {field_reaches, 4}, + {field_step_type, 0}, + [197] = + {field_id, 1}, + {field_preconditions, 3}, + {field_reaches, 4}, + {field_step_type, 0}, + {field_tag, 2}, + [202] = + {field_id, 1}, + {field_preconditions, 4}, + {field_step_type, 0}, + {field_tag, 2}, + {field_ttc, 3}, + [207] = + {field_id, 1}, + {field_reaches, 4}, + {field_step_type, 0}, + {field_tag, 2}, + {field_ttc, 3}, + [212] = + {field_id, 1}, + {field_meta, 4}, + {field_step_type, 0}, + {field_tag, 2}, + {field_ttc, 3}, + [217] = {field_detector, 4}, {field_id, 1}, - {field_meta, 3}, {field_step_type, 0}, - {field_ttc, 2}, - [183] = + {field_tag, 2}, + {field_ttc, 3}, + [222] = {field_id, 1}, {field_meta, 3}, {field_preconditions, 4}, {field_step_type, 0}, - {field_ttc, 2}, - [188] = + {field_tag, 2}, + [227] = {field_id, 1}, {field_meta, 3}, {field_reaches, 4}, {field_step_type, 0}, - {field_ttc, 2}, - [193] = + {field_tag, 2}, + [232] = + {field_detector, 4}, + {field_id, 1}, + {field_meta, 3}, + {field_step_type, 0}, + {field_tag, 2}, + [237] = {field_detector, 3}, {field_id, 1}, - {field_meta, 2}, {field_preconditions, 4}, {field_step_type, 0}, - [198] = + {field_tag, 2}, + [242] = {field_detector, 3}, {field_id, 1}, - {field_meta, 2}, {field_reaches, 4}, {field_step_type, 0}, - [203] = + {field_tag, 2}, + [247] = + {field_detector, 2}, {field_id, 1}, - {field_meta, 2}, {field_preconditions, 3}, {field_reaches, 4}, {field_step_type, 0}, - [208] = + [252] = {field_body, 6}, {field_extends, 2}, {field_extends, 3}, {field_id, 1}, {field_meta, 4}, - [213] = + [257] = {field_body, 7}, {field_extends, 3}, {field_extends, 4}, {field_id, 2}, {field_meta, 5}, - [218] = + [262] = {field_id, 0}, - [219] = + [263] = {field_left, 0}, {field_operator, 1}, {field_right, 2}, - [222] = - {field_cias, 2}, - {field_cias, 3}, - {field_cias, 4}, - {field_detector, 5}, - {field_id, 1}, - {field_step_type, 0}, - [228] = + [266] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, {field_id, 1}, {field_preconditions, 5}, {field_step_type, 0}, - [234] = + [272] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, {field_id, 1}, {field_reaches, 5}, {field_step_type, 0}, - [240] = + [278] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, {field_id, 1}, {field_step_type, 0}, {field_ttc, 5}, - [246] = + [284] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, {field_id, 1}, {field_meta, 5}, {field_step_type, 0}, - [252] = - {field_detector, 4}, - {field_id, 1}, - {field_preconditions, 5}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - [258] = - {field_detector, 4}, - {field_id, 1}, - {field_reaches, 5}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - [264] = - {field_id, 1}, - {field_preconditions, 4}, - {field_reaches, 5}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - [270] = - {field_detector, 5}, - {field_id, 1}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 4}, - [276] = - {field_id, 1}, - {field_preconditions, 5}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 4}, - [282] = - {field_id, 1}, - {field_reaches, 5}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 4}, - [288] = - {field_id, 1}, - {field_meta, 5}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 4}, - [294] = + [290] = + {field_cias, 2}, + {field_cias, 3}, + {field_cias, 4}, {field_detector, 5}, {field_id, 1}, - {field_meta, 4}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - [300] = - {field_id, 1}, - {field_meta, 4}, - {field_preconditions, 5}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - [306] = - {field_id, 1}, - {field_meta, 4}, - {field_reaches, 5}, {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - [312] = + [296] = {field_id, 1}, {field_type, 0}, - [314] = + [298] = {field_context, 2}, {field_name, 1}, {field_type, 3}, - [317] = + [301] = {field_context, 2}, {field_name, 1}, {field_ttc, 3}, - [320] = + [304] = {field_context, 1}, {field_ttc, 3}, {field_type, 2}, - [323] = - {field_detector, 3}, + [307] = {field_id, 1}, + {field_meta, 3}, {field_preconditions, 4}, {field_reaches, 5}, {field_step_type, 0}, {field_ttc, 2}, - [329] = + [313] = {field_detector, 4}, {field_id, 1}, {field_meta, 3}, {field_preconditions, 5}, {field_step_type, 0}, {field_ttc, 2}, - [335] = + [319] = {field_detector, 4}, {field_id, 1}, {field_meta, 3}, {field_reaches, 5}, {field_step_type, 0}, {field_ttc, 2}, - [341] = + [325] = + {field_detector, 3}, {field_id, 1}, - {field_meta, 3}, {field_preconditions, 4}, {field_reaches, 5}, {field_step_type, 0}, {field_ttc, 2}, - [347] = + [331] = {field_detector, 3}, {field_id, 1}, {field_meta, 2}, {field_preconditions, 4}, {field_reaches, 5}, {field_step_type, 0}, - [353] = - {field_expression, 0}, - {field_type_id, 2}, - [355] = - {field_cias, 2}, + [337] = {field_cias, 3}, {field_cias, 4}, - {field_detector, 5}, + {field_cias, 5}, {field_id, 1}, - {field_preconditions, 6}, {field_step_type, 0}, - [362] = - {field_cias, 2}, - {field_cias, 3}, - {field_cias, 4}, - {field_detector, 5}, + {field_tag, 2}, + [343] = {field_id, 1}, - {field_reaches, 6}, + {field_preconditions, 4}, + {field_reaches, 5}, {field_step_type, 0}, - [369] = - {field_cias, 2}, - {field_cias, 3}, - {field_cias, 4}, + {field_tag, 2}, + {field_ttc, 3}, + [349] = {field_id, 1}, + {field_meta, 4}, {field_preconditions, 5}, - {field_reaches, 6}, {field_step_type, 0}, - [376] = - {field_cias, 2}, - {field_cias, 3}, + {field_tag, 2}, + {field_ttc, 3}, + [355] = + {field_id, 1}, + {field_meta, 4}, + {field_reaches, 5}, + {field_step_type, 0}, + {field_tag, 2}, + {field_ttc, 3}, + [361] = + {field_detector, 5}, + {field_id, 1}, + {field_meta, 4}, + {field_step_type, 0}, + {field_tag, 2}, + {field_ttc, 3}, + [367] = + {field_detector, 4}, + {field_id, 1}, + {field_preconditions, 5}, + {field_step_type, 0}, + {field_tag, 2}, + {field_ttc, 3}, + [373] = + {field_detector, 4}, + {field_id, 1}, + {field_reaches, 5}, + {field_step_type, 0}, + {field_tag, 2}, + {field_ttc, 3}, + [379] = + {field_id, 1}, + {field_meta, 3}, + {field_preconditions, 4}, + {field_reaches, 5}, + {field_step_type, 0}, + {field_tag, 2}, + [385] = + {field_detector, 4}, + {field_id, 1}, + {field_meta, 3}, + {field_preconditions, 5}, + {field_step_type, 0}, + {field_tag, 2}, + [391] = + {field_detector, 4}, + {field_id, 1}, + {field_meta, 3}, + {field_reaches, 5}, + {field_step_type, 0}, + {field_tag, 2}, + [397] = + {field_detector, 3}, + {field_id, 1}, + {field_preconditions, 4}, + {field_reaches, 5}, + {field_step_type, 0}, + {field_tag, 2}, + [403] = + {field_expression, 0}, + {field_type_id, 2}, + [405] = + {field_cias, 2}, + {field_cias, 3}, {field_cias, 4}, - {field_detector, 6}, {field_id, 1}, + {field_preconditions, 5}, + {field_reaches, 6}, {field_step_type, 0}, - {field_ttc, 5}, - [383] = + [412] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1422,7 +1473,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_preconditions, 6}, {field_step_type, 0}, {field_ttc, 5}, - [390] = + [419] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1430,7 +1481,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_reaches, 6}, {field_step_type, 0}, {field_ttc, 5}, - [397] = + [426] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1438,15 +1489,15 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_meta, 6}, {field_step_type, 0}, {field_ttc, 5}, - [404] = + [433] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, {field_detector, 6}, {field_id, 1}, - {field_meta, 5}, {field_step_type, 0}, - [411] = + {field_ttc, 5}, + [440] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1454,7 +1505,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_meta, 5}, {field_preconditions, 6}, {field_step_type, 0}, - [418] = + [447] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1462,174 +1513,190 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_meta, 5}, {field_reaches, 6}, {field_step_type, 0}, - [425] = + [454] = + {field_cias, 2}, + {field_cias, 3}, + {field_cias, 4}, + {field_detector, 6}, + {field_id, 1}, + {field_meta, 5}, + {field_step_type, 0}, + [461] = + {field_cias, 2}, + {field_cias, 3}, {field_cias, 4}, - {field_cias, 5}, - {field_cias, 6}, + {field_detector, 5}, {field_id, 1}, + {field_preconditions, 6}, {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - [432] = + [468] = + {field_cias, 2}, + {field_cias, 3}, + {field_cias, 4}, + {field_detector, 5}, + {field_id, 1}, + {field_reaches, 6}, + {field_step_type, 0}, + [475] = + {field_context, 2}, + {field_name, 1}, + {field_ttc, 4}, + {field_type, 3}, + [479] = + {field_id, 0}, + {field_values, 2}, + [481] = {field_detector, 4}, {field_id, 1}, + {field_meta, 3}, {field_preconditions, 5}, {field_reaches, 6}, {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - [439] = - {field_detector, 5}, + {field_ttc, 2}, + [488] = + {field_cias, 3}, + {field_cias, 4}, + {field_cias, 5}, {field_id, 1}, {field_preconditions, 6}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 4}, - [446] = - {field_detector, 5}, + [495] = + {field_cias, 3}, + {field_cias, 4}, + {field_cias, 5}, {field_id, 1}, {field_reaches, 6}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 4}, - [453] = + [502] = + {field_cias, 3}, + {field_cias, 4}, + {field_cias, 5}, {field_id, 1}, - {field_preconditions, 5}, - {field_reaches, 6}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 4}, - [460] = - {field_detector, 6}, + {field_ttc, 6}, + [509] = + {field_cias, 3}, + {field_cias, 4}, + {field_cias, 5}, {field_id, 1}, - {field_meta, 5}, + {field_meta, 6}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 4}, - [467] = + [516] = + {field_cias, 3}, + {field_cias, 4}, + {field_cias, 5}, + {field_detector, 6}, {field_id, 1}, - {field_meta, 5}, - {field_preconditions, 6}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 4}, - [474] = + [523] = {field_id, 1}, - {field_meta, 5}, + {field_meta, 4}, + {field_preconditions, 5}, {field_reaches, 6}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 4}, - [481] = + {field_ttc, 3}, + [530] = {field_detector, 5}, {field_id, 1}, {field_meta, 4}, {field_preconditions, 6}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - [488] = + {field_ttc, 3}, + [537] = {field_detector, 5}, {field_id, 1}, {field_meta, 4}, {field_reaches, 6}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - [495] = + {field_ttc, 3}, + [544] = + {field_detector, 4}, {field_id, 1}, - {field_meta, 4}, {field_preconditions, 5}, {field_reaches, 6}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - [502] = - {field_context, 2}, - {field_name, 1}, - {field_ttc, 4}, - {field_type, 3}, - [506] = - {field_id, 0}, - {field_values, 2}, - [508] = + {field_ttc, 3}, + [551] = {field_detector, 4}, {field_id, 1}, {field_meta, 3}, {field_preconditions, 5}, {field_reaches, 6}, {field_step_type, 0}, - {field_ttc, 2}, - [515] = + {field_tag, 2}, + [558] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, - {field_detector, 5}, {field_id, 1}, {field_preconditions, 6}, {field_reaches, 7}, {field_step_type, 0}, - [523] = + {field_ttc, 5}, + [566] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, - {field_detector, 6}, {field_id, 1}, + {field_meta, 6}, {field_preconditions, 7}, {field_step_type, 0}, {field_ttc, 5}, - [531] = + [574] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, - {field_detector, 6}, {field_id, 1}, + {field_meta, 6}, {field_reaches, 7}, {field_step_type, 0}, {field_ttc, 5}, - [539] = + [582] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, + {field_detector, 7}, {field_id, 1}, - {field_preconditions, 6}, - {field_reaches, 7}, + {field_meta, 6}, {field_step_type, 0}, {field_ttc, 5}, - [547] = + [590] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, - {field_detector, 7}, + {field_detector, 6}, {field_id, 1}, - {field_meta, 6}, + {field_preconditions, 7}, {field_step_type, 0}, {field_ttc, 5}, - [555] = + [598] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, + {field_detector, 6}, {field_id, 1}, - {field_meta, 6}, - {field_preconditions, 7}, + {field_reaches, 7}, {field_step_type, 0}, {field_ttc, 5}, - [563] = + [606] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, {field_id, 1}, - {field_meta, 6}, + {field_meta, 5}, + {field_preconditions, 6}, {field_reaches, 7}, {field_step_type, 0}, - {field_ttc, 5}, - [571] = + [614] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1638,7 +1705,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_meta, 5}, {field_preconditions, 7}, {field_step_type, 0}, - [579] = + [622] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1647,97 +1714,110 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_meta, 5}, {field_reaches, 7}, {field_step_type, 0}, - [587] = + [630] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, + {field_detector, 5}, {field_id, 1}, - {field_meta, 5}, {field_preconditions, 6}, {field_reaches, 7}, {field_step_type, 0}, - [595] = + [638] = + {field_id, 0}, + {field_values, 2}, + {field_values, 3}, + [641] = + {field_cias, 3}, {field_cias, 4}, {field_cias, 5}, - {field_cias, 6}, - {field_detector, 7}, {field_id, 1}, + {field_preconditions, 6}, + {field_reaches, 7}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - [603] = + [649] = + {field_cias, 3}, {field_cias, 4}, {field_cias, 5}, - {field_cias, 6}, {field_id, 1}, {field_preconditions, 7}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - [611] = + {field_ttc, 6}, + [657] = + {field_cias, 3}, {field_cias, 4}, {field_cias, 5}, - {field_cias, 6}, {field_id, 1}, {field_reaches, 7}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - [619] = + {field_ttc, 6}, + [665] = + {field_cias, 3}, {field_cias, 4}, {field_cias, 5}, - {field_cias, 6}, {field_id, 1}, + {field_meta, 7}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 7}, - [627] = + {field_ttc, 6}, + [673] = + {field_cias, 3}, {field_cias, 4}, {field_cias, 5}, - {field_cias, 6}, + {field_detector, 7}, {field_id, 1}, - {field_meta, 7}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - [635] = - {field_detector, 5}, + {field_ttc, 6}, + [681] = + {field_cias, 3}, + {field_cias, 4}, + {field_cias, 5}, {field_id, 1}, - {field_preconditions, 6}, + {field_meta, 6}, + {field_preconditions, 7}, + {field_step_type, 0}, + {field_tag, 2}, + [689] = + {field_cias, 3}, + {field_cias, 4}, + {field_cias, 5}, + {field_id, 1}, + {field_meta, 6}, {field_reaches, 7}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 4}, - [643] = - {field_detector, 6}, + [697] = + {field_cias, 3}, + {field_cias, 4}, + {field_cias, 5}, + {field_detector, 7}, {field_id, 1}, - {field_meta, 5}, - {field_preconditions, 7}, + {field_meta, 6}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 4}, - [651] = + [705] = + {field_cias, 3}, + {field_cias, 4}, + {field_cias, 5}, {field_detector, 6}, {field_id, 1}, - {field_meta, 5}, - {field_reaches, 7}, + {field_preconditions, 7}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 4}, - [659] = + [713] = + {field_cias, 3}, + {field_cias, 4}, + {field_cias, 5}, + {field_detector, 6}, {field_id, 1}, - {field_meta, 5}, - {field_preconditions, 6}, {field_reaches, 7}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 4}, - [667] = + [721] = {field_detector, 5}, {field_id, 1}, {field_meta, 4}, @@ -1745,22 +1825,18 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_reaches, 7}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - [675] = - {field_id, 0}, - {field_values, 2}, - {field_values, 3}, - [678] = + {field_ttc, 3}, + [729] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, - {field_detector, 6}, {field_id, 1}, + {field_meta, 6}, {field_preconditions, 7}, {field_reaches, 8}, {field_step_type, 0}, {field_ttc, 5}, - [687] = + [738] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1770,7 +1846,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_preconditions, 8}, {field_step_type, 0}, {field_ttc, 5}, - [696] = + [747] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1780,17 +1856,17 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_reaches, 8}, {field_step_type, 0}, {field_ttc, 5}, - [705] = + [756] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, + {field_detector, 6}, {field_id, 1}, - {field_meta, 6}, {field_preconditions, 7}, {field_reaches, 8}, {field_step_type, 0}, {field_ttc, 5}, - [714] = + [765] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1800,117 +1876,107 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_preconditions, 7}, {field_reaches, 8}, {field_step_type, 0}, - [723] = + [774] = + {field_cias, 3}, {field_cias, 4}, {field_cias, 5}, - {field_cias, 6}, - {field_detector, 7}, {field_id, 1}, - {field_preconditions, 8}, + {field_preconditions, 7}, + {field_reaches, 8}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - [732] = + {field_ttc, 6}, + [783] = + {field_cias, 3}, {field_cias, 4}, {field_cias, 5}, - {field_cias, 6}, - {field_detector, 7}, {field_id, 1}, - {field_reaches, 8}, + {field_meta, 7}, + {field_preconditions, 8}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - [741] = + {field_ttc, 6}, + [792] = + {field_cias, 3}, {field_cias, 4}, {field_cias, 5}, - {field_cias, 6}, {field_id, 1}, - {field_preconditions, 7}, + {field_meta, 7}, {field_reaches, 8}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - [750] = + {field_ttc, 6}, + [801] = + {field_cias, 3}, {field_cias, 4}, {field_cias, 5}, - {field_cias, 6}, {field_detector, 8}, {field_id, 1}, + {field_meta, 7}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 7}, - [759] = + {field_ttc, 6}, + [810] = + {field_cias, 3}, {field_cias, 4}, {field_cias, 5}, - {field_cias, 6}, + {field_detector, 7}, {field_id, 1}, {field_preconditions, 8}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 7}, - [768] = + {field_ttc, 6}, + [819] = + {field_cias, 3}, {field_cias, 4}, {field_cias, 5}, - {field_cias, 6}, + {field_detector, 7}, {field_id, 1}, {field_reaches, 8}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 7}, - [777] = + {field_ttc, 6}, + [828] = + {field_cias, 3}, {field_cias, 4}, {field_cias, 5}, - {field_cias, 6}, {field_id, 1}, - {field_meta, 8}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 7}, - [786] = - {field_cias, 4}, - {field_cias, 5}, - {field_cias, 6}, - {field_detector, 8}, - {field_id, 1}, - {field_meta, 7}, + {field_meta, 6}, + {field_preconditions, 7}, + {field_reaches, 8}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - [795] = + [837] = + {field_cias, 3}, {field_cias, 4}, {field_cias, 5}, - {field_cias, 6}, + {field_detector, 7}, {field_id, 1}, - {field_meta, 7}, + {field_meta, 6}, {field_preconditions, 8}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - [804] = + [846] = + {field_cias, 3}, {field_cias, 4}, {field_cias, 5}, - {field_cias, 6}, + {field_detector, 7}, {field_id, 1}, - {field_meta, 7}, + {field_meta, 6}, {field_reaches, 8}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - [813] = + [855] = + {field_cias, 3}, + {field_cias, 4}, + {field_cias, 5}, {field_detector, 6}, {field_id, 1}, - {field_meta, 5}, {field_preconditions, 7}, {field_reaches, 8}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 4}, - [822] = + [864] = {field_id, 6}, {field_left_field_id, 2}, {field_left_id, 0}, @@ -1918,7 +1984,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_right_field_id, 10}, {field_right_id, 12}, {field_right_mult, 8}, - [829] = + [871] = {field_cias, 2}, {field_cias, 3}, {field_cias, 4}, @@ -1929,117 +1995,62 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_reaches, 9}, {field_step_type, 0}, {field_ttc, 5}, - [839] = + [881] = + {field_cias, 3}, {field_cias, 4}, {field_cias, 5}, - {field_cias, 6}, - {field_detector, 7}, {field_id, 1}, + {field_meta, 7}, {field_preconditions, 8}, {field_reaches, 9}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - [849] = + {field_ttc, 6}, + [891] = + {field_cias, 3}, {field_cias, 4}, {field_cias, 5}, - {field_cias, 6}, {field_detector, 8}, {field_id, 1}, + {field_meta, 7}, {field_preconditions, 9}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 7}, - [859] = + {field_ttc, 6}, + [901] = + {field_cias, 3}, {field_cias, 4}, {field_cias, 5}, - {field_cias, 6}, {field_detector, 8}, {field_id, 1}, + {field_meta, 7}, {field_reaches, 9}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 7}, - [869] = + {field_ttc, 6}, + [911] = + {field_cias, 3}, {field_cias, 4}, {field_cias, 5}, - {field_cias, 6}, + {field_detector, 7}, {field_id, 1}, {field_preconditions, 8}, {field_reaches, 9}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 7}, - [879] = - {field_cias, 4}, - {field_cias, 5}, - {field_cias, 6}, - {field_detector, 9}, - {field_id, 1}, - {field_meta, 8}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 7}, - [889] = - {field_cias, 4}, - {field_cias, 5}, - {field_cias, 6}, - {field_id, 1}, - {field_meta, 8}, - {field_preconditions, 9}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 7}, - [899] = - {field_cias, 4}, - {field_cias, 5}, - {field_cias, 6}, - {field_id, 1}, - {field_meta, 8}, - {field_reaches, 9}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 7}, - [909] = - {field_cias, 4}, - {field_cias, 5}, - {field_cias, 6}, - {field_detector, 8}, - {field_id, 1}, - {field_meta, 7}, - {field_preconditions, 9}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - [919] = - {field_cias, 4}, - {field_cias, 5}, - {field_cias, 6}, - {field_detector, 8}, - {field_id, 1}, - {field_meta, 7}, - {field_reaches, 9}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - [929] = + {field_ttc, 6}, + [921] = + {field_cias, 3}, {field_cias, 4}, {field_cias, 5}, - {field_cias, 6}, + {field_detector, 7}, {field_id, 1}, - {field_meta, 7}, + {field_meta, 6}, {field_preconditions, 8}, {field_reaches, 9}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - [939] = + [931] = {field_id, 6}, {field_left_field_id, 2}, {field_left_id, 0}, @@ -2048,58 +2059,10 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_right_field_id, 10}, {field_right_id, 12}, {field_right_mult, 8}, - [947] = - {field_cias, 4}, - {field_cias, 5}, - {field_cias, 6}, - {field_detector, 8}, - {field_id, 1}, - {field_preconditions, 9}, - {field_reaches, 10}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 7}, - [958] = - {field_cias, 4}, - {field_cias, 5}, - {field_cias, 6}, - {field_detector, 9}, - {field_id, 1}, - {field_meta, 8}, - {field_preconditions, 10}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 7}, - [969] = - {field_cias, 4}, - {field_cias, 5}, - {field_cias, 6}, - {field_detector, 9}, - {field_id, 1}, - {field_meta, 8}, - {field_reaches, 10}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 7}, - [980] = - {field_cias, 4}, - {field_cias, 5}, - {field_cias, 6}, - {field_id, 1}, - {field_meta, 8}, - {field_preconditions, 9}, - {field_reaches, 10}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 7}, - [991] = + [939] = + {field_cias, 3}, {field_cias, 4}, {field_cias, 5}, - {field_cias, 6}, {field_detector, 8}, {field_id, 1}, {field_meta, 7}, @@ -2107,20 +2070,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = { {field_reaches, 10}, {field_step_type, 0}, {field_tag, 2}, - {field_tag, 3}, - [1002] = - {field_cias, 4}, - {field_cias, 5}, - {field_cias, 6}, - {field_detector, 9}, - {field_id, 1}, - {field_meta, 8}, - {field_preconditions, 10}, - {field_reaches, 11}, - {field_step_type, 0}, - {field_tag, 2}, - {field_tag, 3}, - {field_ttc, 7}, + {field_ttc, 6}, }; static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = { @@ -2243,8 +2193,8 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [105] = 105, [106] = 106, [107] = 107, - [108] = 29, - [109] = 83, + [108] = 108, + [109] = 109, [110] = 110, [111] = 111, [112] = 112, @@ -2333,7 +2283,7 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [195] = 195, [196] = 196, [197] = 197, - [198] = 194, + [198] = 198, [199] = 199, [200] = 200, [201] = 201, @@ -2345,9 +2295,9 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [207] = 207, [208] = 208, [209] = 209, - [210] = 27, + [210] = 210, [211] = 211, - [212] = 212, + [212] = 46, [213] = 213, [214] = 214, [215] = 215, @@ -2387,7 +2337,7 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [249] = 249, [250] = 250, [251] = 251, - [252] = 252, + [252] = 53, [253] = 253, [254] = 254, [255] = 255, @@ -2397,7 +2347,7 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [259] = 259, [260] = 260, [261] = 261, - [262] = 28, + [262] = 262, [263] = 263, [264] = 264, [265] = 265, @@ -2453,12 +2403,11 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [315] = 315, [316] = 316, [317] = 317, - [318] = 317, - [319] = 319, - [320] = 309, - [321] = 321, - [322] = 319, - [323] = 323, + [318] = 318, + [319] = 294, + [320] = 289, + [321] = 308, + [322] = 322, }; static bool ts_lex(TSLexer *lexer, TSStateId state) { @@ -2648,7 +2597,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { '-', 54, '.', 40, '/', 6, - '<', 13, + '<', 14, '[', 48, '\\', 18, '{', 29, @@ -3035,7 +2984,7 @@ static const TSLexerMode ts_lex_modes[STATE_COUNT] = { [3] = {.lex_state = 1}, [4] = {.lex_state = 1}, [5] = {.lex_state = 1}, - [6] = {.lex_state = 24}, + [6] = {.lex_state = 1}, [7] = {.lex_state = 1}, [8] = {.lex_state = 1}, [9] = {.lex_state = 1}, @@ -3047,46 +2996,46 @@ static const TSLexerMode ts_lex_modes[STATE_COUNT] = { [15] = {.lex_state = 1}, [16] = {.lex_state = 1}, [17] = {.lex_state = 1}, - [18] = {.lex_state = 1}, + [18] = {.lex_state = 24}, [19] = {.lex_state = 24}, [20] = {.lex_state = 24}, - [21] = {.lex_state = 24}, + [21] = {.lex_state = 1}, [22] = {.lex_state = 24}, [23] = {.lex_state = 24}, [24] = {.lex_state = 24}, [25] = {.lex_state = 24}, - [26] = {.lex_state = 24}, + [26] = {.lex_state = 1}, [27] = {.lex_state = 1}, [28] = {.lex_state = 1}, [29] = {.lex_state = 1}, - [30] = {.lex_state = 24}, - [31] = {.lex_state = 24}, - [32] = {.lex_state = 24}, - [33] = {.lex_state = 24}, - [34] = {.lex_state = 24}, + [30] = {.lex_state = 1}, + [31] = {.lex_state = 1}, + [32] = {.lex_state = 1}, + [33] = {.lex_state = 1}, + [34] = {.lex_state = 1}, [35] = {.lex_state = 24}, - [36] = {.lex_state = 24}, - [37] = {.lex_state = 24}, - [38] = {.lex_state = 24}, - [39] = {.lex_state = 24}, - [40] = {.lex_state = 24}, - [41] = {.lex_state = 24}, - [42] = {.lex_state = 24}, - [43] = {.lex_state = 24}, - [44] = {.lex_state = 24}, - [45] = {.lex_state = 24}, - [46] = {.lex_state = 24}, - [47] = {.lex_state = 24}, - [48] = {.lex_state = 24}, - [49] = {.lex_state = 24}, - [50] = {.lex_state = 24}, - [51] = {.lex_state = 24}, - [52] = {.lex_state = 24}, - [53] = {.lex_state = 24}, - [54] = {.lex_state = 24}, - [55] = {.lex_state = 24}, - [56] = {.lex_state = 24}, - [57] = {.lex_state = 24}, + [36] = {.lex_state = 1}, + [37] = {.lex_state = 1}, + [38] = {.lex_state = 1}, + [39] = {.lex_state = 1}, + [40] = {.lex_state = 1}, + [41] = {.lex_state = 1}, + [42] = {.lex_state = 1}, + [43] = {.lex_state = 1}, + [44] = {.lex_state = 1}, + [45] = {.lex_state = 1}, + [46] = {.lex_state = 1}, + [47] = {.lex_state = 1}, + [48] = {.lex_state = 1}, + [49] = {.lex_state = 1}, + [50] = {.lex_state = 1}, + [51] = {.lex_state = 1}, + [52] = {.lex_state = 1}, + [53] = {.lex_state = 1}, + [54] = {.lex_state = 1}, + [55] = {.lex_state = 1}, + [56] = {.lex_state = 1}, + [57] = {.lex_state = 1}, [58] = {.lex_state = 24}, [59] = {.lex_state = 24}, [60] = {.lex_state = 24}, @@ -3095,25 +3044,25 @@ static const TSLexerMode ts_lex_modes[STATE_COUNT] = { [63] = {.lex_state = 24}, [64] = {.lex_state = 24}, [65] = {.lex_state = 24}, - [66] = {.lex_state = 4}, + [66] = {.lex_state = 24}, [67] = {.lex_state = 24}, [68] = {.lex_state = 24}, [69] = {.lex_state = 24}, [70] = {.lex_state = 24}, [71] = {.lex_state = 24}, [72] = {.lex_state = 24}, - [73] = {.lex_state = 24}, + [73] = {.lex_state = 4}, [74] = {.lex_state = 24}, [75] = {.lex_state = 24}, - [76] = {.lex_state = 4}, - [77] = {.lex_state = 24}, + [76] = {.lex_state = 24}, + [77] = {.lex_state = 4}, [78] = {.lex_state = 24}, [79] = {.lex_state = 24}, [80] = {.lex_state = 24}, [81] = {.lex_state = 24}, [82] = {.lex_state = 24}, [83] = {.lex_state = 4}, - [84] = {.lex_state = 24}, + [84] = {.lex_state = 4}, [85] = {.lex_state = 24}, [86] = {.lex_state = 4}, [87] = {.lex_state = 24}, @@ -3136,9 +3085,9 @@ static const TSLexerMode ts_lex_modes[STATE_COUNT] = { [104] = {.lex_state = 24}, [105] = {.lex_state = 24}, [106] = {.lex_state = 24}, - [107] = {.lex_state = 4}, + [107] = {.lex_state = 24}, [108] = {.lex_state = 24}, - [109] = {.lex_state = 4}, + [109] = {.lex_state = 24}, [110] = {.lex_state = 24}, [111] = {.lex_state = 24}, [112] = {.lex_state = 24}, @@ -3148,8 +3097,8 @@ static const TSLexerMode ts_lex_modes[STATE_COUNT] = { [116] = {.lex_state = 24}, [117] = {.lex_state = 24}, [118] = {.lex_state = 24}, - [119] = {.lex_state = 4}, - [120] = {.lex_state = 24}, + [119] = {.lex_state = 24}, + [120] = {.lex_state = 4}, [121] = {.lex_state = 24}, [122] = {.lex_state = 24}, [123] = {.lex_state = 24}, @@ -3166,7 +3115,7 @@ static const TSLexerMode ts_lex_modes[STATE_COUNT] = { [134] = {.lex_state = 24}, [135] = {.lex_state = 24}, [136] = {.lex_state = 24}, - [137] = {.lex_state = 24}, + [137] = {.lex_state = 4}, [138] = {.lex_state = 4}, [139] = {.lex_state = 4}, [140] = {.lex_state = 4}, @@ -3223,11 +3172,11 @@ static const TSLexerMode ts_lex_modes[STATE_COUNT] = { [191] = {.lex_state = 24}, [192] = {.lex_state = 24}, [193] = {.lex_state = 24}, - [194] = {.lex_state = 4}, + [194] = {.lex_state = 0}, [195] = {.lex_state = 0}, [196] = {.lex_state = 4}, - [197] = {.lex_state = 0}, - [198] = {.lex_state = 4}, + [197] = {.lex_state = 4}, + [198] = {.lex_state = 24}, [199] = {.lex_state = 24}, [200] = {.lex_state = 24}, [201] = {.lex_state = 24}, @@ -3245,13 +3194,13 @@ static const TSLexerMode ts_lex_modes[STATE_COUNT] = { [213] = {.lex_state = 24}, [214] = {.lex_state = 24}, [215] = {.lex_state = 24}, - [216] = {.lex_state = 24}, + [216] = {.lex_state = 0}, [217] = {.lex_state = 24}, [218] = {.lex_state = 24}, [219] = {.lex_state = 24}, [220] = {.lex_state = 24}, - [221] = {.lex_state = 0}, - [222] = {.lex_state = 24}, + [221] = {.lex_state = 24}, + [222] = {.lex_state = 4}, [223] = {.lex_state = 24}, [224] = {.lex_state = 24}, [225] = {.lex_state = 24}, @@ -3260,99 +3209,98 @@ static const TSLexerMode ts_lex_modes[STATE_COUNT] = { [228] = {.lex_state = 24}, [229] = {.lex_state = 24}, [230] = {.lex_state = 24}, - [231] = {.lex_state = 4}, + [231] = {.lex_state = 24}, [232] = {.lex_state = 0}, [233] = {.lex_state = 0}, [234] = {.lex_state = 24}, [235] = {.lex_state = 24}, [236] = {.lex_state = 24}, [237] = {.lex_state = 24}, - [238] = {.lex_state = 0}, - [239] = {.lex_state = 4}, - [240] = {.lex_state = 24}, - [241] = {.lex_state = 0}, - [242] = {.lex_state = 24}, - [243] = {.lex_state = 4}, + [238] = {.lex_state = 24}, + [239] = {.lex_state = 24}, + [240] = {.lex_state = 0}, + [241] = {.lex_state = 4}, + [242] = {.lex_state = 0}, + [243] = {.lex_state = 24}, [244] = {.lex_state = 24}, [245] = {.lex_state = 24}, - [246] = {.lex_state = 24}, - [247] = {.lex_state = 4}, - [248] = {.lex_state = 0}, - [249] = {.lex_state = 0}, + [246] = {.lex_state = 4}, + [247] = {.lex_state = 0}, + [248] = {.lex_state = 4}, + [249] = {.lex_state = 24}, [250] = {.lex_state = 0}, - [251] = {.lex_state = 24}, + [251] = {.lex_state = 0}, [252] = {.lex_state = 24}, [253] = {.lex_state = 24}, [254] = {.lex_state = 24}, [255] = {.lex_state = 24}, [256] = {.lex_state = 24}, - [257] = {.lex_state = 0}, + [257] = {.lex_state = 24}, [258] = {.lex_state = 0}, - [259] = {.lex_state = 24}, + [259] = {.lex_state = 0}, [260] = {.lex_state = 24}, [261] = {.lex_state = 24}, [262] = {.lex_state = 24}, [263] = {.lex_state = 24}, - [264] = {.lex_state = 15}, - [265] = {.lex_state = 0}, - [266] = {.lex_state = 24}, - [267] = {.lex_state = 4}, + [264] = {.lex_state = 0}, + [265] = {.lex_state = 24}, + [266] = {.lex_state = 0}, + [267] = {.lex_state = 0}, [268] = {.lex_state = 0}, - [269] = {.lex_state = 15}, - [270] = {.lex_state = 0}, + [269] = {.lex_state = 24}, + [270] = {.lex_state = 24}, [271] = {.lex_state = 0}, - [272] = {.lex_state = 4}, - [273] = {.lex_state = 24}, - [274] = {.lex_state = 24}, + [272] = {.lex_state = 24}, + [273] = {.lex_state = 15}, + [274] = {.lex_state = 15}, [275] = {.lex_state = 0}, [276] = {.lex_state = 24}, - [277] = {.lex_state = 24}, + [277] = {.lex_state = 0}, [278] = {.lex_state = 0}, - [279] = {.lex_state = 24}, + [279] = {.lex_state = 0}, [280] = {.lex_state = 24}, [281] = {.lex_state = 24}, [282] = {.lex_state = 0}, - [283] = {.lex_state = 24}, + [283] = {.lex_state = 0}, [284] = {.lex_state = 0}, - [285] = {.lex_state = 0}, + [285] = {.lex_state = 24}, [286] = {.lex_state = 0}, - [287] = {.lex_state = 0}, + [287] = {.lex_state = 15}, [288] = {.lex_state = 24}, [289] = {.lex_state = 0}, - [290] = {.lex_state = 24}, - [291] = {.lex_state = 0}, - [292] = {.lex_state = 0}, - [293] = {.lex_state = 24}, + [290] = {.lex_state = 0}, + [291] = {.lex_state = 24}, + [292] = {.lex_state = 24}, + [293] = {.lex_state = 0}, [294] = {.lex_state = 0}, - [295] = {.lex_state = 0}, + [295] = {.lex_state = 24}, [296] = {.lex_state = 0}, - [297] = {.lex_state = 24}, - [298] = {.lex_state = 0}, + [297] = {.lex_state = 0}, + [298] = {.lex_state = 24}, [299] = {.lex_state = 24}, - [300] = {.lex_state = 0}, + [300] = {.lex_state = 15}, [301] = {.lex_state = 0}, [302] = {.lex_state = 24}, - [303] = {.lex_state = 24}, + [303] = {.lex_state = 0}, [304] = {.lex_state = 24}, - [305] = {.lex_state = 15}, + [305] = {.lex_state = 24}, [306] = {.lex_state = 0}, [307] = {.lex_state = 0}, [308] = {.lex_state = 24}, - [309] = {.lex_state = 0}, + [309] = {.lex_state = 24}, [310] = {.lex_state = 0}, - [311] = {.lex_state = 0}, - [312] = {.lex_state = 0}, + [311] = {.lex_state = 24}, + [312] = {.lex_state = 24}, [313] = {.lex_state = 0}, - [314] = {.lex_state = 24}, - [315] = {.lex_state = 0}, - [316] = {.lex_state = 4}, + [314] = {.lex_state = 0}, + [315] = {.lex_state = 24}, + [316] = {.lex_state = 0}, [317] = {.lex_state = 0}, - [318] = {.lex_state = 0}, - [319] = {.lex_state = 24}, + [318] = {.lex_state = 24}, + [319] = {.lex_state = 0}, [320] = {.lex_state = 0}, [321] = {.lex_state = 24}, - [322] = {.lex_state = 24}, - [323] = {.lex_state = 15}, + [322] = {.lex_state = 0}, }; static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { @@ -3403,13 +3351,13 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [sym_cia] = ACTIONS(1), }, [STATE(1)] = { - [sym_source_file] = STATE(291), - [sym_declaration] = STATE(64), - [sym_include_declaration] = STATE(203), - [sym_category_declaration] = STATE(203), - [sym_define_declaration] = STATE(203), - [sym_associations_declaration] = STATE(203), - [aux_sym_source_file_repeat1] = STATE(64), + [sym_source_file] = STATE(290), + [sym_declaration] = STATE(67), + [sym_include_declaration] = STATE(206), + [sym_category_declaration] = STATE(206), + [sym_define_declaration] = STATE(206), + [sym_associations_declaration] = STATE(206), + [aux_sym_source_file_repeat1] = STATE(67), [ts_builtin_sym_end] = ACTIONS(5), [sym_comment] = ACTIONS(3), [anon_sym_include] = ACTIONS(7), @@ -3420,7 +3368,7 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { }; static const uint16_t ts_small_parse_table[] = { - [0] = 16, + [0] = 17, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3437,13 +3385,13 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LT_DASH, ACTIONS(35), 1, anon_sym_LBRACK, - STATE(11), 1, + STATE(3), 1, + aux_sym_attack_step_repeat1, + STATE(7), 1, sym_ttc, - STATE(46), 1, - sym_detector, - STATE(92), 1, + STATE(99), 1, sym_preconditions, - STATE(193), 1, + STATE(150), 1, sym_reaching, ACTIONS(23), 2, anon_sym_let, @@ -3451,20 +3399,25 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - STATE(8), 2, + STATE(6), 2, sym_meta, aux_sym_category_declaration_repeat1, + STATE(26), 2, + sym_detector, + aux_sym_attack_step_repeat2, ACTIONS(21), 5, anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [56] = 15, + [60] = 17, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, sym_comment, + ACTIONS(25), 1, + anon_sym_AT, ACTIONS(27), 1, anon_sym_BANG, ACTIONS(29), 1, @@ -3477,11 +3430,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACE, STATE(10), 1, sym_ttc, - STATE(45), 1, - sym_detector, - STATE(89), 1, + STATE(21), 1, + aux_sym_attack_step_repeat1, + STATE(95), 1, sym_preconditions, - STATE(126), 1, + STATE(123), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, @@ -3489,16 +3442,19 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(41), 2, anon_sym_let, anon_sym_E, - STATE(7), 2, + STATE(9), 2, sym_meta, aux_sym_category_declaration_repeat1, + STATE(33), 2, + sym_detector, + aux_sym_attack_step_repeat2, ACTIONS(39), 5, anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [109] = 14, + [120] = 14, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3513,11 +3469,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, STATE(13), 1, sym_ttc, - STATE(51), 1, - sym_detector, - STATE(106), 1, + STATE(110), 1, sym_preconditions, - STATE(133), 1, + STATE(136), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, @@ -3525,16 +3479,19 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(45), 2, anon_sym_let, anon_sym_E, - STATE(14), 2, + STATE(12), 2, sym_meta, aux_sym_category_declaration_repeat1, + STATE(28), 2, + sym_detector, + aux_sym_attack_step_repeat2, ACTIONS(43), 5, anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [159] = 14, + [171] = 14, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3547,13 +3504,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LT_DASH, ACTIONS(35), 1, anon_sym_LBRACK, - STATE(12), 1, + STATE(15), 1, sym_ttc, - STATE(44), 1, - sym_detector, - STATE(93), 1, + STATE(89), 1, sym_preconditions, - STATE(165), 1, + STATE(159), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, @@ -3564,37 +3519,16 @@ static const uint16_t ts_small_parse_table[] = { STATE(16), 2, sym_meta, aux_sym_category_declaration_repeat1, + STATE(41), 2, + sym_detector, + aux_sym_attack_step_repeat2, ACTIONS(47), 5, anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [209] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(53), 1, - anon_sym_LPAREN, - ACTIONS(55), 1, - anon_sym_DASH, - ACTIONS(51), 16, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - anon_sym_COMMA, - anon_sym_DOT, - anon_sym_RPAREN, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - anon_sym_LBRACK, - anon_sym_STAR, - anon_sym_BSLASH_SLASH, - anon_sym_SLASH_BSLASH, - [237] = 12, + [222] = 12, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3605,28 +3539,29 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(33), 1, - sym_detector, - STATE(72), 1, + STATE(81), 1, sym_preconditions, - STATE(137), 1, + STATE(122), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(59), 2, + ACTIONS(53), 2, anon_sym_let, anon_sym_E, STATE(27), 2, + sym_detector, + aux_sym_attack_step_repeat2, + STATE(46), 2, sym_meta, aux_sym_category_declaration_repeat1, - ACTIONS(57), 5, + ACTIONS(51), 5, anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [281] = 12, + [267] = 12, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3637,28 +3572,29 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(48), 1, - sym_detector, - STATE(78), 1, + STATE(74), 1, sym_preconditions, - STATE(124), 1, + STATE(158), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(63), 2, + ACTIONS(57), 2, anon_sym_let, anon_sym_E, - STATE(27), 2, + STATE(8), 2, sym_meta, aux_sym_category_declaration_repeat1, - ACTIONS(61), 5, + STATE(29), 2, + sym_detector, + aux_sym_attack_step_repeat2, + ACTIONS(55), 5, anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [325] = 12, + [312] = 12, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3669,28 +3605,29 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(36), 1, - sym_detector, - STATE(103), 1, + STATE(88), 1, sym_preconditions, - STATE(130), 1, + STATE(127), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(67), 2, + ACTIONS(61), 2, anon_sym_let, anon_sym_E, - STATE(27), 2, + STATE(30), 2, + sym_detector, + aux_sym_attack_step_repeat2, + STATE(46), 2, sym_meta, aux_sym_category_declaration_repeat1, - ACTIONS(65), 5, + ACTIONS(59), 5, anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [369] = 12, + [357] = 12, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3701,28 +3638,29 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(34), 1, - sym_detector, - STATE(69), 1, + STATE(100), 1, sym_preconditions, - STATE(136), 1, + STATE(133), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(71), 2, + ACTIONS(65), 2, anon_sym_let, anon_sym_E, - STATE(15), 2, + STATE(32), 2, + sym_detector, + aux_sym_attack_step_repeat2, + STATE(46), 2, sym_meta, aux_sym_category_declaration_repeat1, - ACTIONS(69), 5, + ACTIONS(63), 5, anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [413] = 12, + [402] = 12, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3733,28 +3671,29 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(40), 1, - sym_detector, - STATE(71), 1, + STATE(92), 1, sym_preconditions, - STATE(149), 1, + STATE(132), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(75), 2, + ACTIONS(69), 2, anon_sym_let, anon_sym_E, - STATE(9), 2, + STATE(11), 2, sym_meta, aux_sym_category_declaration_repeat1, - ACTIONS(73), 5, + STATE(31), 2, + sym_detector, + aux_sym_attack_step_repeat2, + ACTIONS(67), 5, anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [457] = 12, + [447] = 12, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3765,28 +3704,29 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(47), 1, - sym_detector, - STATE(99), 1, + STATE(78), 1, sym_preconditions, - STATE(178), 1, + STATE(147), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(79), 2, + ACTIONS(73), 2, anon_sym_let, anon_sym_E, - STATE(18), 2, + STATE(34), 2, + sym_detector, + aux_sym_attack_step_repeat2, + STATE(46), 2, sym_meta, aux_sym_category_declaration_repeat1, - ACTIONS(77), 5, + ACTIONS(71), 5, anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [501] = 12, + [492] = 12, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3797,28 +3737,29 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(37), 1, - sym_detector, - STATE(80), 1, + STATE(85), 1, sym_preconditions, - STATE(148), 1, + STATE(155), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(83), 2, + ACTIONS(77), 2, anon_sym_let, anon_sym_E, - STATE(17), 2, + STATE(37), 2, + sym_detector, + aux_sym_attack_step_repeat2, + STATE(46), 2, sym_meta, aux_sym_category_declaration_repeat1, - ACTIONS(81), 5, + ACTIONS(75), 5, anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [545] = 12, + [537] = 12, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3829,28 +3770,29 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(39), 1, - sym_detector, - STATE(81), 1, + STATE(82), 1, sym_preconditions, - STATE(150), 1, + STATE(154), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(87), 2, + ACTIONS(81), 2, anon_sym_let, anon_sym_E, - STATE(27), 2, + STATE(14), 2, sym_meta, aux_sym_category_declaration_repeat1, - ACTIONS(85), 5, + STATE(36), 2, + sym_detector, + aux_sym_attack_step_repeat2, + ACTIONS(79), 5, anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [589] = 12, + [582] = 12, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3861,28 +3803,29 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(41), 1, - sym_detector, - STATE(84), 1, + STATE(94), 1, sym_preconditions, - STATE(154), 1, + STATE(165), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(91), 2, + ACTIONS(85), 2, anon_sym_let, anon_sym_E, - STATE(27), 2, + STATE(42), 2, + sym_detector, + aux_sym_attack_step_repeat2, + STATE(46), 2, sym_meta, aux_sym_category_declaration_repeat1, - ACTIONS(89), 5, + ACTIONS(83), 5, anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [633] = 12, + [627] = 12, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3893,28 +3836,29 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(49), 1, - sym_detector, - STATE(101), 1, + STATE(98), 1, sym_preconditions, - STATE(179), 1, + STATE(173), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(95), 2, + ACTIONS(89), 2, anon_sym_let, anon_sym_E, - STATE(27), 2, + STATE(17), 2, sym_meta, aux_sym_category_declaration_repeat1, - ACTIONS(93), 5, + STATE(39), 2, + sym_detector, + aux_sym_attack_step_repeat2, + ACTIONS(87), 5, anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [677] = 12, + [672] = 12, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3925,28 +3869,29 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(43), 1, - sym_detector, - STATE(90), 1, + STATE(71), 1, sym_preconditions, - STATE(162), 1, + STATE(174), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(99), 2, + ACTIONS(93), 2, anon_sym_let, anon_sym_E, - STATE(27), 2, + STATE(40), 2, + sym_detector, + aux_sym_attack_step_repeat2, + STATE(46), 2, sym_meta, aux_sym_category_declaration_repeat1, - ACTIONS(97), 5, + ACTIONS(91), 5, anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [721] = 12, + [717] = 12, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3957,33 +3902,36 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(50), 1, - sym_detector, - STATE(104), 1, + STATE(105), 1, sym_preconditions, - STATE(185), 1, + STATE(182), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(103), 2, + ACTIONS(97), 2, anon_sym_let, anon_sym_E, - STATE(27), 2, + STATE(43), 2, + sym_detector, + aux_sym_attack_step_repeat2, + STATE(46), 2, sym_meta, aux_sym_category_declaration_repeat1, - ACTIONS(101), 5, + ACTIONS(95), 5, anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, - [765] = 3, + [762] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(107), 1, + ACTIONS(101), 1, + anon_sym_LPAREN, + ACTIONS(103), 1, anon_sym_DASH, - ACTIONS(105), 16, + ACTIONS(99), 16, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4003,9 +3951,9 @@ static const uint16_t ts_small_parse_table[] = { [790] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(111), 1, + ACTIONS(107), 1, anon_sym_DASH, - ACTIONS(109), 16, + ACTIONS(105), 16, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4025,9 +3973,9 @@ static const uint16_t ts_small_parse_table[] = { [815] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(115), 1, + ACTIONS(111), 1, anon_sym_DASH, - ACTIONS(113), 16, + ACTIONS(109), 16, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4044,44 +3992,36 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_STAR, anon_sym_BSLASH_SLASH, anon_sym_SLASH_BSLASH, - [840] = 7, - ACTIONS(3), 1, + [840] = 5, + ACTIONS(17), 1, sym_comment, - ACTIONS(119), 1, - anon_sym_DOT, - ACTIONS(121), 1, - anon_sym_LBRACK, - ACTIONS(123), 1, - anon_sym_DASH, - ACTIONS(125), 1, - anon_sym_STAR, - ACTIONS(127), 1, - anon_sym_SLASH_BSLASH, - ACTIONS(117), 12, - anon_sym_RBRACE, + ACTIONS(117), 1, + anon_sym_AT, + STATE(21), 1, + aux_sym_attack_step_repeat1, + ACTIONS(113), 4, anon_sym_let, + anon_sym_E, + anon_sym_BANG, + sym_identifier, + ACTIONS(115), 11, + anon_sym_LBRACE, + anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, - anon_sym_E, anon_sym_BANGE, - anon_sym_COMMA, - anon_sym_RPAREN, + anon_sym_SLASH_SLASH_BANG, + anon_sym_LT_DASH, anon_sym_PLUS_GT, anon_sym_DASH_GT, - anon_sym_BSLASH_SLASH, - [873] = 6, + anon_sym_LBRACK, + [869] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(119), 1, - anon_sym_DOT, - ACTIONS(121), 1, - anon_sym_LBRACK, - ACTIONS(125), 1, - anon_sym_STAR, - ACTIONS(129), 1, + ACTIONS(122), 1, anon_sym_DASH, - ACTIONS(117), 13, + ACTIONS(120), 16, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4090,17 +4030,20 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_E, anon_sym_BANGE, anon_sym_COMMA, + anon_sym_DOT, anon_sym_RPAREN, anon_sym_PLUS_GT, anon_sym_DASH_GT, + anon_sym_LBRACK, + anon_sym_STAR, anon_sym_BSLASH_SLASH, anon_sym_SLASH_BSLASH, - [904] = 3, + [894] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(133), 1, + ACTIONS(126), 1, anon_sym_DASH, - ACTIONS(131), 16, + ACTIONS(124), 16, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4117,12 +4060,16 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_STAR, anon_sym_BSLASH_SLASH, anon_sym_SLASH_BSLASH, - [929] = 3, + [919] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(129), 1, + ACTIONS(130), 1, + anon_sym_LBRACK, + ACTIONS(132), 1, anon_sym_DASH, - ACTIONS(117), 16, + ACTIONS(134), 1, + anon_sym_STAR, + ACTIONS(128), 14, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4135,26 +4082,20 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_RPAREN, anon_sym_PLUS_GT, anon_sym_DASH_GT, - anon_sym_LBRACK, - anon_sym_STAR, anon_sym_BSLASH_SLASH, anon_sym_SLASH_BSLASH, - [954] = 8, + [948] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(119), 1, - anon_sym_DOT, - ACTIONS(121), 1, + ACTIONS(130), 1, anon_sym_LBRACK, - ACTIONS(123), 1, + ACTIONS(132), 1, anon_sym_DASH, - ACTIONS(125), 1, + ACTIONS(134), 1, anon_sym_STAR, - ACTIONS(127), 1, - anon_sym_SLASH_BSLASH, - ACTIONS(137), 1, - anon_sym_BSLASH_SLASH, - ACTIONS(135), 10, + ACTIONS(136), 1, + anon_sym_DOT, + ACTIONS(128), 13, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4163,116 +4104,166 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_E, anon_sym_BANGE, anon_sym_COMMA, + anon_sym_RPAREN, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [988] = 5, + anon_sym_BSLASH_SLASH, + anon_sym_SLASH_BSLASH, + [979] = 9, ACTIONS(17), 1, sym_comment, - ACTIONS(139), 1, - sym_identifier, - STATE(27), 2, - sym_meta, - aux_sym_category_declaration_repeat1, - ACTIONS(144), 3, - anon_sym_let, - anon_sym_E, + ACTIONS(27), 1, anon_sym_BANG, - ACTIONS(142), 9, + ACTIONS(29), 1, + anon_sym_SLASH_SLASH_BANG, + ACTIONS(31), 1, + anon_sym_LT_DASH, + STATE(72), 1, + sym_preconditions, + STATE(124), 1, + sym_reaching, + ACTIONS(33), 2, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + STATE(47), 2, + sym_detector, + aux_sym_attack_step_repeat2, + ACTIONS(138), 7, anon_sym_RBRACE, + anon_sym_let, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, + anon_sym_E, anon_sym_BANGE, + [1015] = 9, + ACTIONS(17), 1, + sym_comment, + ACTIONS(27), 1, + anon_sym_BANG, + ACTIONS(29), 1, anon_sym_SLASH_SLASH_BANG, + ACTIONS(31), 1, anon_sym_LT_DASH, + STATE(91), 1, + sym_preconditions, + STATE(130), 1, + sym_reaching, + ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1015] = 3, - ACTIONS(17), 1, - sym_comment, - ACTIONS(146), 4, - anon_sym_let, - anon_sym_E, - anon_sym_BANG, - sym_identifier, - ACTIONS(148), 9, + STATE(47), 2, + sym_detector, + aux_sym_attack_step_repeat2, + ACTIONS(140), 7, anon_sym_RBRACE, + anon_sym_let, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, + anon_sym_E, anon_sym_BANGE, + [1051] = 9, + ACTIONS(17), 1, + sym_comment, + ACTIONS(27), 1, + anon_sym_BANG, + ACTIONS(29), 1, anon_sym_SLASH_SLASH_BANG, + ACTIONS(31), 1, anon_sym_LT_DASH, + STATE(87), 1, + sym_preconditions, + STATE(156), 1, + sym_reaching, + ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1036] = 3, - ACTIONS(17), 1, - sym_comment, - ACTIONS(150), 4, - anon_sym_let, - anon_sym_E, - anon_sym_BANG, - sym_identifier, - ACTIONS(152), 9, + STATE(47), 2, + sym_detector, + aux_sym_attack_step_repeat2, + ACTIONS(142), 7, anon_sym_RBRACE, + anon_sym_let, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, + anon_sym_E, anon_sym_BANGE, + [1087] = 9, + ACTIONS(17), 1, + sym_comment, + ACTIONS(27), 1, + anon_sym_BANG, + ACTIONS(29), 1, anon_sym_SLASH_SLASH_BANG, + ACTIONS(31), 1, anon_sym_LT_DASH, + STATE(90), 1, + sym_preconditions, + STATE(128), 1, + sym_reaching, + ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1057] = 6, - ACTIONS(3), 1, - sym_comment, - ACTIONS(154), 1, - sym_identifier, - ACTIONS(160), 1, - anon_sym_LBRACK, - STATE(100), 1, - sym_ttc, - ACTIONS(158), 2, - anon_sym_let, - anon_sym_E, - ACTIONS(156), 8, + STATE(47), 2, + sym_detector, + aux_sym_attack_step_repeat2, + ACTIONS(144), 7, anon_sym_RBRACE, + anon_sym_let, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, + anon_sym_E, anon_sym_BANGE, + [1123] = 9, + ACTIONS(17), 1, + sym_comment, + ACTIONS(27), 1, + anon_sym_BANG, + ACTIONS(29), 1, + anon_sym_SLASH_SLASH_BANG, + ACTIONS(31), 1, anon_sym_LT_DASH, + STATE(76), 1, + sym_preconditions, + STATE(143), 1, + sym_reaching, + ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1084] = 6, - ACTIONS(3), 1, - sym_comment, - ACTIONS(160), 1, - anon_sym_LBRACK, - ACTIONS(162), 1, - sym_identifier, - STATE(73), 1, - sym_ttc, - ACTIONS(166), 2, - anon_sym_let, - anon_sym_E, - ACTIONS(164), 8, + STATE(47), 2, + sym_detector, + aux_sym_attack_step_repeat2, + ACTIONS(146), 7, anon_sym_RBRACE, + anon_sym_let, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, + anon_sym_E, anon_sym_BANGE, + [1159] = 9, + ACTIONS(17), 1, + sym_comment, + ACTIONS(27), 1, + anon_sym_BANG, + ACTIONS(29), 1, + anon_sym_SLASH_SLASH_BANG, + ACTIONS(31), 1, anon_sym_LT_DASH, + STATE(79), 1, + sym_preconditions, + STATE(148), 1, + sym_reaching, + ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1111] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(160), 1, - anon_sym_LBRACK, - STATE(74), 1, - sym_ttc, - ACTIONS(168), 10, + STATE(47), 2, + sym_detector, + aux_sym_attack_step_repeat2, + ACTIONS(148), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4280,22 +4271,53 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, + [1195] = 9, + ACTIONS(17), 1, + sym_comment, + ACTIONS(27), 1, + anon_sym_BANG, + ACTIONS(29), 1, + anon_sym_SLASH_SLASH_BANG, + ACTIONS(31), 1, anon_sym_LT_DASH, + STATE(80), 1, + sym_preconditions, + STATE(151), 1, + sym_reaching, + ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1133] = 6, - ACTIONS(3), 1, + STATE(47), 2, + sym_detector, + aux_sym_attack_step_repeat2, + ACTIONS(150), 7, + anon_sym_RBRACE, + anon_sym_let, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_POUND, + anon_sym_E, + anon_sym_BANGE, + [1231] = 9, + ACTIONS(17), 1, sym_comment, + ACTIONS(27), 1, + anon_sym_BANG, + ACTIONS(29), 1, + anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(85), 1, + STATE(102), 1, sym_preconditions, - STATE(155), 1, + STATE(134), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(170), 7, + STATE(47), 2, + sym_detector, + aux_sym_attack_step_repeat2, + ACTIONS(152), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4303,19 +4325,26 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1159] = 6, - ACTIONS(3), 1, + [1267] = 9, + ACTIONS(17), 1, sym_comment, + ACTIONS(27), 1, + anon_sym_BANG, + ACTIONS(29), 1, + anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(82), 1, + STATE(93), 1, sym_preconditions, - STATE(152), 1, + STATE(161), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(172), 7, + STATE(47), 2, + sym_detector, + aux_sym_attack_step_repeat2, + ACTIONS(154), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4323,14 +4352,21 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1185] = 4, + [1303] = 7, ACTIONS(3), 1, sym_comment, - ACTIONS(160), 1, + ACTIONS(130), 1, anon_sym_LBRACK, - STATE(87), 1, - sym_ttc, - ACTIONS(174), 10, + ACTIONS(134), 1, + anon_sym_STAR, + ACTIONS(136), 1, + anon_sym_DOT, + ACTIONS(158), 1, + anon_sym_DASH, + ACTIONS(160), 2, + anon_sym_BSLASH_SLASH, + anon_sym_SLASH_BSLASH, + ACTIONS(156), 10, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4338,22 +4374,29 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - anon_sym_LT_DASH, + anon_sym_COMMA, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1207] = 6, - ACTIONS(3), 1, + [1335] = 9, + ACTIONS(17), 1, sym_comment, + ACTIONS(27), 1, + anon_sym_BANG, + ACTIONS(29), 1, + anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(77), 1, + STATE(96), 1, sym_preconditions, - STATE(143), 1, + STATE(167), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(176), 7, + STATE(47), 2, + sym_detector, + aux_sym_attack_step_repeat2, + ACTIONS(162), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4361,19 +4404,26 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1233] = 6, - ACTIONS(3), 1, + [1371] = 9, + ACTIONS(17), 1, sym_comment, + ACTIONS(27), 1, + anon_sym_BANG, + ACTIONS(29), 1, + anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(88), 1, + STATE(97), 1, sym_preconditions, - STATE(160), 1, + STATE(169), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(178), 7, + STATE(47), 2, + sym_detector, + aux_sym_attack_step_repeat2, + ACTIONS(164), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4381,36 +4431,47 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1259] = 3, - ACTIONS(3), 1, + [1407] = 3, + ACTIONS(17), 1, sym_comment, - ACTIONS(180), 3, + ACTIONS(113), 4, anon_sym_let, anon_sym_E, + anon_sym_BANG, sym_identifier, - ACTIONS(182), 9, + ACTIONS(115), 12, + anon_sym_LBRACE, anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_BANGE, + anon_sym_AT, + anon_sym_SLASH_SLASH_BANG, anon_sym_LT_DASH, anon_sym_PLUS_GT, anon_sym_DASH_GT, anon_sym_LBRACK, - [1279] = 6, - ACTIONS(3), 1, + [1431] = 9, + ACTIONS(17), 1, sym_comment, + ACTIONS(27), 1, + anon_sym_BANG, + ACTIONS(29), 1, + anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(91), 1, + STATE(107), 1, sym_preconditions, - STATE(163), 1, + STATE(183), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(184), 7, + STATE(47), 2, + sym_detector, + aux_sym_attack_step_repeat2, + ACTIONS(166), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4418,19 +4479,26 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1305] = 6, - ACTIONS(3), 1, + [1467] = 9, + ACTIONS(17), 1, sym_comment, + ACTIONS(27), 1, + anon_sym_BANG, + ACTIONS(29), 1, + anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(110), 1, + STATE(108), 1, sym_preconditions, - STATE(128), 1, + STATE(185), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(186), 7, + STATE(47), 2, + sym_detector, + aux_sym_attack_step_repeat2, + ACTIONS(168), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4438,19 +4506,26 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1331] = 6, - ACTIONS(3), 1, + [1503] = 9, + ACTIONS(17), 1, sym_comment, + ACTIONS(27), 1, + anon_sym_BANG, + ACTIONS(29), 1, + anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(96), 1, + STATE(103), 1, sym_preconditions, - STATE(168), 1, + STATE(175), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(188), 7, + STATE(47), 2, + sym_detector, + aux_sym_attack_step_repeat2, + ACTIONS(170), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4458,36 +4533,26 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1357] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(190), 3, - anon_sym_let, - anon_sym_E, - sym_identifier, - ACTIONS(192), 9, - anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, - anon_sym_LT_DASH, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - anon_sym_LBRACK, - [1377] = 6, - ACTIONS(3), 1, + [1539] = 9, + ACTIONS(17), 1, sym_comment, + ACTIONS(27), 1, + anon_sym_BANG, + ACTIONS(29), 1, + anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(97), 1, + STATE(104), 1, sym_preconditions, - STATE(173), 1, + STATE(178), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(194), 7, + STATE(47), 2, + sym_detector, + aux_sym_attack_step_repeat2, + ACTIONS(172), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4495,19 +4560,26 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1403] = 6, - ACTIONS(3), 1, + [1575] = 9, + ACTIONS(17), 1, sym_comment, + ACTIONS(27), 1, + anon_sym_BANG, + ACTIONS(29), 1, + anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(98), 1, + STATE(109), 1, sym_preconditions, - STATE(176), 1, + STATE(189), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(196), 7, + STATE(47), 2, + sym_detector, + aux_sym_attack_step_repeat2, + ACTIONS(174), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4515,39 +4587,85 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1429] = 6, - ACTIONS(3), 1, + [1611] = 6, + ACTIONS(17), 1, sym_comment, - ACTIONS(31), 1, + ACTIONS(35), 1, + anon_sym_LBRACK, + ACTIONS(176), 1, + sym_identifier, + STATE(55), 1, + sym_ttc, + ACTIONS(180), 3, + anon_sym_let, + anon_sym_E, + anon_sym_BANG, + ACTIONS(178), 9, + anon_sym_RBRACE, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_POUND, + anon_sym_BANGE, + anon_sym_SLASH_SLASH_BANG, anon_sym_LT_DASH, - STATE(67), 1, - sym_preconditions, - STATE(134), 1, - sym_reaching, - ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(198), 7, - anon_sym_RBRACE, + [1640] = 6, + ACTIONS(17), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK, + ACTIONS(182), 1, + sym_identifier, + STATE(54), 1, + sym_ttc, + ACTIONS(186), 3, anon_sym_let, + anon_sym_E, + anon_sym_BANG, + ACTIONS(184), 9, + anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, - anon_sym_E, anon_sym_BANGE, - [1455] = 6, - ACTIONS(3), 1, + anon_sym_SLASH_SLASH_BANG, + anon_sym_LT_DASH, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + [1669] = 5, + ACTIONS(17), 1, sym_comment, - ACTIONS(31), 1, + ACTIONS(188), 1, + sym_identifier, + STATE(46), 2, + sym_meta, + aux_sym_category_declaration_repeat1, + ACTIONS(193), 3, + anon_sym_let, + anon_sym_E, + anon_sym_BANG, + ACTIONS(191), 9, + anon_sym_RBRACE, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_POUND, + anon_sym_BANGE, + anon_sym_SLASH_SLASH_BANG, anon_sym_LT_DASH, - STATE(68), 1, - sym_preconditions, - STATE(192), 1, - sym_reaching, - ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(200), 7, + [1696] = 5, + ACTIONS(17), 1, + sym_comment, + ACTIONS(197), 1, + anon_sym_BANG, + ACTIONS(200), 1, + anon_sym_SLASH_SLASH_BANG, + STATE(47), 2, + sym_detector, + aux_sym_attack_step_repeat2, + ACTIONS(195), 10, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4555,19 +4673,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1481] = 6, - ACTIONS(3), 1, - sym_comment, - ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(102), 1, - sym_preconditions, - STATE(183), 1, - sym_reaching, - ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(202), 7, + [1722] = 5, + ACTIONS(17), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK, + ACTIONS(205), 1, + anon_sym_BANG, + STATE(57), 1, + sym_ttc, + ACTIONS(203), 11, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4575,19 +4693,39 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1507] = 6, - ACTIONS(3), 1, + anon_sym_SLASH_SLASH_BANG, + anon_sym_LT_DASH, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + [1748] = 3, + ACTIONS(17), 1, sym_comment, - ACTIONS(31), 1, + ACTIONS(207), 4, + anon_sym_let, + anon_sym_E, + anon_sym_BANG, + sym_identifier, + ACTIONS(209), 10, + anon_sym_RBRACE, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_POUND, + anon_sym_BANGE, + anon_sym_SLASH_SLASH_BANG, anon_sym_LT_DASH, - STATE(70), 1, - sym_preconditions, - STATE(131), 1, - sym_reaching, - ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(204), 7, + anon_sym_LBRACK, + [1770] = 5, + ACTIONS(17), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LBRACK, + ACTIONS(213), 1, + anon_sym_BANG, + STATE(56), 1, + sym_ttc, + ACTIONS(211), 11, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4595,39 +4733,71 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1533] = 6, - ACTIONS(3), 1, - sym_comment, - ACTIONS(31), 1, + anon_sym_SLASH_SLASH_BANG, anon_sym_LT_DASH, - STATE(105), 1, - sym_preconditions, - STATE(186), 1, - sym_reaching, - ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(206), 7, - anon_sym_RBRACE, + [1796] = 3, + ACTIONS(17), 1, + sym_comment, + ACTIONS(215), 4, anon_sym_let, + anon_sym_E, + anon_sym_BANG, + sym_identifier, + ACTIONS(217), 10, + anon_sym_RBRACE, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, + anon_sym_BANGE, + anon_sym_SLASH_SLASH_BANG, + anon_sym_LT_DASH, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + anon_sym_LBRACK, + [1818] = 3, + ACTIONS(17), 1, + sym_comment, + ACTIONS(219), 4, + anon_sym_let, anon_sym_E, + anon_sym_BANG, + sym_identifier, + ACTIONS(221), 9, + anon_sym_RBRACE, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_POUND, anon_sym_BANGE, - [1559] = 6, - ACTIONS(3), 1, + anon_sym_SLASH_SLASH_BANG, + anon_sym_LT_DASH, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + [1839] = 3, + ACTIONS(17), 1, sym_comment, - ACTIONS(31), 1, + ACTIONS(223), 4, + anon_sym_let, + anon_sym_E, + anon_sym_BANG, + sym_identifier, + ACTIONS(225), 9, + anon_sym_RBRACE, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_POUND, + anon_sym_BANGE, + anon_sym_SLASH_SLASH_BANG, anon_sym_LT_DASH, - STATE(65), 1, - sym_preconditions, - STATE(189), 1, - sym_reaching, - ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(208), 7, + [1860] = 3, + ACTIONS(17), 1, + sym_comment, + ACTIONS(229), 1, + anon_sym_BANG, + ACTIONS(227), 11, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4635,19 +4805,16 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1585] = 6, - ACTIONS(3), 1, - sym_comment, - ACTIONS(31), 1, + anon_sym_SLASH_SLASH_BANG, anon_sym_LT_DASH, - STATE(79), 1, - sym_preconditions, - STATE(146), 1, - sym_reaching, - ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(210), 7, + [1880] = 3, + ACTIONS(17), 1, + sym_comment, + ACTIONS(233), 1, + anon_sym_BANG, + ACTIONS(231), 11, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4655,111 +4822,90 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1611] = 6, - ACTIONS(3), 1, + anon_sym_SLASH_SLASH_BANG, + anon_sym_LT_DASH, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + [1900] = 3, + ACTIONS(17), 1, sym_comment, - ACTIONS(212), 1, + ACTIONS(237), 1, + anon_sym_BANG, + ACTIONS(235), 11, anon_sym_RBRACE, - ACTIONS(214), 1, anon_sym_let, - STATE(292), 1, - sym_asset_definition, - STATE(94), 3, - sym_asset_variable, - sym_attack_step, - aux_sym_asset_definition_repeat1, - ACTIONS(216), 5, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1636] = 6, - ACTIONS(3), 1, + anon_sym_SLASH_SLASH_BANG, + anon_sym_LT_DASH, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + [1920] = 3, + ACTIONS(17), 1, sym_comment, - ACTIONS(214), 1, - anon_sym_let, - ACTIONS(218), 1, + ACTIONS(241), 1, + anon_sym_BANG, + ACTIONS(239), 11, anon_sym_RBRACE, - STATE(311), 1, - sym_asset_definition, - STATE(94), 3, - sym_asset_variable, - sym_attack_step, - aux_sym_asset_definition_repeat1, - ACTIONS(216), 5, + anon_sym_let, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1661] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(220), 1, - ts_builtin_sym_end, - ACTIONS(222), 1, - anon_sym_include, - ACTIONS(225), 1, - anon_sym_category, - ACTIONS(228), 1, - anon_sym_POUND, - ACTIONS(231), 1, - anon_sym_associations, - STATE(54), 2, - sym_declaration, - aux_sym_source_file_repeat1, - STATE(203), 4, - sym_include_declaration, - sym_category_declaration, - sym_define_declaration, - sym_associations_declaration, - [1690] = 6, + anon_sym_SLASH_SLASH_BANG, + anon_sym_LT_DASH, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + [1940] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(214), 1, - anon_sym_let, - ACTIONS(234), 1, + ACTIONS(243), 1, anon_sym_RBRACE, - STATE(289), 1, + ACTIONS(245), 1, + anon_sym_let, + STATE(303), 1, sym_asset_definition, - STATE(94), 3, + STATE(101), 3, sym_asset_variable, sym_attack_step, aux_sym_asset_definition_repeat1, - ACTIONS(216), 5, + ACTIONS(247), 5, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1715] = 6, + [1965] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(214), 1, + ACTIONS(245), 1, anon_sym_let, - ACTIONS(236), 1, + ACTIONS(249), 1, anon_sym_RBRACE, - STATE(306), 1, + STATE(275), 1, sym_asset_definition, - STATE(94), 3, + STATE(101), 3, sym_asset_variable, sym_attack_step, aux_sym_asset_definition_repeat1, - ACTIONS(216), 5, + ACTIONS(247), 5, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1740] = 4, + [1990] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(240), 1, + ACTIONS(253), 1, anon_sym_COMMA, - STATE(63), 1, + STATE(60), 1, aux_sym_preconditions_repeat1, - ACTIONS(238), 9, + ACTIONS(251), 9, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4769,107 +4915,109 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_BANGE, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1761] = 6, + [2011] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(214), 1, + ACTIONS(245), 1, anon_sym_let, - ACTIONS(242), 1, + ACTIONS(256), 1, anon_sym_RBRACE, - STATE(286), 1, + STATE(278), 1, sym_asset_definition, - STATE(94), 3, + STATE(101), 3, sym_asset_variable, sym_attack_step, aux_sym_asset_definition_repeat1, - ACTIONS(216), 5, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [1786] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(246), 1, - anon_sym_COMMA, - STATE(59), 1, - aux_sym_preconditions_repeat1, - ACTIONS(244), 9, - anon_sym_RBRACE, - anon_sym_let, + ACTIONS(247), 5, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - [1807] = 6, + [2036] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(214), 1, + ACTIONS(245), 1, anon_sym_let, - ACTIONS(249), 1, + ACTIONS(258), 1, anon_sym_RBRACE, - STATE(295), 1, + STATE(314), 1, sym_asset_definition, - STATE(94), 3, + STATE(101), 3, sym_asset_variable, sym_attack_step, aux_sym_asset_definition_repeat1, - ACTIONS(216), 5, + ACTIONS(247), 5, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1832] = 6, + [2061] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(260), 1, + ts_builtin_sym_end, + ACTIONS(262), 1, + anon_sym_include, + ACTIONS(265), 1, + anon_sym_category, + ACTIONS(268), 1, + anon_sym_POUND, + ACTIONS(271), 1, + anon_sym_associations, + STATE(63), 2, + sym_declaration, + aux_sym_source_file_repeat1, + STATE(206), 4, + sym_include_declaration, + sym_category_declaration, + sym_define_declaration, + sym_associations_declaration, + [2090] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(214), 1, + ACTIONS(245), 1, anon_sym_let, - ACTIONS(251), 1, + ACTIONS(274), 1, anon_sym_RBRACE, - STATE(294), 1, + STATE(286), 1, sym_asset_definition, - STATE(94), 3, + STATE(101), 3, sym_asset_variable, sym_attack_step, aux_sym_asset_definition_repeat1, - ACTIONS(216), 5, + ACTIONS(247), 5, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1857] = 6, + [2115] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(214), 1, - anon_sym_let, - ACTIONS(253), 1, + ACTIONS(278), 1, + anon_sym_COMMA, + STATE(66), 1, + aux_sym_preconditions_repeat1, + ACTIONS(276), 9, anon_sym_RBRACE, - STATE(312), 1, - sym_asset_definition, - STATE(94), 3, - sym_asset_variable, - sym_attack_step, - aux_sym_asset_definition_repeat1, - ACTIONS(216), 5, + anon_sym_let, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1882] = 4, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + [2136] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(240), 1, + ACTIONS(278), 1, anon_sym_COMMA, - STATE(59), 1, + STATE(60), 1, aux_sym_preconditions_repeat1, - ACTIONS(255), 9, + ACTIONS(280), 9, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4879,7 +5027,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_BANGE, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1903] = 8, + [2157] = 8, ACTIONS(3), 1, sym_comment, ACTIONS(7), 1, @@ -4890,90 +5038,82 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, ACTIONS(13), 1, anon_sym_associations, - ACTIONS(257), 1, + ACTIONS(282), 1, ts_builtin_sym_end, - STATE(54), 2, + STATE(63), 2, sym_declaration, aux_sym_source_file_repeat1, - STATE(203), 4, + STATE(206), 4, sym_include_declaration, sym_category_declaration, sym_define_declaration, sym_associations_declaration, - [1932] = 4, + [2186] = 6, ACTIONS(3), 1, sym_comment, - STATE(122), 1, - sym_reaching, - ACTIONS(33), 2, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - ACTIONS(259), 7, - anon_sym_RBRACE, + ACTIONS(245), 1, anon_sym_let, + ACTIONS(284), 1, + anon_sym_RBRACE, + STATE(301), 1, + sym_asset_definition, + STATE(101), 3, + sym_asset_variable, + sym_attack_step, + aux_sym_asset_definition_repeat1, + ACTIONS(247), 5, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1952] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(261), 1, - sym_identifier, - ACTIONS(263), 1, - anon_sym_LPAREN, - ACTIONS(265), 2, - sym_integer, - sym_float, - STATE(196), 6, - sym__ttc_expr, - sym__ttc_parenthesized, - sym__ttc_primary, - sym_ttc_distribution, - sym_ttc_binop, - sym__number, - [1974] = 4, + [2211] = 6, ACTIONS(3), 1, sym_comment, - STATE(151), 1, - sym_reaching, - ACTIONS(33), 2, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - ACTIONS(267), 7, - anon_sym_RBRACE, + ACTIONS(245), 1, anon_sym_let, + ACTIONS(286), 1, + anon_sym_RBRACE, + STATE(306), 1, + sym_asset_definition, + STATE(101), 3, + sym_asset_variable, + sym_attack_step, + aux_sym_asset_definition_repeat1, + ACTIONS(247), 5, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [1994] = 4, + [2236] = 6, ACTIONS(3), 1, sym_comment, - STATE(127), 1, - sym_reaching, - ACTIONS(33), 2, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - ACTIONS(269), 7, - anon_sym_RBRACE, + ACTIONS(245), 1, anon_sym_let, + ACTIONS(288), 1, + anon_sym_RBRACE, + STATE(279), 1, + sym_asset_definition, + STATE(101), 3, + sym_asset_variable, + sym_attack_step, + aux_sym_asset_definition_repeat1, + ACTIONS(247), 5, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2014] = 4, + [2261] = 4, ACTIONS(3), 1, sym_comment, - STATE(153), 1, + STATE(184), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(271), 7, + ACTIONS(290), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4981,15 +5121,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2034] = 4, + [2281] = 4, ACTIONS(3), 1, sym_comment, - STATE(145), 1, + STATE(135), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(273), 7, + ACTIONS(292), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -4997,31 +5137,32 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2054] = 4, + [2301] = 5, ACTIONS(3), 1, sym_comment, - STATE(129), 1, - sym_reaching, - ACTIONS(33), 2, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - ACTIONS(275), 7, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2074] = 4, + ACTIONS(294), 1, + sym_identifier, + ACTIONS(296), 1, + anon_sym_LPAREN, + ACTIONS(298), 2, + sym_integer, + sym_float, + STATE(196), 6, + sym__ttc_expr, + sym__ttc_parenthesized, + sym__ttc_primary, + sym_ttc_distribution, + sym_ttc_binop, + sym__number, + [2323] = 4, ACTIONS(3), 1, sym_comment, - STATE(156), 1, + STATE(126), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(277), 7, + ACTIONS(300), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5029,10 +5170,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2094] = 2, + [2343] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(279), 10, + ACTIONS(251), 10, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5040,27 +5181,18 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - anon_sym_LT_DASH, + anon_sym_COMMA, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [2110] = 2, + [2359] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(281), 10, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - anon_sym_LT_DASH, + STATE(193), 1, + sym_reaching, + ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [2126] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(244), 10, + ACTIONS(302), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5068,35 +5200,32 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - anon_sym_COMMA, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - [2142] = 5, + [2379] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(261), 1, + ACTIONS(294), 1, sym_identifier, - ACTIONS(263), 1, + ACTIONS(296), 1, anon_sym_LPAREN, - ACTIONS(283), 2, + ACTIONS(304), 2, sym_integer, sym_float, - STATE(141), 6, + STATE(197), 6, sym__ttc_expr, sym__ttc_parenthesized, sym__ttc_primary, sym_ttc_distribution, sym_ttc_binop, sym__number, - [2164] = 4, + [2401] = 4, ACTIONS(3), 1, sym_comment, - STATE(158), 1, + STATE(160), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(285), 7, + ACTIONS(306), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5104,15 +5233,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2184] = 4, + [2421] = 4, ACTIONS(3), 1, sym_comment, - STATE(132), 1, + STATE(162), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(287), 7, + ACTIONS(308), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5120,15 +5249,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2204] = 4, + [2441] = 4, ACTIONS(3), 1, sym_comment, - STATE(159), 1, + STATE(163), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(289), 7, + ACTIONS(310), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5136,15 +5265,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2224] = 4, + [2461] = 4, ACTIONS(3), 1, sym_comment, - STATE(161), 1, + STATE(129), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(291), 7, + ACTIONS(312), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5152,7 +5281,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2244] = 4, + [2481] = 4, ACTIONS(3), 1, sym_comment, STATE(164), 1, @@ -5160,7 +5289,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(293), 7, + ACTIONS(314), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5168,15 +5297,49 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2264] = 4, + [2501] = 5, ACTIONS(3), 1, sym_comment, - STATE(167), 1, + ACTIONS(294), 1, + sym_identifier, + ACTIONS(296), 1, + anon_sym_LPAREN, + ACTIONS(316), 2, + sym_integer, + sym_float, + STATE(139), 6, + sym__ttc_expr, + sym__ttc_parenthesized, + sym__ttc_primary, + sym_ttc_distribution, + sym_ttc_binop, + sym__number, + [2523] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(294), 1, + sym_identifier, + ACTIONS(296), 1, + anon_sym_LPAREN, + ACTIONS(318), 2, + sym_integer, + sym_float, + STATE(140), 6, + sym__ttc_expr, + sym__ttc_parenthesized, + sym__ttc_primary, + sym_ttc_distribution, + sym_ttc_binop, + sym__number, + [2545] = 4, + ACTIONS(3), 1, + sym_comment, + STATE(168), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(295), 7, + ACTIONS(320), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5184,32 +5347,32 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2284] = 5, + [2565] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(261), 1, + ACTIONS(294), 1, sym_identifier, - ACTIONS(263), 1, + ACTIONS(296), 1, anon_sym_LPAREN, - ACTIONS(297), 2, + ACTIONS(322), 2, sym_integer, sym_float, - STATE(198), 6, + STATE(141), 6, sym__ttc_expr, sym__ttc_parenthesized, sym__ttc_primary, sym_ttc_distribution, sym_ttc_binop, sym__number, - [2306] = 4, + [2587] = 4, ACTIONS(3), 1, sym_comment, - STATE(169), 1, + STATE(170), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(299), 7, + ACTIONS(324), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5217,43 +5380,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2326] = 4, + [2607] = 4, ACTIONS(3), 1, sym_comment, - STATE(170), 1, + STATE(142), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(301), 7, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2346] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(261), 1, - sym_identifier, - ACTIONS(263), 1, - anon_sym_LPAREN, - ACTIONS(303), 2, - sym_integer, - sym_float, - STATE(140), 6, - sym__ttc_expr, - sym__ttc_parenthesized, - sym__ttc_primary, - sym_ttc_distribution, - sym_ttc_binop, - sym__number, - [2368] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(305), 10, + ACTIONS(326), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5261,10 +5396,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - anon_sym_LT_DASH, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - [2384] = 4, + [2627] = 4, ACTIONS(3), 1, sym_comment, STATE(172), 1, @@ -5272,7 +5404,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(307), 7, + ACTIONS(328), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5280,15 +5412,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2404] = 4, + [2647] = 4, ACTIONS(3), 1, sym_comment, - STATE(135), 1, + STATE(144), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(309), 7, + ACTIONS(330), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5296,15 +5428,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2424] = 4, + [2667] = 4, ACTIONS(3), 1, sym_comment, - STATE(174), 1, + STATE(145), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(311), 7, + ACTIONS(332), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5312,15 +5444,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2444] = 4, + [2687] = 4, ACTIONS(3), 1, sym_comment, - STATE(175), 1, + STATE(146), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(313), 7, + ACTIONS(334), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5328,15 +5460,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2464] = 4, + [2707] = 4, ACTIONS(3), 1, sym_comment, - STATE(123), 1, + STATE(176), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(315), 7, + ACTIONS(336), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5344,7 +5476,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2484] = 4, + [2727] = 4, ACTIONS(3), 1, sym_comment, STATE(177), 1, @@ -5352,7 +5484,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(317), 7, + ACTIONS(338), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5360,41 +5492,39 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2504] = 5, + [2747] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(214), 1, - anon_sym_let, - ACTIONS(319), 1, + STATE(131), 1, + sym_reaching, + ACTIONS(33), 2, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + ACTIONS(340), 7, anon_sym_RBRACE, - STATE(95), 3, - sym_asset_variable, - sym_attack_step, - aux_sym_asset_definition_repeat1, - ACTIONS(216), 5, + anon_sym_let, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2526] = 5, + [2767] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(321), 1, + STATE(179), 1, + sym_reaching, + ACTIONS(33), 2, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + ACTIONS(342), 7, anon_sym_RBRACE, - ACTIONS(323), 1, anon_sym_let, - STATE(95), 3, - sym_asset_variable, - sym_attack_step, - aux_sym_asset_definition_repeat1, - ACTIONS(326), 5, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2548] = 4, + [2787] = 4, ACTIONS(3), 1, sym_comment, STATE(180), 1, @@ -5402,7 +5532,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(329), 7, + ACTIONS(344), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5410,7 +5540,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2568] = 4, + [2807] = 4, ACTIONS(3), 1, sym_comment, STATE(181), 1, @@ -5418,7 +5548,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(331), 7, + ACTIONS(346), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5426,15 +5556,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2588] = 4, + [2827] = 4, ACTIONS(3), 1, sym_comment, - STATE(182), 1, + STATE(191), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(333), 7, + ACTIONS(348), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5442,15 +5572,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2608] = 4, + [2847] = 4, ACTIONS(3), 1, sym_comment, - STATE(184), 1, + STATE(149), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(335), 7, + ACTIONS(350), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5458,10 +5588,32 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2628] = 2, + [2867] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(245), 1, + anon_sym_let, + ACTIONS(352), 1, + anon_sym_RBRACE, + STATE(106), 3, + sym_asset_variable, + sym_attack_step, + aux_sym_asset_definition_repeat1, + ACTIONS(247), 5, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_POUND, + anon_sym_E, + anon_sym_BANGE, + [2889] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(337), 10, + STATE(152), 1, + sym_reaching, + ACTIONS(33), 2, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + ACTIONS(354), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5469,18 +5621,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - anon_sym_LT_DASH, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - [2644] = 4, + [2909] = 4, ACTIONS(3), 1, sym_comment, - STATE(187), 1, + STATE(186), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(339), 7, + ACTIONS(356), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5488,15 +5637,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2664] = 4, + [2929] = 4, ACTIONS(3), 1, sym_comment, - STATE(188), 1, + STATE(187), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(341), 7, + ACTIONS(358), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5504,15 +5653,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2684] = 4, + [2949] = 4, ACTIONS(3), 1, sym_comment, - STATE(144), 1, + STATE(188), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(343), 7, + ACTIONS(360), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5520,31 +5669,32 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2704] = 4, + [2969] = 5, ACTIONS(3), 1, sym_comment, - STATE(190), 1, - sym_reaching, - ACTIONS(33), 2, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - ACTIONS(345), 7, + ACTIONS(362), 1, anon_sym_RBRACE, + ACTIONS(364), 1, anon_sym_let, + STATE(106), 3, + sym_asset_variable, + sym_attack_step, + aux_sym_asset_definition_repeat1, + ACTIONS(367), 5, anon_sym_PIPE, anon_sym_AMP, anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2724] = 4, + [2991] = 4, ACTIONS(3), 1, sym_comment, - STATE(191), 1, + STATE(190), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(347), 7, + ACTIONS(370), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5552,15 +5702,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2744] = 4, + [3011] = 4, ACTIONS(3), 1, sym_comment, - STATE(147), 1, + STATE(121), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(349), 7, + ACTIONS(372), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5568,27 +5718,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2764] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(261), 1, - sym_identifier, - ACTIONS(263), 1, - anon_sym_LPAREN, - ACTIONS(351), 2, - sym_integer, - sym_float, - STATE(139), 6, - sym__ttc_expr, - sym__ttc_parenthesized, - sym__ttc_primary, - sym_ttc_distribution, - sym_ttc_binop, - sym__number, - [2786] = 2, + [3031] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(152), 10, + STATE(192), 1, + sym_reaching, + ACTIONS(33), 2, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + ACTIONS(374), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5596,35 +5734,15 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - anon_sym_LT_DASH, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - [2802] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(261), 1, - sym_identifier, - ACTIONS(263), 1, - anon_sym_LPAREN, - ACTIONS(353), 2, - sym_integer, - sym_float, - STATE(194), 6, - sym__ttc_expr, - sym__ttc_parenthesized, - sym__ttc_primary, - sym_ttc_distribution, - sym_ttc_binop, - sym__number, - [2824] = 4, + [3051] = 4, ACTIONS(3), 1, sym_comment, - STATE(142), 1, + STATE(153), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(355), 7, + ACTIONS(376), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5632,46 +5750,30 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2844] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(357), 1, - sym_identifier, - ACTIONS(359), 1, - anon_sym_LPAREN, - STATE(57), 1, - sym_asset_expr, - STATE(26), 6, - sym__inline_asset_expr, - sym__asset_expr_primary, - sym_asset_variable_substitution, - sym_asset_expr_type, - sym_asset_expr_binop, - sym_asset_expr_unop, - [2865] = 5, + [3071] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(357), 1, + ACTIONS(378), 1, sym_identifier, - ACTIONS(359), 1, + ACTIONS(380), 1, anon_sym_LPAREN, - STATE(166), 1, + STATE(75), 1, sym_asset_expr, - STATE(26), 6, + STATE(35), 6, sym__inline_asset_expr, sym__asset_expr_primary, sym_asset_variable_substitution, sym_asset_expr_type, sym_asset_expr_binop, sym_asset_expr_unop, - [2886] = 4, + [3092] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(240), 1, + ACTIONS(278), 1, anon_sym_COMMA, - STATE(114), 1, + STATE(60), 1, aux_sym_preconditions_repeat1, - ACTIONS(361), 7, + ACTIONS(382), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5679,14 +5781,14 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2905] = 4, + [3111] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(240), 1, + ACTIONS(278), 1, anon_sym_COMMA, - STATE(59), 1, + STATE(112), 1, aux_sym_preconditions_repeat1, - ACTIONS(363), 7, + ACTIONS(384), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5694,86 +5796,74 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [2924] = 5, + [3130] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(357), 1, + ACTIONS(378), 1, sym_identifier, - ACTIONS(359), 1, + ACTIONS(380), 1, anon_sym_LPAREN, - STATE(113), 1, + STATE(166), 1, sym_asset_expr, - STATE(26), 6, + STATE(35), 6, sym__inline_asset_expr, sym__asset_expr_primary, sym_asset_variable_substitution, sym_asset_expr_type, sym_asset_expr_binop, sym_asset_expr_unop, - [2945] = 5, + [3151] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(357), 1, + ACTIONS(378), 1, sym_identifier, - ACTIONS(359), 1, + ACTIONS(380), 1, anon_sym_LPAREN, - STATE(75), 1, + STATE(113), 1, sym_asset_expr, - STATE(26), 6, + STATE(35), 6, sym__inline_asset_expr, sym__asset_expr_primary, sym_asset_variable_substitution, sym_asset_expr_type, sym_asset_expr_binop, sym_asset_expr_unop, - [2966] = 4, + [3172] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(357), 1, + ACTIONS(378), 1, sym_identifier, - ACTIONS(359), 1, + ACTIONS(380), 1, anon_sym_LPAREN, - STATE(22), 6, + STATE(65), 1, + sym_asset_expr, + STATE(35), 6, sym__inline_asset_expr, sym__asset_expr_primary, sym_asset_variable_substitution, sym_asset_expr_type, sym_asset_expr_binop, sym_asset_expr_unop, - [2984] = 4, + [3193] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(357), 1, + ACTIONS(378), 1, sym_identifier, - ACTIONS(359), 1, + ACTIONS(380), 1, anon_sym_LPAREN, - STATE(25), 6, + STATE(24), 6, sym__inline_asset_expr, sym__asset_expr_primary, sym_asset_variable_substitution, sym_asset_expr_type, sym_asset_expr_binop, sym_asset_expr_unop, - [3002] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(365), 1, - anon_sym_LPAREN, - ACTIONS(369), 1, - anon_sym_SLASH, - ACTIONS(367), 6, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_CARET, - [3020] = 4, + [3211] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(357), 1, + ACTIONS(378), 1, sym_identifier, - ACTIONS(359), 1, + ACTIONS(380), 1, anon_sym_LPAREN, STATE(125), 6, sym__inline_asset_expr, @@ -5782,24 +5872,38 @@ static const uint16_t ts_small_parse_table[] = { sym_asset_expr_type, sym_asset_expr_binop, sym_asset_expr_unop, - [3038] = 4, + [3229] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(357), 1, + ACTIONS(378), 1, sym_identifier, - ACTIONS(359), 1, + ACTIONS(380), 1, anon_sym_LPAREN, - STATE(23), 6, + STATE(25), 6, sym__inline_asset_expr, sym__asset_expr_primary, sym_asset_variable_substitution, sym_asset_expr_type, sym_asset_expr_binop, sym_asset_expr_unop, - [3056] = 2, + [3247] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(386), 1, + anon_sym_LPAREN, + ACTIONS(390), 1, + anon_sym_SLASH, + ACTIONS(388), 6, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_CARET, + [3265] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(371), 7, + ACTIONS(392), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5807,10 +5911,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3069] = 2, + [3278] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(373), 7, + ACTIONS(394), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5818,10 +5922,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3082] = 2, + [3291] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(375), 7, + ACTIONS(396), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5829,26 +5933,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3095] = 7, - ACTIONS(3), 1, - sym_comment, - ACTIONS(119), 1, - anon_sym_DOT, - ACTIONS(121), 1, - anon_sym_LBRACK, - ACTIONS(125), 1, - anon_sym_STAR, - ACTIONS(137), 1, - anon_sym_BSLASH_SLASH, - ACTIONS(377), 1, - anon_sym_RPAREN, - ACTIONS(127), 2, - anon_sym_DASH, - anon_sym_SLASH_BSLASH, - [3118] = 2, + [3304] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(379), 7, + ACTIONS(398), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5856,10 +5944,25 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3131] = 2, + [3317] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(130), 1, + anon_sym_LBRACK, + ACTIONS(134), 1, + anon_sym_STAR, + ACTIONS(136), 1, + anon_sym_DOT, + ACTIONS(400), 1, + anon_sym_RPAREN, + ACTIONS(160), 3, + anon_sym_DASH, + anon_sym_BSLASH_SLASH, + anon_sym_SLASH_BSLASH, + [3338] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(381), 7, + ACTIONS(402), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5867,10 +5970,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3144] = 2, + [3351] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(383), 7, + ACTIONS(404), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5878,10 +5981,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3157] = 2, + [3364] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(385), 7, + ACTIONS(406), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5889,10 +5992,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3170] = 2, + [3377] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(387), 7, + ACTIONS(408), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5900,10 +6003,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3183] = 2, + [3390] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(389), 7, + ACTIONS(410), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5911,10 +6014,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3196] = 2, + [3403] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(391), 7, + ACTIONS(412), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5922,10 +6025,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3209] = 2, + [3416] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(393), 7, + ACTIONS(414), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5933,10 +6036,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3222] = 2, + [3429] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(395), 7, + ACTIONS(416), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5944,10 +6047,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3235] = 2, + [3442] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(397), 7, + ACTIONS(418), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5955,10 +6058,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3248] = 2, + [3455] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(399), 7, + ACTIONS(420), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5966,10 +6069,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3261] = 2, + [3468] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(401), 7, + ACTIONS(422), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -5977,62 +6080,74 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3274] = 3, + [3481] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(426), 1, + anon_sym_SLASH, + ACTIONS(424), 6, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_CARET, + [3496] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(405), 1, + ACTIONS(430), 1, anon_sym_SLASH, - ACTIONS(403), 6, + ACTIONS(428), 6, anon_sym_RPAREN, anon_sym_RBRACK, anon_sym_PLUS, anon_sym_DASH, anon_sym_STAR, anon_sym_CARET, - [3289] = 5, + [3511] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(409), 1, + ACTIONS(434), 1, anon_sym_STAR, - ACTIONS(411), 1, + ACTIONS(436), 1, anon_sym_SLASH, - ACTIONS(413), 1, + ACTIONS(438), 1, anon_sym_CARET, - ACTIONS(407), 4, + ACTIONS(432), 4, anon_sym_RPAREN, anon_sym_RBRACK, anon_sym_PLUS, anon_sym_DASH, - [3308] = 4, + [3530] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(413), 1, + ACTIONS(438), 1, anon_sym_CARET, - ACTIONS(415), 1, + ACTIONS(440), 1, anon_sym_SLASH, - ACTIONS(407), 5, + ACTIONS(432), 5, anon_sym_RPAREN, anon_sym_RBRACK, anon_sym_PLUS, anon_sym_DASH, anon_sym_STAR, - [3325] = 4, + [3547] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(413), 1, + ACTIONS(438), 1, anon_sym_CARET, - ACTIONS(415), 1, + ACTIONS(440), 1, anon_sym_SLASH, - ACTIONS(407), 5, + ACTIONS(432), 5, anon_sym_RPAREN, anon_sym_RBRACK, anon_sym_PLUS, anon_sym_DASH, anon_sym_STAR, - [3342] = 2, + [3564] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(417), 7, + ACTIONS(442), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6040,10 +6155,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3355] = 2, + [3577] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(419), 7, + ACTIONS(444), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6051,10 +6166,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3368] = 2, + [3590] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(421), 7, + ACTIONS(446), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6062,10 +6177,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3381] = 2, + [3603] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(423), 7, + ACTIONS(448), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6073,10 +6188,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3394] = 2, + [3616] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(425), 7, + ACTIONS(450), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6084,10 +6199,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3407] = 2, + [3629] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(427), 7, + ACTIONS(452), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6095,10 +6210,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3420] = 2, + [3642] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(429), 7, + ACTIONS(454), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6106,10 +6221,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3433] = 2, + [3655] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(431), 7, + ACTIONS(456), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6117,10 +6232,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3446] = 2, + [3668] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(433), 7, + ACTIONS(458), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6128,10 +6243,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3459] = 2, + [3681] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(435), 7, + ACTIONS(460), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6139,10 +6254,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3472] = 2, + [3694] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(437), 7, + ACTIONS(462), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6150,10 +6265,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3485] = 2, + [3707] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(439), 7, + ACTIONS(464), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6161,10 +6276,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3498] = 2, + [3720] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(441), 7, + ACTIONS(466), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6172,10 +6287,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3511] = 2, + [3733] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(443), 7, + ACTIONS(468), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6183,10 +6298,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3524] = 2, + [3746] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(445), 7, + ACTIONS(470), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6194,22 +6309,22 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3537] = 3, + [3759] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(449), 1, + ACTIONS(474), 1, anon_sym_SLASH, - ACTIONS(447), 6, + ACTIONS(472), 6, anon_sym_RPAREN, anon_sym_RBRACK, anon_sym_PLUS, anon_sym_DASH, anon_sym_STAR, anon_sym_CARET, - [3552] = 2, + [3774] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(451), 7, + ACTIONS(476), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6217,10 +6332,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3565] = 2, + [3787] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(453), 7, + ACTIONS(478), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6228,10 +6343,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3578] = 2, + [3800] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(455), 7, + ACTIONS(480), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6239,10 +6354,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3591] = 2, + [3813] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(457), 7, + ACTIONS(482), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6250,10 +6365,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3604] = 2, + [3826] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(459), 7, + ACTIONS(484), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6261,10 +6376,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3617] = 2, + [3839] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(461), 7, + ACTIONS(486), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6272,10 +6387,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3630] = 2, + [3852] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(463), 7, + ACTIONS(488), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6283,10 +6398,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3643] = 2, + [3865] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(465), 7, + ACTIONS(490), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6294,10 +6409,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3656] = 2, + [3878] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(467), 7, + ACTIONS(492), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6305,10 +6420,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3669] = 2, + [3891] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(469), 7, + ACTIONS(494), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6316,10 +6431,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3682] = 2, + [3904] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(471), 7, + ACTIONS(496), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6327,10 +6442,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3695] = 2, + [3917] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(473), 7, + ACTIONS(498), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6338,10 +6453,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3708] = 2, + [3930] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(475), 7, + ACTIONS(500), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6349,22 +6464,22 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3721] = 3, + [3943] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(479), 1, + ACTIONS(504), 1, anon_sym_SLASH, - ACTIONS(477), 6, + ACTIONS(502), 6, anon_sym_RPAREN, anon_sym_RBRACK, anon_sym_PLUS, anon_sym_DASH, anon_sym_STAR, anon_sym_CARET, - [3736] = 2, + [3958] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(481), 7, + ACTIONS(506), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6372,10 +6487,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3749] = 2, + [3971] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(483), 7, + ACTIONS(508), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6383,10 +6498,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3762] = 2, + [3984] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(485), 7, + ACTIONS(510), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6394,10 +6509,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3775] = 2, + [3997] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(487), 7, + ACTIONS(512), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6405,10 +6520,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3788] = 2, + [4010] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(489), 7, + ACTIONS(514), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6416,10 +6531,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3801] = 2, + [4023] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(491), 7, + ACTIONS(516), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6427,10 +6542,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3814] = 2, + [4036] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(493), 7, + ACTIONS(518), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6438,10 +6553,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3827] = 2, + [4049] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(495), 7, + ACTIONS(520), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6449,10 +6564,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3840] = 2, + [4062] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(497), 7, + ACTIONS(522), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6460,10 +6575,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3853] = 2, + [4075] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(499), 7, + ACTIONS(524), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6471,10 +6586,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3866] = 2, + [4088] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(501), 7, + ACTIONS(526), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6482,10 +6597,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3879] = 2, + [4101] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(503), 7, + ACTIONS(528), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6493,10 +6608,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3892] = 2, + [4114] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(505), 7, + ACTIONS(530), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6504,10 +6619,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3905] = 2, + [4127] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(507), 7, + ACTIONS(532), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6515,10 +6630,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3918] = 2, + [4140] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(509), 7, + ACTIONS(534), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6526,10 +6641,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3931] = 2, + [4153] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(511), 7, + ACTIONS(536), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6537,10 +6652,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3944] = 2, + [4166] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(513), 7, + ACTIONS(538), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6548,10 +6663,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3957] = 2, + [4179] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(515), 7, + ACTIONS(540), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6559,10 +6674,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3970] = 2, + [4192] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(517), 7, + ACTIONS(542), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6570,10 +6685,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3983] = 2, + [4205] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(519), 7, + ACTIONS(544), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6581,10 +6696,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [3996] = 2, + [4218] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(521), 7, + ACTIONS(546), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6592,10 +6707,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [4009] = 2, + [4231] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(523), 7, + ACTIONS(548), 7, anon_sym_RBRACE, anon_sym_let, anon_sym_PIPE, @@ -6603,1303 +6718,1290 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND, anon_sym_E, anon_sym_BANGE, - [4022] = 6, + [4244] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(409), 1, + ACTIONS(550), 1, anon_sym_STAR, - ACTIONS(411), 1, - anon_sym_SLASH, - ACTIONS(413), 1, - anon_sym_CARET, - ACTIONS(525), 1, - anon_sym_RBRACK, - ACTIONS(527), 2, - anon_sym_PLUS, - anon_sym_DASH, - [4042] = 6, + ACTIONS(552), 1, + sym_integer, + STATE(265), 1, + sym_multiplicity_range, + STATE(307), 1, + sym_multiplicity, + STATE(248), 2, + sym__multiplicity_atom, + sym_star, + [4264] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(529), 1, + ACTIONS(550), 1, anon_sym_STAR, - ACTIONS(531), 1, + ACTIONS(552), 1, sym_integer, - STATE(267), 1, + STATE(265), 1, sym_multiplicity_range, - STATE(316), 1, + STATE(304), 1, sym_multiplicity, - STATE(247), 2, + STATE(248), 2, sym__multiplicity_atom, sym_star, - [4062] = 6, + [4284] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(409), 1, + ACTIONS(434), 1, anon_sym_STAR, - ACTIONS(411), 1, + ACTIONS(436), 1, anon_sym_SLASH, - ACTIONS(413), 1, + ACTIONS(438), 1, anon_sym_CARET, - ACTIONS(533), 1, + ACTIONS(554), 1, anon_sym_RPAREN, - ACTIONS(527), 2, + ACTIONS(556), 2, anon_sym_PLUS, anon_sym_DASH, - [4082] = 6, - ACTIONS(3), 1, - sym_comment, - ACTIONS(529), 1, - anon_sym_STAR, - ACTIONS(531), 1, - sym_integer, - STATE(267), 1, - sym_multiplicity_range, - STATE(287), 1, - sym_multiplicity, - STATE(247), 2, - sym__multiplicity_atom, - sym_star, - [4102] = 6, + [4304] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(409), 1, + ACTIONS(434), 1, anon_sym_STAR, - ACTIONS(411), 1, + ACTIONS(436), 1, anon_sym_SLASH, - ACTIONS(413), 1, + ACTIONS(438), 1, anon_sym_CARET, - ACTIONS(535), 1, + ACTIONS(558), 1, anon_sym_RBRACK, - ACTIONS(527), 2, + ACTIONS(556), 2, anon_sym_PLUS, anon_sym_DASH, - [4122] = 2, + [4324] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(560), 1, + sym_identifier, + ACTIONS(562), 1, + anon_sym_LBRACE, + ACTIONS(564), 1, + anon_sym_extends, + STATE(226), 2, + sym_meta, + aux_sym_category_declaration_repeat1, + [4341] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(566), 5, + ts_builtin_sym_end, + anon_sym_include, + anon_sym_category, + anon_sym_POUND, + anon_sym_associations, + [4352] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(537), 5, + ACTIONS(568), 5, ts_builtin_sym_end, anon_sym_include, anon_sym_category, anon_sym_POUND, anon_sym_associations, - [4133] = 5, + [4363] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(539), 1, + ACTIONS(570), 1, anon_sym_RBRACE, - ACTIONS(541), 1, + ACTIONS(572), 1, anon_sym_abstract, - ACTIONS(543), 1, + ACTIONS(575), 1, anon_sym_asset, - STATE(207), 2, + STATE(201), 2, sym_asset_declaration, aux_sym_category_declaration_repeat2, - [4150] = 2, + [4380] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(545), 5, + ACTIONS(578), 5, ts_builtin_sym_end, anon_sym_include, anon_sym_category, anon_sym_POUND, anon_sym_associations, - [4161] = 5, + [4391] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(580), 1, + anon_sym_RBRACE, + ACTIONS(582), 1, + anon_sym_abstract, + ACTIONS(584), 1, + anon_sym_asset, + STATE(201), 2, + sym_asset_declaration, + aux_sym_category_declaration_repeat2, + [4408] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(541), 1, + ACTIONS(582), 1, anon_sym_abstract, - ACTIONS(543), 1, + ACTIONS(584), 1, anon_sym_asset, - ACTIONS(547), 1, + ACTIONS(586), 1, anon_sym_RBRACE, - STATE(206), 2, + STATE(208), 2, sym_asset_declaration, aux_sym_category_declaration_repeat2, - [4178] = 2, + [4425] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(549), 5, + ACTIONS(588), 5, ts_builtin_sym_end, anon_sym_include, anon_sym_category, anon_sym_POUND, anon_sym_associations, - [4189] = 2, + [4436] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(551), 5, + ACTIONS(590), 5, ts_builtin_sym_end, anon_sym_include, anon_sym_category, anon_sym_POUND, anon_sym_associations, - [4200] = 2, + [4447] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(553), 5, - ts_builtin_sym_end, - anon_sym_include, - anon_sym_category, - anon_sym_POUND, - anon_sym_associations, - [4211] = 5, + ACTIONS(560), 1, + sym_identifier, + ACTIONS(592), 1, + anon_sym_LBRACE, + ACTIONS(594), 1, + anon_sym_extends, + STATE(219), 2, + sym_meta, + aux_sym_category_declaration_repeat1, + [4464] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(541), 1, + ACTIONS(582), 1, anon_sym_abstract, - ACTIONS(543), 1, + ACTIONS(584), 1, anon_sym_asset, - ACTIONS(555), 1, + ACTIONS(596), 1, anon_sym_RBRACE, - STATE(207), 2, + STATE(201), 2, sym_asset_declaration, aux_sym_category_declaration_repeat2, - [4228] = 5, + [4481] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(557), 1, - anon_sym_RBRACE, - ACTIONS(559), 1, + ACTIONS(582), 1, anon_sym_abstract, - ACTIONS(562), 1, + ACTIONS(584), 1, anon_sym_asset, - STATE(207), 2, + ACTIONS(598), 1, + anon_sym_RBRACE, + STATE(203), 2, sym_asset_declaration, aux_sym_category_declaration_repeat2, - [4245] = 2, + [4498] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(565), 5, + ACTIONS(600), 5, ts_builtin_sym_end, anon_sym_include, anon_sym_category, anon_sym_POUND, anon_sym_associations, - [4256] = 5, + [4509] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(541), 1, - anon_sym_abstract, - ACTIONS(543), 1, - anon_sym_asset, - ACTIONS(567), 1, - anon_sym_RBRACE, - STATE(200), 2, - sym_asset_declaration, - aux_sym_category_declaration_repeat2, - [4273] = 4, + ACTIONS(602), 5, + ts_builtin_sym_end, + anon_sym_include, + anon_sym_category, + anon_sym_POUND, + anon_sym_associations, + [4520] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(569), 1, + ACTIONS(604), 1, sym_identifier, - ACTIONS(142), 2, + ACTIONS(191), 2, anon_sym_LBRACE, anon_sym_RBRACE, - STATE(210), 2, + STATE(212), 2, sym_meta, aux_sym_category_declaration_repeat1, - [4288] = 2, + [4535] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(572), 5, + ACTIONS(607), 5, ts_builtin_sym_end, anon_sym_include, anon_sym_category, anon_sym_POUND, anon_sym_associations, - [4299] = 2, + [4546] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(574), 5, + ACTIONS(609), 5, ts_builtin_sym_end, anon_sym_include, anon_sym_category, anon_sym_POUND, anon_sym_associations, - [4310] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(576), 1, - sym_identifier, - ACTIONS(578), 1, - anon_sym_LBRACE, - ACTIONS(580), 1, - anon_sym_extends, - STATE(219), 2, - sym_meta, - aux_sym_category_declaration_repeat1, - [4327] = 5, + [4557] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(576), 1, + ACTIONS(611), 1, sym_identifier, - ACTIONS(582), 1, - anon_sym_LBRACE, - ACTIONS(584), 1, - anon_sym_extends, - STATE(230), 2, - sym_meta, - aux_sym_category_declaration_repeat1, - [4344] = 2, + ACTIONS(613), 1, + anon_sym_RBRACE, + STATE(221), 2, + sym_association, + aux_sym_associations_declaration_repeat1, + [4571] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(586), 5, - ts_builtin_sym_end, - anon_sym_include, - anon_sym_category, - anon_sym_POUND, - anon_sym_associations, - [4355] = 5, + ACTIONS(550), 1, + anon_sym_STAR, + ACTIONS(615), 1, + sym_integer, + STATE(272), 2, + sym__multiplicity_atom, + sym_star, + [4585] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(588), 1, + ACTIONS(617), 1, sym_identifier, - ACTIONS(590), 1, + ACTIONS(619), 1, anon_sym_LPAREN, - STATE(30), 1, + STATE(45), 1, sym_detector_context, - STATE(265), 1, + STATE(271), 1, sym_detector_name, - [4371] = 4, + [4601] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(592), 1, + ACTIONS(621), 1, sym_identifier, - ACTIONS(594), 1, - anon_sym_RBRACE, - STATE(225), 2, - sym_association, - aux_sym_associations_declaration_repeat1, - [4385] = 4, + ACTIONS(623), 1, + anon_sym_LBRACE, + STATE(212), 2, + sym_meta, + aux_sym_category_declaration_repeat1, + [4615] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(596), 1, + ACTIONS(621), 1, sym_identifier, - ACTIONS(598), 1, + ACTIONS(625), 1, anon_sym_LBRACE, - STATE(210), 2, + STATE(212), 2, sym_meta, aux_sym_category_declaration_repeat1, - [4399] = 4, + [4629] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(596), 1, + ACTIONS(621), 1, sym_identifier, - ACTIONS(600), 1, + ACTIONS(627), 1, anon_sym_LBRACE, - STATE(210), 2, + STATE(212), 2, sym_meta, aux_sym_category_declaration_repeat1, - [4413] = 4, + [4643] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(592), 1, + ACTIONS(611), 1, sym_identifier, - ACTIONS(602), 1, + ACTIONS(629), 1, anon_sym_RBRACE, - STATE(217), 2, + STATE(227), 2, sym_association, aux_sym_associations_declaration_repeat1, - [4427] = 4, + [4657] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(529), 1, - anon_sym_STAR, - ACTIONS(604), 1, + ACTIONS(631), 1, + anon_sym_RPAREN, + STATE(247), 1, + sym__number, + ACTIONS(633), 2, sym_integer, - STATE(272), 2, - sym__multiplicity_atom, - sym_star, - [4441] = 4, + sym_float, + [4671] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(596), 1, + ACTIONS(621), 1, sym_identifier, - ACTIONS(606), 1, + ACTIONS(635), 1, anon_sym_LBRACE, STATE(229), 2, sym_meta, aux_sym_category_declaration_repeat1, - [4455] = 4, + [4685] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(596), 1, + ACTIONS(621), 1, sym_identifier, - ACTIONS(608), 1, + ACTIONS(637), 1, anon_sym_LBRACE, - STATE(210), 2, + STATE(220), 2, sym_meta, aux_sym_category_declaration_repeat1, - [4469] = 4, + [4699] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(596), 1, + ACTIONS(621), 1, sym_identifier, - ACTIONS(610), 1, + ACTIONS(639), 1, anon_sym_LBRACE, - STATE(223), 2, + STATE(218), 2, sym_meta, aux_sym_category_declaration_repeat1, - [4483] = 4, + [4713] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(612), 1, + ACTIONS(621), 1, sym_identifier, - ACTIONS(615), 1, - anon_sym_RBRACE, - STATE(225), 2, - sym_association, - aux_sym_associations_declaration_repeat1, - [4497] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(617), 1, - sym_identifier, - ACTIONS(620), 1, - anon_sym_RBRACE, - STATE(227), 2, + ACTIONS(641), 1, + anon_sym_LBRACE, + STATE(212), 2, sym_meta, aux_sym_category_declaration_repeat1, - [4511] = 4, + [4727] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(622), 1, + ACTIONS(643), 1, sym_identifier, - ACTIONS(625), 1, + ACTIONS(646), 1, anon_sym_RBRACE, - STATE(210), 2, - sym_meta, - aux_sym_category_declaration_repeat1, - [4525] = 4, + STATE(227), 2, + sym_association, + aux_sym_associations_declaration_repeat1, + [4741] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(596), 1, + ACTIONS(648), 1, sym_identifier, - ACTIONS(627), 1, - anon_sym_LBRACE, - STATE(218), 2, + ACTIONS(651), 1, + anon_sym_RBRACE, + STATE(230), 2, sym_meta, aux_sym_category_declaration_repeat1, - [4539] = 4, + [4755] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(596), 1, + ACTIONS(621), 1, sym_identifier, - ACTIONS(629), 1, + ACTIONS(653), 1, anon_sym_LBRACE, - STATE(210), 2, + STATE(212), 2, sym_meta, aux_sym_category_declaration_repeat1, - [4553] = 4, + [4769] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(596), 1, + ACTIONS(655), 1, sym_identifier, - ACTIONS(631), 1, - anon_sym_LBRACE, - STATE(210), 2, + ACTIONS(658), 1, + anon_sym_RBRACE, + STATE(212), 2, sym_meta, aux_sym_category_declaration_repeat1, - [4567] = 2, + [4783] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(633), 3, - anon_sym_LBRACK, - anon_sym_LT_DASH_DASH, - anon_sym_DOT_DOT, - [4576] = 4, + ACTIONS(660), 3, + anon_sym_RBRACE, + anon_sym_abstract, + anon_sym_asset, + [4792] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(635), 1, + ACTIONS(662), 1, + anon_sym_RBRACE, + ACTIONS(664), 1, anon_sym_COMMA, - ACTIONS(637), 1, - anon_sym_RPAREN, - STATE(238), 1, - aux_sym_detector_context_repeat1, - [4589] = 4, + STATE(232), 1, + aux_sym_cias_repeat1, + [4805] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(635), 1, + ACTIONS(667), 1, anon_sym_COMMA, - ACTIONS(639), 1, + ACTIONS(669), 1, anon_sym_RPAREN, - STATE(232), 1, + STATE(258), 1, aux_sym_detector_context_repeat1, - [4602] = 4, + [4818] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(641), 1, + ACTIONS(671), 1, anon_sym_DOT, - ACTIONS(643), 1, + ACTIONS(673), 1, anon_sym_LPAREN, - STATE(236), 1, + STATE(235), 1, aux_sym_detector_name_repeat1, - [4615] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(645), 3, - anon_sym_RBRACE, - anon_sym_abstract, - anon_sym_asset, - [4624] = 4, + [4831] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(647), 1, + ACTIONS(675), 1, anon_sym_DOT, - ACTIONS(650), 1, + ACTIONS(678), 1, anon_sym_LPAREN, - STATE(236), 1, + STATE(235), 1, aux_sym_detector_name_repeat1, - [4637] = 2, + [4844] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(652), 3, + ACTIONS(680), 3, anon_sym_RBRACE, anon_sym_abstract, anon_sym_asset, - [4646] = 4, + [4853] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(654), 1, - anon_sym_COMMA, - ACTIONS(657), 1, - anon_sym_RPAREN, - STATE(238), 1, - aux_sym_detector_context_repeat1, - [4659] = 3, + ACTIONS(682), 3, + anon_sym_RBRACE, + anon_sym_abstract, + anon_sym_asset, + [4862] = 2, ACTIONS(3), 1, sym_comment, - STATE(271), 1, - sym__number, - ACTIONS(659), 2, - sym_integer, - sym_float, - [4670] = 2, + ACTIONS(684), 3, + anon_sym_RBRACE, + anon_sym_abstract, + anon_sym_asset, + [4871] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(661), 3, + ACTIONS(686), 3, anon_sym_RBRACE, anon_sym_abstract, anon_sym_asset, - [4679] = 4, + [4880] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(663), 1, + ACTIONS(688), 1, anon_sym_COMMA, - ACTIONS(665), 1, + ACTIONS(691), 1, anon_sym_RPAREN, - STATE(248), 1, - aux_sym_ttc_distribution_repeat1, - [4692] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(667), 3, - anon_sym_RBRACE, - anon_sym_abstract, - anon_sym_asset, - [4701] = 3, + STATE(240), 1, + aux_sym_detector_context_repeat1, + [4893] = 3, ACTIONS(3), 1, sym_comment, - STATE(249), 1, + STATE(268), 1, sym__number, - ACTIONS(669), 2, + ACTIONS(693), 2, sym_integer, sym_float, - [4712] = 2, + [4904] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(695), 1, + anon_sym_COMMA, + ACTIONS(697), 1, + anon_sym_RPAREN, + STATE(250), 1, + aux_sym_ttc_distribution_repeat1, + [4917] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(671), 3, + ACTIONS(699), 3, anon_sym_RBRACE, anon_sym_abstract, anon_sym_asset, - [4721] = 2, + [4926] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(673), 3, + ACTIONS(701), 3, anon_sym_RBRACE, anon_sym_abstract, anon_sym_asset, - [4730] = 2, + [4935] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(675), 3, + ACTIONS(703), 3, anon_sym_RBRACE, anon_sym_abstract, anon_sym_asset, - [4739] = 3, + [4944] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(679), 1, - anon_sym_DOT_DOT, - ACTIONS(677), 2, + ACTIONS(705), 3, anon_sym_LBRACK, anon_sym_LT_DASH_DASH, - [4750] = 4, + anon_sym_DOT_DOT, + [4953] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(681), 1, + ACTIONS(695), 1, anon_sym_COMMA, - ACTIONS(684), 1, + ACTIONS(707), 1, anon_sym_RPAREN, - STATE(248), 1, + STATE(242), 1, aux_sym_ttc_distribution_repeat1, - [4763] = 4, + [4966] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(711), 1, + anon_sym_DOT_DOT, + ACTIONS(709), 2, + anon_sym_LBRACK, + anon_sym_LT_DASH_DASH, + [4977] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(663), 1, + ACTIONS(713), 3, + anon_sym_RBRACE, + anon_sym_abstract, + anon_sym_asset, + [4986] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(715), 1, anon_sym_COMMA, - ACTIONS(686), 1, + ACTIONS(718), 1, anon_sym_RPAREN, - STATE(241), 1, + STATE(250), 1, aux_sym_ttc_distribution_repeat1, - [4776] = 4, + [4999] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(688), 1, + ACTIONS(720), 1, anon_sym_RBRACE, - ACTIONS(690), 1, + ACTIONS(722), 1, anon_sym_COMMA, - STATE(257), 1, + STATE(259), 1, aux_sym_cias_repeat1, - [4789] = 2, + [5012] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(692), 3, + ACTIONS(225), 3, + anon_sym_LBRACE, anon_sym_RBRACE, - anon_sym_abstract, - anon_sym_asset, - [4798] = 2, + sym_identifier, + [5021] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(671), 1, + anon_sym_DOT, + ACTIONS(724), 1, + anon_sym_LPAREN, + STATE(234), 1, + aux_sym_detector_name_repeat1, + [5034] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(694), 3, + ACTIONS(726), 3, anon_sym_RBRACE, anon_sym_abstract, anon_sym_asset, - [4807] = 2, + [5043] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(696), 3, + ACTIONS(728), 3, anon_sym_RBRACE, anon_sym_abstract, anon_sym_asset, - [4816] = 2, + [5052] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(698), 3, + ACTIONS(730), 3, anon_sym_RBRACE, anon_sym_abstract, anon_sym_asset, - [4825] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(641), 1, - anon_sym_DOT, - ACTIONS(700), 1, - anon_sym_LPAREN, - STATE(234), 1, - aux_sym_detector_name_repeat1, - [4838] = 2, + [5061] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(702), 3, + ACTIONS(732), 3, anon_sym_RBRACE, anon_sym_abstract, anon_sym_asset, - [4847] = 4, + [5070] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(690), 1, + ACTIONS(667), 1, anon_sym_COMMA, - ACTIONS(704), 1, - anon_sym_RBRACE, - STATE(258), 1, - aux_sym_cias_repeat1, - [4860] = 4, + ACTIONS(734), 1, + anon_sym_RPAREN, + STATE(240), 1, + aux_sym_detector_context_repeat1, + [5083] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(706), 1, - anon_sym_RBRACE, - ACTIONS(708), 1, + ACTIONS(722), 1, anon_sym_COMMA, - STATE(258), 1, - aux_sym_cias_repeat1, - [4873] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(711), 3, + ACTIONS(736), 1, anon_sym_RBRACE, - anon_sym_abstract, - anon_sym_asset, - [4882] = 2, + STATE(232), 1, + aux_sym_cias_repeat1, + [5096] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(713), 3, + ACTIONS(738), 3, anon_sym_RBRACE, anon_sym_abstract, anon_sym_asset, - [4891] = 2, + [5105] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(715), 3, + ACTIONS(740), 3, anon_sym_RBRACE, anon_sym_abstract, anon_sym_asset, - [4900] = 2, + [5114] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(148), 3, - anon_sym_LBRACE, - anon_sym_RBRACE, - sym_identifier, - [4909] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(717), 3, + ACTIONS(742), 3, anon_sym_RBRACE, anon_sym_abstract, anon_sym_asset, - [4918] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(719), 1, - sym_cia, - STATE(285), 1, - sym_cias, - [4928] = 3, + [5123] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(590), 1, + ACTIONS(678), 2, + anon_sym_DOT, anon_sym_LPAREN, - STATE(31), 1, - sym_detector_context, - [4938] = 2, + [5131] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(650), 2, - anon_sym_DOT, - anon_sym_LPAREN, - [4946] = 2, + ACTIONS(662), 2, + anon_sym_RBRACE, + anon_sym_COMMA, + [5139] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(677), 2, + ACTIONS(709), 2, anon_sym_LBRACK, anon_sym_LT_DASH_DASH, - [4954] = 2, + [5147] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(706), 2, - anon_sym_RBRACE, + ACTIONS(691), 2, anon_sym_COMMA, - [4962] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(719), 1, - sym_cia, - STATE(315), 1, - sym_cias, - [4972] = 2, + anon_sym_RPAREN, + [5155] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(721), 2, + ACTIONS(744), 2, anon_sym_COMMA, anon_sym_RPAREN, - [4980] = 2, + [5163] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(684), 2, + ACTIONS(718), 2, anon_sym_COMMA, anon_sym_RPAREN, - [4988] = 2, + [5171] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(723), 2, - anon_sym_LBRACK, - anon_sym_LT_DASH_DASH, - [4996] = 3, + ACTIONS(746), 1, + sym_identifier, + STATE(266), 1, + sym_detector_context_asset, + [5181] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(725), 1, + ACTIONS(746), 1, sym_identifier, STATE(233), 1, sym_detector_context_asset, - [5006] = 3, + [5191] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(725), 1, - sym_identifier, - STATE(275), 1, - sym_detector_context_asset, - [5016] = 2, + ACTIONS(619), 1, + anon_sym_LPAREN, + STATE(44), 1, + sym_detector_context, + [5201] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(657), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - [5024] = 2, + ACTIONS(748), 2, + anon_sym_LBRACK, + anon_sym_LT_DASH_DASH, + [5209] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(727), 1, - sym_identifier, - [5031] = 2, + ACTIONS(750), 1, + sym_cia, + STATE(284), 1, + sym_cias, + [5219] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(729), 1, - sym_identifier, - [5038] = 2, + ACTIONS(750), 1, + sym_cia, + STATE(283), 1, + sym_cias, + [5229] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(731), 1, - anon_sym_RBRACK, - [5045] = 2, + ACTIONS(752), 1, + anon_sym_RBRACE, + [5236] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(733), 1, + ACTIONS(754), 1, sym_identifier, - [5052] = 2, + [5243] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(735), 1, - sym_identifier, - [5059] = 2, + ACTIONS(756), 1, + anon_sym_RPAREN, + [5250] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(737), 1, - sym_identifier, - [5066] = 2, + ACTIONS(758), 1, + anon_sym_RBRACE, + [5257] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(739), 1, - anon_sym_RPAREN, - [5073] = 2, + ACTIONS(760), 1, + anon_sym_RBRACE, + [5264] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(741), 1, + ACTIONS(762), 1, sym_identifier, - [5080] = 2, + [5271] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(743), 1, - anon_sym_LBRACK, - [5087] = 2, + ACTIONS(764), 1, + anon_sym_asset, + [5278] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(745), 1, - anon_sym_RBRACE, - [5094] = 2, + ACTIONS(766), 1, + anon_sym_LBRACK, + [5285] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(747), 1, + ACTIONS(768), 1, anon_sym_RBRACE, - [5101] = 2, + [5292] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(749), 1, - anon_sym_LBRACK, - [5108] = 2, + ACTIONS(770), 1, + anon_sym_RBRACE, + [5299] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(751), 1, + ACTIONS(772), 1, sym_identifier, - [5115] = 2, + [5306] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(753), 1, + ACTIONS(774), 1, anon_sym_RBRACE, - [5122] = 2, + [5313] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(755), 1, - anon_sym_asset, - [5129] = 2, + ACTIONS(776), 1, + anon_sym_DASH_DASH_GT, + [5320] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(757), 1, - ts_builtin_sym_end, - [5136] = 2, + ACTIONS(778), 1, + sym_identifier, + [5327] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(759), 1, - anon_sym_RBRACE, - [5143] = 2, + ACTIONS(780), 1, + anon_sym_COLON, + [5334] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(761), 1, - sym_identifier, - [5150] = 2, + ACTIONS(782), 1, + ts_builtin_sym_end, + [5341] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(763), 1, - anon_sym_RBRACE, - [5157] = 2, + ACTIONS(784), 1, + sym_identifier, + [5348] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(765), 1, - anon_sym_RBRACE, - [5164] = 2, + ACTIONS(786), 1, + sym_identifier, + [5355] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(767), 1, + ACTIONS(788), 1, sym_string, - [5171] = 2, + [5362] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(769), 1, - sym_identifier, - [5178] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(771), 1, - anon_sym_RBRACK, - [5185] = 2, + ACTIONS(790), 1, + sym_string, + [5369] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(773), 1, + ACTIONS(792), 1, sym_identifier, - [5192] = 2, + [5376] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(775), 1, - sym_string, - [5199] = 2, + ACTIONS(794), 1, + anon_sym_LBRACE, + [5383] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(777), 1, - anon_sym_EQ, - [5206] = 2, + ACTIONS(796), 1, + anon_sym_RBRACK, + [5390] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(779), 1, + ACTIONS(798), 1, sym_identifier, - [5213] = 2, + [5397] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(781), 1, + ACTIONS(800), 1, sym_identifier, - [5220] = 2, + [5404] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(783), 1, - sym_identifier, - [5227] = 2, + ACTIONS(802), 1, + sym_cia, + [5411] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(785), 1, - anon_sym_DASH_DASH_GT, - [5234] = 2, + ACTIONS(804), 1, + anon_sym_RBRACE, + [5418] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(806), 1, + sym_identifier, + [5425] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(787), 1, + ACTIONS(808), 1, anon_sym_RBRACE, - [5241] = 2, + [5432] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(789), 1, - anon_sym_RBRACK, - [5248] = 2, + ACTIONS(810), 1, + anon_sym_LT_DASH_DASH, + [5439] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(791), 1, + ACTIONS(812), 1, sym_identifier, - [5255] = 2, + [5446] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(793), 1, - anon_sym_COLON, - [5262] = 2, + ACTIONS(814), 1, + anon_sym_RBRACE, + [5453] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(795), 1, - anon_sym_LBRACE, - [5269] = 2, + ACTIONS(816), 1, + anon_sym_LBRACK, + [5460] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(797), 1, - anon_sym_RBRACE, - [5276] = 2, + ACTIONS(818), 1, + anon_sym_info, + [5467] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(799), 1, - anon_sym_RBRACE, - [5283] = 2, + ACTIONS(820), 1, + sym_identifier, + [5474] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(801), 1, + ACTIONS(822), 1, anon_sym_COLON, - [5290] = 2, + [5481] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(824), 1, + sym_identifier, + [5488] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(803), 1, + ACTIONS(826), 1, sym_identifier, - [5297] = 2, + [5495] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(828), 1, + anon_sym_RBRACK, + [5502] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(805), 1, + ACTIONS(830), 1, anon_sym_RBRACE, - [5304] = 2, + [5509] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(807), 1, - anon_sym_LT_DASH_DASH, - [5311] = 2, + ACTIONS(832), 1, + sym_identifier, + [5516] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(809), 1, - sym_string, - [5318] = 2, + ACTIONS(834), 1, + anon_sym_RBRACK, + [5523] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(811), 1, + ACTIONS(836), 1, sym_string, - [5325] = 2, + [5530] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(813), 1, - anon_sym_info, - [5332] = 2, + ACTIONS(838), 1, + sym_identifier, + [5537] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(815), 1, - anon_sym_COLON, - [5339] = 2, + ACTIONS(840), 1, + sym_string, + [5544] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(817), 1, - sym_identifier, - [5346] = 2, + ACTIONS(842), 1, + anon_sym_COLON, + [5551] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(819), 1, + ACTIONS(844), 1, anon_sym_info, - [5353] = 2, + [5558] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(821), 1, - sym_cia, + ACTIONS(846), 1, + anon_sym_EQ, }; static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(2)] = 0, - [SMALL_STATE(3)] = 56, - [SMALL_STATE(4)] = 109, - [SMALL_STATE(5)] = 159, - [SMALL_STATE(6)] = 209, - [SMALL_STATE(7)] = 237, - [SMALL_STATE(8)] = 281, - [SMALL_STATE(9)] = 325, - [SMALL_STATE(10)] = 369, - [SMALL_STATE(11)] = 413, - [SMALL_STATE(12)] = 457, - [SMALL_STATE(13)] = 501, - [SMALL_STATE(14)] = 545, - [SMALL_STATE(15)] = 589, - [SMALL_STATE(16)] = 633, - [SMALL_STATE(17)] = 677, - [SMALL_STATE(18)] = 721, - [SMALL_STATE(19)] = 765, - [SMALL_STATE(20)] = 790, - [SMALL_STATE(21)] = 815, - [SMALL_STATE(22)] = 840, - [SMALL_STATE(23)] = 873, - [SMALL_STATE(24)] = 904, - [SMALL_STATE(25)] = 929, - [SMALL_STATE(26)] = 954, - [SMALL_STATE(27)] = 988, - [SMALL_STATE(28)] = 1015, - [SMALL_STATE(29)] = 1036, - [SMALL_STATE(30)] = 1057, - [SMALL_STATE(31)] = 1084, - [SMALL_STATE(32)] = 1111, - [SMALL_STATE(33)] = 1133, - [SMALL_STATE(34)] = 1159, - [SMALL_STATE(35)] = 1185, - [SMALL_STATE(36)] = 1207, - [SMALL_STATE(37)] = 1233, - [SMALL_STATE(38)] = 1259, - [SMALL_STATE(39)] = 1279, - [SMALL_STATE(40)] = 1305, - [SMALL_STATE(41)] = 1331, - [SMALL_STATE(42)] = 1357, - [SMALL_STATE(43)] = 1377, - [SMALL_STATE(44)] = 1403, - [SMALL_STATE(45)] = 1429, - [SMALL_STATE(46)] = 1455, - [SMALL_STATE(47)] = 1481, - [SMALL_STATE(48)] = 1507, - [SMALL_STATE(49)] = 1533, - [SMALL_STATE(50)] = 1559, - [SMALL_STATE(51)] = 1585, - [SMALL_STATE(52)] = 1611, - [SMALL_STATE(53)] = 1636, - [SMALL_STATE(54)] = 1661, - [SMALL_STATE(55)] = 1690, - [SMALL_STATE(56)] = 1715, - [SMALL_STATE(57)] = 1740, - [SMALL_STATE(58)] = 1761, - [SMALL_STATE(59)] = 1786, - [SMALL_STATE(60)] = 1807, - [SMALL_STATE(61)] = 1832, - [SMALL_STATE(62)] = 1857, - [SMALL_STATE(63)] = 1882, - [SMALL_STATE(64)] = 1903, - [SMALL_STATE(65)] = 1932, - [SMALL_STATE(66)] = 1952, - [SMALL_STATE(67)] = 1974, - [SMALL_STATE(68)] = 1994, - [SMALL_STATE(69)] = 2014, - [SMALL_STATE(70)] = 2034, - [SMALL_STATE(71)] = 2054, - [SMALL_STATE(72)] = 2074, - [SMALL_STATE(73)] = 2094, - [SMALL_STATE(74)] = 2110, - [SMALL_STATE(75)] = 2126, - [SMALL_STATE(76)] = 2142, - [SMALL_STATE(77)] = 2164, - [SMALL_STATE(78)] = 2184, - [SMALL_STATE(79)] = 2204, - [SMALL_STATE(80)] = 2224, - [SMALL_STATE(81)] = 2244, - [SMALL_STATE(82)] = 2264, - [SMALL_STATE(83)] = 2284, - [SMALL_STATE(84)] = 2306, - [SMALL_STATE(85)] = 2326, - [SMALL_STATE(86)] = 2346, - [SMALL_STATE(87)] = 2368, - [SMALL_STATE(88)] = 2384, - [SMALL_STATE(89)] = 2404, - [SMALL_STATE(90)] = 2424, - [SMALL_STATE(91)] = 2444, - [SMALL_STATE(92)] = 2464, - [SMALL_STATE(93)] = 2484, - [SMALL_STATE(94)] = 2504, - [SMALL_STATE(95)] = 2526, - [SMALL_STATE(96)] = 2548, - [SMALL_STATE(97)] = 2568, - [SMALL_STATE(98)] = 2588, - [SMALL_STATE(99)] = 2608, - [SMALL_STATE(100)] = 2628, - [SMALL_STATE(101)] = 2644, - [SMALL_STATE(102)] = 2664, - [SMALL_STATE(103)] = 2684, - [SMALL_STATE(104)] = 2704, - [SMALL_STATE(105)] = 2724, - [SMALL_STATE(106)] = 2744, - [SMALL_STATE(107)] = 2764, - [SMALL_STATE(108)] = 2786, - [SMALL_STATE(109)] = 2802, - [SMALL_STATE(110)] = 2824, - [SMALL_STATE(111)] = 2844, - [SMALL_STATE(112)] = 2865, - [SMALL_STATE(113)] = 2886, - [SMALL_STATE(114)] = 2905, - [SMALL_STATE(115)] = 2924, - [SMALL_STATE(116)] = 2945, - [SMALL_STATE(117)] = 2966, - [SMALL_STATE(118)] = 2984, - [SMALL_STATE(119)] = 3002, - [SMALL_STATE(120)] = 3020, - [SMALL_STATE(121)] = 3038, - [SMALL_STATE(122)] = 3056, - [SMALL_STATE(123)] = 3069, - [SMALL_STATE(124)] = 3082, - [SMALL_STATE(125)] = 3095, - [SMALL_STATE(126)] = 3118, - [SMALL_STATE(127)] = 3131, - [SMALL_STATE(128)] = 3144, - [SMALL_STATE(129)] = 3157, - [SMALL_STATE(130)] = 3170, - [SMALL_STATE(131)] = 3183, - [SMALL_STATE(132)] = 3196, - [SMALL_STATE(133)] = 3209, - [SMALL_STATE(134)] = 3222, - [SMALL_STATE(135)] = 3235, - [SMALL_STATE(136)] = 3248, - [SMALL_STATE(137)] = 3261, - [SMALL_STATE(138)] = 3274, - [SMALL_STATE(139)] = 3289, - [SMALL_STATE(140)] = 3308, - [SMALL_STATE(141)] = 3325, - [SMALL_STATE(142)] = 3342, - [SMALL_STATE(143)] = 3355, - [SMALL_STATE(144)] = 3368, - [SMALL_STATE(145)] = 3381, - [SMALL_STATE(146)] = 3394, - [SMALL_STATE(147)] = 3407, - [SMALL_STATE(148)] = 3420, - [SMALL_STATE(149)] = 3433, - [SMALL_STATE(150)] = 3446, - [SMALL_STATE(151)] = 3459, - [SMALL_STATE(152)] = 3472, - [SMALL_STATE(153)] = 3485, - [SMALL_STATE(154)] = 3498, - [SMALL_STATE(155)] = 3511, - [SMALL_STATE(156)] = 3524, - [SMALL_STATE(157)] = 3537, - [SMALL_STATE(158)] = 3552, - [SMALL_STATE(159)] = 3565, - [SMALL_STATE(160)] = 3578, - [SMALL_STATE(161)] = 3591, - [SMALL_STATE(162)] = 3604, - [SMALL_STATE(163)] = 3617, - [SMALL_STATE(164)] = 3630, - [SMALL_STATE(165)] = 3643, - [SMALL_STATE(166)] = 3656, - [SMALL_STATE(167)] = 3669, - [SMALL_STATE(168)] = 3682, - [SMALL_STATE(169)] = 3695, - [SMALL_STATE(170)] = 3708, - [SMALL_STATE(171)] = 3721, - [SMALL_STATE(172)] = 3736, - [SMALL_STATE(173)] = 3749, - [SMALL_STATE(174)] = 3762, - [SMALL_STATE(175)] = 3775, - [SMALL_STATE(176)] = 3788, - [SMALL_STATE(177)] = 3801, - [SMALL_STATE(178)] = 3814, - [SMALL_STATE(179)] = 3827, - [SMALL_STATE(180)] = 3840, - [SMALL_STATE(181)] = 3853, - [SMALL_STATE(182)] = 3866, - [SMALL_STATE(183)] = 3879, - [SMALL_STATE(184)] = 3892, - [SMALL_STATE(185)] = 3905, - [SMALL_STATE(186)] = 3918, - [SMALL_STATE(187)] = 3931, - [SMALL_STATE(188)] = 3944, - [SMALL_STATE(189)] = 3957, - [SMALL_STATE(190)] = 3970, - [SMALL_STATE(191)] = 3983, - [SMALL_STATE(192)] = 3996, - [SMALL_STATE(193)] = 4009, - [SMALL_STATE(194)] = 4022, - [SMALL_STATE(195)] = 4042, - [SMALL_STATE(196)] = 4062, - [SMALL_STATE(197)] = 4082, - [SMALL_STATE(198)] = 4102, - [SMALL_STATE(199)] = 4122, - [SMALL_STATE(200)] = 4133, - [SMALL_STATE(201)] = 4150, - [SMALL_STATE(202)] = 4161, - [SMALL_STATE(203)] = 4178, - [SMALL_STATE(204)] = 4189, - [SMALL_STATE(205)] = 4200, - [SMALL_STATE(206)] = 4211, - [SMALL_STATE(207)] = 4228, - [SMALL_STATE(208)] = 4245, - [SMALL_STATE(209)] = 4256, - [SMALL_STATE(210)] = 4273, - [SMALL_STATE(211)] = 4288, - [SMALL_STATE(212)] = 4299, - [SMALL_STATE(213)] = 4310, - [SMALL_STATE(214)] = 4327, - [SMALL_STATE(215)] = 4344, - [SMALL_STATE(216)] = 4355, - [SMALL_STATE(217)] = 4371, - [SMALL_STATE(218)] = 4385, - [SMALL_STATE(219)] = 4399, - [SMALL_STATE(220)] = 4413, - [SMALL_STATE(221)] = 4427, - [SMALL_STATE(222)] = 4441, - [SMALL_STATE(223)] = 4455, - [SMALL_STATE(224)] = 4469, - [SMALL_STATE(225)] = 4483, - [SMALL_STATE(226)] = 4497, - [SMALL_STATE(227)] = 4511, - [SMALL_STATE(228)] = 4525, - [SMALL_STATE(229)] = 4539, - [SMALL_STATE(230)] = 4553, - [SMALL_STATE(231)] = 4567, - [SMALL_STATE(232)] = 4576, - [SMALL_STATE(233)] = 4589, - [SMALL_STATE(234)] = 4602, - [SMALL_STATE(235)] = 4615, - [SMALL_STATE(236)] = 4624, - [SMALL_STATE(237)] = 4637, - [SMALL_STATE(238)] = 4646, - [SMALL_STATE(239)] = 4659, - [SMALL_STATE(240)] = 4670, - [SMALL_STATE(241)] = 4679, - [SMALL_STATE(242)] = 4692, - [SMALL_STATE(243)] = 4701, - [SMALL_STATE(244)] = 4712, - [SMALL_STATE(245)] = 4721, - [SMALL_STATE(246)] = 4730, - [SMALL_STATE(247)] = 4739, - [SMALL_STATE(248)] = 4750, - [SMALL_STATE(249)] = 4763, - [SMALL_STATE(250)] = 4776, - [SMALL_STATE(251)] = 4789, - [SMALL_STATE(252)] = 4798, - [SMALL_STATE(253)] = 4807, - [SMALL_STATE(254)] = 4816, - [SMALL_STATE(255)] = 4825, - [SMALL_STATE(256)] = 4838, - [SMALL_STATE(257)] = 4847, - [SMALL_STATE(258)] = 4860, - [SMALL_STATE(259)] = 4873, - [SMALL_STATE(260)] = 4882, - [SMALL_STATE(261)] = 4891, - [SMALL_STATE(262)] = 4900, - [SMALL_STATE(263)] = 4909, - [SMALL_STATE(264)] = 4918, - [SMALL_STATE(265)] = 4928, - [SMALL_STATE(266)] = 4938, - [SMALL_STATE(267)] = 4946, - [SMALL_STATE(268)] = 4954, - [SMALL_STATE(269)] = 4962, - [SMALL_STATE(270)] = 4972, - [SMALL_STATE(271)] = 4980, - [SMALL_STATE(272)] = 4988, - [SMALL_STATE(273)] = 4996, - [SMALL_STATE(274)] = 5006, - [SMALL_STATE(275)] = 5016, - [SMALL_STATE(276)] = 5024, - [SMALL_STATE(277)] = 5031, - [SMALL_STATE(278)] = 5038, - [SMALL_STATE(279)] = 5045, - [SMALL_STATE(280)] = 5052, - [SMALL_STATE(281)] = 5059, - [SMALL_STATE(282)] = 5066, - [SMALL_STATE(283)] = 5073, - [SMALL_STATE(284)] = 5080, - [SMALL_STATE(285)] = 5087, - [SMALL_STATE(286)] = 5094, - [SMALL_STATE(287)] = 5101, - [SMALL_STATE(288)] = 5108, - [SMALL_STATE(289)] = 5115, - [SMALL_STATE(290)] = 5122, - [SMALL_STATE(291)] = 5129, - [SMALL_STATE(292)] = 5136, - [SMALL_STATE(293)] = 5143, - [SMALL_STATE(294)] = 5150, - [SMALL_STATE(295)] = 5157, - [SMALL_STATE(296)] = 5164, - [SMALL_STATE(297)] = 5171, - [SMALL_STATE(298)] = 5178, - [SMALL_STATE(299)] = 5185, - [SMALL_STATE(300)] = 5192, - [SMALL_STATE(301)] = 5199, - [SMALL_STATE(302)] = 5206, - [SMALL_STATE(303)] = 5213, - [SMALL_STATE(304)] = 5220, - [SMALL_STATE(305)] = 5227, - [SMALL_STATE(306)] = 5234, - [SMALL_STATE(307)] = 5241, - [SMALL_STATE(308)] = 5248, - [SMALL_STATE(309)] = 5255, - [SMALL_STATE(310)] = 5262, - [SMALL_STATE(311)] = 5269, - [SMALL_STATE(312)] = 5276, - [SMALL_STATE(313)] = 5283, - [SMALL_STATE(314)] = 5290, - [SMALL_STATE(315)] = 5297, - [SMALL_STATE(316)] = 5304, - [SMALL_STATE(317)] = 5311, - [SMALL_STATE(318)] = 5318, - [SMALL_STATE(319)] = 5325, - [SMALL_STATE(320)] = 5332, - [SMALL_STATE(321)] = 5339, - [SMALL_STATE(322)] = 5346, - [SMALL_STATE(323)] = 5353, + [SMALL_STATE(3)] = 60, + [SMALL_STATE(4)] = 120, + [SMALL_STATE(5)] = 171, + [SMALL_STATE(6)] = 222, + [SMALL_STATE(7)] = 267, + [SMALL_STATE(8)] = 312, + [SMALL_STATE(9)] = 357, + [SMALL_STATE(10)] = 402, + [SMALL_STATE(11)] = 447, + [SMALL_STATE(12)] = 492, + [SMALL_STATE(13)] = 537, + [SMALL_STATE(14)] = 582, + [SMALL_STATE(15)] = 627, + [SMALL_STATE(16)] = 672, + [SMALL_STATE(17)] = 717, + [SMALL_STATE(18)] = 762, + [SMALL_STATE(19)] = 790, + [SMALL_STATE(20)] = 815, + [SMALL_STATE(21)] = 840, + [SMALL_STATE(22)] = 869, + [SMALL_STATE(23)] = 894, + [SMALL_STATE(24)] = 919, + [SMALL_STATE(25)] = 948, + [SMALL_STATE(26)] = 979, + [SMALL_STATE(27)] = 1015, + [SMALL_STATE(28)] = 1051, + [SMALL_STATE(29)] = 1087, + [SMALL_STATE(30)] = 1123, + [SMALL_STATE(31)] = 1159, + [SMALL_STATE(32)] = 1195, + [SMALL_STATE(33)] = 1231, + [SMALL_STATE(34)] = 1267, + [SMALL_STATE(35)] = 1303, + [SMALL_STATE(36)] = 1335, + [SMALL_STATE(37)] = 1371, + [SMALL_STATE(38)] = 1407, + [SMALL_STATE(39)] = 1431, + [SMALL_STATE(40)] = 1467, + [SMALL_STATE(41)] = 1503, + [SMALL_STATE(42)] = 1539, + [SMALL_STATE(43)] = 1575, + [SMALL_STATE(44)] = 1611, + [SMALL_STATE(45)] = 1640, + [SMALL_STATE(46)] = 1669, + [SMALL_STATE(47)] = 1696, + [SMALL_STATE(48)] = 1722, + [SMALL_STATE(49)] = 1748, + [SMALL_STATE(50)] = 1770, + [SMALL_STATE(51)] = 1796, + [SMALL_STATE(52)] = 1818, + [SMALL_STATE(53)] = 1839, + [SMALL_STATE(54)] = 1860, + [SMALL_STATE(55)] = 1880, + [SMALL_STATE(56)] = 1900, + [SMALL_STATE(57)] = 1920, + [SMALL_STATE(58)] = 1940, + [SMALL_STATE(59)] = 1965, + [SMALL_STATE(60)] = 1990, + [SMALL_STATE(61)] = 2011, + [SMALL_STATE(62)] = 2036, + [SMALL_STATE(63)] = 2061, + [SMALL_STATE(64)] = 2090, + [SMALL_STATE(65)] = 2115, + [SMALL_STATE(66)] = 2136, + [SMALL_STATE(67)] = 2157, + [SMALL_STATE(68)] = 2186, + [SMALL_STATE(69)] = 2211, + [SMALL_STATE(70)] = 2236, + [SMALL_STATE(71)] = 2261, + [SMALL_STATE(72)] = 2281, + [SMALL_STATE(73)] = 2301, + [SMALL_STATE(74)] = 2323, + [SMALL_STATE(75)] = 2343, + [SMALL_STATE(76)] = 2359, + [SMALL_STATE(77)] = 2379, + [SMALL_STATE(78)] = 2401, + [SMALL_STATE(79)] = 2421, + [SMALL_STATE(80)] = 2441, + [SMALL_STATE(81)] = 2461, + [SMALL_STATE(82)] = 2481, + [SMALL_STATE(83)] = 2501, + [SMALL_STATE(84)] = 2523, + [SMALL_STATE(85)] = 2545, + [SMALL_STATE(86)] = 2565, + [SMALL_STATE(87)] = 2587, + [SMALL_STATE(88)] = 2607, + [SMALL_STATE(89)] = 2627, + [SMALL_STATE(90)] = 2647, + [SMALL_STATE(91)] = 2667, + [SMALL_STATE(92)] = 2687, + [SMALL_STATE(93)] = 2707, + [SMALL_STATE(94)] = 2727, + [SMALL_STATE(95)] = 2747, + [SMALL_STATE(96)] = 2767, + [SMALL_STATE(97)] = 2787, + [SMALL_STATE(98)] = 2807, + [SMALL_STATE(99)] = 2827, + [SMALL_STATE(100)] = 2847, + [SMALL_STATE(101)] = 2867, + [SMALL_STATE(102)] = 2889, + [SMALL_STATE(103)] = 2909, + [SMALL_STATE(104)] = 2929, + [SMALL_STATE(105)] = 2949, + [SMALL_STATE(106)] = 2969, + [SMALL_STATE(107)] = 2991, + [SMALL_STATE(108)] = 3011, + [SMALL_STATE(109)] = 3031, + [SMALL_STATE(110)] = 3051, + [SMALL_STATE(111)] = 3071, + [SMALL_STATE(112)] = 3092, + [SMALL_STATE(113)] = 3111, + [SMALL_STATE(114)] = 3130, + [SMALL_STATE(115)] = 3151, + [SMALL_STATE(116)] = 3172, + [SMALL_STATE(117)] = 3193, + [SMALL_STATE(118)] = 3211, + [SMALL_STATE(119)] = 3229, + [SMALL_STATE(120)] = 3247, + [SMALL_STATE(121)] = 3265, + [SMALL_STATE(122)] = 3278, + [SMALL_STATE(123)] = 3291, + [SMALL_STATE(124)] = 3304, + [SMALL_STATE(125)] = 3317, + [SMALL_STATE(126)] = 3338, + [SMALL_STATE(127)] = 3351, + [SMALL_STATE(128)] = 3364, + [SMALL_STATE(129)] = 3377, + [SMALL_STATE(130)] = 3390, + [SMALL_STATE(131)] = 3403, + [SMALL_STATE(132)] = 3416, + [SMALL_STATE(133)] = 3429, + [SMALL_STATE(134)] = 3442, + [SMALL_STATE(135)] = 3455, + [SMALL_STATE(136)] = 3468, + [SMALL_STATE(137)] = 3481, + [SMALL_STATE(138)] = 3496, + [SMALL_STATE(139)] = 3511, + [SMALL_STATE(140)] = 3530, + [SMALL_STATE(141)] = 3547, + [SMALL_STATE(142)] = 3564, + [SMALL_STATE(143)] = 3577, + [SMALL_STATE(144)] = 3590, + [SMALL_STATE(145)] = 3603, + [SMALL_STATE(146)] = 3616, + [SMALL_STATE(147)] = 3629, + [SMALL_STATE(148)] = 3642, + [SMALL_STATE(149)] = 3655, + [SMALL_STATE(150)] = 3668, + [SMALL_STATE(151)] = 3681, + [SMALL_STATE(152)] = 3694, + [SMALL_STATE(153)] = 3707, + [SMALL_STATE(154)] = 3720, + [SMALL_STATE(155)] = 3733, + [SMALL_STATE(156)] = 3746, + [SMALL_STATE(157)] = 3759, + [SMALL_STATE(158)] = 3774, + [SMALL_STATE(159)] = 3787, + [SMALL_STATE(160)] = 3800, + [SMALL_STATE(161)] = 3813, + [SMALL_STATE(162)] = 3826, + [SMALL_STATE(163)] = 3839, + [SMALL_STATE(164)] = 3852, + [SMALL_STATE(165)] = 3865, + [SMALL_STATE(166)] = 3878, + [SMALL_STATE(167)] = 3891, + [SMALL_STATE(168)] = 3904, + [SMALL_STATE(169)] = 3917, + [SMALL_STATE(170)] = 3930, + [SMALL_STATE(171)] = 3943, + [SMALL_STATE(172)] = 3958, + [SMALL_STATE(173)] = 3971, + [SMALL_STATE(174)] = 3984, + [SMALL_STATE(175)] = 3997, + [SMALL_STATE(176)] = 4010, + [SMALL_STATE(177)] = 4023, + [SMALL_STATE(178)] = 4036, + [SMALL_STATE(179)] = 4049, + [SMALL_STATE(180)] = 4062, + [SMALL_STATE(181)] = 4075, + [SMALL_STATE(182)] = 4088, + [SMALL_STATE(183)] = 4101, + [SMALL_STATE(184)] = 4114, + [SMALL_STATE(185)] = 4127, + [SMALL_STATE(186)] = 4140, + [SMALL_STATE(187)] = 4153, + [SMALL_STATE(188)] = 4166, + [SMALL_STATE(189)] = 4179, + [SMALL_STATE(190)] = 4192, + [SMALL_STATE(191)] = 4205, + [SMALL_STATE(192)] = 4218, + [SMALL_STATE(193)] = 4231, + [SMALL_STATE(194)] = 4244, + [SMALL_STATE(195)] = 4264, + [SMALL_STATE(196)] = 4284, + [SMALL_STATE(197)] = 4304, + [SMALL_STATE(198)] = 4324, + [SMALL_STATE(199)] = 4341, + [SMALL_STATE(200)] = 4352, + [SMALL_STATE(201)] = 4363, + [SMALL_STATE(202)] = 4380, + [SMALL_STATE(203)] = 4391, + [SMALL_STATE(204)] = 4408, + [SMALL_STATE(205)] = 4425, + [SMALL_STATE(206)] = 4436, + [SMALL_STATE(207)] = 4447, + [SMALL_STATE(208)] = 4464, + [SMALL_STATE(209)] = 4481, + [SMALL_STATE(210)] = 4498, + [SMALL_STATE(211)] = 4509, + [SMALL_STATE(212)] = 4520, + [SMALL_STATE(213)] = 4535, + [SMALL_STATE(214)] = 4546, + [SMALL_STATE(215)] = 4557, + [SMALL_STATE(216)] = 4571, + [SMALL_STATE(217)] = 4585, + [SMALL_STATE(218)] = 4601, + [SMALL_STATE(219)] = 4615, + [SMALL_STATE(220)] = 4629, + [SMALL_STATE(221)] = 4643, + [SMALL_STATE(222)] = 4657, + [SMALL_STATE(223)] = 4671, + [SMALL_STATE(224)] = 4685, + [SMALL_STATE(225)] = 4699, + [SMALL_STATE(226)] = 4713, + [SMALL_STATE(227)] = 4727, + [SMALL_STATE(228)] = 4741, + [SMALL_STATE(229)] = 4755, + [SMALL_STATE(230)] = 4769, + [SMALL_STATE(231)] = 4783, + [SMALL_STATE(232)] = 4792, + [SMALL_STATE(233)] = 4805, + [SMALL_STATE(234)] = 4818, + [SMALL_STATE(235)] = 4831, + [SMALL_STATE(236)] = 4844, + [SMALL_STATE(237)] = 4853, + [SMALL_STATE(238)] = 4862, + [SMALL_STATE(239)] = 4871, + [SMALL_STATE(240)] = 4880, + [SMALL_STATE(241)] = 4893, + [SMALL_STATE(242)] = 4904, + [SMALL_STATE(243)] = 4917, + [SMALL_STATE(244)] = 4926, + [SMALL_STATE(245)] = 4935, + [SMALL_STATE(246)] = 4944, + [SMALL_STATE(247)] = 4953, + [SMALL_STATE(248)] = 4966, + [SMALL_STATE(249)] = 4977, + [SMALL_STATE(250)] = 4986, + [SMALL_STATE(251)] = 4999, + [SMALL_STATE(252)] = 5012, + [SMALL_STATE(253)] = 5021, + [SMALL_STATE(254)] = 5034, + [SMALL_STATE(255)] = 5043, + [SMALL_STATE(256)] = 5052, + [SMALL_STATE(257)] = 5061, + [SMALL_STATE(258)] = 5070, + [SMALL_STATE(259)] = 5083, + [SMALL_STATE(260)] = 5096, + [SMALL_STATE(261)] = 5105, + [SMALL_STATE(262)] = 5114, + [SMALL_STATE(263)] = 5123, + [SMALL_STATE(264)] = 5131, + [SMALL_STATE(265)] = 5139, + [SMALL_STATE(266)] = 5147, + [SMALL_STATE(267)] = 5155, + [SMALL_STATE(268)] = 5163, + [SMALL_STATE(269)] = 5171, + [SMALL_STATE(270)] = 5181, + [SMALL_STATE(271)] = 5191, + [SMALL_STATE(272)] = 5201, + [SMALL_STATE(273)] = 5209, + [SMALL_STATE(274)] = 5219, + [SMALL_STATE(275)] = 5229, + [SMALL_STATE(276)] = 5236, + [SMALL_STATE(277)] = 5243, + [SMALL_STATE(278)] = 5250, + [SMALL_STATE(279)] = 5257, + [SMALL_STATE(280)] = 5264, + [SMALL_STATE(281)] = 5271, + [SMALL_STATE(282)] = 5278, + [SMALL_STATE(283)] = 5285, + [SMALL_STATE(284)] = 5292, + [SMALL_STATE(285)] = 5299, + [SMALL_STATE(286)] = 5306, + [SMALL_STATE(287)] = 5313, + [SMALL_STATE(288)] = 5320, + [SMALL_STATE(289)] = 5327, + [SMALL_STATE(290)] = 5334, + [SMALL_STATE(291)] = 5341, + [SMALL_STATE(292)] = 5348, + [SMALL_STATE(293)] = 5355, + [SMALL_STATE(294)] = 5362, + [SMALL_STATE(295)] = 5369, + [SMALL_STATE(296)] = 5376, + [SMALL_STATE(297)] = 5383, + [SMALL_STATE(298)] = 5390, + [SMALL_STATE(299)] = 5397, + [SMALL_STATE(300)] = 5404, + [SMALL_STATE(301)] = 5411, + [SMALL_STATE(302)] = 5418, + [SMALL_STATE(303)] = 5425, + [SMALL_STATE(304)] = 5432, + [SMALL_STATE(305)] = 5439, + [SMALL_STATE(306)] = 5446, + [SMALL_STATE(307)] = 5453, + [SMALL_STATE(308)] = 5460, + [SMALL_STATE(309)] = 5467, + [SMALL_STATE(310)] = 5474, + [SMALL_STATE(311)] = 5481, + [SMALL_STATE(312)] = 5488, + [SMALL_STATE(313)] = 5495, + [SMALL_STATE(314)] = 5502, + [SMALL_STATE(315)] = 5509, + [SMALL_STATE(316)] = 5516, + [SMALL_STATE(317)] = 5523, + [SMALL_STATE(318)] = 5530, + [SMALL_STATE(319)] = 5537, + [SMALL_STATE(320)] = 5544, + [SMALL_STATE(321)] = 5551, + [SMALL_STATE(322)] = 5558, }; static const TSParseActionEntry ts_parse_actions[] = { @@ -7907,405 +8009,416 @@ static const TSParseActionEntry ts_parse_actions[] = { [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT_EXTRA(), [5] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 0, 0, 0), - [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(300), - [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(304), - [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(293), - [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(310), - [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(322), + [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(293), + [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(302), + [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(298), + [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(296), + [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(321), [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT_EXTRA(), - [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(264), + [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(273), [21] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 2, 0, 9), [23] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 2, 0, 9), - [25] = {.entry = {.count = 1, .reusable = true}}, SHIFT(299), - [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(216), - [29] = {.entry = {.count = 1, .reusable = true}}, SHIFT(216), - [31] = {.entry = {.count = 1, .reusable = true}}, SHIFT(111), + [25] = {.entry = {.count = 1, .reusable = true}}, SHIFT(312), + [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(217), + [29] = {.entry = {.count = 1, .reusable = true}}, SHIFT(217), + [31] = {.entry = {.count = 1, .reusable = true}}, SHIFT(116), [33] = {.entry = {.count = 1, .reusable = true}}, SHIFT(115), - [35] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), - [37] = {.entry = {.count = 1, .reusable = true}}, SHIFT(269), - [39] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 23), - [41] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 4, 0, 23), - [43] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 42), - [45] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 5, 0, 42), - [47] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 102), - [49] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 7, 0, 102), - [51] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__asset_expr_primary, 1, 0, 0), - [53] = {.entry = {.count = 1, .reusable = true}}, SHIFT(282), - [55] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__asset_expr_primary, 1, 0, 0), - [57] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 47), - [59] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 5, 0, 47), - [61] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 17), - [63] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 3, 0, 17), - [65] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 33), - [67] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 4, 0, 33), - [69] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 46), - [71] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 5, 0, 46), - [73] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 16), - [75] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 3, 0, 16), - [77] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 129), - [79] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 8, 0, 129), - [81] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 70), - [83] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 6, 0, 70), - [85] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 71), - [87] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 6, 0, 71), - [89] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 78), - [91] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 6, 0, 78), - [93] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 130), - [95] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 8, 0, 130), - [97] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 98), - [99] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 7, 0, 98), - [101] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 148), - [103] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 9, 0, 148), - [105] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_expr_unop, 2, 0, 41), - [107] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asset_expr_unop, 2, 0, 41), - [109] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__inline_asset_expr, 3, 0, 0), - [111] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__inline_asset_expr, 3, 0, 0), - [113] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_variable_substitution, 3, 0, 65), - [115] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asset_variable_substitution, 3, 0, 65), - [117] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_expr_binop, 3, 0, 66), - [119] = {.entry = {.count = 1, .reusable = true}}, SHIFT(118), - [121] = {.entry = {.count = 1, .reusable = true}}, SHIFT(276), - [123] = {.entry = {.count = 1, .reusable = false}}, SHIFT(121), - [125] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), - [127] = {.entry = {.count = 1, .reusable = true}}, SHIFT(121), - [129] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asset_expr_binop, 3, 0, 66), - [131] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_expr_type, 4, 0, 91), - [133] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asset_expr_type, 4, 0, 91), - [135] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_expr, 1, 0, 0), - [137] = {.entry = {.count = 1, .reusable = true}}, SHIFT(117), - [139] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_category_declaration_repeat1, 2, 0, 0), SHIFT_REPEAT(322), - [142] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat1, 2, 0, 0), - [144] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_category_declaration_repeat1, 2, 0, 0), - [146] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_meta, 4, 0, 6), - [148] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_meta, 4, 0, 6), - [150] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc, 3, 0, 0), - [152] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc, 3, 0, 0), - [154] = {.entry = {.count = 1, .reusable = false}}, SHIFT(32), - [156] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 2, 0, 24), - [158] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 2, 0, 24), - [160] = {.entry = {.count = 1, .reusable = true}}, SHIFT(109), - [162] = {.entry = {.count = 1, .reusable = false}}, SHIFT(35), - [164] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 3, 0, 48), - [166] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 3, 0, 48), - [168] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 3, 0, 49), - [170] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 79), - [172] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 75), - [174] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 4, 0, 83), - [176] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 57), - [178] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 95), - [180] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector_context, 3, 0, 0), - [182] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_context, 3, 0, 0), - [184] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 99), - [186] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 30), - [188] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 107), - [190] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector_context, 4, 0, 0), - [192] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_context, 4, 0, 0), - [194] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 120), - [196] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 126), - [198] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 43), - [200] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 13), - [202] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 145), - [204] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 34), - [206] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 149), - [208] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 159), - [210] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 67), - [212] = {.entry = {.count = 1, .reusable = true}}, SHIFT(242), - [214] = {.entry = {.count = 1, .reusable = true}}, SHIFT(277), - [216] = {.entry = {.count = 1, .reusable = true}}, SHIFT(280), - [218] = {.entry = {.count = 1, .reusable = true}}, SHIFT(252), - [220] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), - [222] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(300), - [225] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(304), - [228] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(293), - [231] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(310), - [234] = {.entry = {.count = 1, .reusable = true}}, SHIFT(240), - [236] = {.entry = {.count = 1, .reusable = true}}, SHIFT(235), - [238] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preconditions, 2, 0, 25), - [240] = {.entry = {.count = 1, .reusable = true}}, SHIFT(116), - [242] = {.entry = {.count = 1, .reusable = true}}, SHIFT(244), - [244] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_preconditions_repeat1, 2, 0, 0), - [246] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_preconditions_repeat1, 2, 0, 0), SHIFT_REPEAT(116), - [249] = {.entry = {.count = 1, .reusable = true}}, SHIFT(256), - [251] = {.entry = {.count = 1, .reusable = true}}, SHIFT(259), - [253] = {.entry = {.count = 1, .reusable = true}}, SHIFT(263), - [255] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preconditions, 3, 0, 51), - [257] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1, 0, 0), - [259] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 11, 0, 167), - [261] = {.entry = {.count = 1, .reusable = false}}, SHIFT(119), - [263] = {.entry = {.count = 1, .reusable = true}}, SHIFT(66), - [265] = {.entry = {.count = 1, .reusable = false}}, SHIFT(196), - [267] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 72), - [269] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 27), - [271] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 76), - [273] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 60), - [275] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 31), - [277] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 80), - [279] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 4, 0, 84), - [281] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 4, 0, 85), - [283] = {.entry = {.count = 1, .reusable = false}}, SHIFT(141), - [285] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 87), - [287] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 35), - [289] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 92), - [291] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 96), - [293] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 100), - [295] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 104), - [297] = {.entry = {.count = 1, .reusable = false}}, SHIFT(198), - [299] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 108), - [301] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 110), - [303] = {.entry = {.count = 1, .reusable = false}}, SHIFT(140), - [305] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 5, 0, 113), - [307] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 117), - [309] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 44), - [311] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 121), - [313] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 123), - [315] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 14), - [317] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 127), - [319] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_definition, 1, 0, 0), - [321] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_asset_definition_repeat1, 2, 0, 0), - [323] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_asset_definition_repeat1, 2, 0, 0), SHIFT_REPEAT(277), - [326] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_asset_definition_repeat1, 2, 0, 0), SHIFT_REPEAT(280), - [329] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 132), - [331] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 138), - [333] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 142), - [335] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 146), - [337] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 3, 0, 50), - [339] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 150), - [341] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 156), - [343] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 58), - [345] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 160), - [347] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 162), - [349] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 68), - [351] = {.entry = {.count = 1, .reusable = false}}, SHIFT(139), - [353] = {.entry = {.count = 1, .reusable = false}}, SHIFT(194), - [355] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 54), - [357] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), - [359] = {.entry = {.count = 1, .reusable = true}}, SHIFT(120), - [361] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_reaching, 2, 0, 26), - [363] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_reaching, 3, 0, 52), - [365] = {.entry = {.count = 1, .reusable = true}}, SHIFT(243), - [367] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__ttc_primary, 1, 0, 0), - [369] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__ttc_primary, 1, 0, 0), - [371] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 12, 0, 171), - [373] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 29), - [375] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 36), - [377] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), - [379] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 45), - [381] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 53), - [383] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 55), - [385] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 56), - [387] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 59), - [389] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 61), - [391] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 62), - [393] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 69), - [395] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 73), - [397] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 74), - [399] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 77), - [401] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 81), - [403] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__ttc_parenthesized, 3, 0, 0), - [405] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__ttc_parenthesized, 3, 0, 0), - [407] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc_binop, 3, 0, 66), - [409] = {.entry = {.count = 1, .reusable = true}}, SHIFT(86), - [411] = {.entry = {.count = 1, .reusable = false}}, SHIFT(86), - [413] = {.entry = {.count = 1, .reusable = true}}, SHIFT(76), - [415] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc_binop, 3, 0, 66), - [417] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 86), - [419] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 88), - [421] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 89), - [423] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 90), - [425] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 93), - [427] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 94), - [429] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 97), - [431] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 32), - [433] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 101), - [435] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 103), - [437] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 105), - [439] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 106), - [441] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 109), - [443] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 111), - [445] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 112), - [447] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc_distribution, 4, 0, 114), - [449] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc_distribution, 4, 0, 114), - [451] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 115), - [453] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 116), - [455] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 118), - [457] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 119), - [459] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 122), - [461] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 124), - [463] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 125), - [465] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 128), - [467] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_variable, 4, 0, 3), - [469] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 131), - [471] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 133), - [473] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 134), - [475] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 135), - [477] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc_distribution, 5, 0, 136), - [479] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc_distribution, 5, 0, 136), - [481] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 137), - [483] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 139), - [485] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 140), - [487] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 141), - [489] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 143), - [491] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 144), - [493] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 147), - [495] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 151), - [497] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 152), - [499] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 154), - [501] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 155), - [503] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 157), - [505] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 158), - [507] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 161), - [509] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 163), - [511] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 164), - [513] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 11, 0, 166), - [515] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 11, 0, 168), - [517] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 11, 0, 169), - [519] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 11, 0, 170), - [521] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 28), - [523] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 15), - [525] = {.entry = {.count = 1, .reusable = true}}, SHIFT(108), - [527] = {.entry = {.count = 1, .reusable = true}}, SHIFT(107), - [529] = {.entry = {.count = 1, .reusable = true}}, SHIFT(231), - [531] = {.entry = {.count = 1, .reusable = true}}, SHIFT(247), - [533] = {.entry = {.count = 1, .reusable = true}}, SHIFT(138), - [535] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), - [537] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_category_declaration, 5, 0, 5), - [539] = {.entry = {.count = 1, .reusable = true}}, SHIFT(204), - [541] = {.entry = {.count = 1, .reusable = true}}, SHIFT(290), - [543] = {.entry = {.count = 1, .reusable = true}}, SHIFT(297), - [545] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_category_declaration, 4, 0, 2), - [547] = {.entry = {.count = 1, .reusable = true}}, SHIFT(201), - [549] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 1, 0, 0), - [551] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_category_declaration, 6, 0, 7), - [553] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_associations_declaration, 3, 0, 0), - [555] = {.entry = {.count = 1, .reusable = true}}, SHIFT(215), - [557] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat2, 2, 0, 0), - [559] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat2, 2, 0, 0), SHIFT_REPEAT(290), - [562] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat2, 2, 0, 0), SHIFT_REPEAT(297), - [565] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_define_declaration, 4, 0, 3), - [567] = {.entry = {.count = 1, .reusable = true}}, SHIFT(199), - [569] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat1, 2, 0, 0), SHIFT_REPEAT(319), - [572] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_associations_declaration, 4, 0, 0), - [574] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_include_declaration, 2, 0, 1), - [576] = {.entry = {.count = 1, .reusable = false}}, SHIFT(319), - [578] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), - [580] = {.entry = {.count = 1, .reusable = false}}, SHIFT(281), - [582] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), - [584] = {.entry = {.count = 1, .reusable = false}}, SHIFT(303), - [586] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_category_declaration, 5, 0, 4), - [588] = {.entry = {.count = 1, .reusable = true}}, SHIFT(255), - [590] = {.entry = {.count = 1, .reusable = true}}, SHIFT(273), - [592] = {.entry = {.count = 1, .reusable = true}}, SHIFT(284), - [594] = {.entry = {.count = 1, .reusable = true}}, SHIFT(211), - [596] = {.entry = {.count = 1, .reusable = true}}, SHIFT(319), - [598] = {.entry = {.count = 1, .reusable = true}}, SHIFT(209), - [600] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), - [602] = {.entry = {.count = 1, .reusable = true}}, SHIFT(205), - [604] = {.entry = {.count = 1, .reusable = true}}, SHIFT(272), - [606] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), - [608] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), - [610] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), - [612] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_associations_declaration_repeat1, 2, 0, 0), SHIFT_REPEAT(284), - [615] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_associations_declaration_repeat1, 2, 0, 0), - [617] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_association, 13, 0, 153), SHIFT(319), - [620] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_association, 13, 0, 153), - [622] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_association, 14, 0, 165), SHIFT(319), - [625] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_association, 14, 0, 165), - [627] = {.entry = {.count = 1, .reusable = true}}, SHIFT(202), - [629] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), - [631] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), - [633] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_star, 1, 0, 0), - [635] = {.entry = {.count = 1, .reusable = true}}, SHIFT(274), - [637] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42), - [639] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), - [641] = {.entry = {.count = 1, .reusable = true}}, SHIFT(283), - [643] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_name, 2, 0, 0), - [645] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 6, 0, 18), - [647] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_detector_name_repeat1, 2, 0, 0), SHIFT_REPEAT(283), - [650] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_detector_name_repeat1, 2, 0, 0), - [652] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 6, 0, 19), - [654] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_detector_context_repeat1, 2, 0, 0), SHIFT_REPEAT(274), - [657] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_detector_context_repeat1, 2, 0, 0), - [659] = {.entry = {.count = 1, .reusable = false}}, SHIFT(271), - [661] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 4, 0, 2), - [663] = {.entry = {.count = 1, .reusable = true}}, SHIFT(239), - [665] = {.entry = {.count = 1, .reusable = true}}, SHIFT(171), - [667] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 6, 0, 12), - [669] = {.entry = {.count = 1, .reusable = false}}, SHIFT(249), - [671] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 7, 0, 21), - [673] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 7, 0, 22), - [675] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 7, 0, 37), - [677] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_multiplicity, 1, 0, 0), - [679] = {.entry = {.count = 1, .reusable = true}}, SHIFT(221), - [681] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_ttc_distribution_repeat1, 2, 0, 0), SHIFT_REPEAT(239), - [684] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_ttc_distribution_repeat1, 2, 0, 0), - [686] = {.entry = {.count = 1, .reusable = true}}, SHIFT(157), - [688] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_cias, 1, 0, 0), - [690] = {.entry = {.count = 1, .reusable = true}}, SHIFT(323), - [692] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 8, 0, 39), - [694] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 8, 0, 40), - [696] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 8, 0, 63), - [698] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 9, 0, 64), - [700] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_name, 1, 0, 0), - [702] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 5, 0, 8), - [704] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_cias, 2, 0, 0), - [706] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_cias_repeat1, 2, 0, 0), - [708] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_cias_repeat1, 2, 0, 0), SHIFT_REPEAT(323), - [711] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 5, 0, 5), - [713] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 5, 0, 10), - [715] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 6, 0, 11), - [717] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 7, 0, 38), - [719] = {.entry = {.count = 1, .reusable = true}}, SHIFT(250), - [721] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_context_asset, 2, 0, 82), - [723] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_multiplicity_range, 3, 0, 20), - [725] = {.entry = {.count = 1, .reusable = true}}, SHIFT(321), - [727] = {.entry = {.count = 1, .reusable = true}}, SHIFT(298), - [729] = {.entry = {.count = 1, .reusable = true}}, SHIFT(301), - [731] = {.entry = {.count = 1, .reusable = true}}, SHIFT(279), - [733] = {.entry = {.count = 1, .reusable = true}}, SHIFT(226), - [735] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), - [737] = {.entry = {.count = 1, .reusable = true}}, SHIFT(224), - [739] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), - [741] = {.entry = {.count = 1, .reusable = true}}, SHIFT(266), - [743] = {.entry = {.count = 1, .reusable = true}}, SHIFT(302), - [745] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), - [747] = {.entry = {.count = 1, .reusable = true}}, SHIFT(251), - [749] = {.entry = {.count = 1, .reusable = true}}, SHIFT(308), - [751] = {.entry = {.count = 1, .reusable = true}}, SHIFT(305), - [753] = {.entry = {.count = 1, .reusable = true}}, SHIFT(260), - [755] = {.entry = {.count = 1, .reusable = true}}, SHIFT(314), - [757] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [759] = {.entry = {.count = 1, .reusable = true}}, SHIFT(245), - [761] = {.entry = {.count = 1, .reusable = true}}, SHIFT(313), - [763] = {.entry = {.count = 1, .reusable = true}}, SHIFT(237), - [765] = {.entry = {.count = 1, .reusable = true}}, SHIFT(261), - [767] = {.entry = {.count = 1, .reusable = true}}, SHIFT(208), - [769] = {.entry = {.count = 1, .reusable = true}}, SHIFT(214), - [771] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), - [773] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), - [775] = {.entry = {.count = 1, .reusable = true}}, SHIFT(212), - [777] = {.entry = {.count = 1, .reusable = true}}, SHIFT(112), - [779] = {.entry = {.count = 1, .reusable = true}}, SHIFT(307), - [781] = {.entry = {.count = 1, .reusable = true}}, SHIFT(222), - [783] = {.entry = {.count = 1, .reusable = true}}, SHIFT(228), - [785] = {.entry = {.count = 1, .reusable = true}}, SHIFT(197), - [787] = {.entry = {.count = 1, .reusable = true}}, SHIFT(246), - [789] = {.entry = {.count = 1, .reusable = true}}, SHIFT(195), - [791] = {.entry = {.count = 1, .reusable = true}}, SHIFT(278), - [793] = {.entry = {.count = 1, .reusable = true}}, SHIFT(317), - [795] = {.entry = {.count = 1, .reusable = true}}, SHIFT(220), - [797] = {.entry = {.count = 1, .reusable = true}}, SHIFT(254), - [799] = {.entry = {.count = 1, .reusable = true}}, SHIFT(253), - [801] = {.entry = {.count = 1, .reusable = true}}, SHIFT(296), - [803] = {.entry = {.count = 1, .reusable = true}}, SHIFT(213), - [805] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), - [807] = {.entry = {.count = 1, .reusable = true}}, SHIFT(288), - [809] = {.entry = {.count = 1, .reusable = true}}, SHIFT(262), - [811] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), - [813] = {.entry = {.count = 1, .reusable = true}}, SHIFT(309), - [815] = {.entry = {.count = 1, .reusable = true}}, SHIFT(318), - [817] = {.entry = {.count = 1, .reusable = true}}, SHIFT(270), - [819] = {.entry = {.count = 1, .reusable = true}}, SHIFT(320), - [821] = {.entry = {.count = 1, .reusable = true}}, SHIFT(268), + [35] = {.entry = {.count = 1, .reusable = true}}, SHIFT(77), + [37] = {.entry = {.count = 1, .reusable = true}}, SHIFT(274), + [39] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 17), + [41] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 3, 0, 17), + [43] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 47), + [45] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 5, 0, 47), + [47] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 91), + [49] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 6, 0, 91), + [51] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 16), + [53] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 3, 0, 16), + [55] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 15), + [57] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 3, 0, 15), + [59] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 30), + [61] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 4, 0, 30), + [63] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 38), + [65] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 4, 0, 38), + [67] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 37), + [69] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 4, 0, 37), + [71] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 65), + [73] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 5, 0, 65), + [75] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 80), + [77] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 6, 0, 80), + [79] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 79), + [81] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 6, 0, 79), + [83] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 106), + [85] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 7, 0, 106), + [87] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 118), + [89] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 7, 0, 118), + [91] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 119), + [93] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 7, 0, 119), + [95] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 140), + [97] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 8, 0, 140), + [99] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__asset_expr_primary, 1, 0, 0), + [101] = {.entry = {.count = 1, .reusable = true}}, SHIFT(277), + [103] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__asset_expr_primary, 1, 0, 0), + [105] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__inline_asset_expr, 3, 0, 0), + [107] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__inline_asset_expr, 3, 0, 0), + [109] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_expr_type, 4, 0, 102), + [111] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asset_expr_type, 4, 0, 102), + [113] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_attack_step_repeat1, 2, 0, 0), + [115] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_attack_step_repeat1, 2, 0, 0), + [117] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attack_step_repeat1, 2, 0, 0), SHIFT_REPEAT(312), + [120] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_expr_unop, 2, 0, 46), + [122] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asset_expr_unop, 2, 0, 46), + [124] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_variable_substitution, 3, 0, 75), + [126] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asset_variable_substitution, 3, 0, 75), + [128] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_expr_binop, 3, 0, 76), + [130] = {.entry = {.count = 1, .reusable = true}}, SHIFT(285), + [132] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asset_expr_binop, 3, 0, 76), + [134] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), + [136] = {.entry = {.count = 1, .reusable = true}}, SHIFT(117), + [138] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 18), + [140] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 34), + [142] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 81), + [144] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 31), + [146] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 56), + [148] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 66), + [150] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 69), + [152] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 39), + [154] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 95), + [156] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_expr, 1, 0, 0), + [158] = {.entry = {.count = 1, .reusable = false}}, SHIFT(119), + [160] = {.entry = {.count = 1, .reusable = true}}, SHIFT(119), + [162] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 107), + [164] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 110), + [166] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 141), + [168] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 144), + [170] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 120), + [172] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 129), + [174] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 156), + [176] = {.entry = {.count = 1, .reusable = false}}, SHIFT(48), + [178] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 3, 0, 48), + [180] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 3, 0, 48), + [182] = {.entry = {.count = 1, .reusable = false}}, SHIFT(50), + [184] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 2, 0, 24), + [186] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 2, 0, 24), + [188] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_category_declaration_repeat1, 2, 0, 0), SHIFT_REPEAT(321), + [191] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat1, 2, 0, 0), + [193] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_category_declaration_repeat1, 2, 0, 0), + [195] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_attack_step_repeat2, 2, 0, 0), + [197] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attack_step_repeat2, 2, 0, 0), SHIFT_REPEAT(217), + [200] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attack_step_repeat2, 2, 0, 0), SHIFT_REPEAT(217), + [203] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 4, 0, 83), + [205] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 4, 0, 83), + [207] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector_context, 3, 0, 0), + [209] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_context, 3, 0, 0), + [211] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 3, 0, 49), + [213] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 3, 0, 49), + [215] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector_context, 4, 0, 0), + [217] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_context, 4, 0, 0), + [219] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc, 3, 0, 0), + [221] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc, 3, 0, 0), + [223] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_meta, 4, 0, 6), + [225] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_meta, 4, 0, 6), + [227] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 3, 0, 50), + [229] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 3, 0, 50), + [231] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 4, 0, 84), + [233] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 4, 0, 84), + [235] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 4, 0, 85), + [237] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 4, 0, 85), + [239] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 5, 0, 113), + [241] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 5, 0, 113), + [243] = {.entry = {.count = 1, .reusable = true}}, SHIFT(256), + [245] = {.entry = {.count = 1, .reusable = true}}, SHIFT(288), + [247] = {.entry = {.count = 1, .reusable = true}}, SHIFT(295), + [249] = {.entry = {.count = 1, .reusable = true}}, SHIFT(236), + [251] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_preconditions_repeat1, 2, 0, 0), + [253] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_preconditions_repeat1, 2, 0, 0), SHIFT_REPEAT(111), + [256] = {.entry = {.count = 1, .reusable = true}}, SHIFT(245), + [258] = {.entry = {.count = 1, .reusable = true}}, SHIFT(262), + [260] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), + [262] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(293), + [265] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(302), + [268] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(298), + [271] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(296), + [274] = {.entry = {.count = 1, .reusable = true}}, SHIFT(237), + [276] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preconditions, 2, 0, 25), + [278] = {.entry = {.count = 1, .reusable = true}}, SHIFT(111), + [280] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preconditions, 3, 0, 51), + [282] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1, 0, 0), + [284] = {.entry = {.count = 1, .reusable = true}}, SHIFT(238), + [286] = {.entry = {.count = 1, .reusable = true}}, SHIFT(243), + [288] = {.entry = {.count = 1, .reusable = true}}, SHIFT(249), + [290] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 142), + [292] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 40), + [294] = {.entry = {.count = 1, .reusable = false}}, SHIFT(120), + [296] = {.entry = {.count = 1, .reusable = true}}, SHIFT(73), + [298] = {.entry = {.count = 1, .reusable = false}}, SHIFT(196), + [300] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 28), + [302] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 87), + [304] = {.entry = {.count = 1, .reusable = false}}, SHIFT(197), + [306] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 93), + [308] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 96), + [310] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 99), + [312] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 32), + [314] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 104), + [316] = {.entry = {.count = 1, .reusable = false}}, SHIFT(139), + [318] = {.entry = {.count = 1, .reusable = false}}, SHIFT(140), + [320] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 108), + [322] = {.entry = {.count = 1, .reusable = false}}, SHIFT(141), + [324] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 111), + [326] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 54), + [328] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 116), + [330] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 57), + [332] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 60), + [334] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 63), + [336] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 122), + [338] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 127), + [340] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 35), + [342] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 130), + [344] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 133), + [346] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 138), + [348] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 13), + [350] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 67), + [352] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_definition, 1, 0, 0), + [354] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 70), + [356] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 145), + [358] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 149), + [360] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 154), + [362] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_asset_definition_repeat1, 2, 0, 0), + [364] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_asset_definition_repeat1, 2, 0, 0), SHIFT_REPEAT(288), + [367] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_asset_definition_repeat1, 2, 0, 0), SHIFT_REPEAT(295), + [370] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 157), + [372] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 160), + [374] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 166), + [376] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 77), + [378] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), + [380] = {.entry = {.count = 1, .reusable = true}}, SHIFT(118), + [382] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_reaching, 3, 0, 52), + [384] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_reaching, 2, 0, 26), + [386] = {.entry = {.count = 1, .reusable = true}}, SHIFT(222), + [388] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__ttc_primary, 1, 0, 0), + [390] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__ttc_primary, 1, 0, 0), + [392] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 169), + [394] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 33), + [396] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 36), + [398] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 41), + [400] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), + [402] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 53), + [404] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 55), + [406] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 58), + [408] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 59), + [410] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 61), + [412] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 62), + [414] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 64), + [416] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 68), + [418] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 71), + [420] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 72), + [422] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 78), + [424] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__ttc_parenthesized, 3, 0, 0), + [426] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__ttc_parenthesized, 3, 0, 0), + [428] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc_distribution, 3, 0, 75), + [430] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc_distribution, 3, 0, 75), + [432] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc_binop, 3, 0, 76), + [434] = {.entry = {.count = 1, .reusable = true}}, SHIFT(84), + [436] = {.entry = {.count = 1, .reusable = false}}, SHIFT(84), + [438] = {.entry = {.count = 1, .reusable = true}}, SHIFT(86), + [440] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc_binop, 3, 0, 76), + [442] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 86), + [444] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 88), + [446] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 89), + [448] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 90), + [450] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 92), + [452] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 94), + [454] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 97), + [456] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 98), + [458] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 14), + [460] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 100), + [462] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 101), + [464] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 103), + [466] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 105), + [468] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 109), + [470] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 112), + [472] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc_distribution, 4, 0, 114), + [474] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc_distribution, 4, 0, 114), + [476] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 29), + [478] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 117), + [480] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 121), + [482] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 123), + [484] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 124), + [486] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 125), + [488] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 126), + [490] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 128), + [492] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_variable, 4, 0, 3), + [494] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 131), + [496] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 132), + [498] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 134), + [500] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 135), + [502] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc_distribution, 5, 0, 136), + [504] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc_distribution, 5, 0, 136), + [506] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 137), + [508] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 139), + [510] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 143), + [512] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 146), + [514] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 147), + [516] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 148), + [518] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 150), + [520] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 151), + [522] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 152), + [524] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 153), + [526] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 155), + [528] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 158), + [530] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 159), + [532] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 161), + [534] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 162), + [536] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 164), + [538] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 165), + [540] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 167), + [542] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 168), + [544] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 27), + [546] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 11, 0, 171), + [548] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 115), + [550] = {.entry = {.count = 1, .reusable = true}}, SHIFT(246), + [552] = {.entry = {.count = 1, .reusable = true}}, SHIFT(248), + [554] = {.entry = {.count = 1, .reusable = true}}, SHIFT(137), + [556] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), + [558] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), + [560] = {.entry = {.count = 1, .reusable = false}}, SHIFT(308), + [562] = {.entry = {.count = 1, .reusable = true}}, SHIFT(64), + [564] = {.entry = {.count = 1, .reusable = false}}, SHIFT(276), + [566] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_category_declaration, 5, 0, 4), + [568] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_category_declaration, 6, 0, 7), + [570] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat2, 2, 0, 0), + [572] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat2, 2, 0, 0), SHIFT_REPEAT(281), + [575] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat2, 2, 0, 0), SHIFT_REPEAT(309), + [578] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_associations_declaration, 3, 0, 0), + [580] = {.entry = {.count = 1, .reusable = true}}, SHIFT(200), + [582] = {.entry = {.count = 1, .reusable = true}}, SHIFT(281), + [584] = {.entry = {.count = 1, .reusable = true}}, SHIFT(309), + [586] = {.entry = {.count = 1, .reusable = true}}, SHIFT(205), + [588] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_category_declaration, 4, 0, 2), + [590] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 1, 0, 0), + [592] = {.entry = {.count = 1, .reusable = true}}, SHIFT(70), + [594] = {.entry = {.count = 1, .reusable = false}}, SHIFT(311), + [596] = {.entry = {.count = 1, .reusable = true}}, SHIFT(199), + [598] = {.entry = {.count = 1, .reusable = true}}, SHIFT(211), + [600] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_associations_declaration, 4, 0, 0), + [602] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_category_declaration, 5, 0, 5), + [604] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat1, 2, 0, 0), SHIFT_REPEAT(308), + [607] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_include_declaration, 2, 0, 1), + [609] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_define_declaration, 4, 0, 3), + [611] = {.entry = {.count = 1, .reusable = true}}, SHIFT(282), + [613] = {.entry = {.count = 1, .reusable = true}}, SHIFT(202), + [615] = {.entry = {.count = 1, .reusable = true}}, SHIFT(272), + [617] = {.entry = {.count = 1, .reusable = true}}, SHIFT(253), + [619] = {.entry = {.count = 1, .reusable = true}}, SHIFT(270), + [621] = {.entry = {.count = 1, .reusable = true}}, SHIFT(308), + [623] = {.entry = {.count = 1, .reusable = true}}, SHIFT(209), + [625] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), + [627] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), + [629] = {.entry = {.count = 1, .reusable = true}}, SHIFT(210), + [631] = {.entry = {.count = 1, .reusable = true}}, SHIFT(138), + [633] = {.entry = {.count = 1, .reusable = false}}, SHIFT(247), + [635] = {.entry = {.count = 1, .reusable = true}}, SHIFT(68), + [637] = {.entry = {.count = 1, .reusable = true}}, SHIFT(69), + [639] = {.entry = {.count = 1, .reusable = true}}, SHIFT(204), + [641] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), + [643] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_associations_declaration_repeat1, 2, 0, 0), SHIFT_REPEAT(282), + [646] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_associations_declaration_repeat1, 2, 0, 0), + [648] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_association, 13, 0, 163), SHIFT(308), + [651] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_association, 13, 0, 163), + [653] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), + [655] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_association, 14, 0, 170), SHIFT(308), + [658] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_association, 14, 0, 170), + [660] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 6, 0, 11), + [662] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_cias_repeat1, 2, 0, 0), + [664] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_cias_repeat1, 2, 0, 0), SHIFT_REPEAT(300), + [667] = {.entry = {.count = 1, .reusable = true}}, SHIFT(269), + [669] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49), + [671] = {.entry = {.count = 1, .reusable = true}}, SHIFT(318), + [673] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_name, 2, 0, 0), + [675] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_detector_name_repeat1, 2, 0, 0), SHIFT_REPEAT(318), + [678] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_detector_name_repeat1, 2, 0, 0), + [680] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 6, 0, 12), + [682] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 4, 0, 2), + [684] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 6, 0, 19), + [686] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 6, 0, 20), + [688] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_detector_context_repeat1, 2, 0, 0), SHIFT_REPEAT(269), + [691] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_detector_context_repeat1, 2, 0, 0), + [693] = {.entry = {.count = 1, .reusable = false}}, SHIFT(268), + [695] = {.entry = {.count = 1, .reusable = true}}, SHIFT(241), + [697] = {.entry = {.count = 1, .reusable = true}}, SHIFT(171), + [699] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 7, 0, 22), + [701] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 7, 0, 23), + [703] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 8, 0, 45), + [705] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_star, 1, 0, 0), + [707] = {.entry = {.count = 1, .reusable = true}}, SHIFT(157), + [709] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_multiplicity, 1, 0, 0), + [711] = {.entry = {.count = 1, .reusable = true}}, SHIFT(216), + [713] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 5, 0, 8), + [715] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_ttc_distribution_repeat1, 2, 0, 0), SHIFT_REPEAT(241), + [718] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_ttc_distribution_repeat1, 2, 0, 0), + [720] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_cias, 1, 0, 0), + [722] = {.entry = {.count = 1, .reusable = true}}, SHIFT(300), + [724] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_name, 1, 0, 0), + [726] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 8, 0, 44), + [728] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 7, 0, 42), + [730] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 7, 0, 43), + [732] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 5, 0, 10), + [734] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), + [736] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_cias, 2, 0, 0), + [738] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 8, 0, 73), + [740] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 9, 0, 74), + [742] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 5, 0, 5), + [744] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_context_asset, 2, 0, 82), + [746] = {.entry = {.count = 1, .reusable = true}}, SHIFT(291), + [748] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_multiplicity_range, 3, 0, 21), + [750] = {.entry = {.count = 1, .reusable = true}}, SHIFT(251), + [752] = {.entry = {.count = 1, .reusable = true}}, SHIFT(244), + [754] = {.entry = {.count = 1, .reusable = true}}, SHIFT(223), + [756] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), + [758] = {.entry = {.count = 1, .reusable = true}}, SHIFT(261), + [760] = {.entry = {.count = 1, .reusable = true}}, SHIFT(231), + [762] = {.entry = {.count = 1, .reusable = true}}, SHIFT(316), + [764] = {.entry = {.count = 1, .reusable = true}}, SHIFT(305), + [766] = {.entry = {.count = 1, .reusable = true}}, SHIFT(299), + [768] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), + [770] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), + [772] = {.entry = {.count = 1, .reusable = true}}, SHIFT(313), + [774] = {.entry = {.count = 1, .reusable = true}}, SHIFT(257), + [776] = {.entry = {.count = 1, .reusable = true}}, SHIFT(194), + [778] = {.entry = {.count = 1, .reusable = true}}, SHIFT(322), + [780] = {.entry = {.count = 1, .reusable = true}}, SHIFT(294), + [782] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [784] = {.entry = {.count = 1, .reusable = true}}, SHIFT(267), + [786] = {.entry = {.count = 1, .reusable = true}}, SHIFT(228), + [788] = {.entry = {.count = 1, .reusable = true}}, SHIFT(213), + [790] = {.entry = {.count = 1, .reusable = true}}, SHIFT(252), + [792] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), + [794] = {.entry = {.count = 1, .reusable = true}}, SHIFT(215), + [796] = {.entry = {.count = 1, .reusable = true}}, SHIFT(195), + [798] = {.entry = {.count = 1, .reusable = true}}, SHIFT(310), + [800] = {.entry = {.count = 1, .reusable = true}}, SHIFT(297), + [802] = {.entry = {.count = 1, .reusable = true}}, SHIFT(264), + [804] = {.entry = {.count = 1, .reusable = true}}, SHIFT(255), + [806] = {.entry = {.count = 1, .reusable = true}}, SHIFT(225), + [808] = {.entry = {.count = 1, .reusable = true}}, SHIFT(260), + [810] = {.entry = {.count = 1, .reusable = true}}, SHIFT(315), + [812] = {.entry = {.count = 1, .reusable = true}}, SHIFT(207), + [814] = {.entry = {.count = 1, .reusable = true}}, SHIFT(254), + [816] = {.entry = {.count = 1, .reusable = true}}, SHIFT(280), + [818] = {.entry = {.count = 1, .reusable = true}}, SHIFT(289), + [820] = {.entry = {.count = 1, .reusable = true}}, SHIFT(198), + [822] = {.entry = {.count = 1, .reusable = true}}, SHIFT(317), + [824] = {.entry = {.count = 1, .reusable = true}}, SHIFT(224), + [826] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), + [828] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), + [830] = {.entry = {.count = 1, .reusable = true}}, SHIFT(239), + [832] = {.entry = {.count = 1, .reusable = true}}, SHIFT(287), + [834] = {.entry = {.count = 1, .reusable = true}}, SHIFT(292), + [836] = {.entry = {.count = 1, .reusable = true}}, SHIFT(214), + [838] = {.entry = {.count = 1, .reusable = true}}, SHIFT(263), + [840] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), + [842] = {.entry = {.count = 1, .reusable = true}}, SHIFT(319), + [844] = {.entry = {.count = 1, .reusable = true}}, SHIFT(320), + [846] = {.entry = {.count = 1, .reusable = true}}, SHIFT(114), }; #ifdef __cplusplus From f23e0d30718554ec3dce189352d08700bf0b79af Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Tue, 13 May 2025 17:12:12 +0200 Subject: [PATCH 27/45] test: update attack step to use identifier instead of identity nodes --- test/corpus/attackstep.ts-test | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/corpus/attackstep.ts-test b/test/corpus/attackstep.ts-test index d35dea1..717c8e2 100644 --- a/test/corpus/attackstep.ts-test +++ b/test/corpus/attackstep.ts-test @@ -70,14 +70,14 @@ category Test { (source_file (declaration (category_declaration - id: (identity) + id: (identifier) assets: (asset_declaration - id: (identity) + id: (identifier) body: (asset_definition (attack_step - id: (identity) - tag: (identity) - tag: (identity))))))) + id: (identifier) + tag: (identifier) + tag: (identifier))))))) ===================== Attack-step with CIAs From 4d00d9b2bed1d990dd30463b7e840bed59556867 Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Tue, 13 May 2025 17:20:43 +0200 Subject: [PATCH 28/45] fix: reduce requirements to highlight relevant nodes as tags --- queries/highlights.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/queries/highlights.scm b/queries/highlights.scm index 6b10b47..0bae6f5 100644 --- a/queries/highlights.scm +++ b/queries/highlights.scm @@ -113,7 +113,7 @@ ; Miscellaneous (comment) @comment -(attack_step tag: (identifier) @tag +(attack_step (identifier) @tag (#not-match? @tag "hidden|debug|trace")) -(attack_step tag: (identifier) @tag.builtin +(attack_step (identifier) @tag.builtin (#match? @tag.builtin "hidden|debug|trace")) From 7fc7200ea9670cce77d4b0aee188ae119e80ec18 Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Fri, 16 May 2025 09:34:29 +0200 Subject: [PATCH 29/45] fix: made step type into node to highlight E type The 'E' operator/attack-step-type constantly breaks and stops highlighting, by turning the types into a named node we can highlight the named node instead of the string target. --- grammar.js | 16 +- queries/highlights.scm | 45 +- src/grammar.json | 53 +- src/node-types.json | 40 +- src/parser.c | 7341 ++++++++++++++---------------- src/tree_sitter/parser.h | 1 - test/corpus/attackstep.ts-test | 30 + test/corpus/detector.ts-test | 5 + test/corpus/precondition.ts-test | 3 + 9 files changed, 3472 insertions(+), 4062 deletions(-) diff --git a/grammar.js b/grammar.js index 052a38e..d6df58e 100644 --- a/grammar.js +++ b/grammar.js @@ -86,13 +86,7 @@ module.exports = grammar({ // Attack step for an asset attack_step: $ => seq( - field('step_type', choice( - '|', - '&', - '#', - 'E', - '!E', - )), + field('step_type', $.step_type), field('id', $.identifier), optional(field('tag', repeat(seq('@', $.identifier)))), optional(field('cias', seq( @@ -107,6 +101,14 @@ module.exports = grammar({ optional(field('reaches', $.reaching)), ), + step_type: $ => token(choice( + '|', + '&', + '#', + 'E', + '!E', + )), + cias: $ => commaSep1($.cia), // Detector for attack steps diff --git a/queries/highlights.scm b/queries/highlights.scm index 0bae6f5..6c796e4 100644 --- a/queries/highlights.scm +++ b/queries/highlights.scm @@ -9,49 +9,32 @@ ] @punctuation.bracket ; Operators -(association ["<--" "-->"] @operator) - -(ttc_binop - [ +([ + "<--" + "-->" "+" "-" "/" "^" - "*" - ] @operator) - -(attack_step - [ - "|" - "&" + (step_type) + "=" + "!" + "//!" + "<-" + "+>" + "->" "#" - "E" - "!E" - "@" - ] @operator) - -(asset_variable "=" @operator) - -(detector ["!" "//!"] @operator) - -(preconditions "<-" @operator) - -(reaching ["+>" "->"] @operator) - -(define_declaration "#" @operator) - -(asset_expr_binop - [ "\\/" "/\\" "-" "." - ] @operator) + ".." + "@" + ] @operator) +(ttc_binop "*" @operator) (asset_expr_unop "*" @operator) -(multiplicity_range ".." @operator) - ; Keywords "include" @keyword.import diff --git a/src/grammar.json b/src/grammar.json index f6e5521..9e7adcc 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -283,29 +283,8 @@ "type": "FIELD", "name": "step_type", "content": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "|" - }, - { - "type": "STRING", - "value": "&" - }, - { - "type": "STRING", - "value": "#" - }, - { - "type": "STRING", - "value": "E" - }, - { - "type": "STRING", - "value": "!E" - } - ] + "type": "SYMBOL", + "name": "step_type" } }, { @@ -453,6 +432,34 @@ } ] }, + "step_type": { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "STRING", + "value": "&" + }, + { + "type": "STRING", + "value": "#" + }, + { + "type": "STRING", + "value": "E" + }, + { + "type": "STRING", + "value": "!E" + } + ] + } + }, "cias": { "type": "SEQ", "members": [ diff --git a/src/node-types.json b/src/node-types.json index df3b832..d85d39d 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -515,24 +515,8 @@ "required": true, "types": [ { - "type": "!E", - "named": false - }, - { - "type": "#", - "named": false - }, - { - "type": "&", - "named": false - }, - { - "type": "E", - "named": false - }, - { - "type": "|", - "named": false + "type": "step_type", + "named": true } ] }, @@ -1111,18 +1095,10 @@ "type": "!", "named": false }, - { - "type": "!E", - "named": false - }, { "type": "#", "named": false }, - { - "type": "&", - "named": false - }, { "type": "(", "named": false @@ -1199,10 +1175,6 @@ "type": "@", "named": false }, - { - "type": "E", - "named": false - }, { "type": "[", "named": false @@ -1277,15 +1249,15 @@ "named": true }, { - "type": "string", + "type": "step_type", "named": true }, { - "type": "{", - "named": false + "type": "string", + "named": true }, { - "type": "|", + "type": "{", "named": false }, { diff --git a/src/parser.c b/src/parser.c index 23b6adc..935008e 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1,4 +1,4 @@ -/* Automatically generated by tree-sitter v0.25.3 */ +/* Automatically @generated by tree-sitter v0.25.4 */ #include "tree_sitter/parser.h" @@ -7,11 +7,11 @@ #endif #define LANGUAGE_VERSION 15 -#define STATE_COUNT 323 +#define STATE_COUNT 326 #define LARGE_STATE_COUNT 2 -#define SYMBOL_COUNT 95 +#define SYMBOL_COUNT 92 #define ALIAS_COUNT 1 -#define TOKEN_COUNT 46 +#define TOKEN_COUNT 43 #define EXTERNAL_TOKEN_COUNT 0 #define FIELD_COUNT 33 #define MAX_ALIAS_SEQUENCE_LENGTH 14 @@ -31,90 +31,87 @@ enum ts_symbol_identifiers { anon_sym_extends = 9, anon_sym_let = 10, anon_sym_EQ = 11, - anon_sym_PIPE = 12, - anon_sym_AMP = 13, - anon_sym_POUND = 14, - anon_sym_E = 15, - anon_sym_BANGE = 16, - anon_sym_AT = 17, - anon_sym_COMMA = 18, - anon_sym_BANG = 19, - anon_sym_SLASH_SLASH_BANG = 20, - anon_sym_DOT = 21, - anon_sym_LPAREN = 22, - anon_sym_RPAREN = 23, - anon_sym_LT_DASH = 24, - anon_sym_PLUS_GT = 25, - anon_sym_DASH_GT = 26, - anon_sym_LBRACK = 27, - anon_sym_RBRACK = 28, - anon_sym_PLUS = 29, - anon_sym_DASH = 30, - anon_sym_STAR = 31, - anon_sym_SLASH = 32, - anon_sym_CARET = 33, - anon_sym_BSLASH_SLASH = 34, - anon_sym_SLASH_BSLASH = 35, - anon_sym_COLON = 36, - anon_sym_associations = 37, - anon_sym_LT_DASH_DASH = 38, - anon_sym_DASH_DASH_GT = 39, - anon_sym_DOT_DOT = 40, - anon_sym_info = 41, - sym_string = 42, - sym_integer = 43, - sym_float = 44, - sym_cia = 45, - sym_source_file = 46, - sym_declaration = 47, - sym_include_declaration = 48, - sym_category_declaration = 49, - sym_asset_declaration = 50, - sym_asset_definition = 51, - sym_asset_variable = 52, - sym_attack_step = 53, - sym_cias = 54, - sym_detector = 55, - sym_detector_name = 56, - sym_detector_context = 57, - sym_detector_context_asset = 58, - sym_preconditions = 59, - sym_reaching = 60, - sym_ttc = 61, - sym__ttc_expr = 62, - sym__ttc_parenthesized = 63, - sym__ttc_primary = 64, - sym_ttc_distribution = 65, - sym_ttc_binop = 66, - sym_asset_expr = 67, - sym__inline_asset_expr = 68, - sym__asset_expr_primary = 69, - sym_asset_variable_substitution = 70, - sym_asset_expr_type = 71, - sym_asset_expr_binop = 72, - sym_asset_expr_unop = 73, - sym_define_declaration = 74, - sym_associations_declaration = 75, - sym_association = 76, - sym_multiplicity = 77, - sym__multiplicity_atom = 78, - sym_multiplicity_range = 79, - sym_meta = 80, - sym__number = 81, - sym_star = 82, - aux_sym_source_file_repeat1 = 83, - aux_sym_category_declaration_repeat1 = 84, - aux_sym_category_declaration_repeat2 = 85, - aux_sym_asset_definition_repeat1 = 86, - aux_sym_attack_step_repeat1 = 87, - aux_sym_attack_step_repeat2 = 88, - aux_sym_cias_repeat1 = 89, - aux_sym_detector_name_repeat1 = 90, - aux_sym_detector_context_repeat1 = 91, - aux_sym_preconditions_repeat1 = 92, - aux_sym_ttc_distribution_repeat1 = 93, - aux_sym_associations_declaration_repeat1 = 94, - alias_sym_meta_string = 95, + anon_sym_AT = 12, + sym_step_type = 13, + anon_sym_COMMA = 14, + anon_sym_BANG = 15, + anon_sym_SLASH_SLASH_BANG = 16, + anon_sym_DOT = 17, + anon_sym_LPAREN = 18, + anon_sym_RPAREN = 19, + anon_sym_LT_DASH = 20, + anon_sym_PLUS_GT = 21, + anon_sym_DASH_GT = 22, + anon_sym_LBRACK = 23, + anon_sym_RBRACK = 24, + anon_sym_PLUS = 25, + anon_sym_DASH = 26, + anon_sym_STAR = 27, + anon_sym_SLASH = 28, + anon_sym_CARET = 29, + anon_sym_BSLASH_SLASH = 30, + anon_sym_SLASH_BSLASH = 31, + anon_sym_POUND = 32, + anon_sym_COLON = 33, + anon_sym_associations = 34, + anon_sym_LT_DASH_DASH = 35, + anon_sym_DASH_DASH_GT = 36, + anon_sym_DOT_DOT = 37, + anon_sym_info = 38, + sym_string = 39, + sym_integer = 40, + sym_float = 41, + sym_cia = 42, + sym_source_file = 43, + sym_declaration = 44, + sym_include_declaration = 45, + sym_category_declaration = 46, + sym_asset_declaration = 47, + sym_asset_definition = 48, + sym_asset_variable = 49, + sym_attack_step = 50, + sym_cias = 51, + sym_detector = 52, + sym_detector_name = 53, + sym_detector_context = 54, + sym_detector_context_asset = 55, + sym_preconditions = 56, + sym_reaching = 57, + sym_ttc = 58, + sym__ttc_expr = 59, + sym__ttc_parenthesized = 60, + sym__ttc_primary = 61, + sym_ttc_distribution = 62, + sym_ttc_binop = 63, + sym_asset_expr = 64, + sym__inline_asset_expr = 65, + sym__asset_expr_primary = 66, + sym_asset_variable_substitution = 67, + sym_asset_expr_type = 68, + sym_asset_expr_binop = 69, + sym_asset_expr_unop = 70, + sym_define_declaration = 71, + sym_associations_declaration = 72, + sym_association = 73, + sym_multiplicity = 74, + sym__multiplicity_atom = 75, + sym_multiplicity_range = 76, + sym_meta = 77, + sym__number = 78, + sym_star = 79, + aux_sym_source_file_repeat1 = 80, + aux_sym_category_declaration_repeat1 = 81, + aux_sym_category_declaration_repeat2 = 82, + aux_sym_asset_definition_repeat1 = 83, + aux_sym_attack_step_repeat1 = 84, + aux_sym_attack_step_repeat2 = 85, + aux_sym_cias_repeat1 = 86, + aux_sym_detector_name_repeat1 = 87, + aux_sym_detector_context_repeat1 = 88, + aux_sym_preconditions_repeat1 = 89, + aux_sym_ttc_distribution_repeat1 = 90, + aux_sym_associations_declaration_repeat1 = 91, + alias_sym_meta_string = 92, }; static const char * const ts_symbol_names[] = { @@ -130,12 +127,8 @@ static const char * const ts_symbol_names[] = { [anon_sym_extends] = "extends", [anon_sym_let] = "let", [anon_sym_EQ] = "=", - [anon_sym_PIPE] = "|", - [anon_sym_AMP] = "&", - [anon_sym_POUND] = "#", - [anon_sym_E] = "E", - [anon_sym_BANGE] = "!E", [anon_sym_AT] = "@", + [sym_step_type] = "step_type", [anon_sym_COMMA] = ",", [anon_sym_BANG] = "!", [anon_sym_SLASH_SLASH_BANG] = "//!", @@ -154,6 +147,7 @@ static const char * const ts_symbol_names[] = { [anon_sym_CARET] = "^", [anon_sym_BSLASH_SLASH] = "\\/", [anon_sym_SLASH_BSLASH] = "/\\", + [anon_sym_POUND] = "#", [anon_sym_COLON] = ":", [anon_sym_associations] = "associations", [anon_sym_LT_DASH_DASH] = "<--", @@ -229,12 +223,8 @@ static const TSSymbol ts_symbol_map[] = { [anon_sym_extends] = anon_sym_extends, [anon_sym_let] = anon_sym_let, [anon_sym_EQ] = anon_sym_EQ, - [anon_sym_PIPE] = anon_sym_PIPE, - [anon_sym_AMP] = anon_sym_AMP, - [anon_sym_POUND] = anon_sym_POUND, - [anon_sym_E] = anon_sym_E, - [anon_sym_BANGE] = anon_sym_BANGE, [anon_sym_AT] = anon_sym_AT, + [sym_step_type] = sym_step_type, [anon_sym_COMMA] = anon_sym_COMMA, [anon_sym_BANG] = anon_sym_BANG, [anon_sym_SLASH_SLASH_BANG] = anon_sym_SLASH_SLASH_BANG, @@ -253,6 +243,7 @@ static const TSSymbol ts_symbol_map[] = { [anon_sym_CARET] = anon_sym_CARET, [anon_sym_BSLASH_SLASH] = anon_sym_BSLASH_SLASH, [anon_sym_SLASH_BSLASH] = anon_sym_SLASH_BSLASH, + [anon_sym_POUND] = anon_sym_POUND, [anon_sym_COLON] = anon_sym_COLON, [anon_sym_associations] = anon_sym_associations, [anon_sym_LT_DASH_DASH] = anon_sym_LT_DASH_DASH, @@ -364,29 +355,13 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, - [anon_sym_PIPE] = { - .visible = true, - .named = false, - }, - [anon_sym_AMP] = { - .visible = true, - .named = false, - }, - [anon_sym_POUND] = { - .visible = true, - .named = false, - }, - [anon_sym_E] = { - .visible = true, - .named = false, - }, - [anon_sym_BANGE] = { + [anon_sym_AT] = { .visible = true, .named = false, }, - [anon_sym_AT] = { + [sym_step_type] = { .visible = true, - .named = false, + .named = true, }, [anon_sym_COMMA] = { .visible = true, @@ -460,6 +435,10 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, + [anon_sym_POUND] = { + .visible = true, + .named = false, + }, [anon_sym_COLON] = { .visible = true, .named = false, @@ -2140,7 +2119,7 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [52] = 52, [53] = 53, [54] = 54, - [55] = 55, + [55] = 52, [56] = 56, [57] = 57, [58] = 58, @@ -2158,7 +2137,7 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [70] = 70, [71] = 71, [72] = 72, - [73] = 73, + [73] = 64, [74] = 74, [75] = 75, [76] = 76, @@ -2217,11 +2196,11 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [129] = 129, [130] = 130, [131] = 131, - [132] = 132, + [132] = 95, [133] = 133, [134] = 134, [135] = 135, - [136] = 136, + [136] = 48, [137] = 137, [138] = 138, [139] = 139, @@ -2297,7 +2276,7 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [209] = 209, [210] = 210, [211] = 211, - [212] = 46, + [212] = 212, [213] = 213, [214] = 214, [215] = 215, @@ -2321,7 +2300,7 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [233] = 233, [234] = 234, [235] = 235, - [236] = 236, + [236] = 65, [237] = 237, [238] = 238, [239] = 239, @@ -2337,7 +2316,7 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [249] = 249, [250] = 250, [251] = 251, - [252] = 53, + [252] = 252, [253] = 253, [254] = 254, [255] = 255, @@ -2404,10 +2383,13 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [316] = 316, [317] = 317, [318] = 318, - [319] = 294, - [320] = 289, - [321] = 308, - [322] = 322, + [319] = 319, + [320] = 320, + [321] = 321, + [322] = 291, + [323] = 323, + [324] = 299, + [325] = 320, }; static bool ts_lex(TSLexer *lexer, TSStateId state) { @@ -2415,57 +2397,61 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { eof = lexer->eof(lexer); switch (state) { case 0: - if (eof) ADVANCE(25); + if (eof) ADVANCE(28); ADVANCE_MAP( - '!', 38, - '"', 2, - '#', 34, - '&', 33, - '(', 42, - ')', 43, - '*', 55, - '+', 51, - ',', 37, - '-', 53, - '.', 41, - '/', 57, - ':', 61, - '<', 11, - '=', 31, - '@', 36, - '[', 48, - '\\', 18, - ']', 49, - '^', 58, - '{', 29, - '|', 32, - '}', 30, - 'A', 71, - 'C', 71, - 'I', 71, + '!', 41, + '"', 4, + '#', 64, + '(', 45, + ')', 46, + '*', 58, + '+', 54, + ',', 40, + '-', 56, + '.', 44, + '/', 60, + ':', 65, + '<', 13, + '=', 36, + '@', 37, + 'E', 39, + '[', 51, + '\\', 19, + ']', 52, + '^', 61, + 'l', 75, + '{', 32, + '}', 33, + '&', 38, + '|', 38, + 'A', 77, + 'C', 77, + 'I', 77, ); if (lookahead == '\t' || lookahead == '\n' || lookahead == '\r' || lookahead == ' ') SKIP(0); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(68); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(72); if (('B' <= lookahead && lookahead <= '_') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(71); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(77); END_STATE(); case 1: ADVANCE_MAP( - '!', 38, - '#', 34, - '&', 33, - '+', 19, - '-', 20, - '/', 7, - '<', 13, - '@', 36, - '[', 48, - '{', 29, - '|', 32, - '}', 30, + '!', 41, + '+', 20, + '-', 21, + '/', 9, + '<', 15, + '@', 37, + 'E', 39, + '[', 51, + 'l', 75, + '{', 32, + '}', 33, + '#', 38, + '&', 38, + '|', 38, ); if (lookahead == '\t' || lookahead == '\n' || @@ -2474,331 +2460,394 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(71); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(77); END_STATE(); case 2: - if (lookahead == '"') ADVANCE(65); - if (lookahead == '\\') ADVANCE(3); - if (lookahead != 0) ADVANCE(2); + ADVANCE_MAP( + '!', 41, + '+', 20, + '-', 21, + '/', 9, + '<', 15, + '[', 51, + 'l', 24, + '}', 33, + '#', 38, + '&', 38, + 'E', 38, + '|', 38, + ); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(2); END_STATE(); case 3: - if (lookahead == '"') ADVANCE(66); - if (lookahead == '\\') ADVANCE(3); - if (lookahead != 0) ADVANCE(2); - END_STATE(); - case 4: ADVANCE_MAP( - '(', 42, - ')', 43, - '*', 55, - '+', 50, - '-', 52, - '.', 16, - '/', 56, - ':', 23, - '<', 14, - '[', 48, - ']', 49, - '^', 58, + '!', 23, + '(', 45, + ')', 46, + '*', 58, + '+', 20, + ',', 40, + '-', 57, + '.', 43, + '/', 8, + '[', 51, + '\\', 19, + 'l', 24, + '}', 33, + 'A', 78, + 'C', 78, + 'I', 78, + '#', 38, + '&', 38, + 'E', 38, + '|', 38, ); if (lookahead == '\t' || lookahead == '\n' || lookahead == '\r' || - lookahead == ' ') SKIP(4); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(67); - if (('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(71); + lookahead == ' ') SKIP(3); + END_STATE(); + case 4: + if (lookahead == '"') ADVANCE(69); + if (lookahead == '\\') ADVANCE(5); + if (lookahead != 0) ADVANCE(4); END_STATE(); case 5: - if (lookahead == '*') ADVANCE(9); - if (lookahead == '/') ADVANCE(28); + if (lookahead == '"') ADVANCE(70); + if (lookahead == '\\') ADVANCE(5); + if (lookahead != 0) ADVANCE(4); END_STATE(); case 6: - if (lookahead == '*') ADVANCE(9); - if (lookahead == '/') ADVANCE(28); - if (lookahead == '\\') ADVANCE(60); + ADVANCE_MAP( + '(', 45, + ')', 46, + '-', 12, + '.', 17, + '/', 7, + ':', 26, + '<', 16, + '[', 51, + ); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(6); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(71); + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(77); END_STATE(); case 7: - if (lookahead == '*') ADVANCE(9); - if (lookahead == '/') ADVANCE(27); + if (lookahead == '*') ADVANCE(11); + if (lookahead == '/') ADVANCE(31); END_STATE(); case 8: - if (lookahead == '*') ADVANCE(8); - if (lookahead == '/') ADVANCE(26); - if (lookahead != 0) ADVANCE(9); + if (lookahead == '*') ADVANCE(11); + if (lookahead == '/') ADVANCE(31); + if (lookahead == '\\') ADVANCE(63); END_STATE(); case 9: - if (lookahead == '*') ADVANCE(8); - if (lookahead != 0) ADVANCE(9); + if (lookahead == '*') ADVANCE(11); + if (lookahead == '/') ADVANCE(30); END_STATE(); case 10: - if (lookahead == '-') ADVANCE(21); + if (lookahead == '*') ADVANCE(10); + if (lookahead == '/') ADVANCE(29); + if (lookahead != 0) ADVANCE(11); END_STATE(); case 11: - if (lookahead == '-') ADVANCE(45); + if (lookahead == '*') ADVANCE(10); + if (lookahead != 0) ADVANCE(11); END_STATE(); case 12: - if (lookahead == '-') ADVANCE(62); + if (lookahead == '-') ADVANCE(22); END_STATE(); case 13: - if (lookahead == '-') ADVANCE(44); + if (lookahead == '-') ADVANCE(48); END_STATE(); case 14: - if (lookahead == '-') ADVANCE(12); + if (lookahead == '-') ADVANCE(66); END_STATE(); case 15: - if (lookahead == '-') ADVANCE(10); - if (lookahead == '/') ADVANCE(5); - if (lookahead == 'A' || - lookahead == 'C' || - lookahead == 'I') ADVANCE(72); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(15); + if (lookahead == '-') ADVANCE(47); END_STATE(); case 16: - if (lookahead == '.') ADVANCE(64); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(70); + if (lookahead == '-') ADVANCE(14); END_STATE(); case 17: - if (lookahead == '.') ADVANCE(70); + if (lookahead == '.') ADVANCE(68); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(74); END_STATE(); case 18: - if (lookahead == '/') ADVANCE(59); + if (lookahead == '.') ADVANCE(74); END_STATE(); case 19: - if (lookahead == '>') ADVANCE(46); + if (lookahead == '/') ADVANCE(62); END_STATE(); case 20: - if (lookahead == '>') ADVANCE(47); + if (lookahead == '>') ADVANCE(49); END_STATE(); case 21: - if (lookahead == '>') ADVANCE(63); + if (lookahead == '>') ADVANCE(50); END_STATE(); case 22: - if (lookahead == 'E') ADVANCE(35); + if (lookahead == '>') ADVANCE(67); END_STATE(); case 23: - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(69); + if (lookahead == 'E') ADVANCE(38); END_STATE(); case 24: - if (eof) ADVANCE(25); + if (lookahead == 'e') ADVANCE(25); + END_STATE(); + case 25: + if (lookahead == 't') ADVANCE(34); + END_STATE(); + case 26: + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(73); + END_STATE(); + case 27: + if (eof) ADVANCE(28); ADVANCE_MAP( - '!', 22, - '#', 34, - '&', 33, - '(', 42, - ')', 43, - '*', 55, - '+', 19, - ',', 37, - '-', 54, - '.', 40, - '/', 6, - '<', 14, - '[', 48, - '\\', 18, - '{', 29, - '|', 32, - '}', 30, + '#', 64, + '(', 45, + ')', 46, + '*', 58, + '+', 53, + '-', 55, + '.', 43, + '/', 59, + '<', 16, + '[', 51, + ']', 52, + '^', 61, + '{', 32, + '}', 33, ); if (lookahead == '\t' || lookahead == '\n' || lookahead == '\r' || - lookahead == ' ') SKIP(24); + lookahead == ' ') SKIP(27); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(71); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(77); END_STATE(); - case 25: + case 28: ACCEPT_TOKEN(ts_builtin_sym_end); END_STATE(); - case 26: + case 29: ACCEPT_TOKEN(sym_comment); END_STATE(); - case 27: + case 30: ACCEPT_TOKEN(sym_comment); - if (lookahead == '!') ADVANCE(39); + if (lookahead == '!') ADVANCE(42); if (lookahead != 0 && lookahead != '\n' && lookahead != '\r' && lookahead != 0x2028 && - lookahead != 0x2029) ADVANCE(28); + lookahead != 0x2029) ADVANCE(31); END_STATE(); - case 28: + case 31: ACCEPT_TOKEN(sym_comment); if (lookahead != 0 && lookahead != '\n' && lookahead != '\r' && lookahead != 0x2028 && - lookahead != 0x2029) ADVANCE(28); - END_STATE(); - case 29: - ACCEPT_TOKEN(anon_sym_LBRACE); - END_STATE(); - case 30: - ACCEPT_TOKEN(anon_sym_RBRACE); - END_STATE(); - case 31: - ACCEPT_TOKEN(anon_sym_EQ); + lookahead != 0x2029) ADVANCE(31); END_STATE(); case 32: - ACCEPT_TOKEN(anon_sym_PIPE); + ACCEPT_TOKEN(anon_sym_LBRACE); END_STATE(); case 33: - ACCEPT_TOKEN(anon_sym_AMP); + ACCEPT_TOKEN(anon_sym_RBRACE); END_STATE(); case 34: - ACCEPT_TOKEN(anon_sym_POUND); + ACCEPT_TOKEN(anon_sym_let); END_STATE(); case 35: - ACCEPT_TOKEN(anon_sym_BANGE); + ACCEPT_TOKEN(anon_sym_let); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(77); END_STATE(); case 36: - ACCEPT_TOKEN(anon_sym_AT); + ACCEPT_TOKEN(anon_sym_EQ); END_STATE(); case 37: - ACCEPT_TOKEN(anon_sym_COMMA); + ACCEPT_TOKEN(anon_sym_AT); END_STATE(); case 38: - ACCEPT_TOKEN(anon_sym_BANG); - if (lookahead == 'E') ADVANCE(35); + ACCEPT_TOKEN(sym_step_type); END_STATE(); case 39: - ACCEPT_TOKEN(anon_sym_SLASH_SLASH_BANG); + ACCEPT_TOKEN(sym_step_type); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(77); END_STATE(); case 40: - ACCEPT_TOKEN(anon_sym_DOT); + ACCEPT_TOKEN(anon_sym_COMMA); END_STATE(); case 41: - ACCEPT_TOKEN(anon_sym_DOT); - if (lookahead == '.') ADVANCE(64); + ACCEPT_TOKEN(anon_sym_BANG); + if (lookahead == 'E') ADVANCE(38); END_STATE(); case 42: - ACCEPT_TOKEN(anon_sym_LPAREN); + ACCEPT_TOKEN(anon_sym_SLASH_SLASH_BANG); END_STATE(); case 43: - ACCEPT_TOKEN(anon_sym_RPAREN); + ACCEPT_TOKEN(anon_sym_DOT); END_STATE(); case 44: - ACCEPT_TOKEN(anon_sym_LT_DASH); + ACCEPT_TOKEN(anon_sym_DOT); + if (lookahead == '.') ADVANCE(68); END_STATE(); case 45: - ACCEPT_TOKEN(anon_sym_LT_DASH); - if (lookahead == '-') ADVANCE(62); + ACCEPT_TOKEN(anon_sym_LPAREN); END_STATE(); case 46: - ACCEPT_TOKEN(anon_sym_PLUS_GT); + ACCEPT_TOKEN(anon_sym_RPAREN); END_STATE(); case 47: - ACCEPT_TOKEN(anon_sym_DASH_GT); + ACCEPT_TOKEN(anon_sym_LT_DASH); END_STATE(); case 48: - ACCEPT_TOKEN(anon_sym_LBRACK); + ACCEPT_TOKEN(anon_sym_LT_DASH); + if (lookahead == '-') ADVANCE(66); END_STATE(); case 49: - ACCEPT_TOKEN(anon_sym_RBRACK); + ACCEPT_TOKEN(anon_sym_PLUS_GT); END_STATE(); case 50: - ACCEPT_TOKEN(anon_sym_PLUS); + ACCEPT_TOKEN(anon_sym_DASH_GT); END_STATE(); case 51: - ACCEPT_TOKEN(anon_sym_PLUS); - if (lookahead == '>') ADVANCE(46); + ACCEPT_TOKEN(anon_sym_LBRACK); END_STATE(); case 52: - ACCEPT_TOKEN(anon_sym_DASH); + ACCEPT_TOKEN(anon_sym_RBRACK); END_STATE(); case 53: - ACCEPT_TOKEN(anon_sym_DASH); - if (lookahead == '-') ADVANCE(21); - if (lookahead == '>') ADVANCE(47); + ACCEPT_TOKEN(anon_sym_PLUS); END_STATE(); case 54: - ACCEPT_TOKEN(anon_sym_DASH); - if (lookahead == '>') ADVANCE(47); + ACCEPT_TOKEN(anon_sym_PLUS); + if (lookahead == '>') ADVANCE(49); END_STATE(); case 55: - ACCEPT_TOKEN(anon_sym_STAR); + ACCEPT_TOKEN(anon_sym_DASH); END_STATE(); case 56: - ACCEPT_TOKEN(anon_sym_SLASH); - if (lookahead == '*') ADVANCE(9); - if (lookahead == '/') ADVANCE(28); + ACCEPT_TOKEN(anon_sym_DASH); + if (lookahead == '-') ADVANCE(22); + if (lookahead == '>') ADVANCE(50); END_STATE(); case 57: - ACCEPT_TOKEN(anon_sym_SLASH); - if (lookahead == '*') ADVANCE(9); - if (lookahead == '/') ADVANCE(28); - if (lookahead == '\\') ADVANCE(60); + ACCEPT_TOKEN(anon_sym_DASH); + if (lookahead == '>') ADVANCE(50); END_STATE(); case 58: - ACCEPT_TOKEN(anon_sym_CARET); + ACCEPT_TOKEN(anon_sym_STAR); END_STATE(); case 59: - ACCEPT_TOKEN(anon_sym_BSLASH_SLASH); + ACCEPT_TOKEN(anon_sym_SLASH); + if (lookahead == '*') ADVANCE(11); + if (lookahead == '/') ADVANCE(31); END_STATE(); case 60: - ACCEPT_TOKEN(anon_sym_SLASH_BSLASH); + ACCEPT_TOKEN(anon_sym_SLASH); + if (lookahead == '*') ADVANCE(11); + if (lookahead == '/') ADVANCE(31); + if (lookahead == '\\') ADVANCE(63); END_STATE(); case 61: - ACCEPT_TOKEN(anon_sym_COLON); + ACCEPT_TOKEN(anon_sym_CARET); END_STATE(); case 62: - ACCEPT_TOKEN(anon_sym_LT_DASH_DASH); + ACCEPT_TOKEN(anon_sym_BSLASH_SLASH); END_STATE(); case 63: - ACCEPT_TOKEN(anon_sym_DASH_DASH_GT); + ACCEPT_TOKEN(anon_sym_SLASH_BSLASH); END_STATE(); case 64: - ACCEPT_TOKEN(anon_sym_DOT_DOT); + ACCEPT_TOKEN(anon_sym_POUND); END_STATE(); case 65: - ACCEPT_TOKEN(sym_string); + ACCEPT_TOKEN(anon_sym_COLON); END_STATE(); case 66: - ACCEPT_TOKEN(sym_string); - if (lookahead == '"') ADVANCE(65); - if (lookahead == '\\') ADVANCE(3); - if (lookahead != 0) ADVANCE(2); + ACCEPT_TOKEN(anon_sym_LT_DASH_DASH); END_STATE(); case 67: + ACCEPT_TOKEN(anon_sym_DASH_DASH_GT); + END_STATE(); + case 68: + ACCEPT_TOKEN(anon_sym_DOT_DOT); + END_STATE(); + case 69: + ACCEPT_TOKEN(sym_string); + END_STATE(); + case 70: + ACCEPT_TOKEN(sym_string); + if (lookahead == '"') ADVANCE(69); + if (lookahead == '\\') ADVANCE(5); + if (lookahead != 0) ADVANCE(4); + END_STATE(); + case 71: ACCEPT_TOKEN(sym_integer); - if (lookahead == '.') ADVANCE(70); - if (lookahead == ':') ADVANCE(17); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(67); + if (lookahead == '.') ADVANCE(74); + if (lookahead == ':') ADVANCE(18); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(71); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(71); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(77); END_STATE(); - case 68: + case 72: ACCEPT_TOKEN(sym_integer); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(68); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(72); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(71); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(77); END_STATE(); - case 69: + case 73: ACCEPT_TOKEN(sym_float); - if (lookahead == '.') ADVANCE(70); - if (lookahead == ':') ADVANCE(17); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(69); + if (lookahead == '.') ADVANCE(74); + if (lookahead == ':') ADVANCE(18); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(73); END_STATE(); - case 70: + case 74: ACCEPT_TOKEN(sym_float); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(70); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(74); END_STATE(); - case 71: + case 75: ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'e') ADVANCE(76); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(71); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(77); END_STATE(); - case 72: + case 76: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 't') ADVANCE(35); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(77); + END_STATE(); + case 77: + ACCEPT_TOKEN(sym_identifier); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(77); + END_STATE(); + case 78: ACCEPT_TOKEN(sym_cia); END_STATE(); default: @@ -2811,165 +2860,151 @@ static bool ts_lex_keywords(TSLexer *lexer, TSStateId state) { eof = lexer->eof(lexer); switch (state) { case 0: - if (lookahead == 'E') ADVANCE(1); - if (lookahead == 'a') ADVANCE(2); - if (lookahead == 'c') ADVANCE(3); - if (lookahead == 'e') ADVANCE(4); - if (lookahead == 'i') ADVANCE(5); - if (lookahead == 'l') ADVANCE(6); + if (lookahead == 'a') ADVANCE(1); + if (lookahead == 'c') ADVANCE(2); + if (lookahead == 'e') ADVANCE(3); + if (lookahead == 'i') ADVANCE(4); if (lookahead == '\t' || lookahead == '\n' || lookahead == '\r' || lookahead == ' ') SKIP(0); END_STATE(); case 1: - ACCEPT_TOKEN(anon_sym_E); + if (lookahead == 'b') ADVANCE(5); + if (lookahead == 's') ADVANCE(6); END_STATE(); case 2: - if (lookahead == 'b') ADVANCE(7); - if (lookahead == 's') ADVANCE(8); + if (lookahead == 'a') ADVANCE(7); END_STATE(); case 3: - if (lookahead == 'a') ADVANCE(9); + if (lookahead == 'x') ADVANCE(8); END_STATE(); case 4: - if (lookahead == 'x') ADVANCE(10); + if (lookahead == 'n') ADVANCE(9); END_STATE(); case 5: - if (lookahead == 'n') ADVANCE(11); + if (lookahead == 's') ADVANCE(10); END_STATE(); case 6: - if (lookahead == 'e') ADVANCE(12); + if (lookahead == 's') ADVANCE(11); END_STATE(); case 7: - if (lookahead == 's') ADVANCE(13); + if (lookahead == 't') ADVANCE(12); END_STATE(); case 8: - if (lookahead == 's') ADVANCE(14); + if (lookahead == 't') ADVANCE(13); END_STATE(); case 9: - if (lookahead == 't') ADVANCE(15); + if (lookahead == 'c') ADVANCE(14); + if (lookahead == 'f') ADVANCE(15); END_STATE(); case 10: if (lookahead == 't') ADVANCE(16); END_STATE(); case 11: - if (lookahead == 'c') ADVANCE(17); - if (lookahead == 'f') ADVANCE(18); + if (lookahead == 'e') ADVANCE(17); + if (lookahead == 'o') ADVANCE(18); END_STATE(); case 12: - if (lookahead == 't') ADVANCE(19); + if (lookahead == 'e') ADVANCE(19); END_STATE(); case 13: - if (lookahead == 't') ADVANCE(20); + if (lookahead == 'e') ADVANCE(20); END_STATE(); case 14: - if (lookahead == 'e') ADVANCE(21); - if (lookahead == 'o') ADVANCE(22); + if (lookahead == 'l') ADVANCE(21); END_STATE(); case 15: - if (lookahead == 'e') ADVANCE(23); + if (lookahead == 'o') ADVANCE(22); END_STATE(); case 16: - if (lookahead == 'e') ADVANCE(24); + if (lookahead == 'r') ADVANCE(23); END_STATE(); case 17: - if (lookahead == 'l') ADVANCE(25); + if (lookahead == 't') ADVANCE(24); END_STATE(); case 18: - if (lookahead == 'o') ADVANCE(26); + if (lookahead == 'c') ADVANCE(25); END_STATE(); case 19: - ACCEPT_TOKEN(anon_sym_let); + if (lookahead == 'g') ADVANCE(26); END_STATE(); case 20: - if (lookahead == 'r') ADVANCE(27); + if (lookahead == 'n') ADVANCE(27); END_STATE(); case 21: - if (lookahead == 't') ADVANCE(28); + if (lookahead == 'u') ADVANCE(28); END_STATE(); case 22: - if (lookahead == 'c') ADVANCE(29); + ACCEPT_TOKEN(anon_sym_info); END_STATE(); case 23: - if (lookahead == 'g') ADVANCE(30); + if (lookahead == 'a') ADVANCE(29); END_STATE(); case 24: - if (lookahead == 'n') ADVANCE(31); + ACCEPT_TOKEN(anon_sym_asset); END_STATE(); case 25: - if (lookahead == 'u') ADVANCE(32); + if (lookahead == 'i') ADVANCE(30); END_STATE(); case 26: - ACCEPT_TOKEN(anon_sym_info); + if (lookahead == 'o') ADVANCE(31); END_STATE(); case 27: - if (lookahead == 'a') ADVANCE(33); + if (lookahead == 'd') ADVANCE(32); END_STATE(); case 28: - ACCEPT_TOKEN(anon_sym_asset); + if (lookahead == 'd') ADVANCE(33); END_STATE(); case 29: - if (lookahead == 'i') ADVANCE(34); + if (lookahead == 'c') ADVANCE(34); END_STATE(); case 30: - if (lookahead == 'o') ADVANCE(35); + if (lookahead == 'a') ADVANCE(35); END_STATE(); case 31: - if (lookahead == 'd') ADVANCE(36); + if (lookahead == 'r') ADVANCE(36); END_STATE(); case 32: - if (lookahead == 'd') ADVANCE(37); + if (lookahead == 's') ADVANCE(37); END_STATE(); case 33: - if (lookahead == 'c') ADVANCE(38); + if (lookahead == 'e') ADVANCE(38); END_STATE(); case 34: - if (lookahead == 'a') ADVANCE(39); + if (lookahead == 't') ADVANCE(39); END_STATE(); case 35: - if (lookahead == 'r') ADVANCE(40); + if (lookahead == 't') ADVANCE(40); END_STATE(); case 36: - if (lookahead == 's') ADVANCE(41); + if (lookahead == 'y') ADVANCE(41); END_STATE(); case 37: - if (lookahead == 'e') ADVANCE(42); + ACCEPT_TOKEN(anon_sym_extends); END_STATE(); case 38: - if (lookahead == 't') ADVANCE(43); + ACCEPT_TOKEN(anon_sym_include); END_STATE(); case 39: - if (lookahead == 't') ADVANCE(44); + ACCEPT_TOKEN(anon_sym_abstract); END_STATE(); case 40: - if (lookahead == 'y') ADVANCE(45); + if (lookahead == 'i') ADVANCE(42); END_STATE(); case 41: - ACCEPT_TOKEN(anon_sym_extends); + ACCEPT_TOKEN(anon_sym_category); END_STATE(); case 42: - ACCEPT_TOKEN(anon_sym_include); + if (lookahead == 'o') ADVANCE(43); END_STATE(); case 43: - ACCEPT_TOKEN(anon_sym_abstract); + if (lookahead == 'n') ADVANCE(44); END_STATE(); case 44: - if (lookahead == 'i') ADVANCE(46); + if (lookahead == 's') ADVANCE(45); END_STATE(); case 45: - ACCEPT_TOKEN(anon_sym_category); - END_STATE(); - case 46: - if (lookahead == 'o') ADVANCE(47); - END_STATE(); - case 47: - if (lookahead == 'n') ADVANCE(48); - END_STATE(); - case 48: - if (lookahead == 's') ADVANCE(49); - END_STATE(); - case 49: ACCEPT_TOKEN(anon_sym_associations); END_STATE(); default: @@ -2979,7 +3014,7 @@ static bool ts_lex_keywords(TSLexer *lexer, TSStateId state) { static const TSLexerMode ts_lex_modes[STATE_COUNT] = { [0] = {.lex_state = 0}, - [1] = {.lex_state = 24}, + [1] = {.lex_state = 27}, [2] = {.lex_state = 1}, [3] = {.lex_state = 1}, [4] = {.lex_state = 1}, @@ -2996,311 +3031,314 @@ static const TSLexerMode ts_lex_modes[STATE_COUNT] = { [15] = {.lex_state = 1}, [16] = {.lex_state = 1}, [17] = {.lex_state = 1}, - [18] = {.lex_state = 24}, - [19] = {.lex_state = 24}, - [20] = {.lex_state = 24}, - [21] = {.lex_state = 1}, - [22] = {.lex_state = 24}, - [23] = {.lex_state = 24}, - [24] = {.lex_state = 24}, - [25] = {.lex_state = 24}, - [26] = {.lex_state = 1}, - [27] = {.lex_state = 1}, - [28] = {.lex_state = 1}, - [29] = {.lex_state = 1}, - [30] = {.lex_state = 1}, - [31] = {.lex_state = 1}, - [32] = {.lex_state = 1}, - [33] = {.lex_state = 1}, - [34] = {.lex_state = 1}, - [35] = {.lex_state = 24}, - [36] = {.lex_state = 1}, - [37] = {.lex_state = 1}, - [38] = {.lex_state = 1}, - [39] = {.lex_state = 1}, - [40] = {.lex_state = 1}, + [18] = {.lex_state = 3}, + [19] = {.lex_state = 1}, + [20] = {.lex_state = 3}, + [21] = {.lex_state = 3}, + [22] = {.lex_state = 3}, + [23] = {.lex_state = 3}, + [24] = {.lex_state = 3}, + [25] = {.lex_state = 3}, + [26] = {.lex_state = 2}, + [27] = {.lex_state = 2}, + [28] = {.lex_state = 2}, + [29] = {.lex_state = 2}, + [30] = {.lex_state = 2}, + [31] = {.lex_state = 2}, + [32] = {.lex_state = 2}, + [33] = {.lex_state = 2}, + [34] = {.lex_state = 2}, + [35] = {.lex_state = 2}, + [36] = {.lex_state = 2}, + [37] = {.lex_state = 2}, + [38] = {.lex_state = 3}, + [39] = {.lex_state = 2}, + [40] = {.lex_state = 2}, [41] = {.lex_state = 1}, - [42] = {.lex_state = 1}, - [43] = {.lex_state = 1}, + [42] = {.lex_state = 2}, + [43] = {.lex_state = 2}, [44] = {.lex_state = 1}, - [45] = {.lex_state = 1}, - [46] = {.lex_state = 1}, + [45] = {.lex_state = 27}, + [46] = {.lex_state = 27}, [47] = {.lex_state = 1}, [48] = {.lex_state = 1}, [49] = {.lex_state = 1}, - [50] = {.lex_state = 1}, - [51] = {.lex_state = 1}, - [52] = {.lex_state = 1}, + [50] = {.lex_state = 6}, + [51] = {.lex_state = 2}, + [52] = {.lex_state = 6}, [53] = {.lex_state = 1}, - [54] = {.lex_state = 1}, - [55] = {.lex_state = 1}, - [56] = {.lex_state = 1}, - [57] = {.lex_state = 1}, - [58] = {.lex_state = 24}, - [59] = {.lex_state = 24}, - [60] = {.lex_state = 24}, - [61] = {.lex_state = 24}, - [62] = {.lex_state = 24}, - [63] = {.lex_state = 24}, - [64] = {.lex_state = 24}, - [65] = {.lex_state = 24}, - [66] = {.lex_state = 24}, - [67] = {.lex_state = 24}, - [68] = {.lex_state = 24}, - [69] = {.lex_state = 24}, - [70] = {.lex_state = 24}, - [71] = {.lex_state = 24}, - [72] = {.lex_state = 24}, - [73] = {.lex_state = 4}, - [74] = {.lex_state = 24}, - [75] = {.lex_state = 24}, - [76] = {.lex_state = 24}, - [77] = {.lex_state = 4}, - [78] = {.lex_state = 24}, - [79] = {.lex_state = 24}, - [80] = {.lex_state = 24}, - [81] = {.lex_state = 24}, - [82] = {.lex_state = 24}, - [83] = {.lex_state = 4}, - [84] = {.lex_state = 4}, - [85] = {.lex_state = 24}, - [86] = {.lex_state = 4}, - [87] = {.lex_state = 24}, - [88] = {.lex_state = 24}, - [89] = {.lex_state = 24}, - [90] = {.lex_state = 24}, - [91] = {.lex_state = 24}, - [92] = {.lex_state = 24}, - [93] = {.lex_state = 24}, - [94] = {.lex_state = 24}, - [95] = {.lex_state = 24}, - [96] = {.lex_state = 24}, - [97] = {.lex_state = 24}, - [98] = {.lex_state = 24}, - [99] = {.lex_state = 24}, - [100] = {.lex_state = 24}, - [101] = {.lex_state = 24}, - [102] = {.lex_state = 24}, - [103] = {.lex_state = 24}, - [104] = {.lex_state = 24}, - [105] = {.lex_state = 24}, - [106] = {.lex_state = 24}, - [107] = {.lex_state = 24}, - [108] = {.lex_state = 24}, - [109] = {.lex_state = 24}, - [110] = {.lex_state = 24}, - [111] = {.lex_state = 24}, - [112] = {.lex_state = 24}, - [113] = {.lex_state = 24}, - [114] = {.lex_state = 24}, - [115] = {.lex_state = 24}, - [116] = {.lex_state = 24}, - [117] = {.lex_state = 24}, - [118] = {.lex_state = 24}, - [119] = {.lex_state = 24}, - [120] = {.lex_state = 4}, - [121] = {.lex_state = 24}, - [122] = {.lex_state = 24}, - [123] = {.lex_state = 24}, - [124] = {.lex_state = 24}, - [125] = {.lex_state = 24}, - [126] = {.lex_state = 24}, - [127] = {.lex_state = 24}, - [128] = {.lex_state = 24}, - [129] = {.lex_state = 24}, - [130] = {.lex_state = 24}, - [131] = {.lex_state = 24}, - [132] = {.lex_state = 24}, - [133] = {.lex_state = 24}, - [134] = {.lex_state = 24}, - [135] = {.lex_state = 24}, - [136] = {.lex_state = 24}, - [137] = {.lex_state = 4}, - [138] = {.lex_state = 4}, - [139] = {.lex_state = 4}, - [140] = {.lex_state = 4}, - [141] = {.lex_state = 4}, - [142] = {.lex_state = 24}, - [143] = {.lex_state = 24}, - [144] = {.lex_state = 24}, - [145] = {.lex_state = 24}, - [146] = {.lex_state = 24}, - [147] = {.lex_state = 24}, - [148] = {.lex_state = 24}, - [149] = {.lex_state = 24}, - [150] = {.lex_state = 24}, - [151] = {.lex_state = 24}, - [152] = {.lex_state = 24}, - [153] = {.lex_state = 24}, - [154] = {.lex_state = 24}, - [155] = {.lex_state = 24}, - [156] = {.lex_state = 24}, - [157] = {.lex_state = 4}, - [158] = {.lex_state = 24}, - [159] = {.lex_state = 24}, - [160] = {.lex_state = 24}, - [161] = {.lex_state = 24}, - [162] = {.lex_state = 24}, - [163] = {.lex_state = 24}, - [164] = {.lex_state = 24}, - [165] = {.lex_state = 24}, - [166] = {.lex_state = 24}, - [167] = {.lex_state = 24}, - [168] = {.lex_state = 24}, - [169] = {.lex_state = 24}, - [170] = {.lex_state = 24}, - [171] = {.lex_state = 4}, - [172] = {.lex_state = 24}, - [173] = {.lex_state = 24}, - [174] = {.lex_state = 24}, - [175] = {.lex_state = 24}, - [176] = {.lex_state = 24}, - [177] = {.lex_state = 24}, - [178] = {.lex_state = 24}, - [179] = {.lex_state = 24}, - [180] = {.lex_state = 24}, - [181] = {.lex_state = 24}, - [182] = {.lex_state = 24}, - [183] = {.lex_state = 24}, - [184] = {.lex_state = 24}, - [185] = {.lex_state = 24}, - [186] = {.lex_state = 24}, - [187] = {.lex_state = 24}, - [188] = {.lex_state = 24}, - [189] = {.lex_state = 24}, - [190] = {.lex_state = 24}, - [191] = {.lex_state = 24}, - [192] = {.lex_state = 24}, - [193] = {.lex_state = 24}, + [54] = {.lex_state = 2}, + [55] = {.lex_state = 6}, + [56] = {.lex_state = 6}, + [57] = {.lex_state = 6}, + [58] = {.lex_state = 2}, + [59] = {.lex_state = 6}, + [60] = {.lex_state = 27}, + [61] = {.lex_state = 27}, + [62] = {.lex_state = 27}, + [63] = {.lex_state = 27}, + [64] = {.lex_state = 1}, + [65] = {.lex_state = 1}, + [66] = {.lex_state = 27}, + [67] = {.lex_state = 2}, + [68] = {.lex_state = 2}, + [69] = {.lex_state = 27}, + [70] = {.lex_state = 2}, + [71] = {.lex_state = 27}, + [72] = {.lex_state = 2}, + [73] = {.lex_state = 2}, + [74] = {.lex_state = 27}, + [75] = {.lex_state = 27}, + [76] = {.lex_state = 3}, + [77] = {.lex_state = 3}, + [78] = {.lex_state = 3}, + [79] = {.lex_state = 27}, + [80] = {.lex_state = 3}, + [81] = {.lex_state = 3}, + [82] = {.lex_state = 27}, + [83] = {.lex_state = 27}, + [84] = {.lex_state = 27}, + [85] = {.lex_state = 27}, + [86] = {.lex_state = 3}, + [87] = {.lex_state = 27}, + [88] = {.lex_state = 3}, + [89] = {.lex_state = 3}, + [90] = {.lex_state = 3}, + [91] = {.lex_state = 3}, + [92] = {.lex_state = 3}, + [93] = {.lex_state = 3}, + [94] = {.lex_state = 3}, + [95] = {.lex_state = 27}, + [96] = {.lex_state = 3}, + [97] = {.lex_state = 3}, + [98] = {.lex_state = 3}, + [99] = {.lex_state = 3}, + [100] = {.lex_state = 0}, + [101] = {.lex_state = 0}, + [102] = {.lex_state = 27}, + [103] = {.lex_state = 3}, + [104] = {.lex_state = 3}, + [105] = {.lex_state = 3}, + [106] = {.lex_state = 3}, + [107] = {.lex_state = 3}, + [108] = {.lex_state = 3}, + [109] = {.lex_state = 3}, + [110] = {.lex_state = 3}, + [111] = {.lex_state = 3}, + [112] = {.lex_state = 3}, + [113] = {.lex_state = 3}, + [114] = {.lex_state = 3}, + [115] = {.lex_state = 3}, + [116] = {.lex_state = 3}, + [117] = {.lex_state = 3}, + [118] = {.lex_state = 3}, + [119] = {.lex_state = 3}, + [120] = {.lex_state = 3}, + [121] = {.lex_state = 3}, + [122] = {.lex_state = 3}, + [123] = {.lex_state = 3}, + [124] = {.lex_state = 3}, + [125] = {.lex_state = 3}, + [126] = {.lex_state = 3}, + [127] = {.lex_state = 3}, + [128] = {.lex_state = 3}, + [129] = {.lex_state = 3}, + [130] = {.lex_state = 3}, + [131] = {.lex_state = 3}, + [132] = {.lex_state = 27}, + [133] = {.lex_state = 3}, + [134] = {.lex_state = 27}, + [135] = {.lex_state = 27}, + [136] = {.lex_state = 27}, + [137] = {.lex_state = 27}, + [138] = {.lex_state = 27}, + [139] = {.lex_state = 27}, + [140] = {.lex_state = 27}, + [141] = {.lex_state = 27}, + [142] = {.lex_state = 27}, + [143] = {.lex_state = 27}, + [144] = {.lex_state = 27}, + [145] = {.lex_state = 27}, + [146] = {.lex_state = 27}, + [147] = {.lex_state = 27}, + [148] = {.lex_state = 27}, + [149] = {.lex_state = 27}, + [150] = {.lex_state = 3}, + [151] = {.lex_state = 27}, + [152] = {.lex_state = 3}, + [153] = {.lex_state = 27}, + [154] = {.lex_state = 27}, + [155] = {.lex_state = 0}, + [156] = {.lex_state = 6}, + [157] = {.lex_state = 27}, + [158] = {.lex_state = 27}, + [159] = {.lex_state = 27}, + [160] = {.lex_state = 27}, + [161] = {.lex_state = 27}, + [162] = {.lex_state = 27}, + [163] = {.lex_state = 27}, + [164] = {.lex_state = 27}, + [165] = {.lex_state = 27}, + [166] = {.lex_state = 27}, + [167] = {.lex_state = 27}, + [168] = {.lex_state = 27}, + [169] = {.lex_state = 3}, + [170] = {.lex_state = 3}, + [171] = {.lex_state = 3}, + [172] = {.lex_state = 3}, + [173] = {.lex_state = 3}, + [174] = {.lex_state = 3}, + [175] = {.lex_state = 27}, + [176] = {.lex_state = 3}, + [177] = {.lex_state = 3}, + [178] = {.lex_state = 3}, + [179] = {.lex_state = 3}, + [180] = {.lex_state = 3}, + [181] = {.lex_state = 27}, + [182] = {.lex_state = 27}, + [183] = {.lex_state = 27}, + [184] = {.lex_state = 6}, + [185] = {.lex_state = 0}, + [186] = {.lex_state = 3}, + [187] = {.lex_state = 6}, + [188] = {.lex_state = 27}, + [189] = {.lex_state = 0}, + [190] = {.lex_state = 27}, + [191] = {.lex_state = 3}, + [192] = {.lex_state = 27}, + [193] = {.lex_state = 27}, [194] = {.lex_state = 0}, - [195] = {.lex_state = 0}, - [196] = {.lex_state = 4}, - [197] = {.lex_state = 4}, - [198] = {.lex_state = 24}, - [199] = {.lex_state = 24}, - [200] = {.lex_state = 24}, - [201] = {.lex_state = 24}, - [202] = {.lex_state = 24}, - [203] = {.lex_state = 24}, - [204] = {.lex_state = 24}, - [205] = {.lex_state = 24}, - [206] = {.lex_state = 24}, - [207] = {.lex_state = 24}, - [208] = {.lex_state = 24}, - [209] = {.lex_state = 24}, - [210] = {.lex_state = 24}, - [211] = {.lex_state = 24}, - [212] = {.lex_state = 24}, - [213] = {.lex_state = 24}, - [214] = {.lex_state = 24}, - [215] = {.lex_state = 24}, - [216] = {.lex_state = 0}, - [217] = {.lex_state = 24}, - [218] = {.lex_state = 24}, - [219] = {.lex_state = 24}, - [220] = {.lex_state = 24}, - [221] = {.lex_state = 24}, - [222] = {.lex_state = 4}, - [223] = {.lex_state = 24}, - [224] = {.lex_state = 24}, - [225] = {.lex_state = 24}, - [226] = {.lex_state = 24}, - [227] = {.lex_state = 24}, - [228] = {.lex_state = 24}, - [229] = {.lex_state = 24}, - [230] = {.lex_state = 24}, - [231] = {.lex_state = 24}, - [232] = {.lex_state = 0}, + [195] = {.lex_state = 27}, + [196] = {.lex_state = 27}, + [197] = {.lex_state = 3}, + [198] = {.lex_state = 3}, + [199] = {.lex_state = 3}, + [200] = {.lex_state = 3}, + [201] = {.lex_state = 27}, + [202] = {.lex_state = 3}, + [203] = {.lex_state = 27}, + [204] = {.lex_state = 3}, + [205] = {.lex_state = 3}, + [206] = {.lex_state = 3}, + [207] = {.lex_state = 3}, + [208] = {.lex_state = 3}, + [209] = {.lex_state = 3}, + [210] = {.lex_state = 27}, + [211] = {.lex_state = 27}, + [212] = {.lex_state = 27}, + [213] = {.lex_state = 3}, + [214] = {.lex_state = 27}, + [215] = {.lex_state = 0}, + [216] = {.lex_state = 6}, + [217] = {.lex_state = 0}, + [218] = {.lex_state = 3}, + [219] = {.lex_state = 3}, + [220] = {.lex_state = 0}, + [221] = {.lex_state = 3}, + [222] = {.lex_state = 3}, + [223] = {.lex_state = 3}, + [224] = {.lex_state = 3}, + [225] = {.lex_state = 3}, + [226] = {.lex_state = 3}, + [227] = {.lex_state = 0}, + [228] = {.lex_state = 3}, + [229] = {.lex_state = 3}, + [230] = {.lex_state = 27}, + [231] = {.lex_state = 3}, + [232] = {.lex_state = 3}, [233] = {.lex_state = 0}, - [234] = {.lex_state = 24}, - [235] = {.lex_state = 24}, - [236] = {.lex_state = 24}, - [237] = {.lex_state = 24}, - [238] = {.lex_state = 24}, - [239] = {.lex_state = 24}, - [240] = {.lex_state = 0}, - [241] = {.lex_state = 4}, - [242] = {.lex_state = 0}, - [243] = {.lex_state = 24}, - [244] = {.lex_state = 24}, - [245] = {.lex_state = 24}, - [246] = {.lex_state = 4}, - [247] = {.lex_state = 0}, - [248] = {.lex_state = 4}, - [249] = {.lex_state = 24}, - [250] = {.lex_state = 0}, - [251] = {.lex_state = 0}, - [252] = {.lex_state = 24}, - [253] = {.lex_state = 24}, - [254] = {.lex_state = 24}, - [255] = {.lex_state = 24}, - [256] = {.lex_state = 24}, - [257] = {.lex_state = 24}, - [258] = {.lex_state = 0}, - [259] = {.lex_state = 0}, - [260] = {.lex_state = 24}, - [261] = {.lex_state = 24}, - [262] = {.lex_state = 24}, - [263] = {.lex_state = 24}, - [264] = {.lex_state = 0}, - [265] = {.lex_state = 24}, + [234] = {.lex_state = 3}, + [235] = {.lex_state = 3}, + [236] = {.lex_state = 27}, + [237] = {.lex_state = 3}, + [238] = {.lex_state = 3}, + [239] = {.lex_state = 3}, + [240] = {.lex_state = 3}, + [241] = {.lex_state = 3}, + [242] = {.lex_state = 3}, + [243] = {.lex_state = 3}, + [244] = {.lex_state = 3}, + [245] = {.lex_state = 3}, + [246] = {.lex_state = 3}, + [247] = {.lex_state = 3}, + [248] = {.lex_state = 3}, + [249] = {.lex_state = 3}, + [250] = {.lex_state = 3}, + [251] = {.lex_state = 3}, + [252] = {.lex_state = 3}, + [253] = {.lex_state = 3}, + [254] = {.lex_state = 3}, + [255] = {.lex_state = 3}, + [256] = {.lex_state = 0}, + [257] = {.lex_state = 3}, + [258] = {.lex_state = 3}, + [259] = {.lex_state = 3}, + [260] = {.lex_state = 27}, + [261] = {.lex_state = 3}, + [262] = {.lex_state = 3}, + [263] = {.lex_state = 27}, + [264] = {.lex_state = 3}, + [265] = {.lex_state = 3}, [266] = {.lex_state = 0}, - [267] = {.lex_state = 0}, - [268] = {.lex_state = 0}, - [269] = {.lex_state = 24}, - [270] = {.lex_state = 24}, + [267] = {.lex_state = 27}, + [268] = {.lex_state = 3}, + [269] = {.lex_state = 27}, + [270] = {.lex_state = 0}, [271] = {.lex_state = 0}, - [272] = {.lex_state = 24}, - [273] = {.lex_state = 15}, - [274] = {.lex_state = 15}, + [272] = {.lex_state = 27}, + [273] = {.lex_state = 27}, + [274] = {.lex_state = 27}, [275] = {.lex_state = 0}, - [276] = {.lex_state = 24}, + [276] = {.lex_state = 3}, [277] = {.lex_state = 0}, [278] = {.lex_state = 0}, - [279] = {.lex_state = 0}, - [280] = {.lex_state = 24}, - [281] = {.lex_state = 24}, - [282] = {.lex_state = 0}, + [279] = {.lex_state = 27}, + [280] = {.lex_state = 27}, + [281] = {.lex_state = 0}, + [282] = {.lex_state = 27}, [283] = {.lex_state = 0}, - [284] = {.lex_state = 0}, - [285] = {.lex_state = 24}, - [286] = {.lex_state = 0}, - [287] = {.lex_state = 15}, - [288] = {.lex_state = 24}, + [284] = {.lex_state = 27}, + [285] = {.lex_state = 27}, + [286] = {.lex_state = 27}, + [287] = {.lex_state = 6}, + [288] = {.lex_state = 0}, [289] = {.lex_state = 0}, [290] = {.lex_state = 0}, - [291] = {.lex_state = 24}, - [292] = {.lex_state = 24}, - [293] = {.lex_state = 0}, - [294] = {.lex_state = 0}, - [295] = {.lex_state = 24}, + [291] = {.lex_state = 0}, + [292] = {.lex_state = 27}, + [293] = {.lex_state = 27}, + [294] = {.lex_state = 27}, + [295] = {.lex_state = 0}, [296] = {.lex_state = 0}, - [297] = {.lex_state = 0}, - [298] = {.lex_state = 24}, - [299] = {.lex_state = 24}, - [300] = {.lex_state = 15}, - [301] = {.lex_state = 0}, - [302] = {.lex_state = 24}, + [297] = {.lex_state = 27}, + [298] = {.lex_state = 0}, + [299] = {.lex_state = 27}, + [300] = {.lex_state = 27}, + [301] = {.lex_state = 27}, + [302] = {.lex_state = 27}, [303] = {.lex_state = 0}, - [304] = {.lex_state = 24}, - [305] = {.lex_state = 24}, + [304] = {.lex_state = 0}, + [305] = {.lex_state = 0}, [306] = {.lex_state = 0}, [307] = {.lex_state = 0}, - [308] = {.lex_state = 24}, - [309] = {.lex_state = 24}, + [308] = {.lex_state = 27}, + [309] = {.lex_state = 0}, [310] = {.lex_state = 0}, - [311] = {.lex_state = 24}, - [312] = {.lex_state = 24}, + [311] = {.lex_state = 0}, + [312] = {.lex_state = 3}, [313] = {.lex_state = 0}, - [314] = {.lex_state = 0}, - [315] = {.lex_state = 24}, - [316] = {.lex_state = 0}, + [314] = {.lex_state = 27}, + [315] = {.lex_state = 27}, + [316] = {.lex_state = 27}, [317] = {.lex_state = 0}, - [318] = {.lex_state = 24}, - [319] = {.lex_state = 0}, + [318] = {.lex_state = 0}, + [319] = {.lex_state = 27}, [320] = {.lex_state = 0}, - [321] = {.lex_state = 24}, + [321] = {.lex_state = 0}, [322] = {.lex_state = 0}, + [323] = {.lex_state = 0}, + [324] = {.lex_state = 27}, + [325] = {.lex_state = 0}, }; static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { @@ -3317,12 +3355,8 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_extends] = ACTIONS(1), [anon_sym_let] = ACTIONS(1), [anon_sym_EQ] = ACTIONS(1), - [anon_sym_PIPE] = ACTIONS(1), - [anon_sym_AMP] = ACTIONS(1), - [anon_sym_POUND] = ACTIONS(1), - [anon_sym_E] = ACTIONS(1), - [anon_sym_BANGE] = ACTIONS(1), [anon_sym_AT] = ACTIONS(1), + [sym_step_type] = ACTIONS(1), [anon_sym_COMMA] = ACTIONS(1), [anon_sym_BANG] = ACTIONS(1), [anon_sym_DOT] = ACTIONS(1), @@ -3340,6 +3374,7 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_CARET] = ACTIONS(1), [anon_sym_BSLASH_SLASH] = ACTIONS(1), [anon_sym_SLASH_BSLASH] = ACTIONS(1), + [anon_sym_POUND] = ACTIONS(1), [anon_sym_COLON] = ACTIONS(1), [anon_sym_associations] = ACTIONS(1), [anon_sym_LT_DASH_DASH] = ACTIONS(1), @@ -3351,13 +3386,13 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [sym_cia] = ACTIONS(1), }, [STATE(1)] = { - [sym_source_file] = STATE(290), - [sym_declaration] = STATE(67), - [sym_include_declaration] = STATE(206), - [sym_category_declaration] = STATE(206), - [sym_define_declaration] = STATE(206), - [sym_associations_declaration] = STATE(206), - [aux_sym_source_file_repeat1] = STATE(67), + [sym_source_file] = STATE(307), + [sym_declaration] = STATE(46), + [sym_include_declaration] = STATE(143), + [sym_category_declaration] = STATE(143), + [sym_define_declaration] = STATE(143), + [sym_associations_declaration] = STATE(143), + [aux_sym_source_file_repeat1] = STATE(46), [ts_builtin_sym_end] = ACTIONS(5), [sym_comment] = ACTIONS(3), [anon_sym_include] = ACTIONS(7), @@ -3375,6 +3410,8 @@ static const uint16_t ts_small_parse_table[] = { sym_comment, ACTIONS(19), 1, anon_sym_LBRACE, + ACTIONS(21), 1, + anon_sym_RBRACE, ACTIONS(25), 1, anon_sym_AT, ACTIONS(27), 1, @@ -3389,29 +3426,23 @@ static const uint16_t ts_small_parse_table[] = { aux_sym_attack_step_repeat1, STATE(7), 1, sym_ttc, - STATE(99), 1, + STATE(126), 1, sym_preconditions, - STATE(150), 1, + STATE(239), 1, sym_reaching, ACTIONS(23), 2, anon_sym_let, - anon_sym_E, + sym_step_type, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, STATE(6), 2, sym_meta, aux_sym_category_declaration_repeat1, - STATE(26), 2, + STATE(29), 2, sym_detector, aux_sym_attack_step_repeat2, - ACTIONS(21), 5, - anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, - [60] = 17, + [56] = 17, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3428,33 +3459,29 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(37), 1, anon_sym_LBRACE, - STATE(10), 1, + ACTIONS(39), 1, + anon_sym_RBRACE, + STATE(9), 1, sym_ttc, - STATE(21), 1, + STATE(19), 1, aux_sym_attack_step_repeat1, - STATE(95), 1, + STATE(98), 1, sym_preconditions, - STATE(123), 1, + STATE(177), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, ACTIONS(41), 2, anon_sym_let, - anon_sym_E, - STATE(9), 2, + sym_step_type, + STATE(10), 2, sym_meta, aux_sym_category_declaration_repeat1, - STATE(33), 2, + STATE(28), 2, sym_detector, aux_sym_attack_step_repeat2, - ACTIONS(39), 5, - anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, - [120] = 14, + [112] = 14, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3467,31 +3494,27 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LT_DASH, ACTIONS(35), 1, anon_sym_LBRACK, - STATE(13), 1, + ACTIONS(43), 1, + anon_sym_RBRACE, + STATE(14), 1, sym_ttc, - STATE(110), 1, + STATE(133), 1, sym_preconditions, - STATE(136), 1, + STATE(186), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, ACTIONS(45), 2, anon_sym_let, - anon_sym_E, - STATE(12), 2, + sym_step_type, + STATE(15), 2, sym_meta, aux_sym_category_declaration_repeat1, - STATE(28), 2, + STATE(31), 2, sym_detector, aux_sym_attack_step_repeat2, - ACTIONS(43), 5, - anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, - [171] = 14, + [159] = 14, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3504,31 +3527,27 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LT_DASH, ACTIONS(35), 1, anon_sym_LBRACK, - STATE(15), 1, + ACTIONS(47), 1, + anon_sym_RBRACE, + STATE(13), 1, sym_ttc, - STATE(89), 1, + STATE(120), 1, sym_preconditions, - STATE(159), 1, + STATE(219), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, ACTIONS(49), 2, anon_sym_let, - anon_sym_E, + sym_step_type, STATE(16), 2, sym_meta, aux_sym_category_declaration_repeat1, - STATE(41), 2, + STATE(39), 2, sym_detector, aux_sym_attack_step_repeat2, - ACTIONS(47), 5, - anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, - [222] = 12, + [206] = 12, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3539,29 +3558,25 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(81), 1, + ACTIONS(51), 1, + anon_sym_RBRACE, + STATE(97), 1, sym_preconditions, - STATE(122), 1, + STATE(264), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, ACTIONS(53), 2, anon_sym_let, - anon_sym_E, - STATE(27), 2, + sym_step_type, + STATE(30), 2, sym_detector, aux_sym_attack_step_repeat2, - STATE(46), 2, + STATE(48), 2, sym_meta, aux_sym_category_declaration_repeat1, - ACTIONS(51), 5, - anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, - [267] = 12, + [247] = 12, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3572,29 +3587,25 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(74), 1, + ACTIONS(55), 1, + anon_sym_RBRACE, + STATE(96), 1, sym_preconditions, - STATE(158), 1, + STATE(244), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, ACTIONS(57), 2, anon_sym_let, - anon_sym_E, + sym_step_type, STATE(8), 2, sym_meta, aux_sym_category_declaration_repeat1, - STATE(29), 2, + STATE(27), 2, sym_detector, aux_sym_attack_step_repeat2, - ACTIONS(55), 5, - anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, - [312] = 12, + [288] = 12, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3605,29 +3616,25 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(88), 1, + ACTIONS(59), 1, + anon_sym_RBRACE, + STATE(103), 1, sym_preconditions, - STATE(127), 1, + STATE(170), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, ACTIONS(61), 2, anon_sym_let, - anon_sym_E, - STATE(30), 2, + sym_step_type, + STATE(33), 2, sym_detector, aux_sym_attack_step_repeat2, - STATE(46), 2, + STATE(48), 2, sym_meta, aux_sym_category_declaration_repeat1, - ACTIONS(59), 5, - anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, - [357] = 12, + [329] = 12, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3638,29 +3645,25 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(100), 1, + ACTIONS(63), 1, + anon_sym_RBRACE, + STATE(106), 1, sym_preconditions, - STATE(133), 1, + STATE(176), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, ACTIONS(65), 2, anon_sym_let, - anon_sym_E, - STATE(32), 2, - sym_detector, - aux_sym_attack_step_repeat2, - STATE(46), 2, + sym_step_type, + STATE(11), 2, sym_meta, aux_sym_category_declaration_repeat1, - ACTIONS(63), 5, - anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, - [402] = 12, + STATE(36), 2, + sym_detector, + aux_sym_attack_step_repeat2, + [370] = 12, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3671,29 +3674,25 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(92), 1, + ACTIONS(67), 1, + anon_sym_RBRACE, + STATE(107), 1, sym_preconditions, - STATE(132), 1, + STATE(178), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, ACTIONS(69), 2, anon_sym_let, - anon_sym_E, - STATE(11), 2, - sym_meta, - aux_sym_category_declaration_repeat1, - STATE(31), 2, + sym_step_type, + STATE(26), 2, sym_detector, aux_sym_attack_step_repeat2, - ACTIONS(67), 5, - anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, - [447] = 12, + STATE(48), 2, + sym_meta, + aux_sym_category_declaration_repeat1, + [411] = 12, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3704,29 +3703,25 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(78), 1, + ACTIONS(71), 1, + anon_sym_RBRACE, + STATE(114), 1, sym_preconditions, - STATE(147), 1, + STATE(202), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, ACTIONS(73), 2, anon_sym_let, - anon_sym_E, - STATE(34), 2, + sym_step_type, + STATE(32), 2, sym_detector, aux_sym_attack_step_repeat2, - STATE(46), 2, + STATE(48), 2, sym_meta, aux_sym_category_declaration_repeat1, - ACTIONS(71), 5, - anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, - [492] = 12, + [452] = 12, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3737,29 +3732,25 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(85), 1, + ACTIONS(75), 1, + anon_sym_RBRACE, + STATE(94), 1, sym_preconditions, - STATE(155), 1, + STATE(249), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, ACTIONS(77), 2, anon_sym_let, - anon_sym_E, - STATE(37), 2, + sym_step_type, + STATE(43), 2, sym_detector, aux_sym_attack_step_repeat2, - STATE(46), 2, + STATE(48), 2, sym_meta, aux_sym_category_declaration_repeat1, - ACTIONS(75), 5, - anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, - [537] = 12, + [493] = 12, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3770,29 +3761,25 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(82), 1, + ACTIONS(79), 1, + anon_sym_RBRACE, + STATE(125), 1, sym_preconditions, - STATE(154), 1, + STATE(235), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, ACTIONS(81), 2, anon_sym_let, - anon_sym_E, - STATE(14), 2, + sym_step_type, + STATE(12), 2, sym_meta, aux_sym_category_declaration_repeat1, - STATE(36), 2, + STATE(42), 2, sym_detector, aux_sym_attack_step_repeat2, - ACTIONS(79), 5, - anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, - [582] = 12, + [534] = 12, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3803,29 +3790,25 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(94), 1, + ACTIONS(83), 1, + anon_sym_RBRACE, + STATE(117), 1, sym_preconditions, - STATE(165), 1, + STATE(209), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, ACTIONS(85), 2, anon_sym_let, - anon_sym_E, - STATE(42), 2, - sym_detector, - aux_sym_attack_step_repeat2, - STATE(46), 2, + sym_step_type, + STATE(17), 2, sym_meta, aux_sym_category_declaration_repeat1, - ACTIONS(83), 5, - anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, - [627] = 12, + STATE(34), 2, + sym_detector, + aux_sym_attack_step_repeat2, + [575] = 12, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3836,29 +3819,25 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(98), 1, + ACTIONS(87), 1, + anon_sym_RBRACE, + STATE(118), 1, sym_preconditions, - STATE(173), 1, + STATE(265), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, ACTIONS(89), 2, anon_sym_let, - anon_sym_E, - STATE(17), 2, - sym_meta, - aux_sym_category_declaration_repeat1, - STATE(39), 2, + sym_step_type, + STATE(35), 2, sym_detector, aux_sym_attack_step_repeat2, - ACTIONS(87), 5, - anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, - [672] = 12, + STATE(48), 2, + sym_meta, + aux_sym_category_declaration_repeat1, + [616] = 12, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3869,29 +3848,25 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(71), 1, + ACTIONS(91), 1, + anon_sym_RBRACE, + STATE(127), 1, sym_preconditions, - STATE(174), 1, + STATE(238), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, ACTIONS(93), 2, anon_sym_let, - anon_sym_E, - STATE(40), 2, + sym_step_type, + STATE(37), 2, sym_detector, aux_sym_attack_step_repeat2, - STATE(46), 2, + STATE(48), 2, sym_meta, aux_sym_category_declaration_repeat1, - ACTIONS(91), 5, - anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, - [717] = 12, + [657] = 12, ACTIONS(15), 1, sym_identifier, ACTIONS(17), 1, @@ -3902,43 +3877,35 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(105), 1, + ACTIONS(95), 1, + anon_sym_RBRACE, + STATE(122), 1, sym_preconditions, - STATE(182), 1, + STATE(226), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, ACTIONS(97), 2, anon_sym_let, - anon_sym_E, - STATE(43), 2, + sym_step_type, + STATE(40), 2, sym_detector, aux_sym_attack_step_repeat2, - STATE(46), 2, + STATE(48), 2, sym_meta, aux_sym_category_declaration_repeat1, - ACTIONS(95), 5, - anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, - [762] = 4, + [698] = 4, ACTIONS(3), 1, sym_comment, ACTIONS(101), 1, anon_sym_LPAREN, ACTIONS(103), 1, anon_sym_DASH, - ACTIONS(99), 16, + ACTIONS(99), 12, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, + sym_step_type, anon_sym_COMMA, anon_sym_DOT, anon_sym_RPAREN, @@ -3948,19 +3915,35 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_STAR, anon_sym_BSLASH_SLASH, anon_sym_SLASH_BSLASH, - [790] = 3, + [722] = 5, + ACTIONS(17), 1, + sym_comment, + ACTIONS(109), 1, + anon_sym_AT, + STATE(19), 1, + aux_sym_attack_step_repeat1, + ACTIONS(105), 4, + anon_sym_let, + sym_step_type, + anon_sym_BANG, + sym_identifier, + ACTIONS(107), 7, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_SLASH_SLASH_BANG, + anon_sym_LT_DASH, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + anon_sym_LBRACK, + [747] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(107), 1, + ACTIONS(114), 1, anon_sym_DASH, - ACTIONS(105), 16, + ACTIONS(112), 12, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, + sym_step_type, anon_sym_COMMA, anon_sym_DOT, anon_sym_RPAREN, @@ -3970,87 +3953,56 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_STAR, anon_sym_BSLASH_SLASH, anon_sym_SLASH_BSLASH, - [815] = 3, + [768] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(111), 1, + ACTIONS(118), 1, + anon_sym_DOT, + ACTIONS(120), 1, + anon_sym_LBRACK, + ACTIONS(122), 1, anon_sym_DASH, - ACTIONS(109), 16, + ACTIONS(124), 1, + anon_sym_STAR, + ACTIONS(116), 9, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, + sym_step_type, anon_sym_COMMA, - anon_sym_DOT, anon_sym_RPAREN, anon_sym_PLUS_GT, anon_sym_DASH_GT, - anon_sym_LBRACK, - anon_sym_STAR, anon_sym_BSLASH_SLASH, anon_sym_SLASH_BSLASH, - [840] = 5, - ACTIONS(17), 1, - sym_comment, - ACTIONS(117), 1, - anon_sym_AT, - STATE(21), 1, - aux_sym_attack_step_repeat1, - ACTIONS(113), 4, - anon_sym_let, - anon_sym_E, - anon_sym_BANG, - sym_identifier, - ACTIONS(115), 11, - anon_sym_LBRACE, - anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, - anon_sym_SLASH_SLASH_BANG, - anon_sym_LT_DASH, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - anon_sym_LBRACK, - [869] = 3, + [795] = 5, ACTIONS(3), 1, sym_comment, + ACTIONS(120), 1, + anon_sym_LBRACK, ACTIONS(122), 1, anon_sym_DASH, - ACTIONS(120), 16, + ACTIONS(124), 1, + anon_sym_STAR, + ACTIONS(116), 10, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, + sym_step_type, anon_sym_COMMA, anon_sym_DOT, anon_sym_RPAREN, anon_sym_PLUS_GT, anon_sym_DASH_GT, - anon_sym_LBRACK, - anon_sym_STAR, anon_sym_BSLASH_SLASH, anon_sym_SLASH_BSLASH, - [894] = 3, + [820] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(126), 1, + ACTIONS(128), 1, anon_sym_DASH, - ACTIONS(124), 16, + ACTIONS(126), 12, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, + sym_step_type, anon_sym_COMMA, anon_sym_DOT, anon_sym_RPAREN, @@ -4060,56 +4012,43 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_STAR, anon_sym_BSLASH_SLASH, anon_sym_SLASH_BSLASH, - [919] = 5, + [841] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(130), 1, - anon_sym_LBRACK, ACTIONS(132), 1, anon_sym_DASH, - ACTIONS(134), 1, - anon_sym_STAR, - ACTIONS(128), 14, + ACTIONS(130), 12, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, + sym_step_type, anon_sym_COMMA, anon_sym_DOT, anon_sym_RPAREN, anon_sym_PLUS_GT, anon_sym_DASH_GT, + anon_sym_LBRACK, + anon_sym_STAR, anon_sym_BSLASH_SLASH, anon_sym_SLASH_BSLASH, - [948] = 6, + [862] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(130), 1, - anon_sym_LBRACK, - ACTIONS(132), 1, - anon_sym_DASH, - ACTIONS(134), 1, - anon_sym_STAR, ACTIONS(136), 1, - anon_sym_DOT, - ACTIONS(128), 13, + anon_sym_DASH, + ACTIONS(134), 12, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, + sym_step_type, anon_sym_COMMA, + anon_sym_DOT, anon_sym_RPAREN, anon_sym_PLUS_GT, anon_sym_DASH_GT, + anon_sym_LBRACK, + anon_sym_STAR, anon_sym_BSLASH_SLASH, anon_sym_SLASH_BSLASH, - [979] = 9, + [883] = 9, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -4118,25 +4057,21 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(72), 1, + STATE(116), 1, sym_preconditions, - STATE(124), 1, + STATE(206), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - STATE(47), 2, + STATE(54), 2, sym_detector, aux_sym_attack_step_repeat2, - ACTIONS(138), 7, + ACTIONS(138), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [1015] = 9, + sym_step_type, + [915] = 9, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -4145,25 +4080,21 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(91), 1, + STATE(104), 1, sym_preconditions, - STATE(130), 1, + STATE(171), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - STATE(47), 2, + STATE(54), 2, sym_detector, aux_sym_attack_step_repeat2, - ACTIONS(140), 7, + ACTIONS(140), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [1051] = 9, + sym_step_type, + [947] = 9, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -4172,25 +4103,21 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(87), 1, + STATE(109), 1, sym_preconditions, - STATE(156), 1, + STATE(179), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - STATE(47), 2, + STATE(54), 2, sym_detector, aux_sym_attack_step_repeat2, - ACTIONS(142), 7, + ACTIONS(142), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [1087] = 9, + sym_step_type, + [979] = 9, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -4199,25 +4126,21 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(90), 1, + STATE(99), 1, sym_preconditions, - STATE(128), 1, + STATE(191), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - STATE(47), 2, + STATE(54), 2, sym_detector, aux_sym_attack_step_repeat2, - ACTIONS(144), 7, + ACTIONS(144), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [1123] = 9, + sym_step_type, + [1011] = 9, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -4226,25 +4149,21 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(76), 1, + STATE(105), 1, sym_preconditions, - STATE(143), 1, + STATE(173), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - STATE(47), 2, + STATE(54), 2, sym_detector, aux_sym_attack_step_repeat2, - ACTIONS(146), 7, + ACTIONS(146), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [1159] = 9, + sym_step_type, + [1043] = 9, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -4253,25 +4172,21 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(79), 1, + STATE(119), 1, sym_preconditions, - STATE(148), 1, + STATE(213), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - STATE(47), 2, + STATE(54), 2, sym_detector, aux_sym_attack_step_repeat2, - ACTIONS(148), 7, + ACTIONS(148), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [1195] = 9, + sym_step_type, + [1075] = 9, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -4280,25 +4195,21 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(80), 1, + STATE(121), 1, sym_preconditions, - STATE(151), 1, + STATE(222), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - STATE(47), 2, + STATE(54), 2, sym_detector, aux_sym_attack_step_repeat2, - ACTIONS(150), 7, + ACTIONS(150), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [1231] = 9, + sym_step_type, + [1107] = 9, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -4307,25 +4218,21 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(102), 1, + STATE(113), 1, sym_preconditions, - STATE(134), 1, + STATE(198), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - STATE(47), 2, + STATE(54), 2, sym_detector, aux_sym_attack_step_repeat2, - ACTIONS(152), 7, + ACTIONS(152), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [1267] = 9, + sym_step_type, + [1139] = 9, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -4334,50 +4241,21 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(93), 1, + STATE(123), 1, sym_preconditions, - STATE(161), 1, + STATE(228), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - STATE(47), 2, + STATE(54), 2, sym_detector, aux_sym_attack_step_repeat2, - ACTIONS(154), 7, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [1303] = 7, - ACTIONS(3), 1, - sym_comment, - ACTIONS(130), 1, - anon_sym_LBRACK, - ACTIONS(134), 1, - anon_sym_STAR, - ACTIONS(136), 1, - anon_sym_DOT, - ACTIONS(158), 1, - anon_sym_DASH, - ACTIONS(160), 2, - anon_sym_BSLASH_SLASH, - anon_sym_SLASH_BSLASH, - ACTIONS(156), 10, + ACTIONS(154), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - anon_sym_COMMA, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - [1335] = 9, + sym_step_type, + [1171] = 9, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -4386,25 +4264,21 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(96), 1, + STATE(124), 1, sym_preconditions, - STATE(167), 1, + STATE(231), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - STATE(47), 2, + STATE(54), 2, sym_detector, aux_sym_attack_step_repeat2, - ACTIONS(162), 7, + ACTIONS(156), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [1371] = 9, + sym_step_type, + [1203] = 9, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -4413,46 +4287,21 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(97), 1, + STATE(115), 1, sym_preconditions, - STATE(169), 1, + STATE(204), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - STATE(47), 2, + STATE(54), 2, sym_detector, aux_sym_attack_step_repeat2, - ACTIONS(164), 7, + ACTIONS(158), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [1407] = 3, - ACTIONS(17), 1, - sym_comment, - ACTIONS(113), 4, - anon_sym_let, - anon_sym_E, - anon_sym_BANG, - sym_identifier, - ACTIONS(115), 12, - anon_sym_LBRACE, - anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, - anon_sym_AT, - anon_sym_SLASH_SLASH_BANG, - anon_sym_LT_DASH, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - anon_sym_LBRACK, - [1431] = 9, + sym_step_type, + [1235] = 9, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -4461,25 +4310,42 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(107), 1, + STATE(131), 1, sym_preconditions, - STATE(183), 1, + STATE(252), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - STATE(47), 2, + STATE(54), 2, sym_detector, aux_sym_attack_step_repeat2, - ACTIONS(166), 7, + ACTIONS(160), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [1467] = 9, + sym_step_type, + [1267] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(118), 1, + anon_sym_DOT, + ACTIONS(120), 1, + anon_sym_LBRACK, + ACTIONS(124), 1, + anon_sym_STAR, + ACTIONS(164), 1, + anon_sym_DASH, + ACTIONS(166), 2, + anon_sym_BSLASH_SLASH, + anon_sym_SLASH_BSLASH, + ACTIONS(162), 6, + anon_sym_RBRACE, + anon_sym_let, + sym_step_type, + anon_sym_COMMA, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + [1295] = 9, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -4488,25 +4354,21 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(108), 1, + STATE(128), 1, sym_preconditions, - STATE(185), 1, + STATE(241), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - STATE(47), 2, + STATE(54), 2, sym_detector, aux_sym_attack_step_repeat2, - ACTIONS(168), 7, + ACTIONS(168), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [1503] = 9, + sym_step_type, + [1327] = 9, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -4515,25 +4377,38 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(103), 1, + STATE(129), 1, sym_preconditions, - STATE(175), 1, + STATE(245), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - STATE(47), 2, + STATE(54), 2, sym_detector, aux_sym_attack_step_repeat2, - ACTIONS(170), 7, + ACTIONS(170), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [1539] = 9, + sym_step_type, + [1359] = 3, + ACTIONS(17), 1, + sym_comment, + ACTIONS(105), 4, + anon_sym_let, + sym_step_type, + anon_sym_BANG, + sym_identifier, + ACTIONS(107), 8, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_AT, + anon_sym_SLASH_SLASH_BANG, + anon_sym_LT_DASH, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + anon_sym_LBRACK, + [1379] = 9, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -4542,25 +4417,21 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(104), 1, + STATE(130), 1, sym_preconditions, - STATE(178), 1, + STATE(250), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - STATE(47), 2, + STATE(54), 2, sym_detector, aux_sym_attack_step_repeat2, - ACTIONS(172), 7, + ACTIONS(172), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [1575] = 9, + sym_step_type, + [1411] = 9, ACTIONS(17), 1, sym_comment, ACTIONS(27), 1, @@ -4569,3439 +4440,2974 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH_SLASH_BANG, ACTIONS(31), 1, anon_sym_LT_DASH, - STATE(109), 1, + STATE(110), 1, sym_preconditions, - STATE(189), 1, + STATE(257), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - STATE(47), 2, + STATE(54), 2, sym_detector, aux_sym_attack_step_repeat2, - ACTIONS(174), 7, + ACTIONS(174), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [1611] = 6, + sym_step_type, + [1443] = 6, ACTIONS(17), 1, sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK, ACTIONS(176), 1, sym_identifier, - STATE(55), 1, + ACTIONS(182), 1, + anon_sym_LBRACK, + STATE(67), 1, sym_ttc, ACTIONS(180), 3, anon_sym_let, - anon_sym_E, + sym_step_type, anon_sym_BANG, - ACTIONS(178), 9, + ACTIONS(178), 5, anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, anon_sym_SLASH_SLASH_BANG, anon_sym_LT_DASH, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1640] = 6, - ACTIONS(17), 1, + [1468] = 8, + ACTIONS(3), 1, sym_comment, - ACTIONS(35), 1, - anon_sym_LBRACK, - ACTIONS(182), 1, - sym_identifier, - STATE(54), 1, - sym_ttc, - ACTIONS(186), 3, - anon_sym_let, - anon_sym_E, - anon_sym_BANG, - ACTIONS(184), 9, - anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, - anon_sym_SLASH_SLASH_BANG, + ACTIONS(184), 1, + ts_builtin_sym_end, + ACTIONS(186), 1, + anon_sym_include, + ACTIONS(189), 1, + anon_sym_category, + ACTIONS(192), 1, + anon_sym_POUND, + ACTIONS(195), 1, + anon_sym_associations, + STATE(45), 2, + sym_declaration, + aux_sym_source_file_repeat1, + STATE(143), 4, + sym_include_declaration, + sym_category_declaration, + sym_define_declaration, + sym_associations_declaration, + [1497] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_include, + ACTIONS(9), 1, + anon_sym_category, + ACTIONS(11), 1, + anon_sym_POUND, + ACTIONS(13), 1, + anon_sym_associations, + ACTIONS(198), 1, + ts_builtin_sym_end, + STATE(45), 2, + sym_declaration, + aux_sym_source_file_repeat1, + STATE(143), 4, + sym_include_declaration, + sym_category_declaration, + sym_define_declaration, + sym_associations_declaration, + [1526] = 6, + ACTIONS(17), 1, + sym_comment, + ACTIONS(182), 1, + anon_sym_LBRACK, + ACTIONS(200), 1, + sym_identifier, + STATE(70), 1, + sym_ttc, + ACTIONS(204), 3, + anon_sym_let, + sym_step_type, + anon_sym_BANG, + ACTIONS(202), 5, + anon_sym_RBRACE, + anon_sym_SLASH_SLASH_BANG, anon_sym_LT_DASH, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1669] = 5, + [1551] = 5, ACTIONS(17), 1, sym_comment, - ACTIONS(188), 1, + ACTIONS(206), 1, sym_identifier, - STATE(46), 2, + STATE(48), 2, sym_meta, aux_sym_category_declaration_repeat1, - ACTIONS(193), 3, + ACTIONS(211), 3, anon_sym_let, - anon_sym_E, + sym_step_type, anon_sym_BANG, - ACTIONS(191), 9, + ACTIONS(209), 5, anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, anon_sym_SLASH_SLASH_BANG, anon_sym_LT_DASH, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1696] = 5, + [1574] = 3, ACTIONS(17), 1, sym_comment, - ACTIONS(197), 1, + ACTIONS(213), 4, + anon_sym_let, + sym_step_type, anon_sym_BANG, - ACTIONS(200), 1, - anon_sym_SLASH_SLASH_BANG, - STATE(47), 2, - sym_detector, - aux_sym_attack_step_repeat2, - ACTIONS(195), 10, + sym_identifier, + ACTIONS(215), 6, anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, + anon_sym_SLASH_SLASH_BANG, anon_sym_LT_DASH, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1722] = 5, + anon_sym_LBRACK, + [1592] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + sym_identifier, + ACTIONS(219), 1, + anon_sym_LPAREN, + ACTIONS(221), 2, + sym_integer, + sym_float, + STATE(102), 6, + sym__ttc_expr, + sym__ttc_parenthesized, + sym__ttc_primary, + sym_ttc_distribution, + sym_ttc_binop, + sym__number, + [1614] = 5, ACTIONS(17), 1, sym_comment, - ACTIONS(35), 1, + ACTIONS(182), 1, anon_sym_LBRACK, - ACTIONS(205), 1, + ACTIONS(225), 1, anon_sym_BANG, - STATE(57), 1, + STATE(72), 1, sym_ttc, - ACTIONS(203), 11, + ACTIONS(223), 7, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, + sym_step_type, anon_sym_SLASH_SLASH_BANG, anon_sym_LT_DASH, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1748] = 3, + [1636] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + sym_identifier, + ACTIONS(219), 1, + anon_sym_LPAREN, + ACTIONS(227), 2, + sym_integer, + sym_float, + STATE(95), 6, + sym__ttc_expr, + sym__ttc_parenthesized, + sym__ttc_primary, + sym_ttc_distribution, + sym_ttc_binop, + sym__number, + [1658] = 3, ACTIONS(17), 1, sym_comment, - ACTIONS(207), 4, + ACTIONS(229), 4, anon_sym_let, - anon_sym_E, + sym_step_type, anon_sym_BANG, sym_identifier, - ACTIONS(209), 10, + ACTIONS(231), 6, anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, anon_sym_SLASH_SLASH_BANG, anon_sym_LT_DASH, anon_sym_PLUS_GT, anon_sym_DASH_GT, anon_sym_LBRACK, - [1770] = 5, + [1676] = 5, ACTIONS(17), 1, sym_comment, - ACTIONS(35), 1, + ACTIONS(235), 1, + anon_sym_BANG, + ACTIONS(238), 1, + anon_sym_SLASH_SLASH_BANG, + STATE(54), 2, + sym_detector, + aux_sym_attack_step_repeat2, + ACTIONS(233), 6, + anon_sym_RBRACE, + anon_sym_let, + sym_step_type, + anon_sym_LT_DASH, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + [1698] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + sym_identifier, + ACTIONS(219), 1, + anon_sym_LPAREN, + ACTIONS(241), 2, + sym_integer, + sym_float, + STATE(132), 6, + sym__ttc_expr, + sym__ttc_parenthesized, + sym__ttc_primary, + sym_ttc_distribution, + sym_ttc_binop, + sym__number, + [1720] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + sym_identifier, + ACTIONS(219), 1, + anon_sym_LPAREN, + ACTIONS(243), 2, + sym_integer, + sym_float, + STATE(87), 6, + sym__ttc_expr, + sym__ttc_parenthesized, + sym__ttc_primary, + sym_ttc_distribution, + sym_ttc_binop, + sym__number, + [1742] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + sym_identifier, + ACTIONS(219), 1, + anon_sym_LPAREN, + ACTIONS(245), 2, + sym_integer, + sym_float, + STATE(75), 6, + sym__ttc_expr, + sym__ttc_parenthesized, + sym__ttc_primary, + sym_ttc_distribution, + sym_ttc_binop, + sym__number, + [1764] = 5, + ACTIONS(17), 1, + sym_comment, + ACTIONS(182), 1, anon_sym_LBRACK, - ACTIONS(213), 1, + ACTIONS(249), 1, anon_sym_BANG, - STATE(56), 1, + STATE(68), 1, sym_ttc, - ACTIONS(211), 11, + ACTIONS(247), 7, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, + sym_step_type, anon_sym_SLASH_SLASH_BANG, anon_sym_LT_DASH, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1796] = 3, + [1786] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + sym_identifier, + ACTIONS(219), 1, + anon_sym_LPAREN, + ACTIONS(251), 2, + sym_integer, + sym_float, + STATE(85), 6, + sym__ttc_expr, + sym__ttc_parenthesized, + sym__ttc_primary, + sym_ttc_distribution, + sym_ttc_binop, + sym__number, + [1808] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(253), 1, + sym_identifier, + ACTIONS(255), 1, + anon_sym_LPAREN, + STATE(240), 1, + sym_asset_expr, + STATE(38), 6, + sym__inline_asset_expr, + sym__asset_expr_primary, + sym_asset_variable_substitution, + sym_asset_expr_type, + sym_asset_expr_binop, + sym_asset_expr_unop, + [1829] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(253), 1, + sym_identifier, + ACTIONS(255), 1, + anon_sym_LPAREN, + STATE(152), 1, + sym_asset_expr, + STATE(38), 6, + sym__inline_asset_expr, + sym__asset_expr_primary, + sym_asset_variable_substitution, + sym_asset_expr_type, + sym_asset_expr_binop, + sym_asset_expr_unop, + [1850] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(253), 1, + sym_identifier, + ACTIONS(255), 1, + anon_sym_LPAREN, + STATE(91), 1, + sym_asset_expr, + STATE(38), 6, + sym__inline_asset_expr, + sym__asset_expr_primary, + sym_asset_variable_substitution, + sym_asset_expr_type, + sym_asset_expr_binop, + sym_asset_expr_unop, + [1871] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(253), 1, + sym_identifier, + ACTIONS(255), 1, + anon_sym_LPAREN, + STATE(111), 1, + sym_asset_expr, + STATE(38), 6, + sym__inline_asset_expr, + sym__asset_expr_primary, + sym_asset_variable_substitution, + sym_asset_expr_type, + sym_asset_expr_binop, + sym_asset_expr_unop, + [1892] = 3, ACTIONS(17), 1, sym_comment, - ACTIONS(215), 4, + ACTIONS(257), 4, anon_sym_let, - anon_sym_E, + sym_step_type, anon_sym_BANG, sym_identifier, - ACTIONS(217), 10, + ACTIONS(259), 5, anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, anon_sym_SLASH_SLASH_BANG, anon_sym_LT_DASH, anon_sym_PLUS_GT, anon_sym_DASH_GT, - anon_sym_LBRACK, - [1818] = 3, + [1909] = 3, ACTIONS(17), 1, sym_comment, - ACTIONS(219), 4, + ACTIONS(261), 4, anon_sym_let, - anon_sym_E, + sym_step_type, anon_sym_BANG, sym_identifier, - ACTIONS(221), 9, + ACTIONS(263), 5, anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, anon_sym_SLASH_SLASH_BANG, anon_sym_LT_DASH, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1839] = 3, + [1926] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_SLASH, + ACTIONS(267), 6, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_CARET, + [1944] = 3, ACTIONS(17), 1, sym_comment, - ACTIONS(223), 4, - anon_sym_let, - anon_sym_E, + ACTIONS(273), 1, anon_sym_BANG, - sym_identifier, - ACTIONS(225), 9, + ACTIONS(271), 7, anon_sym_RBRACE, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_BANGE, + anon_sym_let, + sym_step_type, anon_sym_SLASH_SLASH_BANG, anon_sym_LT_DASH, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1860] = 3, + [1960] = 3, ACTIONS(17), 1, sym_comment, - ACTIONS(229), 1, + ACTIONS(277), 1, anon_sym_BANG, - ACTIONS(227), 11, + ACTIONS(275), 7, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, + sym_step_type, anon_sym_SLASH_SLASH_BANG, anon_sym_LT_DASH, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1880] = 3, + [1976] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(253), 1, + sym_identifier, + ACTIONS(255), 1, + anon_sym_LPAREN, + STATE(22), 6, + sym__inline_asset_expr, + sym__asset_expr_primary, + sym_asset_variable_substitution, + sym_asset_expr_type, + sym_asset_expr_binop, + sym_asset_expr_unop, + [1994] = 3, ACTIONS(17), 1, sym_comment, - ACTIONS(233), 1, + ACTIONS(281), 1, anon_sym_BANG, - ACTIONS(231), 11, + ACTIONS(279), 7, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, + sym_step_type, anon_sym_SLASH_SLASH_BANG, anon_sym_LT_DASH, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1900] = 3, + [2010] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(253), 1, + sym_identifier, + ACTIONS(255), 1, + anon_sym_LPAREN, + STATE(92), 6, + sym__inline_asset_expr, + sym__asset_expr_primary, + sym_asset_variable_substitution, + sym_asset_expr_type, + sym_asset_expr_binop, + sym_asset_expr_unop, + [2028] = 3, ACTIONS(17), 1, sym_comment, - ACTIONS(237), 1, + ACTIONS(285), 1, anon_sym_BANG, - ACTIONS(235), 11, + ACTIONS(283), 7, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, + sym_step_type, anon_sym_SLASH_SLASH_BANG, anon_sym_LT_DASH, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1920] = 3, + [2044] = 3, ACTIONS(17), 1, sym_comment, - ACTIONS(241), 1, + ACTIONS(257), 1, anon_sym_BANG, - ACTIONS(239), 11, + ACTIONS(259), 7, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, + sym_step_type, anon_sym_SLASH_SLASH_BANG, anon_sym_LT_DASH, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [1940] = 6, + [2060] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(243), 1, - anon_sym_RBRACE, - ACTIONS(245), 1, - anon_sym_let, - STATE(303), 1, - sym_asset_definition, - STATE(101), 3, - sym_asset_variable, - sym_attack_step, - aux_sym_asset_definition_repeat1, - ACTIONS(247), 5, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [1965] = 6, + ACTIONS(253), 1, + sym_identifier, + ACTIONS(255), 1, + anon_sym_LPAREN, + STATE(21), 6, + sym__inline_asset_expr, + sym__asset_expr_primary, + sym_asset_variable_substitution, + sym_asset_expr_type, + sym_asset_expr_binop, + sym_asset_expr_unop, + [2078] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(245), 1, - anon_sym_let, - ACTIONS(249), 1, - anon_sym_RBRACE, - STATE(275), 1, - sym_asset_definition, - STATE(101), 3, - sym_asset_variable, - sym_attack_step, - aux_sym_asset_definition_repeat1, - ACTIONS(247), 5, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [1990] = 4, + ACTIONS(289), 1, + anon_sym_SLASH, + ACTIONS(291), 1, + anon_sym_CARET, + ACTIONS(287), 5, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + [2095] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(253), 1, - anon_sym_COMMA, - STATE(60), 1, - aux_sym_preconditions_repeat1, - ACTIONS(251), 9, + ACTIONS(293), 1, anon_sym_RBRACE, + ACTIONS(295), 1, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - anon_sym_PLUS_GT, - anon_sym_DASH_GT, - [2011] = 6, - ACTIONS(3), 1, - sym_comment, - ACTIONS(245), 1, - anon_sym_let, - ACTIONS(256), 1, - anon_sym_RBRACE, - STATE(278), 1, + ACTIONS(297), 1, + sym_step_type, + STATE(318), 1, sym_asset_definition, - STATE(101), 3, + STATE(108), 3, sym_asset_variable, sym_attack_step, aux_sym_asset_definition_repeat1, - ACTIONS(247), 5, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2036] = 6, + [2116] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(245), 1, + ACTIONS(295), 1, anon_sym_let, - ACTIONS(258), 1, + ACTIONS(297), 1, + sym_step_type, + ACTIONS(299), 1, anon_sym_RBRACE, - STATE(314), 1, + STATE(281), 1, sym_asset_definition, - STATE(101), 3, + STATE(108), 3, sym_asset_variable, sym_attack_step, aux_sym_asset_definition_repeat1, - ACTIONS(247), 5, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2061] = 8, - ACTIONS(3), 1, - sym_comment, - ACTIONS(260), 1, - ts_builtin_sym_end, - ACTIONS(262), 1, - anon_sym_include, - ACTIONS(265), 1, - anon_sym_category, - ACTIONS(268), 1, - anon_sym_POUND, - ACTIONS(271), 1, - anon_sym_associations, - STATE(63), 2, - sym_declaration, - aux_sym_source_file_repeat1, - STATE(206), 4, - sym_include_declaration, - sym_category_declaration, - sym_define_declaration, - sym_associations_declaration, - [2090] = 6, + [2137] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(245), 1, + ACTIONS(295), 1, anon_sym_let, - ACTIONS(274), 1, + ACTIONS(297), 1, + sym_step_type, + ACTIONS(301), 1, anon_sym_RBRACE, - STATE(286), 1, + STATE(306), 1, sym_asset_definition, - STATE(101), 3, + STATE(108), 3, sym_asset_variable, sym_attack_step, aux_sym_asset_definition_repeat1, - ACTIONS(247), 5, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2115] = 4, + [2158] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(305), 1, + anon_sym_SLASH, + ACTIONS(303), 6, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_CARET, + [2173] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(278), 1, + ACTIONS(309), 1, anon_sym_COMMA, - STATE(66), 1, + STATE(80), 1, aux_sym_preconditions_repeat1, - ACTIONS(276), 9, + ACTIONS(307), 5, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, + sym_step_type, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [2136] = 4, + [2190] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_let, + ACTIONS(297), 1, + sym_step_type, + ACTIONS(312), 1, + anon_sym_RBRACE, + STATE(323), 1, + sym_asset_definition, + STATE(108), 3, + sym_asset_variable, + sym_attack_step, + aux_sym_asset_definition_repeat1, + [2211] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(316), 1, + anon_sym_SLASH, + ACTIONS(314), 6, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_CARET, + [2226] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(320), 1, + anon_sym_SLASH, + ACTIONS(318), 6, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_CARET, + [2241] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(324), 1, + anon_sym_SLASH, + ACTIONS(322), 6, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_CARET, + [2256] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(291), 1, + anon_sym_CARET, + ACTIONS(326), 1, + anon_sym_STAR, + ACTIONS(328), 1, + anon_sym_SLASH, + ACTIONS(287), 4, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_PLUS, + anon_sym_DASH, + [2275] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(278), 1, + ACTIONS(332), 1, anon_sym_COMMA, - STATE(60), 1, + STATE(80), 1, aux_sym_preconditions_repeat1, - ACTIONS(280), 9, + ACTIONS(330), 5, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, + sym_step_type, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [2157] = 8, + [2292] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(7), 1, - anon_sym_include, - ACTIONS(9), 1, - anon_sym_category, - ACTIONS(11), 1, - anon_sym_POUND, - ACTIONS(13), 1, - anon_sym_associations, - ACTIONS(282), 1, - ts_builtin_sym_end, - STATE(63), 2, - sym_declaration, - aux_sym_source_file_repeat1, - STATE(206), 4, - sym_include_declaration, - sym_category_declaration, - sym_define_declaration, - sym_associations_declaration, - [2186] = 6, + ACTIONS(289), 1, + anon_sym_SLASH, + ACTIONS(291), 1, + anon_sym_CARET, + ACTIONS(287), 5, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + [2309] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(245), 1, + ACTIONS(295), 1, anon_sym_let, - ACTIONS(284), 1, + ACTIONS(297), 1, + sym_step_type, + ACTIONS(334), 1, anon_sym_RBRACE, - STATE(301), 1, + STATE(321), 1, sym_asset_definition, - STATE(101), 3, + STATE(108), 3, sym_asset_variable, sym_attack_step, aux_sym_asset_definition_repeat1, - ACTIONS(247), 5, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2211] = 6, + [2330] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(245), 1, + ACTIONS(295), 1, anon_sym_let, - ACTIONS(286), 1, + ACTIONS(297), 1, + sym_step_type, + ACTIONS(336), 1, anon_sym_RBRACE, - STATE(306), 1, + STATE(278), 1, sym_asset_definition, - STATE(101), 3, + STATE(108), 3, sym_asset_variable, sym_attack_step, aux_sym_asset_definition_repeat1, - ACTIONS(247), 5, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2236] = 6, + [2351] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(245), 1, + ACTIONS(295), 1, anon_sym_let, - ACTIONS(288), 1, + ACTIONS(297), 1, + sym_step_type, + ACTIONS(338), 1, anon_sym_RBRACE, - STATE(279), 1, + STATE(313), 1, sym_asset_definition, - STATE(101), 3, + STATE(108), 3, sym_asset_variable, sym_attack_step, aux_sym_asset_definition_repeat1, - ACTIONS(247), 5, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2261] = 4, + [2372] = 4, ACTIONS(3), 1, sym_comment, - STATE(184), 1, - sym_reaching, - ACTIONS(33), 2, + ACTIONS(332), 1, + anon_sym_COMMA, + STATE(86), 1, + aux_sym_preconditions_repeat1, + ACTIONS(340), 5, + anon_sym_RBRACE, + anon_sym_let, + sym_step_type, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(290), 7, - anon_sym_RBRACE, + [2389] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(118), 1, + anon_sym_DOT, + ACTIONS(120), 1, + anon_sym_LBRACK, + ACTIONS(124), 1, + anon_sym_STAR, + ACTIONS(342), 1, + anon_sym_RPAREN, + ACTIONS(166), 3, + anon_sym_DASH, + anon_sym_BSLASH_SLASH, + anon_sym_SLASH_BSLASH, + [2410] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2281] = 4, + ACTIONS(297), 1, + sym_step_type, + ACTIONS(344), 1, + anon_sym_RBRACE, + STATE(283), 1, + sym_asset_definition, + STATE(108), 3, + sym_asset_variable, + sym_attack_step, + aux_sym_asset_definition_repeat1, + [2431] = 4, ACTIONS(3), 1, sym_comment, - STATE(135), 1, + STATE(255), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(292), 7, + ACTIONS(346), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2301] = 5, + sym_step_type, + [2447] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(294), 1, - sym_identifier, - ACTIONS(296), 1, - anon_sym_LPAREN, - ACTIONS(298), 2, - sym_integer, - sym_float, - STATE(196), 6, - sym__ttc_expr, - sym__ttc_parenthesized, - sym__ttc_primary, - sym_ttc_distribution, - sym_ttc_binop, - sym__number, - [2323] = 4, + ACTIONS(291), 1, + anon_sym_CARET, + ACTIONS(326), 1, + anon_sym_STAR, + ACTIONS(328), 1, + anon_sym_SLASH, + ACTIONS(348), 1, + anon_sym_RBRACK, + ACTIONS(350), 2, + anon_sym_PLUS, + anon_sym_DASH, + [2467] = 4, ACTIONS(3), 1, sym_comment, - STATE(126), 1, + STATE(262), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(300), 7, + ACTIONS(352), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2343] = 2, + sym_step_type, + [2483] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(251), 10, + STATE(172), 1, + sym_reaching, + ACTIONS(33), 2, + anon_sym_PLUS_GT, + anon_sym_DASH_GT, + ACTIONS(354), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - anon_sym_COMMA, + sym_step_type, + [2499] = 4, + ACTIONS(3), 1, + sym_comment, + STATE(174), 1, + sym_reaching, + ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - [2359] = 4, + ACTIONS(356), 3, + anon_sym_RBRACE, + anon_sym_let, + sym_step_type, + [2515] = 4, ACTIONS(3), 1, sym_comment, - STATE(193), 1, + STATE(180), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(302), 7, + ACTIONS(358), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2379] = 5, + sym_step_type, + [2531] = 6, ACTIONS(3), 1, sym_comment, - ACTIONS(294), 1, - sym_identifier, - ACTIONS(296), 1, - anon_sym_LPAREN, - ACTIONS(304), 2, + ACTIONS(360), 1, + anon_sym_STAR, + ACTIONS(362), 1, sym_integer, - sym_float, - STATE(197), 6, - sym__ttc_expr, - sym__ttc_parenthesized, - sym__ttc_primary, - sym_ttc_distribution, - sym_ttc_binop, - sym__number, - [2401] = 4, + STATE(269), 1, + sym_multiplicity_range, + STATE(290), 1, + sym_multiplicity, + STATE(187), 2, + sym__multiplicity_atom, + sym_star, + [2551] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(360), 1, + anon_sym_STAR, + ACTIONS(362), 1, + sym_integer, + STATE(269), 1, + sym_multiplicity_range, + STATE(316), 1, + sym_multiplicity, + STATE(187), 2, + sym__multiplicity_atom, + sym_star, + [2571] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(291), 1, + anon_sym_CARET, + ACTIONS(326), 1, + anon_sym_STAR, + ACTIONS(328), 1, + anon_sym_SLASH, + ACTIONS(364), 1, + anon_sym_RPAREN, + ACTIONS(350), 2, + anon_sym_PLUS, + anon_sym_DASH, + [2591] = 4, ACTIONS(3), 1, sym_comment, - STATE(160), 1, + STATE(197), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(306), 7, + ACTIONS(366), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2421] = 4, + sym_step_type, + [2607] = 4, ACTIONS(3), 1, sym_comment, - STATE(162), 1, + STATE(199), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(308), 7, + ACTIONS(368), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2441] = 4, + sym_step_type, + [2623] = 4, ACTIONS(3), 1, sym_comment, - STATE(163), 1, + STATE(200), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(310), 7, + ACTIONS(370), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2461] = 4, + sym_step_type, + [2639] = 4, ACTIONS(3), 1, sym_comment, - STATE(129), 1, + STATE(169), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(312), 7, + ACTIONS(372), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2481] = 4, + sym_step_type, + [2655] = 4, ACTIONS(3), 1, sym_comment, - STATE(164), 1, + STATE(205), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(314), 7, + ACTIONS(374), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2501] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(294), 1, - sym_identifier, - ACTIONS(296), 1, - anon_sym_LPAREN, - ACTIONS(316), 2, - sym_integer, - sym_float, - STATE(139), 6, - sym__ttc_expr, - sym__ttc_parenthesized, - sym__ttc_primary, - sym_ttc_distribution, - sym_ttc_binop, - sym__number, - [2523] = 5, + sym_step_type, + [2671] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(294), 1, - sym_identifier, - ACTIONS(296), 1, - anon_sym_LPAREN, - ACTIONS(318), 2, - sym_integer, - sym_float, - STATE(140), 6, - sym__ttc_expr, - sym__ttc_parenthesized, - sym__ttc_primary, - sym_ttc_distribution, - sym_ttc_binop, - sym__number, - [2545] = 4, + ACTIONS(295), 1, + anon_sym_let, + ACTIONS(297), 1, + sym_step_type, + ACTIONS(376), 1, + anon_sym_RBRACE, + STATE(112), 3, + sym_asset_variable, + sym_attack_step, + aux_sym_asset_definition_repeat1, + [2689] = 4, ACTIONS(3), 1, sym_comment, - STATE(168), 1, + STATE(207), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(320), 7, + ACTIONS(378), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2565] = 5, + sym_step_type, + [2705] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(294), 1, - sym_identifier, - ACTIONS(296), 1, - anon_sym_LPAREN, - ACTIONS(322), 2, - sym_integer, - sym_float, - STATE(141), 6, - sym__ttc_expr, - sym__ttc_parenthesized, - sym__ttc_primary, - sym_ttc_distribution, - sym_ttc_binop, - sym__number, - [2587] = 4, - ACTIONS(3), 1, - sym_comment, - STATE(170), 1, + STATE(261), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(324), 7, + ACTIONS(380), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2607] = 4, + sym_step_type, + [2721] = 2, ACTIONS(3), 1, sym_comment, - STATE(142), 1, - sym_reaching, - ACTIONS(33), 2, + ACTIONS(307), 6, + anon_sym_RBRACE, + anon_sym_let, + sym_step_type, + anon_sym_COMMA, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(326), 7, + [2733] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(382), 1, anon_sym_RBRACE, + ACTIONS(384), 1, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2627] = 4, + ACTIONS(387), 1, + sym_step_type, + STATE(112), 3, + sym_asset_variable, + sym_attack_step, + aux_sym_asset_definition_repeat1, + [2751] = 4, ACTIONS(3), 1, sym_comment, - STATE(172), 1, + STATE(218), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(328), 7, + ACTIONS(390), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2647] = 4, + sym_step_type, + [2767] = 4, ACTIONS(3), 1, sym_comment, - STATE(144), 1, + STATE(221), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(330), 7, + ACTIONS(392), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2667] = 4, + sym_step_type, + [2783] = 4, ACTIONS(3), 1, sym_comment, - STATE(145), 1, + STATE(223), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(332), 7, + ACTIONS(394), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2687] = 4, + sym_step_type, + [2799] = 4, ACTIONS(3), 1, sym_comment, - STATE(146), 1, + STATE(224), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(334), 7, + ACTIONS(396), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2707] = 4, + sym_step_type, + [2815] = 4, ACTIONS(3), 1, sym_comment, - STATE(176), 1, + STATE(225), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(336), 7, + ACTIONS(398), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2727] = 4, + sym_step_type, + [2831] = 4, ACTIONS(3), 1, sym_comment, - STATE(177), 1, + STATE(229), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(338), 7, + ACTIONS(400), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2747] = 4, + sym_step_type, + [2847] = 4, ACTIONS(3), 1, sym_comment, - STATE(131), 1, + STATE(232), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(340), 7, + ACTIONS(402), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2767] = 4, + sym_step_type, + [2863] = 4, ACTIONS(3), 1, sym_comment, - STATE(179), 1, + STATE(234), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(342), 7, + ACTIONS(404), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2787] = 4, + sym_step_type, + [2879] = 4, ACTIONS(3), 1, sym_comment, - STATE(180), 1, + STATE(242), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(344), 7, + ACTIONS(406), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2807] = 4, + sym_step_type, + [2895] = 4, ACTIONS(3), 1, sym_comment, - STATE(181), 1, + STATE(243), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(346), 7, + ACTIONS(408), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2827] = 4, + sym_step_type, + [2911] = 4, ACTIONS(3), 1, sym_comment, - STATE(191), 1, + STATE(246), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(348), 7, + ACTIONS(410), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2847] = 4, + sym_step_type, + [2927] = 4, ACTIONS(3), 1, sym_comment, - STATE(149), 1, + STATE(247), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(350), 7, + ACTIONS(412), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2867] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(245), 1, - anon_sym_let, - ACTIONS(352), 1, - anon_sym_RBRACE, - STATE(106), 3, - sym_asset_variable, - sym_attack_step, - aux_sym_asset_definition_repeat1, - ACTIONS(247), 5, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2889] = 4, + sym_step_type, + [2943] = 4, ACTIONS(3), 1, sym_comment, - STATE(152), 1, + STATE(248), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(354), 7, + ACTIONS(414), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2909] = 4, + sym_step_type, + [2959] = 4, ACTIONS(3), 1, sym_comment, - STATE(186), 1, + STATE(237), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(356), 7, + ACTIONS(416), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2929] = 4, + sym_step_type, + [2975] = 4, ACTIONS(3), 1, sym_comment, - STATE(187), 1, + STATE(251), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(358), 7, + ACTIONS(418), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2949] = 4, + sym_step_type, + [2991] = 4, ACTIONS(3), 1, sym_comment, - STATE(188), 1, + STATE(253), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(360), 7, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2969] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(362), 1, + ACTIONS(420), 3, anon_sym_RBRACE, - ACTIONS(364), 1, anon_sym_let, - STATE(106), 3, - sym_asset_variable, - sym_attack_step, - aux_sym_asset_definition_repeat1, - ACTIONS(367), 5, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [2991] = 4, + sym_step_type, + [3007] = 4, ACTIONS(3), 1, sym_comment, - STATE(190), 1, + STATE(254), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(370), 7, + ACTIONS(422), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3011] = 4, + sym_step_type, + [3023] = 4, ACTIONS(3), 1, sym_comment, - STATE(121), 1, + STATE(258), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(372), 7, + ACTIONS(424), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3031] = 4, + sym_step_type, + [3039] = 4, ACTIONS(3), 1, sym_comment, - STATE(192), 1, + STATE(259), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(374), 7, + ACTIONS(426), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3051] = 4, + sym_step_type, + [3055] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(291), 1, + anon_sym_CARET, + ACTIONS(326), 1, + anon_sym_STAR, + ACTIONS(328), 1, + anon_sym_SLASH, + ACTIONS(428), 1, + anon_sym_RBRACK, + ACTIONS(350), 2, + anon_sym_PLUS, + anon_sym_DASH, + [3075] = 4, ACTIONS(3), 1, sym_comment, - STATE(153), 1, + STATE(208), 1, sym_reaching, ACTIONS(33), 2, anon_sym_PLUS_GT, anon_sym_DASH_GT, - ACTIONS(376), 7, + ACTIONS(430), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3071] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(378), 1, - sym_identifier, - ACTIONS(380), 1, - anon_sym_LPAREN, - STATE(75), 1, - sym_asset_expr, - STATE(35), 6, - sym__inline_asset_expr, - sym__asset_expr_primary, - sym_asset_variable_substitution, - sym_asset_expr_type, - sym_asset_expr_binop, - sym_asset_expr_unop, - [3092] = 4, + sym_step_type, + [3091] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(278), 1, - anon_sym_COMMA, - STATE(60), 1, - aux_sym_preconditions_repeat1, - ACTIONS(382), 7, + ACTIONS(432), 1, anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3111] = 4, + ACTIONS(434), 1, + anon_sym_abstract, + ACTIONS(436), 1, + anon_sym_asset, + STATE(141), 2, + sym_asset_declaration, + aux_sym_category_declaration_repeat2, + [3108] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(278), 1, - anon_sym_COMMA, - STATE(112), 1, - aux_sym_preconditions_repeat1, - ACTIONS(384), 7, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, + ACTIONS(438), 5, + ts_builtin_sym_end, + anon_sym_include, + anon_sym_category, anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3130] = 5, + anon_sym_associations, + [3119] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(378), 1, + ACTIONS(440), 1, sym_identifier, - ACTIONS(380), 1, - anon_sym_LPAREN, - STATE(166), 1, - sym_asset_expr, - STATE(35), 6, - sym__inline_asset_expr, - sym__asset_expr_primary, - sym_asset_variable_substitution, - sym_asset_expr_type, - sym_asset_expr_binop, - sym_asset_expr_unop, - [3151] = 5, + ACTIONS(209), 2, + anon_sym_LBRACE, + anon_sym_RBRACE, + STATE(136), 2, + sym_meta, + aux_sym_category_declaration_repeat1, + [3134] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(378), 1, + ACTIONS(443), 1, sym_identifier, - ACTIONS(380), 1, - anon_sym_LPAREN, - STATE(113), 1, - sym_asset_expr, - STATE(35), 6, - sym__inline_asset_expr, - sym__asset_expr_primary, - sym_asset_variable_substitution, - sym_asset_expr_type, - sym_asset_expr_binop, - sym_asset_expr_unop, - [3172] = 5, + ACTIONS(445), 1, + anon_sym_LBRACE, + ACTIONS(447), 1, + anon_sym_extends, + STATE(168), 2, + sym_meta, + aux_sym_category_declaration_repeat1, + [3151] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(378), 1, - sym_identifier, - ACTIONS(380), 1, - anon_sym_LPAREN, - STATE(65), 1, - sym_asset_expr, - STATE(35), 6, - sym__inline_asset_expr, - sym__asset_expr_primary, - sym_asset_variable_substitution, - sym_asset_expr_type, - sym_asset_expr_binop, - sym_asset_expr_unop, - [3193] = 4, + ACTIONS(449), 5, + ts_builtin_sym_end, + anon_sym_include, + anon_sym_category, + anon_sym_POUND, + anon_sym_associations, + [3162] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(378), 1, - sym_identifier, - ACTIONS(380), 1, - anon_sym_LPAREN, - STATE(24), 6, - sym__inline_asset_expr, - sym__asset_expr_primary, - sym_asset_variable_substitution, - sym_asset_expr_type, - sym_asset_expr_binop, - sym_asset_expr_unop, - [3211] = 4, + ACTIONS(451), 1, + anon_sym_RBRACE, + ACTIONS(453), 1, + anon_sym_abstract, + ACTIONS(456), 1, + anon_sym_asset, + STATE(139), 2, + sym_asset_declaration, + aux_sym_category_declaration_repeat2, + [3179] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(378), 1, - sym_identifier, - ACTIONS(380), 1, - anon_sym_LPAREN, - STATE(125), 6, - sym__inline_asset_expr, - sym__asset_expr_primary, - sym_asset_variable_substitution, - sym_asset_expr_type, - sym_asset_expr_binop, - sym_asset_expr_unop, - [3229] = 4, + ACTIONS(459), 5, + ts_builtin_sym_end, + anon_sym_include, + anon_sym_category, + anon_sym_POUND, + anon_sym_associations, + [3190] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(378), 1, - sym_identifier, - ACTIONS(380), 1, - anon_sym_LPAREN, - STATE(25), 6, - sym__inline_asset_expr, - sym__asset_expr_primary, - sym_asset_variable_substitution, - sym_asset_expr_type, - sym_asset_expr_binop, - sym_asset_expr_unop, - [3247] = 4, + ACTIONS(434), 1, + anon_sym_abstract, + ACTIONS(436), 1, + anon_sym_asset, + ACTIONS(461), 1, + anon_sym_RBRACE, + STATE(139), 2, + sym_asset_declaration, + aux_sym_category_declaration_repeat2, + [3207] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(386), 1, - anon_sym_LPAREN, - ACTIONS(390), 1, - anon_sym_SLASH, - ACTIONS(388), 6, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_CARET, - [3265] = 2, + ACTIONS(463), 5, + ts_builtin_sym_end, + anon_sym_include, + anon_sym_category, + anon_sym_POUND, + anon_sym_associations, + [3218] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(392), 7, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, + ACTIONS(465), 5, + ts_builtin_sym_end, + anon_sym_include, + anon_sym_category, anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3278] = 2, + anon_sym_associations, + [3229] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(394), 7, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, + ACTIONS(467), 5, + ts_builtin_sym_end, + anon_sym_include, + anon_sym_category, anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3291] = 2, + anon_sym_associations, + [3240] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(396), 7, + ACTIONS(434), 1, + anon_sym_abstract, + ACTIONS(436), 1, + anon_sym_asset, + ACTIONS(469), 1, anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, + STATE(139), 2, + sym_asset_declaration, + aux_sym_category_declaration_repeat2, + [3257] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(443), 1, + sym_identifier, + ACTIONS(471), 1, + anon_sym_LBRACE, + ACTIONS(473), 1, + anon_sym_extends, + STATE(161), 2, + sym_meta, + aux_sym_category_declaration_repeat1, + [3274] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(475), 5, + ts_builtin_sym_end, + anon_sym_include, + anon_sym_category, anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3304] = 2, + anon_sym_associations, + [3285] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(398), 7, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, + ACTIONS(477), 5, + ts_builtin_sym_end, + anon_sym_include, + anon_sym_category, anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3317] = 6, + anon_sym_associations, + [3296] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(130), 1, - anon_sym_LBRACK, - ACTIONS(134), 1, - anon_sym_STAR, - ACTIONS(136), 1, - anon_sym_DOT, - ACTIONS(400), 1, - anon_sym_RPAREN, - ACTIONS(160), 3, - anon_sym_DASH, - anon_sym_BSLASH_SLASH, - anon_sym_SLASH_BSLASH, - [3338] = 2, + ACTIONS(434), 1, + anon_sym_abstract, + ACTIONS(436), 1, + anon_sym_asset, + ACTIONS(479), 1, + anon_sym_RBRACE, + STATE(145), 2, + sym_asset_declaration, + aux_sym_category_declaration_repeat2, + [3313] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(402), 7, + ACTIONS(332), 1, + anon_sym_COMMA, + STATE(80), 1, + aux_sym_preconditions_repeat1, + ACTIONS(481), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3351] = 2, + sym_step_type, + [3328] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(404), 7, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, + ACTIONS(483), 5, + ts_builtin_sym_end, + anon_sym_include, + anon_sym_category, anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3364] = 2, + anon_sym_associations, + [3339] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(406), 7, + ACTIONS(332), 1, + anon_sym_COMMA, + STATE(150), 1, + aux_sym_preconditions_repeat1, + ACTIONS(485), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3377] = 2, + sym_step_type, + [3354] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(408), 7, + ACTIONS(487), 1, + sym_identifier, + ACTIONS(490), 1, anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3390] = 2, + STATE(167), 2, + sym_meta, + aux_sym_category_declaration_repeat1, + [3368] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(410), 7, + ACTIONS(492), 1, + sym_identifier, + ACTIONS(494), 1, anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3403] = 2, + STATE(165), 2, + sym_association, + aux_sym_associations_declaration_repeat1, + [3382] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(412), 7, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3416] = 2, + ACTIONS(360), 1, + anon_sym_STAR, + ACTIONS(496), 1, + sym_integer, + STATE(274), 2, + sym__multiplicity_atom, + sym_star, + [3396] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(414), 7, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3429] = 2, + ACTIONS(498), 1, + anon_sym_RPAREN, + STATE(194), 1, + sym__number, + ACTIONS(500), 2, + sym_integer, + sym_float, + [3410] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(416), 7, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3442] = 2, + ACTIONS(502), 1, + sym_identifier, + ACTIONS(504), 1, + anon_sym_LBRACE, + STATE(162), 2, + sym_meta, + aux_sym_category_declaration_repeat1, + [3424] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(418), 7, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3455] = 2, + ACTIONS(502), 1, + sym_identifier, + ACTIONS(506), 1, + anon_sym_LBRACE, + STATE(160), 2, + sym_meta, + aux_sym_category_declaration_repeat1, + [3438] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(420), 7, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3468] = 2, + ACTIONS(502), 1, + sym_identifier, + ACTIONS(508), 1, + anon_sym_LBRACE, + STATE(136), 2, + sym_meta, + aux_sym_category_declaration_repeat1, + [3452] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(422), 7, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3481] = 3, + ACTIONS(502), 1, + sym_identifier, + ACTIONS(510), 1, + anon_sym_LBRACE, + STATE(136), 2, + sym_meta, + aux_sym_category_declaration_repeat1, + [3466] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(426), 1, - anon_sym_SLASH, - ACTIONS(424), 6, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_CARET, - [3496] = 3, + ACTIONS(502), 1, + sym_identifier, + ACTIONS(512), 1, + anon_sym_LBRACE, + STATE(136), 2, + sym_meta, + aux_sym_category_declaration_repeat1, + [3480] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(430), 1, - anon_sym_SLASH, - ACTIONS(428), 6, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_CARET, - [3511] = 5, + ACTIONS(502), 1, + sym_identifier, + ACTIONS(514), 1, + anon_sym_LBRACE, + STATE(136), 2, + sym_meta, + aux_sym_category_declaration_repeat1, + [3494] = 5, ACTIONS(3), 1, sym_comment, - ACTIONS(434), 1, - anon_sym_STAR, - ACTIONS(436), 1, - anon_sym_SLASH, - ACTIONS(438), 1, - anon_sym_CARET, - ACTIONS(432), 4, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_PLUS, - anon_sym_DASH, - [3530] = 4, + ACTIONS(516), 1, + sym_identifier, + ACTIONS(518), 1, + anon_sym_LPAREN, + STATE(47), 1, + sym_detector_context, + STATE(266), 1, + sym_detector_name, + [3510] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(438), 1, - anon_sym_CARET, - ACTIONS(440), 1, - anon_sym_SLASH, - ACTIONS(432), 5, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_STAR, - [3547] = 4, + ACTIONS(502), 1, + sym_identifier, + ACTIONS(520), 1, + anon_sym_LBRACE, + STATE(159), 2, + sym_meta, + aux_sym_category_declaration_repeat1, + [3524] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(438), 1, - anon_sym_CARET, - ACTIONS(440), 1, - anon_sym_SLASH, - ACTIONS(432), 5, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_STAR, - [3564] = 2, + ACTIONS(522), 1, + sym_identifier, + ACTIONS(525), 1, + anon_sym_RBRACE, + STATE(165), 2, + sym_association, + aux_sym_associations_declaration_repeat1, + [3538] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(442), 7, + ACTIONS(492), 1, + sym_identifier, + ACTIONS(527), 1, anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3577] = 2, + STATE(154), 2, + sym_association, + aux_sym_associations_declaration_repeat1, + [3552] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(444), 7, + ACTIONS(529), 1, + sym_identifier, + ACTIONS(532), 1, anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3590] = 2, + STATE(136), 2, + sym_meta, + aux_sym_category_declaration_repeat1, + [3566] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(446), 7, + ACTIONS(502), 1, + sym_identifier, + ACTIONS(534), 1, + anon_sym_LBRACE, + STATE(136), 2, + sym_meta, + aux_sym_category_declaration_repeat1, + [3580] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(536), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3603] = 2, + sym_step_type, + [3589] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(448), 7, + ACTIONS(538), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3616] = 2, + sym_step_type, + [3598] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(450), 7, + ACTIONS(540), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3629] = 2, + sym_step_type, + [3607] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(452), 7, + ACTIONS(542), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3642] = 2, + sym_step_type, + [3616] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(454), 7, + ACTIONS(544), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3655] = 2, + sym_step_type, + [3625] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(456), 7, + ACTIONS(546), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3668] = 2, + sym_step_type, + [3634] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(458), 7, + ACTIONS(548), 3, anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3681] = 2, + anon_sym_abstract, + anon_sym_asset, + [3643] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(460), 7, + ACTIONS(550), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3694] = 2, + sym_step_type, + [3652] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(462), 7, + ACTIONS(552), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3707] = 2, + sym_step_type, + [3661] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(464), 7, + ACTIONS(554), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3720] = 2, + sym_step_type, + [3670] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(466), 7, + ACTIONS(556), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3733] = 2, + sym_step_type, + [3679] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(468), 7, + ACTIONS(558), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3746] = 2, + sym_step_type, + [3688] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(470), 7, + ACTIONS(560), 3, anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3759] = 3, + anon_sym_abstract, + anon_sym_asset, + [3697] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(474), 1, - anon_sym_SLASH, - ACTIONS(472), 6, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_CARET, - [3774] = 2, + ACTIONS(562), 3, + anon_sym_RBRACE, + anon_sym_abstract, + anon_sym_asset, + [3706] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(564), 1, + anon_sym_DOT, + ACTIONS(566), 1, + anon_sym_LPAREN, + STATE(230), 1, + aux_sym_detector_name_repeat1, + [3719] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(568), 3, + anon_sym_LBRACK, + anon_sym_LT_DASH_DASH, + anon_sym_DOT_DOT, + [3728] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(476), 7, + ACTIONS(570), 1, anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3787] = 2, + ACTIONS(572), 1, + anon_sym_COMMA, + STATE(185), 1, + aux_sym_cias_repeat1, + [3741] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(478), 7, + ACTIONS(575), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3800] = 2, + sym_step_type, + [3750] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(480), 7, + ACTIONS(579), 1, + anon_sym_DOT_DOT, + ACTIONS(577), 2, + anon_sym_LBRACK, + anon_sym_LT_DASH_DASH, + [3761] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(581), 3, anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3813] = 2, + anon_sym_abstract, + anon_sym_asset, + [3770] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(583), 1, + anon_sym_COMMA, + ACTIONS(585), 1, + anon_sym_RPAREN, + STATE(215), 1, + aux_sym_detector_context_repeat1, + [3783] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(587), 1, + anon_sym_DOT, + ACTIONS(590), 1, + anon_sym_LPAREN, + STATE(190), 1, + aux_sym_detector_name_repeat1, + [3796] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(482), 7, + ACTIONS(592), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3826] = 2, + sym_step_type, + [3805] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(484), 7, + ACTIONS(594), 3, anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3839] = 2, + anon_sym_abstract, + anon_sym_asset, + [3814] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(486), 7, + ACTIONS(596), 3, anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3852] = 2, + anon_sym_abstract, + anon_sym_asset, + [3823] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(598), 1, + anon_sym_COMMA, + ACTIONS(600), 1, + anon_sym_RPAREN, + STATE(217), 1, + aux_sym_ttc_distribution_repeat1, + [3836] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(488), 7, + ACTIONS(602), 3, anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3865] = 2, + anon_sym_abstract, + anon_sym_asset, + [3845] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(490), 7, + ACTIONS(604), 3, anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3878] = 2, + anon_sym_abstract, + anon_sym_asset, + [3854] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(492), 7, + ACTIONS(606), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3891] = 2, + sym_step_type, + [3863] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(494), 7, + ACTIONS(608), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3904] = 2, + sym_step_type, + [3872] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(496), 7, + ACTIONS(610), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3917] = 2, + sym_step_type, + [3881] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(498), 7, + ACTIONS(612), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3930] = 2, + sym_step_type, + [3890] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(500), 7, + ACTIONS(614), 3, anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3943] = 3, - ACTIONS(3), 1, - sym_comment, - ACTIONS(504), 1, - anon_sym_SLASH, - ACTIONS(502), 6, - anon_sym_RPAREN, - anon_sym_RBRACK, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_STAR, - anon_sym_CARET, - [3958] = 2, + anon_sym_abstract, + anon_sym_asset, + [3899] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(506), 7, + ACTIONS(616), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3971] = 2, + sym_step_type, + [3908] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(508), 7, + ACTIONS(618), 3, anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3984] = 2, + anon_sym_abstract, + anon_sym_asset, + [3917] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(510), 7, + ACTIONS(620), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [3997] = 2, + sym_step_type, + [3926] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(512), 7, + ACTIONS(622), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [4010] = 2, + sym_step_type, + [3935] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(514), 7, + ACTIONS(624), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [4023] = 2, + sym_step_type, + [3944] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(516), 7, + ACTIONS(626), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [4036] = 2, + sym_step_type, + [3953] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(518), 7, + ACTIONS(628), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [4049] = 2, + sym_step_type, + [3962] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(520), 7, + ACTIONS(630), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [4062] = 2, + sym_step_type, + [3971] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(522), 7, + ACTIONS(632), 3, anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [4075] = 2, + anon_sym_abstract, + anon_sym_asset, + [3980] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(524), 7, + ACTIONS(634), 3, anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [4088] = 2, + anon_sym_abstract, + anon_sym_asset, + [3989] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(526), 7, + ACTIONS(636), 3, anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [4101] = 2, + anon_sym_abstract, + anon_sym_asset, + [3998] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(528), 7, + ACTIONS(638), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [4114] = 2, + sym_step_type, + [4007] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(530), 7, + ACTIONS(640), 3, anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [4127] = 2, + anon_sym_abstract, + anon_sym_asset, + [4016] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(532), 7, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [4140] = 2, + ACTIONS(642), 1, + anon_sym_COMMA, + ACTIONS(645), 1, + anon_sym_RPAREN, + STATE(215), 1, + aux_sym_detector_context_repeat1, + [4029] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(534), 7, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [4153] = 2, + STATE(271), 1, + sym__number, + ACTIONS(647), 2, + sym_integer, + sym_float, + [4040] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(536), 7, - anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [4166] = 2, + ACTIONS(598), 1, + anon_sym_COMMA, + ACTIONS(649), 1, + anon_sym_RPAREN, + STATE(233), 1, + aux_sym_ttc_distribution_repeat1, + [4053] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(538), 7, + ACTIONS(651), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [4179] = 2, + sym_step_type, + [4062] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(540), 7, + ACTIONS(653), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [4192] = 2, + sym_step_type, + [4071] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(542), 7, + ACTIONS(655), 1, anon_sym_RBRACE, - anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [4205] = 2, + ACTIONS(657), 1, + anon_sym_COMMA, + STATE(185), 1, + aux_sym_cias_repeat1, + [4084] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(544), 7, + ACTIONS(659), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [4218] = 2, + sym_step_type, + [4093] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(546), 7, + ACTIONS(661), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [4231] = 2, + sym_step_type, + [4102] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(548), 7, + ACTIONS(663), 3, anon_sym_RBRACE, anon_sym_let, - anon_sym_PIPE, - anon_sym_AMP, - anon_sym_POUND, - anon_sym_E, - anon_sym_BANGE, - [4244] = 6, - ACTIONS(3), 1, - sym_comment, - ACTIONS(550), 1, - anon_sym_STAR, - ACTIONS(552), 1, - sym_integer, - STATE(265), 1, - sym_multiplicity_range, - STATE(307), 1, - sym_multiplicity, - STATE(248), 2, - sym__multiplicity_atom, - sym_star, - [4264] = 6, - ACTIONS(3), 1, - sym_comment, - ACTIONS(550), 1, - anon_sym_STAR, - ACTIONS(552), 1, - sym_integer, - STATE(265), 1, - sym_multiplicity_range, - STATE(304), 1, - sym_multiplicity, - STATE(248), 2, - sym__multiplicity_atom, - sym_star, - [4284] = 6, - ACTIONS(3), 1, - sym_comment, - ACTIONS(434), 1, - anon_sym_STAR, - ACTIONS(436), 1, - anon_sym_SLASH, - ACTIONS(438), 1, - anon_sym_CARET, - ACTIONS(554), 1, - anon_sym_RPAREN, - ACTIONS(556), 2, - anon_sym_PLUS, - anon_sym_DASH, - [4304] = 6, - ACTIONS(3), 1, - sym_comment, - ACTIONS(434), 1, - anon_sym_STAR, - ACTIONS(436), 1, - anon_sym_SLASH, - ACTIONS(438), 1, - anon_sym_CARET, - ACTIONS(558), 1, - anon_sym_RBRACK, - ACTIONS(556), 2, - anon_sym_PLUS, - anon_sym_DASH, - [4324] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(560), 1, - sym_identifier, - ACTIONS(562), 1, - anon_sym_LBRACE, - ACTIONS(564), 1, - anon_sym_extends, - STATE(226), 2, - sym_meta, - aux_sym_category_declaration_repeat1, - [4341] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(566), 5, - ts_builtin_sym_end, - anon_sym_include, - anon_sym_category, - anon_sym_POUND, - anon_sym_associations, - [4352] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(568), 5, - ts_builtin_sym_end, - anon_sym_include, - anon_sym_category, - anon_sym_POUND, - anon_sym_associations, - [4363] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(570), 1, - anon_sym_RBRACE, - ACTIONS(572), 1, - anon_sym_abstract, - ACTIONS(575), 1, - anon_sym_asset, - STATE(201), 2, - sym_asset_declaration, - aux_sym_category_declaration_repeat2, - [4380] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(578), 5, - ts_builtin_sym_end, - anon_sym_include, - anon_sym_category, - anon_sym_POUND, - anon_sym_associations, - [4391] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(580), 1, - anon_sym_RBRACE, - ACTIONS(582), 1, - anon_sym_abstract, - ACTIONS(584), 1, - anon_sym_asset, - STATE(201), 2, - sym_asset_declaration, - aux_sym_category_declaration_repeat2, - [4408] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(582), 1, - anon_sym_abstract, - ACTIONS(584), 1, - anon_sym_asset, - ACTIONS(586), 1, - anon_sym_RBRACE, - STATE(208), 2, - sym_asset_declaration, - aux_sym_category_declaration_repeat2, - [4425] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(588), 5, - ts_builtin_sym_end, - anon_sym_include, - anon_sym_category, - anon_sym_POUND, - anon_sym_associations, - [4436] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(590), 5, - ts_builtin_sym_end, - anon_sym_include, - anon_sym_category, - anon_sym_POUND, - anon_sym_associations, - [4447] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(560), 1, - sym_identifier, - ACTIONS(592), 1, - anon_sym_LBRACE, - ACTIONS(594), 1, - anon_sym_extends, - STATE(219), 2, - sym_meta, - aux_sym_category_declaration_repeat1, - [4464] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(582), 1, - anon_sym_abstract, - ACTIONS(584), 1, - anon_sym_asset, - ACTIONS(596), 1, - anon_sym_RBRACE, - STATE(201), 2, - sym_asset_declaration, - aux_sym_category_declaration_repeat2, - [4481] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(582), 1, - anon_sym_abstract, - ACTIONS(584), 1, - anon_sym_asset, - ACTIONS(598), 1, - anon_sym_RBRACE, - STATE(203), 2, - sym_asset_declaration, - aux_sym_category_declaration_repeat2, - [4498] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(600), 5, - ts_builtin_sym_end, - anon_sym_include, - anon_sym_category, - anon_sym_POUND, - anon_sym_associations, - [4509] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(602), 5, - ts_builtin_sym_end, - anon_sym_include, - anon_sym_category, - anon_sym_POUND, - anon_sym_associations, - [4520] = 4, + sym_step_type, + [4111] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(604), 1, - sym_identifier, - ACTIONS(191), 2, - anon_sym_LBRACE, + ACTIONS(665), 3, anon_sym_RBRACE, - STATE(212), 2, - sym_meta, - aux_sym_category_declaration_repeat1, - [4535] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(607), 5, - ts_builtin_sym_end, - anon_sym_include, - anon_sym_category, - anon_sym_POUND, - anon_sym_associations, - [4546] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(609), 5, - ts_builtin_sym_end, - anon_sym_include, - anon_sym_category, - anon_sym_POUND, - anon_sym_associations, - [4557] = 4, + anon_sym_let, + sym_step_type, + [4120] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(611), 1, - sym_identifier, - ACTIONS(613), 1, + ACTIONS(667), 3, anon_sym_RBRACE, - STATE(221), 2, - sym_association, - aux_sym_associations_declaration_repeat1, - [4571] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(550), 1, - anon_sym_STAR, - ACTIONS(615), 1, - sym_integer, - STATE(272), 2, - sym__multiplicity_atom, - sym_star, - [4585] = 5, - ACTIONS(3), 1, - sym_comment, - ACTIONS(617), 1, - sym_identifier, - ACTIONS(619), 1, - anon_sym_LPAREN, - STATE(45), 1, - sym_detector_context, - STATE(271), 1, - sym_detector_name, - [4601] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(621), 1, - sym_identifier, - ACTIONS(623), 1, - anon_sym_LBRACE, - STATE(212), 2, - sym_meta, - aux_sym_category_declaration_repeat1, - [4615] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(621), 1, - sym_identifier, - ACTIONS(625), 1, - anon_sym_LBRACE, - STATE(212), 2, - sym_meta, - aux_sym_category_declaration_repeat1, - [4629] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(621), 1, - sym_identifier, - ACTIONS(627), 1, - anon_sym_LBRACE, - STATE(212), 2, - sym_meta, - aux_sym_category_declaration_repeat1, - [4643] = 4, + anon_sym_let, + sym_step_type, + [4129] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(611), 1, - sym_identifier, - ACTIONS(629), 1, + ACTIONS(669), 3, anon_sym_RBRACE, - STATE(227), 2, - sym_association, - aux_sym_associations_declaration_repeat1, - [4657] = 4, + anon_sym_let, + sym_step_type, + [4138] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(631), 1, + ACTIONS(583), 1, + anon_sym_COMMA, + ACTIONS(671), 1, anon_sym_RPAREN, - STATE(247), 1, - sym__number, - ACTIONS(633), 2, - sym_integer, - sym_float, - [4671] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(621), 1, - sym_identifier, - ACTIONS(635), 1, - anon_sym_LBRACE, - STATE(229), 2, - sym_meta, - aux_sym_category_declaration_repeat1, - [4685] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(621), 1, - sym_identifier, - ACTIONS(637), 1, - anon_sym_LBRACE, - STATE(220), 2, - sym_meta, - aux_sym_category_declaration_repeat1, - [4699] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(621), 1, - sym_identifier, - ACTIONS(639), 1, - anon_sym_LBRACE, - STATE(218), 2, - sym_meta, - aux_sym_category_declaration_repeat1, - [4713] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(621), 1, - sym_identifier, - ACTIONS(641), 1, - anon_sym_LBRACE, - STATE(212), 2, - sym_meta, - aux_sym_category_declaration_repeat1, - [4727] = 4, + STATE(189), 1, + aux_sym_detector_context_repeat1, + [4151] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(643), 1, - sym_identifier, - ACTIONS(646), 1, + ACTIONS(673), 3, anon_sym_RBRACE, - STATE(227), 2, - sym_association, - aux_sym_associations_declaration_repeat1, - [4741] = 4, + anon_sym_let, + sym_step_type, + [4160] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(648), 1, - sym_identifier, - ACTIONS(651), 1, + ACTIONS(675), 3, anon_sym_RBRACE, - STATE(230), 2, - sym_meta, - aux_sym_category_declaration_repeat1, - [4755] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(621), 1, - sym_identifier, - ACTIONS(653), 1, - anon_sym_LBRACE, - STATE(212), 2, - sym_meta, - aux_sym_category_declaration_repeat1, - [4769] = 4, + anon_sym_let, + sym_step_type, + [4169] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(655), 1, - sym_identifier, - ACTIONS(658), 1, - anon_sym_RBRACE, - STATE(212), 2, - sym_meta, - aux_sym_category_declaration_repeat1, - [4783] = 2, + ACTIONS(564), 1, + anon_sym_DOT, + ACTIONS(677), 1, + anon_sym_LPAREN, + STATE(190), 1, + aux_sym_detector_name_repeat1, + [4182] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(660), 3, + ACTIONS(679), 3, anon_sym_RBRACE, - anon_sym_abstract, - anon_sym_asset, - [4792] = 4, + anon_sym_let, + sym_step_type, + [4191] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(662), 1, + ACTIONS(681), 3, anon_sym_RBRACE, - ACTIONS(664), 1, - anon_sym_COMMA, - STATE(232), 1, - aux_sym_cias_repeat1, - [4805] = 4, + anon_sym_let, + sym_step_type, + [4200] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(667), 1, + ACTIONS(683), 1, anon_sym_COMMA, - ACTIONS(669), 1, + ACTIONS(686), 1, anon_sym_RPAREN, - STATE(258), 1, - aux_sym_detector_context_repeat1, - [4818] = 4, - ACTIONS(3), 1, - sym_comment, - ACTIONS(671), 1, - anon_sym_DOT, - ACTIONS(673), 1, - anon_sym_LPAREN, - STATE(235), 1, - aux_sym_detector_name_repeat1, - [4831] = 4, + STATE(233), 1, + aux_sym_ttc_distribution_repeat1, + [4213] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(675), 1, - anon_sym_DOT, - ACTIONS(678), 1, - anon_sym_LPAREN, - STATE(235), 1, - aux_sym_detector_name_repeat1, - [4844] = 2, + ACTIONS(688), 3, + anon_sym_RBRACE, + anon_sym_let, + sym_step_type, + [4222] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(680), 3, + ACTIONS(690), 3, anon_sym_RBRACE, - anon_sym_abstract, - anon_sym_asset, - [4853] = 2, + anon_sym_let, + sym_step_type, + [4231] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(682), 3, + ACTIONS(263), 3, + anon_sym_LBRACE, anon_sym_RBRACE, - anon_sym_abstract, - anon_sym_asset, - [4862] = 2, + sym_identifier, + [4240] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(684), 3, + ACTIONS(692), 3, anon_sym_RBRACE, - anon_sym_abstract, - anon_sym_asset, - [4871] = 2, + anon_sym_let, + sym_step_type, + [4249] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(686), 3, + ACTIONS(694), 3, anon_sym_RBRACE, - anon_sym_abstract, - anon_sym_asset, - [4880] = 4, + anon_sym_let, + sym_step_type, + [4258] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(688), 1, - anon_sym_COMMA, - ACTIONS(691), 1, - anon_sym_RPAREN, - STATE(240), 1, - aux_sym_detector_context_repeat1, - [4893] = 3, + ACTIONS(696), 3, + anon_sym_RBRACE, + anon_sym_let, + sym_step_type, + [4267] = 2, ACTIONS(3), 1, sym_comment, - STATE(268), 1, - sym__number, - ACTIONS(693), 2, - sym_integer, - sym_float, - [4904] = 4, + ACTIONS(698), 3, + anon_sym_RBRACE, + anon_sym_let, + sym_step_type, + [4276] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(695), 1, - anon_sym_COMMA, - ACTIONS(697), 1, - anon_sym_RPAREN, - STATE(250), 1, - aux_sym_ttc_distribution_repeat1, - [4917] = 2, + ACTIONS(700), 3, + anon_sym_RBRACE, + anon_sym_let, + sym_step_type, + [4285] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(699), 3, + ACTIONS(702), 3, anon_sym_RBRACE, - anon_sym_abstract, - anon_sym_asset, - [4926] = 2, + anon_sym_let, + sym_step_type, + [4294] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(701), 3, + ACTIONS(704), 3, anon_sym_RBRACE, - anon_sym_abstract, - anon_sym_asset, - [4935] = 2, + anon_sym_let, + sym_step_type, + [4303] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(703), 3, + ACTIONS(706), 3, anon_sym_RBRACE, - anon_sym_abstract, - anon_sym_asset, - [4944] = 2, + anon_sym_let, + sym_step_type, + [4312] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(705), 3, - anon_sym_LBRACK, - anon_sym_LT_DASH_DASH, - anon_sym_DOT_DOT, - [4953] = 4, + ACTIONS(708), 3, + anon_sym_RBRACE, + anon_sym_let, + sym_step_type, + [4321] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(695), 1, - anon_sym_COMMA, - ACTIONS(707), 1, - anon_sym_RPAREN, - STATE(242), 1, - aux_sym_ttc_distribution_repeat1, - [4966] = 3, + ACTIONS(710), 3, + anon_sym_RBRACE, + anon_sym_let, + sym_step_type, + [4330] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(711), 1, - anon_sym_DOT_DOT, - ACTIONS(709), 2, - anon_sym_LBRACK, - anon_sym_LT_DASH_DASH, - [4977] = 2, + ACTIONS(712), 3, + anon_sym_RBRACE, + anon_sym_let, + sym_step_type, + [4339] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(713), 3, + ACTIONS(714), 3, anon_sym_RBRACE, - anon_sym_abstract, - anon_sym_asset, - [4986] = 4, + anon_sym_let, + sym_step_type, + [4348] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(715), 1, - anon_sym_COMMA, - ACTIONS(718), 1, - anon_sym_RPAREN, - STATE(250), 1, - aux_sym_ttc_distribution_repeat1, - [4999] = 4, + ACTIONS(716), 3, + anon_sym_RBRACE, + anon_sym_let, + sym_step_type, + [4357] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(720), 1, + ACTIONS(718), 3, anon_sym_RBRACE, - ACTIONS(722), 1, - anon_sym_COMMA, - STATE(259), 1, - aux_sym_cias_repeat1, - [5012] = 2, + anon_sym_let, + sym_step_type, + [4366] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(225), 3, - anon_sym_LBRACE, + ACTIONS(720), 3, anon_sym_RBRACE, - sym_identifier, - [5021] = 4, + anon_sym_let, + sym_step_type, + [4375] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(671), 1, - anon_sym_DOT, - ACTIONS(724), 1, - anon_sym_LPAREN, - STATE(234), 1, - aux_sym_detector_name_repeat1, - [5034] = 2, + ACTIONS(722), 3, + anon_sym_RBRACE, + anon_sym_let, + sym_step_type, + [4384] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(724), 3, + anon_sym_RBRACE, + anon_sym_let, + sym_step_type, + [4393] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(726), 3, anon_sym_RBRACE, - anon_sym_abstract, - anon_sym_asset, - [5043] = 2, + anon_sym_let, + sym_step_type, + [4402] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(728), 3, anon_sym_RBRACE, - anon_sym_abstract, - anon_sym_asset, - [5052] = 2, + anon_sym_let, + sym_step_type, + [4411] = 4, ACTIONS(3), 1, sym_comment, - ACTIONS(730), 3, + ACTIONS(657), 1, + anon_sym_COMMA, + ACTIONS(730), 1, anon_sym_RBRACE, - anon_sym_abstract, - anon_sym_asset, - [5061] = 2, + STATE(220), 1, + aux_sym_cias_repeat1, + [4424] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(732), 3, anon_sym_RBRACE, - anon_sym_abstract, - anon_sym_asset, - [5070] = 4, + anon_sym_let, + sym_step_type, + [4433] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(667), 1, - anon_sym_COMMA, - ACTIONS(734), 1, - anon_sym_RPAREN, - STATE(240), 1, - aux_sym_detector_context_repeat1, - [5083] = 4, + ACTIONS(734), 3, + anon_sym_RBRACE, + anon_sym_let, + sym_step_type, + [4442] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(722), 1, - anon_sym_COMMA, - ACTIONS(736), 1, + ACTIONS(736), 3, anon_sym_RBRACE, - STATE(232), 1, - aux_sym_cias_repeat1, - [5096] = 2, + anon_sym_let, + sym_step_type, + [4451] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(738), 3, anon_sym_RBRACE, anon_sym_abstract, anon_sym_asset, - [5105] = 2, + [4460] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(740), 3, anon_sym_RBRACE, - anon_sym_abstract, - anon_sym_asset, - [5114] = 2, + anon_sym_let, + sym_step_type, + [4469] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(742), 3, + anon_sym_RBRACE, + anon_sym_let, + sym_step_type, + [4478] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(744), 3, anon_sym_RBRACE, anon_sym_abstract, anon_sym_asset, - [5123] = 2, + [4487] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(678), 2, - anon_sym_DOT, - anon_sym_LPAREN, - [5131] = 2, + ACTIONS(746), 3, + anon_sym_RBRACE, + anon_sym_let, + sym_step_type, + [4496] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(662), 2, + ACTIONS(748), 3, anon_sym_RBRACE, - anon_sym_COMMA, - [5139] = 2, + anon_sym_let, + sym_step_type, + [4505] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(709), 2, - anon_sym_LBRACK, - anon_sym_LT_DASH_DASH, - [5147] = 2, + ACTIONS(518), 1, + anon_sym_LPAREN, + STATE(44), 1, + sym_detector_context, + [4515] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(691), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - [5155] = 2, + ACTIONS(750), 1, + sym_identifier, + STATE(227), 1, + sym_detector_context_asset, + [4525] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(744), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - [5163] = 2, + ACTIONS(752), 1, + sym_cia, + STATE(304), 1, + sym_cias, + [4535] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(577), 2, + anon_sym_LBRACK, + anon_sym_LT_DASH_DASH, + [4543] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(718), 2, + ACTIONS(754), 2, anon_sym_COMMA, anon_sym_RPAREN, - [5171] = 3, + [4551] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(746), 1, - sym_identifier, - STATE(266), 1, - sym_detector_context_asset, - [5181] = 3, + ACTIONS(686), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [4559] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(746), 1, + ACTIONS(750), 1, sym_identifier, - STATE(233), 1, + STATE(275), 1, sym_detector_context_asset, - [5191] = 3, + [4569] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(619), 1, + ACTIONS(590), 2, + anon_sym_DOT, anon_sym_LPAREN, - STATE(44), 1, - sym_detector_context, - [5201] = 2, + [4577] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(748), 2, + ACTIONS(756), 2, anon_sym_LBRACK, anon_sym_LT_DASH_DASH, - [5209] = 3, + [4585] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(750), 1, - sym_cia, - STATE(284), 1, - sym_cias, - [5219] = 3, + ACTIONS(645), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [4593] = 3, ACTIONS(3), 1, sym_comment, - ACTIONS(750), 1, + ACTIONS(752), 1, sym_cia, - STATE(283), 1, + STATE(310), 1, sym_cias, - [5229] = 2, + [4603] = 2, ACTIONS(3), 1, sym_comment, - ACTIONS(752), 1, + ACTIONS(570), 2, anon_sym_RBRACE, - [5236] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(754), 1, - sym_identifier, - [5243] = 2, - ACTIONS(3), 1, - sym_comment, - ACTIONS(756), 1, - anon_sym_RPAREN, - [5250] = 2, + anon_sym_COMMA, + [4611] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(758), 1, anon_sym_RBRACE, - [5257] = 2, + [4618] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(760), 1, - anon_sym_RBRACE, - [5264] = 2, + sym_identifier, + [4625] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(762), 1, sym_identifier, - [5271] = 2, + [4632] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(764), 1, - anon_sym_asset, - [5278] = 2, + anon_sym_RBRACE, + [4639] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(766), 1, - anon_sym_LBRACK, - [5285] = 2, + sym_identifier, + [4646] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(768), 1, anon_sym_RBRACE, - [5292] = 2, + [4653] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(770), 1, - anon_sym_RBRACE, - [5299] = 2, + anon_sym_asset, + [4660] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(772), 1, sym_identifier, - [5306] = 2, + [4667] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(774), 1, - anon_sym_RBRACE, - [5313] = 2, + sym_identifier, + [4674] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(776), 1, anon_sym_DASH_DASH_GT, - [5320] = 2, + [4681] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(778), 1, - sym_identifier, - [5327] = 2, + anon_sym_RBRACK, + [4688] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(780), 1, - anon_sym_COLON, - [5334] = 2, + anon_sym_RPAREN, + [4695] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(782), 1, - ts_builtin_sym_end, - [5341] = 2, + anon_sym_LBRACK, + [4702] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(784), 1, - sym_identifier, - [5348] = 2, + anon_sym_COLON, + [4709] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(786), 1, sym_identifier, - [5355] = 2, + [4716] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(788), 1, - sym_string, - [5362] = 2, + sym_identifier, + [4723] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(790), 1, - sym_string, - [5369] = 2, + sym_identifier, + [4730] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(792), 1, - sym_identifier, - [5376] = 2, + anon_sym_EQ, + [4737] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(794), 1, - anon_sym_LBRACE, - [5383] = 2, + anon_sym_RBRACK, + [4744] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(796), 1, - anon_sym_RBRACK, - [5390] = 2, + sym_identifier, + [4751] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(798), 1, - sym_identifier, - [5397] = 2, + anon_sym_LBRACK, + [4758] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(800), 1, - sym_identifier, - [5404] = 2, + anon_sym_info, + [4765] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(802), 1, - sym_cia, - [5411] = 2, + sym_identifier, + [4772] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(804), 1, - anon_sym_RBRACE, - [5418] = 2, + sym_identifier, + [4779] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(806), 1, sym_identifier, - [5425] = 2, + [4786] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(808), 1, - anon_sym_RBRACE, - [5432] = 2, + sym_string, + [4793] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(810), 1, - anon_sym_LT_DASH_DASH, - [5439] = 2, + anon_sym_RBRACE, + [4800] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(812), 1, - sym_identifier, - [5446] = 2, + anon_sym_LBRACE, + [4807] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(814), 1, anon_sym_RBRACE, - [5453] = 2, + [4814] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(816), 1, - anon_sym_LBRACK, - [5460] = 2, + ts_builtin_sym_end, + [4821] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(818), 1, - anon_sym_info, - [5467] = 2, + sym_identifier, + [4828] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(820), 1, - sym_identifier, - [5474] = 2, + anon_sym_COLON, + [4835] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(822), 1, - anon_sym_COLON, - [5481] = 2, + anon_sym_RBRACE, + [4842] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(824), 1, - sym_identifier, - [5488] = 2, + anon_sym_RBRACK, + [4849] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(826), 1, - sym_identifier, - [5495] = 2, + sym_cia, + [4856] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(828), 1, - anon_sym_RBRACK, - [5502] = 2, + anon_sym_RBRACE, + [4863] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(830), 1, - anon_sym_RBRACE, - [5509] = 2, + sym_identifier, + [4870] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(832), 1, sym_identifier, - [5516] = 2, + [4877] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(834), 1, - anon_sym_RBRACK, - [5523] = 2, + anon_sym_LT_DASH_DASH, + [4884] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(836), 1, sym_string, - [5530] = 2, + [4891] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(838), 1, - sym_identifier, - [5537] = 2, + anon_sym_RBRACE, + [4898] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(840), 1, - sym_string, - [5544] = 2, + sym_identifier, + [4905] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(842), 1, - anon_sym_COLON, - [5551] = 2, + sym_string, + [4912] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(844), 1, - anon_sym_info, - [5558] = 2, + anon_sym_RBRACE, + [4919] = 2, ACTIONS(3), 1, sym_comment, ACTIONS(846), 1, - anon_sym_EQ, + anon_sym_COLON, + [4926] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(848), 1, + anon_sym_RBRACE, + [4933] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(850), 1, + anon_sym_info, + [4940] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(852), 1, + sym_string, }; static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(2)] = 0, - [SMALL_STATE(3)] = 60, - [SMALL_STATE(4)] = 120, - [SMALL_STATE(5)] = 171, - [SMALL_STATE(6)] = 222, - [SMALL_STATE(7)] = 267, - [SMALL_STATE(8)] = 312, - [SMALL_STATE(9)] = 357, - [SMALL_STATE(10)] = 402, - [SMALL_STATE(11)] = 447, - [SMALL_STATE(12)] = 492, - [SMALL_STATE(13)] = 537, - [SMALL_STATE(14)] = 582, - [SMALL_STATE(15)] = 627, - [SMALL_STATE(16)] = 672, - [SMALL_STATE(17)] = 717, - [SMALL_STATE(18)] = 762, - [SMALL_STATE(19)] = 790, - [SMALL_STATE(20)] = 815, - [SMALL_STATE(21)] = 840, - [SMALL_STATE(22)] = 869, - [SMALL_STATE(23)] = 894, - [SMALL_STATE(24)] = 919, - [SMALL_STATE(25)] = 948, - [SMALL_STATE(26)] = 979, - [SMALL_STATE(27)] = 1015, - [SMALL_STATE(28)] = 1051, - [SMALL_STATE(29)] = 1087, - [SMALL_STATE(30)] = 1123, - [SMALL_STATE(31)] = 1159, - [SMALL_STATE(32)] = 1195, - [SMALL_STATE(33)] = 1231, - [SMALL_STATE(34)] = 1267, - [SMALL_STATE(35)] = 1303, - [SMALL_STATE(36)] = 1335, - [SMALL_STATE(37)] = 1371, - [SMALL_STATE(38)] = 1407, - [SMALL_STATE(39)] = 1431, - [SMALL_STATE(40)] = 1467, - [SMALL_STATE(41)] = 1503, - [SMALL_STATE(42)] = 1539, - [SMALL_STATE(43)] = 1575, - [SMALL_STATE(44)] = 1611, - [SMALL_STATE(45)] = 1640, - [SMALL_STATE(46)] = 1669, - [SMALL_STATE(47)] = 1696, - [SMALL_STATE(48)] = 1722, - [SMALL_STATE(49)] = 1748, - [SMALL_STATE(50)] = 1770, - [SMALL_STATE(51)] = 1796, - [SMALL_STATE(52)] = 1818, - [SMALL_STATE(53)] = 1839, - [SMALL_STATE(54)] = 1860, - [SMALL_STATE(55)] = 1880, - [SMALL_STATE(56)] = 1900, - [SMALL_STATE(57)] = 1920, - [SMALL_STATE(58)] = 1940, - [SMALL_STATE(59)] = 1965, - [SMALL_STATE(60)] = 1990, - [SMALL_STATE(61)] = 2011, - [SMALL_STATE(62)] = 2036, - [SMALL_STATE(63)] = 2061, - [SMALL_STATE(64)] = 2090, - [SMALL_STATE(65)] = 2115, - [SMALL_STATE(66)] = 2136, - [SMALL_STATE(67)] = 2157, - [SMALL_STATE(68)] = 2186, - [SMALL_STATE(69)] = 2211, - [SMALL_STATE(70)] = 2236, - [SMALL_STATE(71)] = 2261, - [SMALL_STATE(72)] = 2281, - [SMALL_STATE(73)] = 2301, - [SMALL_STATE(74)] = 2323, - [SMALL_STATE(75)] = 2343, - [SMALL_STATE(76)] = 2359, - [SMALL_STATE(77)] = 2379, - [SMALL_STATE(78)] = 2401, - [SMALL_STATE(79)] = 2421, - [SMALL_STATE(80)] = 2441, - [SMALL_STATE(81)] = 2461, - [SMALL_STATE(82)] = 2481, - [SMALL_STATE(83)] = 2501, - [SMALL_STATE(84)] = 2523, - [SMALL_STATE(85)] = 2545, - [SMALL_STATE(86)] = 2565, - [SMALL_STATE(87)] = 2587, - [SMALL_STATE(88)] = 2607, - [SMALL_STATE(89)] = 2627, - [SMALL_STATE(90)] = 2647, - [SMALL_STATE(91)] = 2667, - [SMALL_STATE(92)] = 2687, - [SMALL_STATE(93)] = 2707, - [SMALL_STATE(94)] = 2727, - [SMALL_STATE(95)] = 2747, - [SMALL_STATE(96)] = 2767, - [SMALL_STATE(97)] = 2787, - [SMALL_STATE(98)] = 2807, - [SMALL_STATE(99)] = 2827, - [SMALL_STATE(100)] = 2847, - [SMALL_STATE(101)] = 2867, - [SMALL_STATE(102)] = 2889, - [SMALL_STATE(103)] = 2909, - [SMALL_STATE(104)] = 2929, - [SMALL_STATE(105)] = 2949, - [SMALL_STATE(106)] = 2969, - [SMALL_STATE(107)] = 2991, - [SMALL_STATE(108)] = 3011, - [SMALL_STATE(109)] = 3031, - [SMALL_STATE(110)] = 3051, - [SMALL_STATE(111)] = 3071, - [SMALL_STATE(112)] = 3092, - [SMALL_STATE(113)] = 3111, - [SMALL_STATE(114)] = 3130, - [SMALL_STATE(115)] = 3151, - [SMALL_STATE(116)] = 3172, - [SMALL_STATE(117)] = 3193, - [SMALL_STATE(118)] = 3211, - [SMALL_STATE(119)] = 3229, - [SMALL_STATE(120)] = 3247, - [SMALL_STATE(121)] = 3265, - [SMALL_STATE(122)] = 3278, - [SMALL_STATE(123)] = 3291, - [SMALL_STATE(124)] = 3304, - [SMALL_STATE(125)] = 3317, - [SMALL_STATE(126)] = 3338, - [SMALL_STATE(127)] = 3351, - [SMALL_STATE(128)] = 3364, - [SMALL_STATE(129)] = 3377, - [SMALL_STATE(130)] = 3390, - [SMALL_STATE(131)] = 3403, - [SMALL_STATE(132)] = 3416, - [SMALL_STATE(133)] = 3429, - [SMALL_STATE(134)] = 3442, - [SMALL_STATE(135)] = 3455, - [SMALL_STATE(136)] = 3468, - [SMALL_STATE(137)] = 3481, - [SMALL_STATE(138)] = 3496, - [SMALL_STATE(139)] = 3511, - [SMALL_STATE(140)] = 3530, - [SMALL_STATE(141)] = 3547, - [SMALL_STATE(142)] = 3564, - [SMALL_STATE(143)] = 3577, - [SMALL_STATE(144)] = 3590, - [SMALL_STATE(145)] = 3603, - [SMALL_STATE(146)] = 3616, - [SMALL_STATE(147)] = 3629, - [SMALL_STATE(148)] = 3642, - [SMALL_STATE(149)] = 3655, - [SMALL_STATE(150)] = 3668, - [SMALL_STATE(151)] = 3681, - [SMALL_STATE(152)] = 3694, - [SMALL_STATE(153)] = 3707, - [SMALL_STATE(154)] = 3720, - [SMALL_STATE(155)] = 3733, - [SMALL_STATE(156)] = 3746, - [SMALL_STATE(157)] = 3759, - [SMALL_STATE(158)] = 3774, - [SMALL_STATE(159)] = 3787, - [SMALL_STATE(160)] = 3800, - [SMALL_STATE(161)] = 3813, - [SMALL_STATE(162)] = 3826, - [SMALL_STATE(163)] = 3839, - [SMALL_STATE(164)] = 3852, - [SMALL_STATE(165)] = 3865, - [SMALL_STATE(166)] = 3878, - [SMALL_STATE(167)] = 3891, - [SMALL_STATE(168)] = 3904, - [SMALL_STATE(169)] = 3917, - [SMALL_STATE(170)] = 3930, - [SMALL_STATE(171)] = 3943, - [SMALL_STATE(172)] = 3958, - [SMALL_STATE(173)] = 3971, - [SMALL_STATE(174)] = 3984, - [SMALL_STATE(175)] = 3997, - [SMALL_STATE(176)] = 4010, - [SMALL_STATE(177)] = 4023, - [SMALL_STATE(178)] = 4036, - [SMALL_STATE(179)] = 4049, - [SMALL_STATE(180)] = 4062, - [SMALL_STATE(181)] = 4075, - [SMALL_STATE(182)] = 4088, - [SMALL_STATE(183)] = 4101, - [SMALL_STATE(184)] = 4114, - [SMALL_STATE(185)] = 4127, - [SMALL_STATE(186)] = 4140, - [SMALL_STATE(187)] = 4153, - [SMALL_STATE(188)] = 4166, - [SMALL_STATE(189)] = 4179, - [SMALL_STATE(190)] = 4192, - [SMALL_STATE(191)] = 4205, - [SMALL_STATE(192)] = 4218, - [SMALL_STATE(193)] = 4231, - [SMALL_STATE(194)] = 4244, - [SMALL_STATE(195)] = 4264, - [SMALL_STATE(196)] = 4284, - [SMALL_STATE(197)] = 4304, - [SMALL_STATE(198)] = 4324, - [SMALL_STATE(199)] = 4341, - [SMALL_STATE(200)] = 4352, - [SMALL_STATE(201)] = 4363, - [SMALL_STATE(202)] = 4380, - [SMALL_STATE(203)] = 4391, - [SMALL_STATE(204)] = 4408, - [SMALL_STATE(205)] = 4425, - [SMALL_STATE(206)] = 4436, - [SMALL_STATE(207)] = 4447, - [SMALL_STATE(208)] = 4464, - [SMALL_STATE(209)] = 4481, - [SMALL_STATE(210)] = 4498, - [SMALL_STATE(211)] = 4509, - [SMALL_STATE(212)] = 4520, - [SMALL_STATE(213)] = 4535, - [SMALL_STATE(214)] = 4546, - [SMALL_STATE(215)] = 4557, - [SMALL_STATE(216)] = 4571, - [SMALL_STATE(217)] = 4585, - [SMALL_STATE(218)] = 4601, - [SMALL_STATE(219)] = 4615, - [SMALL_STATE(220)] = 4629, - [SMALL_STATE(221)] = 4643, - [SMALL_STATE(222)] = 4657, - [SMALL_STATE(223)] = 4671, - [SMALL_STATE(224)] = 4685, - [SMALL_STATE(225)] = 4699, - [SMALL_STATE(226)] = 4713, - [SMALL_STATE(227)] = 4727, - [SMALL_STATE(228)] = 4741, - [SMALL_STATE(229)] = 4755, - [SMALL_STATE(230)] = 4769, - [SMALL_STATE(231)] = 4783, - [SMALL_STATE(232)] = 4792, - [SMALL_STATE(233)] = 4805, - [SMALL_STATE(234)] = 4818, - [SMALL_STATE(235)] = 4831, - [SMALL_STATE(236)] = 4844, - [SMALL_STATE(237)] = 4853, - [SMALL_STATE(238)] = 4862, - [SMALL_STATE(239)] = 4871, - [SMALL_STATE(240)] = 4880, - [SMALL_STATE(241)] = 4893, - [SMALL_STATE(242)] = 4904, - [SMALL_STATE(243)] = 4917, - [SMALL_STATE(244)] = 4926, - [SMALL_STATE(245)] = 4935, - [SMALL_STATE(246)] = 4944, - [SMALL_STATE(247)] = 4953, - [SMALL_STATE(248)] = 4966, - [SMALL_STATE(249)] = 4977, - [SMALL_STATE(250)] = 4986, - [SMALL_STATE(251)] = 4999, - [SMALL_STATE(252)] = 5012, - [SMALL_STATE(253)] = 5021, - [SMALL_STATE(254)] = 5034, - [SMALL_STATE(255)] = 5043, - [SMALL_STATE(256)] = 5052, - [SMALL_STATE(257)] = 5061, - [SMALL_STATE(258)] = 5070, - [SMALL_STATE(259)] = 5083, - [SMALL_STATE(260)] = 5096, - [SMALL_STATE(261)] = 5105, - [SMALL_STATE(262)] = 5114, - [SMALL_STATE(263)] = 5123, - [SMALL_STATE(264)] = 5131, - [SMALL_STATE(265)] = 5139, - [SMALL_STATE(266)] = 5147, - [SMALL_STATE(267)] = 5155, - [SMALL_STATE(268)] = 5163, - [SMALL_STATE(269)] = 5171, - [SMALL_STATE(270)] = 5181, - [SMALL_STATE(271)] = 5191, - [SMALL_STATE(272)] = 5201, - [SMALL_STATE(273)] = 5209, - [SMALL_STATE(274)] = 5219, - [SMALL_STATE(275)] = 5229, - [SMALL_STATE(276)] = 5236, - [SMALL_STATE(277)] = 5243, - [SMALL_STATE(278)] = 5250, - [SMALL_STATE(279)] = 5257, - [SMALL_STATE(280)] = 5264, - [SMALL_STATE(281)] = 5271, - [SMALL_STATE(282)] = 5278, - [SMALL_STATE(283)] = 5285, - [SMALL_STATE(284)] = 5292, - [SMALL_STATE(285)] = 5299, - [SMALL_STATE(286)] = 5306, - [SMALL_STATE(287)] = 5313, - [SMALL_STATE(288)] = 5320, - [SMALL_STATE(289)] = 5327, - [SMALL_STATE(290)] = 5334, - [SMALL_STATE(291)] = 5341, - [SMALL_STATE(292)] = 5348, - [SMALL_STATE(293)] = 5355, - [SMALL_STATE(294)] = 5362, - [SMALL_STATE(295)] = 5369, - [SMALL_STATE(296)] = 5376, - [SMALL_STATE(297)] = 5383, - [SMALL_STATE(298)] = 5390, - [SMALL_STATE(299)] = 5397, - [SMALL_STATE(300)] = 5404, - [SMALL_STATE(301)] = 5411, - [SMALL_STATE(302)] = 5418, - [SMALL_STATE(303)] = 5425, - [SMALL_STATE(304)] = 5432, - [SMALL_STATE(305)] = 5439, - [SMALL_STATE(306)] = 5446, - [SMALL_STATE(307)] = 5453, - [SMALL_STATE(308)] = 5460, - [SMALL_STATE(309)] = 5467, - [SMALL_STATE(310)] = 5474, - [SMALL_STATE(311)] = 5481, - [SMALL_STATE(312)] = 5488, - [SMALL_STATE(313)] = 5495, - [SMALL_STATE(314)] = 5502, - [SMALL_STATE(315)] = 5509, - [SMALL_STATE(316)] = 5516, - [SMALL_STATE(317)] = 5523, - [SMALL_STATE(318)] = 5530, - [SMALL_STATE(319)] = 5537, - [SMALL_STATE(320)] = 5544, - [SMALL_STATE(321)] = 5551, - [SMALL_STATE(322)] = 5558, + [SMALL_STATE(3)] = 56, + [SMALL_STATE(4)] = 112, + [SMALL_STATE(5)] = 159, + [SMALL_STATE(6)] = 206, + [SMALL_STATE(7)] = 247, + [SMALL_STATE(8)] = 288, + [SMALL_STATE(9)] = 329, + [SMALL_STATE(10)] = 370, + [SMALL_STATE(11)] = 411, + [SMALL_STATE(12)] = 452, + [SMALL_STATE(13)] = 493, + [SMALL_STATE(14)] = 534, + [SMALL_STATE(15)] = 575, + [SMALL_STATE(16)] = 616, + [SMALL_STATE(17)] = 657, + [SMALL_STATE(18)] = 698, + [SMALL_STATE(19)] = 722, + [SMALL_STATE(20)] = 747, + [SMALL_STATE(21)] = 768, + [SMALL_STATE(22)] = 795, + [SMALL_STATE(23)] = 820, + [SMALL_STATE(24)] = 841, + [SMALL_STATE(25)] = 862, + [SMALL_STATE(26)] = 883, + [SMALL_STATE(27)] = 915, + [SMALL_STATE(28)] = 947, + [SMALL_STATE(29)] = 979, + [SMALL_STATE(30)] = 1011, + [SMALL_STATE(31)] = 1043, + [SMALL_STATE(32)] = 1075, + [SMALL_STATE(33)] = 1107, + [SMALL_STATE(34)] = 1139, + [SMALL_STATE(35)] = 1171, + [SMALL_STATE(36)] = 1203, + [SMALL_STATE(37)] = 1235, + [SMALL_STATE(38)] = 1267, + [SMALL_STATE(39)] = 1295, + [SMALL_STATE(40)] = 1327, + [SMALL_STATE(41)] = 1359, + [SMALL_STATE(42)] = 1379, + [SMALL_STATE(43)] = 1411, + [SMALL_STATE(44)] = 1443, + [SMALL_STATE(45)] = 1468, + [SMALL_STATE(46)] = 1497, + [SMALL_STATE(47)] = 1526, + [SMALL_STATE(48)] = 1551, + [SMALL_STATE(49)] = 1574, + [SMALL_STATE(50)] = 1592, + [SMALL_STATE(51)] = 1614, + [SMALL_STATE(52)] = 1636, + [SMALL_STATE(53)] = 1658, + [SMALL_STATE(54)] = 1676, + [SMALL_STATE(55)] = 1698, + [SMALL_STATE(56)] = 1720, + [SMALL_STATE(57)] = 1742, + [SMALL_STATE(58)] = 1764, + [SMALL_STATE(59)] = 1786, + [SMALL_STATE(60)] = 1808, + [SMALL_STATE(61)] = 1829, + [SMALL_STATE(62)] = 1850, + [SMALL_STATE(63)] = 1871, + [SMALL_STATE(64)] = 1892, + [SMALL_STATE(65)] = 1909, + [SMALL_STATE(66)] = 1926, + [SMALL_STATE(67)] = 1944, + [SMALL_STATE(68)] = 1960, + [SMALL_STATE(69)] = 1976, + [SMALL_STATE(70)] = 1994, + [SMALL_STATE(71)] = 2010, + [SMALL_STATE(72)] = 2028, + [SMALL_STATE(73)] = 2044, + [SMALL_STATE(74)] = 2060, + [SMALL_STATE(75)] = 2078, + [SMALL_STATE(76)] = 2095, + [SMALL_STATE(77)] = 2116, + [SMALL_STATE(78)] = 2137, + [SMALL_STATE(79)] = 2158, + [SMALL_STATE(80)] = 2173, + [SMALL_STATE(81)] = 2190, + [SMALL_STATE(82)] = 2211, + [SMALL_STATE(83)] = 2226, + [SMALL_STATE(84)] = 2241, + [SMALL_STATE(85)] = 2256, + [SMALL_STATE(86)] = 2275, + [SMALL_STATE(87)] = 2292, + [SMALL_STATE(88)] = 2309, + [SMALL_STATE(89)] = 2330, + [SMALL_STATE(90)] = 2351, + [SMALL_STATE(91)] = 2372, + [SMALL_STATE(92)] = 2389, + [SMALL_STATE(93)] = 2410, + [SMALL_STATE(94)] = 2431, + [SMALL_STATE(95)] = 2447, + [SMALL_STATE(96)] = 2467, + [SMALL_STATE(97)] = 2483, + [SMALL_STATE(98)] = 2499, + [SMALL_STATE(99)] = 2515, + [SMALL_STATE(100)] = 2531, + [SMALL_STATE(101)] = 2551, + [SMALL_STATE(102)] = 2571, + [SMALL_STATE(103)] = 2591, + [SMALL_STATE(104)] = 2607, + [SMALL_STATE(105)] = 2623, + [SMALL_STATE(106)] = 2639, + [SMALL_STATE(107)] = 2655, + [SMALL_STATE(108)] = 2671, + [SMALL_STATE(109)] = 2689, + [SMALL_STATE(110)] = 2705, + [SMALL_STATE(111)] = 2721, + [SMALL_STATE(112)] = 2733, + [SMALL_STATE(113)] = 2751, + [SMALL_STATE(114)] = 2767, + [SMALL_STATE(115)] = 2783, + [SMALL_STATE(116)] = 2799, + [SMALL_STATE(117)] = 2815, + [SMALL_STATE(118)] = 2831, + [SMALL_STATE(119)] = 2847, + [SMALL_STATE(120)] = 2863, + [SMALL_STATE(121)] = 2879, + [SMALL_STATE(122)] = 2895, + [SMALL_STATE(123)] = 2911, + [SMALL_STATE(124)] = 2927, + [SMALL_STATE(125)] = 2943, + [SMALL_STATE(126)] = 2959, + [SMALL_STATE(127)] = 2975, + [SMALL_STATE(128)] = 2991, + [SMALL_STATE(129)] = 3007, + [SMALL_STATE(130)] = 3023, + [SMALL_STATE(131)] = 3039, + [SMALL_STATE(132)] = 3055, + [SMALL_STATE(133)] = 3075, + [SMALL_STATE(134)] = 3091, + [SMALL_STATE(135)] = 3108, + [SMALL_STATE(136)] = 3119, + [SMALL_STATE(137)] = 3134, + [SMALL_STATE(138)] = 3151, + [SMALL_STATE(139)] = 3162, + [SMALL_STATE(140)] = 3179, + [SMALL_STATE(141)] = 3190, + [SMALL_STATE(142)] = 3207, + [SMALL_STATE(143)] = 3218, + [SMALL_STATE(144)] = 3229, + [SMALL_STATE(145)] = 3240, + [SMALL_STATE(146)] = 3257, + [SMALL_STATE(147)] = 3274, + [SMALL_STATE(148)] = 3285, + [SMALL_STATE(149)] = 3296, + [SMALL_STATE(150)] = 3313, + [SMALL_STATE(151)] = 3328, + [SMALL_STATE(152)] = 3339, + [SMALL_STATE(153)] = 3354, + [SMALL_STATE(154)] = 3368, + [SMALL_STATE(155)] = 3382, + [SMALL_STATE(156)] = 3396, + [SMALL_STATE(157)] = 3410, + [SMALL_STATE(158)] = 3424, + [SMALL_STATE(159)] = 3438, + [SMALL_STATE(160)] = 3452, + [SMALL_STATE(161)] = 3466, + [SMALL_STATE(162)] = 3480, + [SMALL_STATE(163)] = 3494, + [SMALL_STATE(164)] = 3510, + [SMALL_STATE(165)] = 3524, + [SMALL_STATE(166)] = 3538, + [SMALL_STATE(167)] = 3552, + [SMALL_STATE(168)] = 3566, + [SMALL_STATE(169)] = 3580, + [SMALL_STATE(170)] = 3589, + [SMALL_STATE(171)] = 3598, + [SMALL_STATE(172)] = 3607, + [SMALL_STATE(173)] = 3616, + [SMALL_STATE(174)] = 3625, + [SMALL_STATE(175)] = 3634, + [SMALL_STATE(176)] = 3643, + [SMALL_STATE(177)] = 3652, + [SMALL_STATE(178)] = 3661, + [SMALL_STATE(179)] = 3670, + [SMALL_STATE(180)] = 3679, + [SMALL_STATE(181)] = 3688, + [SMALL_STATE(182)] = 3697, + [SMALL_STATE(183)] = 3706, + [SMALL_STATE(184)] = 3719, + [SMALL_STATE(185)] = 3728, + [SMALL_STATE(186)] = 3741, + [SMALL_STATE(187)] = 3750, + [SMALL_STATE(188)] = 3761, + [SMALL_STATE(189)] = 3770, + [SMALL_STATE(190)] = 3783, + [SMALL_STATE(191)] = 3796, + [SMALL_STATE(192)] = 3805, + [SMALL_STATE(193)] = 3814, + [SMALL_STATE(194)] = 3823, + [SMALL_STATE(195)] = 3836, + [SMALL_STATE(196)] = 3845, + [SMALL_STATE(197)] = 3854, + [SMALL_STATE(198)] = 3863, + [SMALL_STATE(199)] = 3872, + [SMALL_STATE(200)] = 3881, + [SMALL_STATE(201)] = 3890, + [SMALL_STATE(202)] = 3899, + [SMALL_STATE(203)] = 3908, + [SMALL_STATE(204)] = 3917, + [SMALL_STATE(205)] = 3926, + [SMALL_STATE(206)] = 3935, + [SMALL_STATE(207)] = 3944, + [SMALL_STATE(208)] = 3953, + [SMALL_STATE(209)] = 3962, + [SMALL_STATE(210)] = 3971, + [SMALL_STATE(211)] = 3980, + [SMALL_STATE(212)] = 3989, + [SMALL_STATE(213)] = 3998, + [SMALL_STATE(214)] = 4007, + [SMALL_STATE(215)] = 4016, + [SMALL_STATE(216)] = 4029, + [SMALL_STATE(217)] = 4040, + [SMALL_STATE(218)] = 4053, + [SMALL_STATE(219)] = 4062, + [SMALL_STATE(220)] = 4071, + [SMALL_STATE(221)] = 4084, + [SMALL_STATE(222)] = 4093, + [SMALL_STATE(223)] = 4102, + [SMALL_STATE(224)] = 4111, + [SMALL_STATE(225)] = 4120, + [SMALL_STATE(226)] = 4129, + [SMALL_STATE(227)] = 4138, + [SMALL_STATE(228)] = 4151, + [SMALL_STATE(229)] = 4160, + [SMALL_STATE(230)] = 4169, + [SMALL_STATE(231)] = 4182, + [SMALL_STATE(232)] = 4191, + [SMALL_STATE(233)] = 4200, + [SMALL_STATE(234)] = 4213, + [SMALL_STATE(235)] = 4222, + [SMALL_STATE(236)] = 4231, + [SMALL_STATE(237)] = 4240, + [SMALL_STATE(238)] = 4249, + [SMALL_STATE(239)] = 4258, + [SMALL_STATE(240)] = 4267, + [SMALL_STATE(241)] = 4276, + [SMALL_STATE(242)] = 4285, + [SMALL_STATE(243)] = 4294, + [SMALL_STATE(244)] = 4303, + [SMALL_STATE(245)] = 4312, + [SMALL_STATE(246)] = 4321, + [SMALL_STATE(247)] = 4330, + [SMALL_STATE(248)] = 4339, + [SMALL_STATE(249)] = 4348, + [SMALL_STATE(250)] = 4357, + [SMALL_STATE(251)] = 4366, + [SMALL_STATE(252)] = 4375, + [SMALL_STATE(253)] = 4384, + [SMALL_STATE(254)] = 4393, + [SMALL_STATE(255)] = 4402, + [SMALL_STATE(256)] = 4411, + [SMALL_STATE(257)] = 4424, + [SMALL_STATE(258)] = 4433, + [SMALL_STATE(259)] = 4442, + [SMALL_STATE(260)] = 4451, + [SMALL_STATE(261)] = 4460, + [SMALL_STATE(262)] = 4469, + [SMALL_STATE(263)] = 4478, + [SMALL_STATE(264)] = 4487, + [SMALL_STATE(265)] = 4496, + [SMALL_STATE(266)] = 4505, + [SMALL_STATE(267)] = 4515, + [SMALL_STATE(268)] = 4525, + [SMALL_STATE(269)] = 4535, + [SMALL_STATE(270)] = 4543, + [SMALL_STATE(271)] = 4551, + [SMALL_STATE(272)] = 4559, + [SMALL_STATE(273)] = 4569, + [SMALL_STATE(274)] = 4577, + [SMALL_STATE(275)] = 4585, + [SMALL_STATE(276)] = 4593, + [SMALL_STATE(277)] = 4603, + [SMALL_STATE(278)] = 4611, + [SMALL_STATE(279)] = 4618, + [SMALL_STATE(280)] = 4625, + [SMALL_STATE(281)] = 4632, + [SMALL_STATE(282)] = 4639, + [SMALL_STATE(283)] = 4646, + [SMALL_STATE(284)] = 4653, + [SMALL_STATE(285)] = 4660, + [SMALL_STATE(286)] = 4667, + [SMALL_STATE(287)] = 4674, + [SMALL_STATE(288)] = 4681, + [SMALL_STATE(289)] = 4688, + [SMALL_STATE(290)] = 4695, + [SMALL_STATE(291)] = 4702, + [SMALL_STATE(292)] = 4709, + [SMALL_STATE(293)] = 4716, + [SMALL_STATE(294)] = 4723, + [SMALL_STATE(295)] = 4730, + [SMALL_STATE(296)] = 4737, + [SMALL_STATE(297)] = 4744, + [SMALL_STATE(298)] = 4751, + [SMALL_STATE(299)] = 4758, + [SMALL_STATE(300)] = 4765, + [SMALL_STATE(301)] = 4772, + [SMALL_STATE(302)] = 4779, + [SMALL_STATE(303)] = 4786, + [SMALL_STATE(304)] = 4793, + [SMALL_STATE(305)] = 4800, + [SMALL_STATE(306)] = 4807, + [SMALL_STATE(307)] = 4814, + [SMALL_STATE(308)] = 4821, + [SMALL_STATE(309)] = 4828, + [SMALL_STATE(310)] = 4835, + [SMALL_STATE(311)] = 4842, + [SMALL_STATE(312)] = 4849, + [SMALL_STATE(313)] = 4856, + [SMALL_STATE(314)] = 4863, + [SMALL_STATE(315)] = 4870, + [SMALL_STATE(316)] = 4877, + [SMALL_STATE(317)] = 4884, + [SMALL_STATE(318)] = 4891, + [SMALL_STATE(319)] = 4898, + [SMALL_STATE(320)] = 4905, + [SMALL_STATE(321)] = 4912, + [SMALL_STATE(322)] = 4919, + [SMALL_STATE(323)] = 4926, + [SMALL_STATE(324)] = 4933, + [SMALL_STATE(325)] = 4940, }; static const TSParseActionEntry ts_parse_actions[] = { @@ -8009,22 +7415,22 @@ static const TSParseActionEntry ts_parse_actions[] = { [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT_EXTRA(), [5] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 0, 0, 0), - [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(293), - [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(302), - [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(298), - [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(296), - [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(321), + [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(303), + [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(279), + [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(319), + [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(305), + [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(324), [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT_EXTRA(), - [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(273), + [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(276), [21] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 2, 0, 9), [23] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 2, 0, 9), - [25] = {.entry = {.count = 1, .reusable = true}}, SHIFT(312), - [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(217), - [29] = {.entry = {.count = 1, .reusable = true}}, SHIFT(217), - [31] = {.entry = {.count = 1, .reusable = true}}, SHIFT(116), - [33] = {.entry = {.count = 1, .reusable = true}}, SHIFT(115), - [35] = {.entry = {.count = 1, .reusable = true}}, SHIFT(77), - [37] = {.entry = {.count = 1, .reusable = true}}, SHIFT(274), + [25] = {.entry = {.count = 1, .reusable = true}}, SHIFT(315), + [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(163), + [29] = {.entry = {.count = 1, .reusable = true}}, SHIFT(163), + [31] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), + [33] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), + [35] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), + [37] = {.entry = {.count = 1, .reusable = true}}, SHIFT(268), [39] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 17), [41] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 3, 0, 17), [43] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 47), @@ -8037,388 +7443,391 @@ static const TSParseActionEntry ts_parse_actions[] = { [57] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 3, 0, 15), [59] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 30), [61] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 4, 0, 30), - [63] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 38), - [65] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 4, 0, 38), - [67] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 37), - [69] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 4, 0, 37), + [63] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 37), + [65] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 4, 0, 37), + [67] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 38), + [69] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 4, 0, 38), [71] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 65), [73] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 5, 0, 65), - [75] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 80), - [77] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 6, 0, 80), - [79] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 79), - [81] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 6, 0, 79), - [83] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 106), - [85] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 7, 0, 106), - [87] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 118), - [89] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 7, 0, 118), + [75] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 140), + [77] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 8, 0, 140), + [79] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 118), + [81] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 7, 0, 118), + [83] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 79), + [85] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 6, 0, 79), + [87] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 80), + [89] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 6, 0, 80), [91] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 119), [93] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 7, 0, 119), - [95] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 140), - [97] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 8, 0, 140), + [95] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 106), + [97] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attack_step, 7, 0, 106), [99] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__asset_expr_primary, 1, 0, 0), - [101] = {.entry = {.count = 1, .reusable = true}}, SHIFT(277), + [101] = {.entry = {.count = 1, .reusable = true}}, SHIFT(289), [103] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__asset_expr_primary, 1, 0, 0), - [105] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__inline_asset_expr, 3, 0, 0), - [107] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__inline_asset_expr, 3, 0, 0), - [109] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_expr_type, 4, 0, 102), - [111] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asset_expr_type, 4, 0, 102), - [113] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_attack_step_repeat1, 2, 0, 0), - [115] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_attack_step_repeat1, 2, 0, 0), - [117] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attack_step_repeat1, 2, 0, 0), SHIFT_REPEAT(312), - [120] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_expr_unop, 2, 0, 46), - [122] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asset_expr_unop, 2, 0, 46), - [124] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_variable_substitution, 3, 0, 75), - [126] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asset_variable_substitution, 3, 0, 75), - [128] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_expr_binop, 3, 0, 76), - [130] = {.entry = {.count = 1, .reusable = true}}, SHIFT(285), - [132] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asset_expr_binop, 3, 0, 76), - [134] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), - [136] = {.entry = {.count = 1, .reusable = true}}, SHIFT(117), - [138] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 18), - [140] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 34), - [142] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 81), - [144] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 31), - [146] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 56), - [148] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 66), - [150] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 69), - [152] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 39), - [154] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 95), - [156] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_expr, 1, 0, 0), - [158] = {.entry = {.count = 1, .reusable = false}}, SHIFT(119), - [160] = {.entry = {.count = 1, .reusable = true}}, SHIFT(119), - [162] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 107), - [164] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 110), - [166] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 141), - [168] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 144), - [170] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 120), - [172] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 129), + [105] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_attack_step_repeat1, 2, 0, 0), + [107] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_attack_step_repeat1, 2, 0, 0), + [109] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attack_step_repeat1, 2, 0, 0), SHIFT_REPEAT(315), + [112] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_expr_unop, 2, 0, 46), + [114] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asset_expr_unop, 2, 0, 46), + [116] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_expr_binop, 3, 0, 76), + [118] = {.entry = {.count = 1, .reusable = true}}, SHIFT(69), + [120] = {.entry = {.count = 1, .reusable = true}}, SHIFT(294), + [122] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asset_expr_binop, 3, 0, 76), + [124] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), + [126] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_variable_substitution, 3, 0, 75), + [128] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asset_variable_substitution, 3, 0, 75), + [130] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_expr_type, 4, 0, 102), + [132] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asset_expr_type, 4, 0, 102), + [134] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__inline_asset_expr, 3, 0, 0), + [136] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__inline_asset_expr, 3, 0, 0), + [138] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 69), + [140] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 31), + [142] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 39), + [144] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 18), + [146] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 34), + [148] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 81), + [150] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 95), + [152] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 56), + [154] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 107), + [156] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 110), + [158] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 66), + [160] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 144), + [162] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_expr, 1, 0, 0), + [164] = {.entry = {.count = 1, .reusable = false}}, SHIFT(74), + [166] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), + [168] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 120), + [170] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 129), + [172] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 141), [174] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 156), - [176] = {.entry = {.count = 1, .reusable = false}}, SHIFT(48), + [176] = {.entry = {.count = 1, .reusable = false}}, SHIFT(51), [178] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 3, 0, 48), [180] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 3, 0, 48), - [182] = {.entry = {.count = 1, .reusable = false}}, SHIFT(50), - [184] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 2, 0, 24), - [186] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 2, 0, 24), - [188] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_category_declaration_repeat1, 2, 0, 0), SHIFT_REPEAT(321), - [191] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat1, 2, 0, 0), - [193] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_category_declaration_repeat1, 2, 0, 0), - [195] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_attack_step_repeat2, 2, 0, 0), - [197] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attack_step_repeat2, 2, 0, 0), SHIFT_REPEAT(217), - [200] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attack_step_repeat2, 2, 0, 0), SHIFT_REPEAT(217), - [203] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 4, 0, 83), - [205] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 4, 0, 83), - [207] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector_context, 3, 0, 0), - [209] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_context, 3, 0, 0), - [211] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 3, 0, 49), - [213] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 3, 0, 49), - [215] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector_context, 4, 0, 0), - [217] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_context, 4, 0, 0), - [219] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc, 3, 0, 0), - [221] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc, 3, 0, 0), - [223] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_meta, 4, 0, 6), - [225] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_meta, 4, 0, 6), - [227] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 3, 0, 50), - [229] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 3, 0, 50), - [231] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 4, 0, 84), - [233] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 4, 0, 84), - [235] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 4, 0, 85), - [237] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 4, 0, 85), - [239] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 5, 0, 113), - [241] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 5, 0, 113), - [243] = {.entry = {.count = 1, .reusable = true}}, SHIFT(256), - [245] = {.entry = {.count = 1, .reusable = true}}, SHIFT(288), - [247] = {.entry = {.count = 1, .reusable = true}}, SHIFT(295), - [249] = {.entry = {.count = 1, .reusable = true}}, SHIFT(236), - [251] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_preconditions_repeat1, 2, 0, 0), - [253] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_preconditions_repeat1, 2, 0, 0), SHIFT_REPEAT(111), - [256] = {.entry = {.count = 1, .reusable = true}}, SHIFT(245), - [258] = {.entry = {.count = 1, .reusable = true}}, SHIFT(262), - [260] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), - [262] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(293), - [265] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(302), - [268] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(298), - [271] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(296), - [274] = {.entry = {.count = 1, .reusable = true}}, SHIFT(237), - [276] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preconditions, 2, 0, 25), - [278] = {.entry = {.count = 1, .reusable = true}}, SHIFT(111), - [280] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preconditions, 3, 0, 51), - [282] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1, 0, 0), - [284] = {.entry = {.count = 1, .reusable = true}}, SHIFT(238), - [286] = {.entry = {.count = 1, .reusable = true}}, SHIFT(243), - [288] = {.entry = {.count = 1, .reusable = true}}, SHIFT(249), - [290] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 142), - [292] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 40), - [294] = {.entry = {.count = 1, .reusable = false}}, SHIFT(120), - [296] = {.entry = {.count = 1, .reusable = true}}, SHIFT(73), - [298] = {.entry = {.count = 1, .reusable = false}}, SHIFT(196), - [300] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 28), - [302] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 87), - [304] = {.entry = {.count = 1, .reusable = false}}, SHIFT(197), - [306] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 93), - [308] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 96), - [310] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 99), - [312] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 32), - [314] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 104), - [316] = {.entry = {.count = 1, .reusable = false}}, SHIFT(139), - [318] = {.entry = {.count = 1, .reusable = false}}, SHIFT(140), - [320] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 108), - [322] = {.entry = {.count = 1, .reusable = false}}, SHIFT(141), - [324] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 111), - [326] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 54), - [328] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 116), - [330] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 57), - [332] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 60), - [334] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 63), - [336] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 122), - [338] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 127), - [340] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 35), - [342] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 130), - [344] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 133), - [346] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 138), - [348] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 13), - [350] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 67), - [352] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_definition, 1, 0, 0), - [354] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 70), - [356] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 145), - [358] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 149), - [360] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 154), - [362] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_asset_definition_repeat1, 2, 0, 0), - [364] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_asset_definition_repeat1, 2, 0, 0), SHIFT_REPEAT(288), - [367] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_asset_definition_repeat1, 2, 0, 0), SHIFT_REPEAT(295), - [370] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 157), - [372] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 160), - [374] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 166), - [376] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 77), - [378] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), - [380] = {.entry = {.count = 1, .reusable = true}}, SHIFT(118), - [382] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_reaching, 3, 0, 52), - [384] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_reaching, 2, 0, 26), - [386] = {.entry = {.count = 1, .reusable = true}}, SHIFT(222), - [388] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__ttc_primary, 1, 0, 0), - [390] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__ttc_primary, 1, 0, 0), - [392] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 169), - [394] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 33), - [396] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 36), - [398] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 41), - [400] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), - [402] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 53), - [404] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 55), - [406] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 58), - [408] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 59), - [410] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 61), - [412] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 62), - [414] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 64), - [416] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 68), - [418] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 71), - [420] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 72), - [422] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 78), - [424] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__ttc_parenthesized, 3, 0, 0), - [426] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__ttc_parenthesized, 3, 0, 0), - [428] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc_distribution, 3, 0, 75), - [430] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc_distribution, 3, 0, 75), - [432] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc_binop, 3, 0, 76), - [434] = {.entry = {.count = 1, .reusable = true}}, SHIFT(84), - [436] = {.entry = {.count = 1, .reusable = false}}, SHIFT(84), - [438] = {.entry = {.count = 1, .reusable = true}}, SHIFT(86), - [440] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc_binop, 3, 0, 76), - [442] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 86), - [444] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 88), - [446] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 89), - [448] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 90), - [450] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 92), - [452] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 94), - [454] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 97), - [456] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 98), - [458] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 14), - [460] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 100), - [462] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 101), - [464] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 103), - [466] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 105), - [468] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 109), - [470] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 112), - [472] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc_distribution, 4, 0, 114), - [474] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc_distribution, 4, 0, 114), - [476] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 29), - [478] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 117), - [480] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 121), - [482] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 123), - [484] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 124), - [486] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 125), - [488] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 126), - [490] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 128), - [492] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_variable, 4, 0, 3), - [494] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 131), - [496] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 132), - [498] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 134), - [500] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 135), - [502] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc_distribution, 5, 0, 136), - [504] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc_distribution, 5, 0, 136), - [506] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 137), - [508] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 139), - [510] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 143), - [512] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 146), - [514] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 147), - [516] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 148), - [518] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 150), - [520] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 151), - [522] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 152), - [524] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 153), - [526] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 155), - [528] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 158), - [530] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 159), - [532] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 161), - [534] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 162), - [536] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 164), - [538] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 165), - [540] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 167), - [542] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 168), - [544] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 27), - [546] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 11, 0, 171), - [548] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 115), - [550] = {.entry = {.count = 1, .reusable = true}}, SHIFT(246), - [552] = {.entry = {.count = 1, .reusable = true}}, SHIFT(248), - [554] = {.entry = {.count = 1, .reusable = true}}, SHIFT(137), - [556] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), - [558] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), - [560] = {.entry = {.count = 1, .reusable = false}}, SHIFT(308), - [562] = {.entry = {.count = 1, .reusable = true}}, SHIFT(64), - [564] = {.entry = {.count = 1, .reusable = false}}, SHIFT(276), - [566] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_category_declaration, 5, 0, 4), - [568] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_category_declaration, 6, 0, 7), - [570] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat2, 2, 0, 0), - [572] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat2, 2, 0, 0), SHIFT_REPEAT(281), - [575] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat2, 2, 0, 0), SHIFT_REPEAT(309), - [578] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_associations_declaration, 3, 0, 0), - [580] = {.entry = {.count = 1, .reusable = true}}, SHIFT(200), - [582] = {.entry = {.count = 1, .reusable = true}}, SHIFT(281), - [584] = {.entry = {.count = 1, .reusable = true}}, SHIFT(309), - [586] = {.entry = {.count = 1, .reusable = true}}, SHIFT(205), - [588] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_category_declaration, 4, 0, 2), - [590] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 1, 0, 0), - [592] = {.entry = {.count = 1, .reusable = true}}, SHIFT(70), - [594] = {.entry = {.count = 1, .reusable = false}}, SHIFT(311), - [596] = {.entry = {.count = 1, .reusable = true}}, SHIFT(199), - [598] = {.entry = {.count = 1, .reusable = true}}, SHIFT(211), - [600] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_associations_declaration, 4, 0, 0), - [602] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_category_declaration, 5, 0, 5), - [604] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat1, 2, 0, 0), SHIFT_REPEAT(308), - [607] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_include_declaration, 2, 0, 1), - [609] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_define_declaration, 4, 0, 3), - [611] = {.entry = {.count = 1, .reusable = true}}, SHIFT(282), - [613] = {.entry = {.count = 1, .reusable = true}}, SHIFT(202), - [615] = {.entry = {.count = 1, .reusable = true}}, SHIFT(272), - [617] = {.entry = {.count = 1, .reusable = true}}, SHIFT(253), - [619] = {.entry = {.count = 1, .reusable = true}}, SHIFT(270), - [621] = {.entry = {.count = 1, .reusable = true}}, SHIFT(308), - [623] = {.entry = {.count = 1, .reusable = true}}, SHIFT(209), - [625] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), - [627] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), - [629] = {.entry = {.count = 1, .reusable = true}}, SHIFT(210), - [631] = {.entry = {.count = 1, .reusable = true}}, SHIFT(138), - [633] = {.entry = {.count = 1, .reusable = false}}, SHIFT(247), - [635] = {.entry = {.count = 1, .reusable = true}}, SHIFT(68), - [637] = {.entry = {.count = 1, .reusable = true}}, SHIFT(69), - [639] = {.entry = {.count = 1, .reusable = true}}, SHIFT(204), - [641] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), - [643] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_associations_declaration_repeat1, 2, 0, 0), SHIFT_REPEAT(282), - [646] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_associations_declaration_repeat1, 2, 0, 0), - [648] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_association, 13, 0, 163), SHIFT(308), - [651] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_association, 13, 0, 163), - [653] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), - [655] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_association, 14, 0, 170), SHIFT(308), - [658] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_association, 14, 0, 170), - [660] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 6, 0, 11), - [662] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_cias_repeat1, 2, 0, 0), - [664] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_cias_repeat1, 2, 0, 0), SHIFT_REPEAT(300), - [667] = {.entry = {.count = 1, .reusable = true}}, SHIFT(269), - [669] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49), - [671] = {.entry = {.count = 1, .reusable = true}}, SHIFT(318), - [673] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_name, 2, 0, 0), - [675] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_detector_name_repeat1, 2, 0, 0), SHIFT_REPEAT(318), - [678] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_detector_name_repeat1, 2, 0, 0), - [680] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 6, 0, 12), - [682] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 4, 0, 2), - [684] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 6, 0, 19), - [686] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 6, 0, 20), - [688] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_detector_context_repeat1, 2, 0, 0), SHIFT_REPEAT(269), - [691] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_detector_context_repeat1, 2, 0, 0), - [693] = {.entry = {.count = 1, .reusable = false}}, SHIFT(268), - [695] = {.entry = {.count = 1, .reusable = true}}, SHIFT(241), - [697] = {.entry = {.count = 1, .reusable = true}}, SHIFT(171), - [699] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 7, 0, 22), - [701] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 7, 0, 23), - [703] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 8, 0, 45), - [705] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_star, 1, 0, 0), - [707] = {.entry = {.count = 1, .reusable = true}}, SHIFT(157), - [709] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_multiplicity, 1, 0, 0), - [711] = {.entry = {.count = 1, .reusable = true}}, SHIFT(216), - [713] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 5, 0, 8), - [715] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_ttc_distribution_repeat1, 2, 0, 0), SHIFT_REPEAT(241), - [718] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_ttc_distribution_repeat1, 2, 0, 0), - [720] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_cias, 1, 0, 0), - [722] = {.entry = {.count = 1, .reusable = true}}, SHIFT(300), - [724] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_name, 1, 0, 0), - [726] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 8, 0, 44), - [728] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 7, 0, 42), - [730] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 7, 0, 43), - [732] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 5, 0, 10), - [734] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), - [736] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_cias, 2, 0, 0), - [738] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 8, 0, 73), - [740] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 9, 0, 74), - [742] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 5, 0, 5), - [744] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_context_asset, 2, 0, 82), - [746] = {.entry = {.count = 1, .reusable = true}}, SHIFT(291), - [748] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_multiplicity_range, 3, 0, 21), - [750] = {.entry = {.count = 1, .reusable = true}}, SHIFT(251), - [752] = {.entry = {.count = 1, .reusable = true}}, SHIFT(244), - [754] = {.entry = {.count = 1, .reusable = true}}, SHIFT(223), - [756] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), - [758] = {.entry = {.count = 1, .reusable = true}}, SHIFT(261), - [760] = {.entry = {.count = 1, .reusable = true}}, SHIFT(231), - [762] = {.entry = {.count = 1, .reusable = true}}, SHIFT(316), - [764] = {.entry = {.count = 1, .reusable = true}}, SHIFT(305), - [766] = {.entry = {.count = 1, .reusable = true}}, SHIFT(299), - [768] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), - [770] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), - [772] = {.entry = {.count = 1, .reusable = true}}, SHIFT(313), - [774] = {.entry = {.count = 1, .reusable = true}}, SHIFT(257), - [776] = {.entry = {.count = 1, .reusable = true}}, SHIFT(194), - [778] = {.entry = {.count = 1, .reusable = true}}, SHIFT(322), - [780] = {.entry = {.count = 1, .reusable = true}}, SHIFT(294), - [782] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [784] = {.entry = {.count = 1, .reusable = true}}, SHIFT(267), - [786] = {.entry = {.count = 1, .reusable = true}}, SHIFT(228), - [788] = {.entry = {.count = 1, .reusable = true}}, SHIFT(213), - [790] = {.entry = {.count = 1, .reusable = true}}, SHIFT(252), - [792] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), - [794] = {.entry = {.count = 1, .reusable = true}}, SHIFT(215), - [796] = {.entry = {.count = 1, .reusable = true}}, SHIFT(195), - [798] = {.entry = {.count = 1, .reusable = true}}, SHIFT(310), - [800] = {.entry = {.count = 1, .reusable = true}}, SHIFT(297), - [802] = {.entry = {.count = 1, .reusable = true}}, SHIFT(264), - [804] = {.entry = {.count = 1, .reusable = true}}, SHIFT(255), - [806] = {.entry = {.count = 1, .reusable = true}}, SHIFT(225), - [808] = {.entry = {.count = 1, .reusable = true}}, SHIFT(260), - [810] = {.entry = {.count = 1, .reusable = true}}, SHIFT(315), - [812] = {.entry = {.count = 1, .reusable = true}}, SHIFT(207), - [814] = {.entry = {.count = 1, .reusable = true}}, SHIFT(254), - [816] = {.entry = {.count = 1, .reusable = true}}, SHIFT(280), - [818] = {.entry = {.count = 1, .reusable = true}}, SHIFT(289), - [820] = {.entry = {.count = 1, .reusable = true}}, SHIFT(198), - [822] = {.entry = {.count = 1, .reusable = true}}, SHIFT(317), - [824] = {.entry = {.count = 1, .reusable = true}}, SHIFT(224), - [826] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), - [828] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), - [830] = {.entry = {.count = 1, .reusable = true}}, SHIFT(239), - [832] = {.entry = {.count = 1, .reusable = true}}, SHIFT(287), - [834] = {.entry = {.count = 1, .reusable = true}}, SHIFT(292), - [836] = {.entry = {.count = 1, .reusable = true}}, SHIFT(214), - [838] = {.entry = {.count = 1, .reusable = true}}, SHIFT(263), - [840] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), - [842] = {.entry = {.count = 1, .reusable = true}}, SHIFT(319), - [844] = {.entry = {.count = 1, .reusable = true}}, SHIFT(320), - [846] = {.entry = {.count = 1, .reusable = true}}, SHIFT(114), + [182] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), + [184] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), + [186] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(303), + [189] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(279), + [192] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(319), + [195] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(305), + [198] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1, 0, 0), + [200] = {.entry = {.count = 1, .reusable = false}}, SHIFT(58), + [202] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 2, 0, 24), + [204] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 2, 0, 24), + [206] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_category_declaration_repeat1, 2, 0, 0), SHIFT_REPEAT(324), + [209] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat1, 2, 0, 0), + [211] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_category_declaration_repeat1, 2, 0, 0), + [213] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector_context, 4, 0, 0), + [215] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_context, 4, 0, 0), + [217] = {.entry = {.count = 1, .reusable = false}}, SHIFT(66), + [219] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), + [221] = {.entry = {.count = 1, .reusable = false}}, SHIFT(102), + [223] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 4, 0, 83), + [225] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 4, 0, 83), + [227] = {.entry = {.count = 1, .reusable = false}}, SHIFT(95), + [229] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector_context, 3, 0, 0), + [231] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_context, 3, 0, 0), + [233] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_attack_step_repeat2, 2, 0, 0), + [235] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_attack_step_repeat2, 2, 0, 0), SHIFT_REPEAT(163), + [238] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attack_step_repeat2, 2, 0, 0), SHIFT_REPEAT(163), + [241] = {.entry = {.count = 1, .reusable = false}}, SHIFT(132), + [243] = {.entry = {.count = 1, .reusable = false}}, SHIFT(87), + [245] = {.entry = {.count = 1, .reusable = false}}, SHIFT(75), + [247] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 3, 0, 49), + [249] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 3, 0, 49), + [251] = {.entry = {.count = 1, .reusable = false}}, SHIFT(85), + [253] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), + [255] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71), + [257] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc, 3, 0, 0), + [259] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc, 3, 0, 0), + [261] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_meta, 4, 0, 6), + [263] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_meta, 4, 0, 6), + [265] = {.entry = {.count = 1, .reusable = true}}, SHIFT(156), + [267] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__ttc_primary, 1, 0, 0), + [269] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__ttc_primary, 1, 0, 0), + [271] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 4, 0, 84), + [273] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 4, 0, 84), + [275] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 4, 0, 85), + [277] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 4, 0, 85), + [279] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 3, 0, 50), + [281] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 3, 0, 50), + [283] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector, 5, 0, 113), + [285] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_detector, 5, 0, 113), + [287] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc_binop, 3, 0, 76), + [289] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc_binop, 3, 0, 76), + [291] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57), + [293] = {.entry = {.count = 1, .reusable = true}}, SHIFT(196), + [295] = {.entry = {.count = 1, .reusable = true}}, SHIFT(314), + [297] = {.entry = {.count = 1, .reusable = true}}, SHIFT(285), + [299] = {.entry = {.count = 1, .reusable = true}}, SHIFT(203), + [301] = {.entry = {.count = 1, .reusable = true}}, SHIFT(214), + [303] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc_distribution, 4, 0, 114), + [305] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc_distribution, 4, 0, 114), + [307] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_preconditions_repeat1, 2, 0, 0), + [309] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_preconditions_repeat1, 2, 0, 0), SHIFT_REPEAT(63), + [312] = {.entry = {.count = 1, .reusable = true}}, SHIFT(263), + [314] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__ttc_parenthesized, 3, 0, 0), + [316] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__ttc_parenthesized, 3, 0, 0), + [318] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc_distribution, 3, 0, 75), + [320] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc_distribution, 3, 0, 75), + [322] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ttc_distribution, 5, 0, 136), + [324] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ttc_distribution, 5, 0, 136), + [326] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), + [328] = {.entry = {.count = 1, .reusable = false}}, SHIFT(56), + [330] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preconditions, 3, 0, 51), + [332] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), + [334] = {.entry = {.count = 1, .reusable = true}}, SHIFT(175), + [336] = {.entry = {.count = 1, .reusable = true}}, SHIFT(260), + [338] = {.entry = {.count = 1, .reusable = true}}, SHIFT(195), + [340] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_preconditions, 2, 0, 25), + [342] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), + [344] = {.entry = {.count = 1, .reusable = true}}, SHIFT(188), + [346] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 154), + [348] = {.entry = {.count = 1, .reusable = true}}, SHIFT(64), + [350] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), + [352] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 28), + [354] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 32), + [356] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 35), + [358] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 40), + [360] = {.entry = {.count = 1, .reusable = true}}, SHIFT(184), + [362] = {.entry = {.count = 1, .reusable = true}}, SHIFT(187), + [364] = {.entry = {.count = 1, .reusable = true}}, SHIFT(82), + [366] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 54), + [368] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 57), + [370] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 60), + [372] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 63), + [374] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 67), + [376] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_definition, 1, 0, 0), + [378] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 70), + [380] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 166), + [382] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_asset_definition_repeat1, 2, 0, 0), + [384] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_asset_definition_repeat1, 2, 0, 0), SHIFT_REPEAT(314), + [387] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_asset_definition_repeat1, 2, 0, 0), SHIFT_REPEAT(285), + [390] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 87), + [392] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 93), + [394] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 96), + [396] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 99), + [398] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 104), + [400] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 108), + [402] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 111), + [404] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 116), + [406] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 122), + [408] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 127), + [410] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 130), + [412] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 133), + [414] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 138), + [416] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 13), + [418] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 142), + [420] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 145), + [422] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 149), + [424] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 157), + [426] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 160), + [428] = {.entry = {.count = 1, .reusable = true}}, SHIFT(73), + [430] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 77), + [432] = {.entry = {.count = 1, .reusable = true}}, SHIFT(135), + [434] = {.entry = {.count = 1, .reusable = true}}, SHIFT(284), + [436] = {.entry = {.count = 1, .reusable = true}}, SHIFT(302), + [438] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_category_declaration, 4, 0, 2), + [440] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat1, 2, 0, 0), SHIFT_REPEAT(299), + [443] = {.entry = {.count = 1, .reusable = false}}, SHIFT(299), + [445] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89), + [447] = {.entry = {.count = 1, .reusable = false}}, SHIFT(282), + [449] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_category_declaration, 5, 0, 4), + [451] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat2, 2, 0, 0), + [453] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat2, 2, 0, 0), SHIFT_REPEAT(284), + [456] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_category_declaration_repeat2, 2, 0, 0), SHIFT_REPEAT(302), + [459] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_define_declaration, 4, 0, 3), + [461] = {.entry = {.count = 1, .reusable = true}}, SHIFT(138), + [463] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_category_declaration, 5, 0, 5), + [465] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 1, 0, 0), + [467] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_associations_declaration, 3, 0, 0), + [469] = {.entry = {.count = 1, .reusable = true}}, SHIFT(148), + [471] = {.entry = {.count = 1, .reusable = true}}, SHIFT(93), + [473] = {.entry = {.count = 1, .reusable = false}}, SHIFT(308), + [475] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_include_declaration, 2, 0, 1), + [477] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_category_declaration, 6, 0, 7), + [479] = {.entry = {.count = 1, .reusable = true}}, SHIFT(142), + [481] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_reaching, 3, 0, 52), + [483] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_associations_declaration, 4, 0, 0), + [485] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_reaching, 2, 0, 26), + [487] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_association, 13, 0, 163), SHIFT(299), + [490] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_association, 13, 0, 163), + [492] = {.entry = {.count = 1, .reusable = true}}, SHIFT(298), + [494] = {.entry = {.count = 1, .reusable = true}}, SHIFT(151), + [496] = {.entry = {.count = 1, .reusable = true}}, SHIFT(274), + [498] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), + [500] = {.entry = {.count = 1, .reusable = false}}, SHIFT(194), + [502] = {.entry = {.count = 1, .reusable = true}}, SHIFT(299), + [504] = {.entry = {.count = 1, .reusable = true}}, SHIFT(134), + [506] = {.entry = {.count = 1, .reusable = true}}, SHIFT(81), + [508] = {.entry = {.count = 1, .reusable = true}}, SHIFT(77), + [510] = {.entry = {.count = 1, .reusable = true}}, SHIFT(90), + [512] = {.entry = {.count = 1, .reusable = true}}, SHIFT(78), + [514] = {.entry = {.count = 1, .reusable = true}}, SHIFT(149), + [516] = {.entry = {.count = 1, .reusable = true}}, SHIFT(183), + [518] = {.entry = {.count = 1, .reusable = true}}, SHIFT(267), + [520] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), + [522] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_associations_declaration_repeat1, 2, 0, 0), SHIFT_REPEAT(298), + [525] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_associations_declaration_repeat1, 2, 0, 0), + [527] = {.entry = {.count = 1, .reusable = true}}, SHIFT(144), + [529] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_association, 14, 0, 170), SHIFT(299), + [532] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_association, 14, 0, 170), + [534] = {.entry = {.count = 1, .reusable = true}}, SHIFT(76), + [536] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 92), + [538] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 55), + [540] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 58), + [542] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 59), + [544] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 61), + [546] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 62), + [548] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 7, 0, 22), + [550] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 64), + [552] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 36), + [554] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 68), + [556] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 71), + [558] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 72), + [560] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 8, 0, 73), + [562] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 9, 0, 74), + [564] = {.entry = {.count = 1, .reusable = true}}, SHIFT(280), + [566] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_name, 1, 0, 0), + [568] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_star, 1, 0, 0), + [570] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_cias_repeat1, 2, 0, 0), + [572] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_cias_repeat1, 2, 0, 0), SHIFT_REPEAT(312), + [575] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 78), + [577] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_multiplicity, 1, 0, 0), + [579] = {.entry = {.count = 1, .reusable = true}}, SHIFT(155), + [581] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 5, 0, 8), + [583] = {.entry = {.count = 1, .reusable = true}}, SHIFT(272), + [585] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49), + [587] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_detector_name_repeat1, 2, 0, 0), SHIFT_REPEAT(280), + [590] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_detector_name_repeat1, 2, 0, 0), + [592] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 41), + [594] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 5, 0, 10), + [596] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 7, 0, 42), + [598] = {.entry = {.count = 1, .reusable = true}}, SHIFT(216), + [600] = {.entry = {.count = 1, .reusable = true}}, SHIFT(79), + [602] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 7, 0, 43), + [604] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 5, 0, 5), + [606] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 86), + [608] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 88), + [610] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 89), + [612] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 90), + [614] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 8, 0, 44), + [616] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 94), + [618] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 8, 0, 45), + [620] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 97), + [622] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 98), + [624] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 100), + [626] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 6, 0, 101), + [628] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 103), + [630] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 105), + [632] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 6, 0, 11), + [634] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 7, 0, 23), + [636] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 6, 0, 20), + [638] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 112), + [640] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 6, 0, 12), + [642] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_detector_context_repeat1, 2, 0, 0), SHIFT_REPEAT(272), + [645] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_detector_context_repeat1, 2, 0, 0), + [647] = {.entry = {.count = 1, .reusable = false}}, SHIFT(271), + [649] = {.entry = {.count = 1, .reusable = true}}, SHIFT(84), + [651] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 115), + [653] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 117), + [655] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_cias, 2, 0, 0), + [657] = {.entry = {.count = 1, .reusable = true}}, SHIFT(312), + [659] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 121), + [661] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 123), + [663] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 124), + [665] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 125), + [667] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 126), + [669] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 128), + [671] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), + [673] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 131), + [675] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 132), + [677] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_name, 2, 0, 0), + [679] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 134), + [681] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 135), + [683] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_ttc_distribution_repeat1, 2, 0, 0), SHIFT_REPEAT(216), + [686] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_ttc_distribution_repeat1, 2, 0, 0), + [688] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 137), + [690] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 139), + [692] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 27), + [694] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 143), + [696] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 3, 0, 14), + [698] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_variable, 4, 0, 3), + [700] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 146), + [702] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 8, 0, 147), + [704] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 148), + [706] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 29), + [708] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 150), + [710] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 151), + [712] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 152), + [714] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 153), + [716] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 155), + [718] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 158), + [720] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 159), + [722] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 161), + [724] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 9, 0, 162), + [726] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 164), + [728] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 165), + [730] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_cias, 1, 0, 0), + [732] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 167), + [734] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 168), + [736] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 10, 0, 169), + [738] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 4, 0, 2), + [740] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 11, 0, 171), + [742] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 5, 0, 53), + [744] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asset_declaration, 6, 0, 19), + [746] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 4, 0, 33), + [748] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attack_step, 7, 0, 109), + [750] = {.entry = {.count = 1, .reusable = true}}, SHIFT(297), + [752] = {.entry = {.count = 1, .reusable = true}}, SHIFT(256), + [754] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_detector_context_asset, 2, 0, 82), + [756] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_multiplicity_range, 3, 0, 21), + [758] = {.entry = {.count = 1, .reusable = true}}, SHIFT(192), + [760] = {.entry = {.count = 1, .reusable = true}}, SHIFT(157), + [762] = {.entry = {.count = 1, .reusable = true}}, SHIFT(273), + [764] = {.entry = {.count = 1, .reusable = true}}, SHIFT(182), + [766] = {.entry = {.count = 1, .reusable = true}}, SHIFT(158), + [768] = {.entry = {.count = 1, .reusable = true}}, SHIFT(210), + [770] = {.entry = {.count = 1, .reusable = true}}, SHIFT(293), + [772] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), + [774] = {.entry = {.count = 1, .reusable = true}}, SHIFT(288), + [776] = {.entry = {.count = 1, .reusable = true}}, SHIFT(100), + [778] = {.entry = {.count = 1, .reusable = true}}, SHIFT(292), + [780] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), + [782] = {.entry = {.count = 1, .reusable = true}}, SHIFT(286), + [784] = {.entry = {.count = 1, .reusable = true}}, SHIFT(325), + [786] = {.entry = {.count = 1, .reusable = true}}, SHIFT(153), + [788] = {.entry = {.count = 1, .reusable = true}}, SHIFT(146), + [790] = {.entry = {.count = 1, .reusable = true}}, SHIFT(311), + [792] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), + [794] = {.entry = {.count = 1, .reusable = true}}, SHIFT(101), + [796] = {.entry = {.count = 1, .reusable = true}}, SHIFT(270), + [798] = {.entry = {.count = 1, .reusable = true}}, SHIFT(301), + [800] = {.entry = {.count = 1, .reusable = true}}, SHIFT(291), + [802] = {.entry = {.count = 1, .reusable = true}}, SHIFT(287), + [804] = {.entry = {.count = 1, .reusable = true}}, SHIFT(296), + [806] = {.entry = {.count = 1, .reusable = true}}, SHIFT(137), + [808] = {.entry = {.count = 1, .reusable = true}}, SHIFT(147), + [810] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), + [812] = {.entry = {.count = 1, .reusable = true}}, SHIFT(166), + [814] = {.entry = {.count = 1, .reusable = true}}, SHIFT(211), + [816] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [818] = {.entry = {.count = 1, .reusable = true}}, SHIFT(164), + [820] = {.entry = {.count = 1, .reusable = true}}, SHIFT(317), + [822] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), + [824] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), + [826] = {.entry = {.count = 1, .reusable = true}}, SHIFT(277), + [828] = {.entry = {.count = 1, .reusable = true}}, SHIFT(181), + [830] = {.entry = {.count = 1, .reusable = true}}, SHIFT(295), + [832] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), + [834] = {.entry = {.count = 1, .reusable = true}}, SHIFT(300), + [836] = {.entry = {.count = 1, .reusable = true}}, SHIFT(140), + [838] = {.entry = {.count = 1, .reusable = true}}, SHIFT(212), + [840] = {.entry = {.count = 1, .reusable = true}}, SHIFT(309), + [842] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), + [844] = {.entry = {.count = 1, .reusable = true}}, SHIFT(201), + [846] = {.entry = {.count = 1, .reusable = true}}, SHIFT(320), + [848] = {.entry = {.count = 1, .reusable = true}}, SHIFT(193), + [850] = {.entry = {.count = 1, .reusable = true}}, SHIFT(322), + [852] = {.entry = {.count = 1, .reusable = true}}, SHIFT(236), }; #ifdef __cplusplus diff --git a/src/tree_sitter/parser.h b/src/tree_sitter/parser.h index cdbe64c..858107d 100644 --- a/src/tree_sitter/parser.h +++ b/src/tree_sitter/parser.h @@ -18,7 +18,6 @@ typedef uint16_t TSStateId; typedef uint16_t TSSymbol; typedef uint16_t TSFieldId; typedef struct TSLanguage TSLanguage; -typedef struct TSLanguageMetadata TSLanguageMetadata; typedef struct TSLanguageMetadata { uint8_t major_version; uint8_t minor_version; diff --git a/test/corpus/attackstep.ts-test b/test/corpus/attackstep.ts-test index 717c8e2..23b5c80 100644 --- a/test/corpus/attackstep.ts-test +++ b/test/corpus/attackstep.ts-test @@ -22,14 +22,19 @@ category Test { id: (identifier) body: (asset_definition (attack_step + step_type: (step_type) id: (identifier)) (attack_step + step_type: (step_type) id: (identifier)) (attack_step + step_type: (step_type) id: (identifier)) (attack_step + step_type: (step_type) id: (identifier)) (attack_step + step_type: (step_type) id: (identifier))))))) ==================== @@ -52,6 +57,7 @@ category Test { id: (identifier) body: (asset_definition (attack_step + step_type: (step_type) id: (identifier) tag: (identifier))))))) @@ -75,6 +81,7 @@ category Test { id: (identifier) body: (asset_definition (attack_step + step_type: (step_type) id: (identifier) tag: (identifier) tag: (identifier))))))) @@ -103,23 +110,28 @@ category Test { id: (identifier) body: (asset_definition (attack_step + step_type: (step_type) id: (identifier) cias: (cias (cia))) (attack_step + step_type: (step_type) id: (identifier) cias: (cias (cia))) (attack_step + step_type: (step_type) id: (identifier) cias: (cias (cia))) (attack_step + step_type: (step_type) id: (identifier) cias: (cias (cia) (cia))) (attack_step + step_type: (step_type) id: (identifier) cias: (cias (cia) @@ -156,40 +168,47 @@ category Test { id: (identifier) body: (asset_definition (attack_step + step_type: (step_type) id: (identifier) ttc: (ttc (integer))) (attack_step + step_type: (step_type) id: (identifier) ttc: (ttc (ttc_binop left: (integer) right: (integer)))) (attack_step + step_type: (step_type) id: (identifier) ttc: (ttc (ttc_binop left: (integer) right: (integer)))) (attack_step + step_type: (step_type) id: (identifier) ttc: (ttc (ttc_binop left: (integer) right: (integer)))) (attack_step + step_type: (step_type) id: (identifier) ttc: (ttc (ttc_binop left: (integer) right: (integer)))) (attack_step + step_type: (step_type) id: (identifier) ttc: (ttc (ttc_binop left: (integer) right: (integer)))) (attack_step + step_type: (step_type) id: (identifier) ttc: (ttc (ttc_binop @@ -198,6 +217,7 @@ category Test { left: (integer) right: (integer))))) (attack_step + step_type: (step_type) id: (identifier) ttc: (ttc (ttc_binop @@ -206,6 +226,7 @@ category Test { left: (integer) right: (integer))))) (attack_step + step_type: (step_type) id: (identifier) ttc: (ttc (ttc_binop @@ -214,16 +235,19 @@ category Test { right: (integer)) right: (integer)))) (attack_step + step_type: (step_type) id: (identifier) ttc: (ttc (identifier))) (attack_step + step_type: (step_type) id: (identifier) ttc: (ttc (ttc_distribution id: (identifier) values: (integer)))) (attack_step + step_type: (step_type) id: (identifier) ttc: (ttc (ttc_distribution @@ -254,6 +278,7 @@ category Test { id: (identifier) body: (asset_definition (attack_step + step_type: (step_type) id: (identifier) meta: (meta id: (identifier) @@ -262,6 +287,7 @@ category Test { id: (identifier) info: (meta_string))) (attack_step + step_type: (step_type) id: (identifier) meta: (meta id: (identifier) @@ -294,11 +320,13 @@ category Test { id: (identifier) body: (asset_definition (attack_step + step_type: (step_type) id: (identifier) reaches: (reaching reaches: (asset_expr (identifier)))) (attack_step + step_type: (step_type) id: (identifier) reaches: (reaching reaches: (asset_expr @@ -306,11 +334,13 @@ category Test { reaches: (asset_expr (identifier)))) (attack_step + step_type: (step_type) id: (identifier) reaches: (reaching reaches: (asset_expr (identifier)))) (attack_step + step_type: (step_type) id: (identifier) reaches: (reaching reaches: (asset_expr diff --git a/test/corpus/detector.ts-test b/test/corpus/detector.ts-test index 2f0a44d..50ca5e0 100644 --- a/test/corpus/detector.ts-test +++ b/test/corpus/detector.ts-test @@ -18,6 +18,7 @@ category Test { id: (identifier) body: (asset_definition (attack_step + step_type: (step_type) id: (identifier) detector: (detector context: (detector_context @@ -48,6 +49,7 @@ category Test { id: (identifier) body: (asset_definition (attack_step + step_type: (step_type) id: (identifier) detector: (detector context: (detector_context @@ -78,6 +80,7 @@ category Test { id: (identifier) body: (asset_definition (attack_step + step_type: (step_type) id: (identifier) detector: (detector name: (detector_name @@ -109,6 +112,7 @@ category Test { id: (identifier) body: (asset_definition (attack_step + step_type: (step_type) id: (identifier) detector: (detector context: (detector_context @@ -137,6 +141,7 @@ category Test { id: (identifier) body: (asset_definition (attack_step + step_type: (step_type) id: (identifier) detector: (detector context: (detector_context diff --git a/test/corpus/precondition.ts-test b/test/corpus/precondition.ts-test index d566450..d2db8e9 100644 --- a/test/corpus/precondition.ts-test +++ b/test/corpus/precondition.ts-test @@ -21,11 +21,13 @@ category Test { id: (identifier) body: (asset_definition (attack_step + step_type: (step_type) id: (identifier) preconditions: (preconditions condition: (asset_expr (identifier)))) (attack_step + step_type: (step_type) id: (identifier) preconditions: (preconditions condition: (asset_expr @@ -63,6 +65,7 @@ category Test { id: (identifier) body: (asset_definition (attack_step + step_type: (step_type) id: (identifier) preconditions: (preconditions condition: (asset_expr From d79c1085b534092f7ca629622ad522339c8ffdc7 Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Fri, 16 May 2025 10:38:22 +0200 Subject: [PATCH 30/45] feat: swap to dictionary look-up of bstr for attak-step-type bindings Dicionaries are more maintainable but also faster than series of if-else statements, especially since they are easier for the interpreter to optimize for. This also allows easier usage of byte-strings (bstr) since they can be mapped. Using bstr allows us to avoid decoding them as much as possible. --- examples/visitor/fast.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index 55c30f4..8fad299 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -361,12 +361,18 @@ def visit_attack_step(self, cursor: TreeCursor) -> ASTNode: ############################################################################################################## # grab (step_type) - step_type = 'and' if cursor.node.text.decode() == '&' \ - else 'or' if cursor.node.text.decode() == '|' \ - else 'defense' if cursor.node.text.decode() == '#' \ - else 'exist' if cursor.node.text.decode() == 'E' \ - else 'notExist' if cursor.node.text.decode() == '!E' \ - else cursor.node.text.decode() + # use raw text bytes to avoid decoding as much as possible + step_type_btext = cursor.node.text + step_type_bindings = { + b'&': 'and', + b'|': 'or', + b'#': 'defense', + b'E': 'exist', + b'!E': 'notExist' + } + # decode value only if its really necessary (no binding found) + if (step_type := step_type_bindings.get(step_type_btext)) is None: + step_type = step_type_btext.decode() go_to_sibling(cursor) # grab (id) From 456e6b19d0b080c455a85fba475a73f18a7e04ca Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Fri, 16 May 2025 11:00:50 +0200 Subject: [PATCH 31/45] refactor: swap decode with byte-strings in visit_attack_step Replace some `.decode() == ''` with ` == b''` in fast.MalCompiler.visit_attack_step --- examples/visitor/fast.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index 8fad299..50921b1 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -383,7 +383,7 @@ def visit_attack_step(self, cursor: TreeCursor) -> ASTNode: tags = [] # TODO change grammar to make (@ id)* instead of (@ id)? - while (cursor.node.text.decode() == '@'): + while (cursor.node.text == b'@'): go_to_sibling(cursor) # skip '@' tags.append(cursor.node.text.decode()) # grab (id) if not go_to_sibling(cursor): # move to next symbol, break if last @@ -391,7 +391,7 @@ def visit_attack_step(self, cursor: TreeCursor) -> ASTNode: # process all ( '{' (cias) '}' ) we might have risk = None - if (cursor.node.text.decode() == '{'): + if (cursor.node.text == b'{'): go_to_sibling(cursor) # skip '{' risk = self.visit(cursor) # grab (cias) go_to_sibling(cursor) # go to '}' From 307521c78be81592d5c66cdf1a56841caee09399 Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Fri, 16 May 2025 11:02:24 +0200 Subject: [PATCH 32/45] refactor: swap decode with byte-strings in visit_detector_context Replace some `.decode() == ''` with ` == b''` in fast.MalCompiler.visit_detector_context --- examples/visitor/fast.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index 50921b1..fbc6465 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -492,7 +492,7 @@ def visit_detector_context(self, cursor: TreeCursor): context[label] = asset go_to_sibling(cursor) - while cursor.node.text.decode() != ')': + while cursor.node.text != b')': # skip ',' go_to_sibling(cursor) # grab another detector_context_asset From 7e56670f3749866967ec390f620d66b5905fe984 Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Fri, 16 May 2025 11:04:11 +0200 Subject: [PATCH 33/45] refactor: swap decode with byte-strings in visit_asset_declaration Replace some `.decode() == ''` with ` == b''` in fast.MalCompiler.visit_asset_declaration --- examples/visitor/fast.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index fbc6465..f7e7927 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -272,7 +272,7 @@ def visit_asset_declaration(self, cursor: TreeCursor, category: str) -> ASTNode: ############################################################################## # grab (abstract)? - isAbstract = cursor.node.text.decode() == 'abstract' + isAbstract = cursor.node.text == b'abstract' if (isAbstract): go_to_sibling(cursor) # We must go to 'asset' @@ -285,7 +285,7 @@ def visit_asset_declaration(self, cursor: TreeCursor, category: str) -> ASTNode: # grab (extends id)? superAsset = None - if (cursor.node.text.decode() == 'extends'): + if (cursor.node.text == b'extends'): go_to_sibling(cursor) # move to the id superAsset = cursor.node.text.decode() # get the text go_to_sibling(cursor) # move to the meta From dec1d4763af185842d53e43704cc93f235d0088c Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Fri, 16 May 2025 11:16:42 +0200 Subject: [PATCH 34/45] refactor: swap strip() with slices in visit_meta Greedily replace `strip('"')` with slicing operation `[1:-1]` since '"' are garantueed to be ASCII and so 1-byte UTF-8, which the `decode()` call assumes anyway. --- examples/visitor/fast.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index f7e7927..e98894b 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -262,7 +262,10 @@ def visit_meta(self, cursor: TreeCursor) -> ASTNode: go_to_sibling(cursor) # grab (string) node - info_string = cursor.node.text.decode().strip('"') + # '"' are ASCII so they are garantueed to only take one byte in UTF-8 (assumed for .decode) + # therefor, we can greedily only take bytes 1:-1 + # strip surrounding quotes (") by slicing + info_string = cursor.node.text[1:-1].decode() return (id, info_string) From 83e8d82679d3cfeaf731eeeea0983a2df3a9ac60 Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Fri, 16 May 2025 11:19:36 +0200 Subject: [PATCH 35/45] fix: skip not having enough parameter space added *args and **kwargs to make it accept anything --- examples/visitor/fast.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index e98894b..06fea8e 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -132,7 +132,7 @@ def visit_source_file(self, cursor: TreeCursor) -> ASTNode | list[ASTNode] | Non return langspec - def skip(self, _,): + def skip(self, *args, **kwargs): pass def _visit(self, cursor: TreeCursor) -> ASTNode | list[ASTNode] | None: From 0457dfdc3c6689f182494f958cbec3dc6df2cc60 Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Fri, 16 May 2025 11:37:20 +0200 Subject: [PATCH 36/45] refactor: swap strip() with slices in visit_meta Greedily replace `strip(')` with slicing operation `[1:-1]` since ' are garantueed to be ASCII and so 1-byte UTF-8, which the `decode()` call assumes anyway. --- examples/visitor/fast.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index 06fea8e..992ac2c 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -244,7 +244,11 @@ def visit_include_declaration(self, cursor: TreeCursor): # skip 'include' go_to_sibling(cursor) - return ("include", cursor.node.text.decode().strip('"')) + # grab (file) which is a (string) + # '"' are ASCII so they are garantueed to only take one byte in UTF-8 (assumed for .decode) + # therefor, we can greedily only take bytes 1:-1 + # strip surrounding quotes (") by slicing + return ("include", cursor.node.text[1:-1].decode()) def visit_meta(self, cursor: TreeCursor) -> ASTNode: ############################ From e39ec00dbb82ddcc258a8108d3a85445361d7ece Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Fri, 16 May 2025 11:44:13 +0200 Subject: [PATCH 37/45] feat: swap to dictionary look-up of bstr for cia bindings Dicionaries are more maintainable but also faster than series of if-else statements, especially since they are easier for the interpreter to optimize for. This also allows easier usage of byte-strings (bstr) since they can be mapped. Using bstr allows us to avoid decoding them as much as possible. --- examples/visitor/fast.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index 992ac2c..b981d01 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -545,17 +545,14 @@ def visit_cia(self, cursor: TreeCursor): ############### # 'C'|'I'|'A' # ############### - cia = cursor.node.text.decode() - - key = ( - "isConfidentiality" - if cia == 'C' - else "isIntegrity" - if cia == 'I' - else "isAvailability" - if cia == 'A' - else None - ) + + cia_btext = cursor.node.text + cia_bindings = { + b'C': 'isConfidentiality', + b'I': 'isIntegrity', + b'A': 'isAvailability', + } + key = cia_bindings.get(cia_btext) return {key: True} From 03f267c69d30f417917a9ccfc224980ae0197d0d Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Fri, 16 May 2025 11:48:14 +0200 Subject: [PATCH 38/45] refactor: swap decode with byte-strings in _visit_intermediary_ttc_expr Replace some `.decode() == ''` with ` == b''` in fast.MalCompiler._visit_intermediary_ttc_expr --- examples/visitor/fast.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index b981d01..f3cc113 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -572,7 +572,7 @@ def _visit_intermediary_ttc_expr(self, cursor: TreeCursor): ################################################################################################### # check if we have '(', in this case it's a parenthesized expression - if (cursor.node.text.decode() == '('): + if (cursor.node.text == b'('): go_to_sibling(cursor) # skip '(' result = self._visit_intermediary_ttc_expr(cursor) # visit the expression go_to_sibling(cursor) # skip ')' From 7bac4774ffd8205a1ac67c249e79ecdf891bb66e Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Fri, 16 May 2025 11:49:26 +0200 Subject: [PATCH 39/45] refactor: Remove decode() for float() casts The `float()` function (or casting function) natively supports byte strings. `decode()` adds unecessary overhead. --- examples/visitor/fast.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index f3cc113..de94330 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -599,12 +599,12 @@ def _visit_intermediary_ttc_expr(self, cursor: TreeCursor): return self.visit(cursor) def visit_float(self, cursor: TreeCursor): - ret = float(cursor.node.text.decode()) + ret = float(cursor.node.text) return ret def visit_integer(self, cursor: TreeCursor): - ret = float(cursor.node.text.decode()) + ret = float(cursor.node.text) return ret From 7bdb4a0adb7c1a4b4ef50cbbad0da62c8da00400 Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Fri, 16 May 2025 11:55:13 +0200 Subject: [PATCH 40/45] feat: swap to dictionary look-up of bstr for ttc binop operation type bindings Dicionaries are more maintainable but also faster than series of if-else statements, especially since they are easier for the interpreter to optimize for. This also allows easier usage of byte-strings (bstr) since they can be mapped. Using bstr allows us to avoid decoding them as much as possible. --- examples/visitor/fast.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index de94330..ea5a6ae 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -618,12 +618,15 @@ def visit_ttc_binop(self, cursor: TreeCursor): go_to_sibling(cursor) # grab operation type - operation = cursor.node.text.decode() - operation_type = 'addition' if operation == '+' else \ - 'subtraction' if operation == '-' else \ - 'multiplication' if operation == '*' else \ - 'division' if operation == '/' else \ - 'exponentiation' + operation = cursor.node.text + operation_type_bindings = { + b'+': 'addition', + b'-': 'subtraction', + b'*': 'multiplication', + b'/': 'division', + b'^': 'exponentiation', + } + operation_type = operation_type_bindings.get(operation) go_to_sibling(cursor) # grab second (intermediary_ttc_expr) From 32e5841f1a7b38983b3a7eea5d2cfed82f7a89c4 Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Fri, 16 May 2025 11:57:25 +0200 Subject: [PATCH 41/45] refactor: swap decode with byte-strings in visit_ttc_distribution Replace some `.decode() == ''` with ` == b''` in fast.MalCompiler.visit_ttc_distribution --- examples/visitor/fast.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index ea5a6ae..2c9ae3f 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -654,7 +654,7 @@ def visit_ttc_distribution(self, cursor: TreeCursor): args.append(arg) # move to next symbol, if it's not a comma then done go_to_sibling(cursor) - if (cursor.node.text.decode() != ','): + if (cursor.node.text != b','): break # otherwise, ignore the comma go_to_sibling(cursor) From 0ac693d1f0ba472f2d9dca7936fb50d08e536639 Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Fri, 16 May 2025 11:58:48 +0200 Subject: [PATCH 42/45] refactor: swap decode with byte-strings in visit_reaching Replace some `.decode() == ''` with ` == b''` in fast.MalCompiler.visit_reaching --- examples/visitor/fast.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index 2c9ae3f..1584682 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -691,7 +691,7 @@ def visit_reaching(self, cursor: TreeCursor): ret = {} # Get type of reaches - ret["overrides"] = True if cursor.node.text.decode()=='->' else False + ret["overrides"] = cursor.node.text == b'->' go_to_sibling(cursor) # Visit the steps From 3d0222300bff1a608151b6560ff529c2d5b72eeb Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Fri, 16 May 2025 12:04:21 +0200 Subject: [PATCH 43/45] feat: swap to dictionary look-up of bstr for asset expression binop bindings Dicionaries are more maintainable but also faster than series of if-else statements, especially since they are easier for the interpreter to optimize for. This also allows easier usage of byte-strings (bstr) since they can be mapped. Using bstr allows us to avoid decoding them as much as possible. --- examples/visitor/fast.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index 1584682..16ac40c 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -775,10 +775,14 @@ def visit_asset_expr_binop(self, cursor: TreeCursor): go_to_sibling(cursor) # Get the type of operation - optype = 'collect' if cursor.node.text.decode()=='.' \ - else 'union' if cursor.node.text.decode()=='\\/' \ - else 'intersection' if cursor.node.text.decode()=='/\\' \ - else 'difference' + op_btext = cursor.node.text + optype_bindings = { + b'.': 'collect', + b'\\/': 'union', + b'/\\': 'intersection', + b'-': 'difference', + } + optype = optype_bindings.get(op_btext) go_to_sibling(cursor) # Get the rhs From fad8f2651d04269518a9375c42365f72f96e594e Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Fri, 16 May 2025 12:08:02 +0200 Subject: [PATCH 44/45] refactor: swap decode with byte-strings in visit_associations_declaration Replace some `.decode() == ''` with ` == b''` in fast.MalCompiler.visit_associations_declaration --- examples/visitor/fast.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/visitor/fast.py b/examples/visitor/fast.py index 16ac40c..78d2a5c 100644 --- a/examples/visitor/fast.py +++ b/examples/visitor/fast.py @@ -883,7 +883,7 @@ def visit_associations_declaration(self, cursor: TreeCursor): # visit all associations associations = [] - while cursor.node.text.decode() != '}': + while cursor.node.text != b'}': associations.append(self.visit(cursor)) go_to_sibling(cursor) From e871f97ca850e5cd5a8f1d2e34b3e204a2ee7b42 Mon Sep 17 00:00:00 2001 From: Tobiky <12644606+Tobiky@users.noreply.github.com> Date: Fri, 16 May 2025 14:07:14 +0200 Subject: [PATCH 45/45] chore: Bump grammar version to 0.2.0 --- CMakeLists.txt | 2 +- Cargo.toml | 2 +- Makefile | 2 +- package-lock.json | 4 ++-- package.json | 2 +- pyproject.toml | 2 +- src/parser.c | 2 +- tree-sitter.json | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d5f5f8..12f1b88 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.13) project(tree-sitter-mal - VERSION "0.1.0" + VERSION "0.2.0" DESCRIPTION "IT systems are growing in complexity and the threat from cyberattacks is increasing. Threat modeling is a process that can be used to analyze potential attacks to IT systems in order to facilitate secure design. Meta Attack Language (MAL) is a threat modeling language framework for the creation of domain specific languages (DSL). MAL is developed at KTH Royal Institute of Technolog" HOMEPAGE_URL "https://github.com/tobiky/tree-sitter-mal" LANGUAGES C) diff --git a/Cargo.toml b/Cargo.toml index 864f469..77b4f61 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tree-sitter-mal" description = "IT systems are growing in complexity and the threat from cyberattacks is increasing. Threat modeling is a process that can be used to analyze potential attacks to IT systems in order to facilitate secure design. Meta Attack Language (MAL) is a threat modeling language framework for the creation of domain specific languages (DSL). MAL is developed at KTH Royal Institute of Technolog" -version = "0.1.0" +version = "0.2.0" authors = ["Andreas Hammarstrand "] license = "MIT" readme = "README.md" diff --git a/Makefile b/Makefile index 646c7fa..311a707 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ endif LANGUAGE_NAME := tree-sitter-mal HOMEPAGE_URL := https://github.com/tobiky/tree-sitter-mal -VERSION := 0.1.0 +VERSION := 0.2.0 # repository SRC_DIR := src diff --git a/package-lock.json b/package-lock.json index c6354db..e14a16d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "tree-sitter-mal", - "version": "0.1.0", + "version": "0.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "tree-sitter-mal", - "version": "0.1.0", + "version": "0.2.0", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 8a4a6d1..f5a8214 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tree-sitter-mal", - "version": "0.1.0", + "version": "0.2.0", "description": "IT systems are growing in complexity and the threat from cyberattacks is increasing. Threat modeling is a process that can be used to analyze potential attacks to IT systems in order to facilitate secure design. Meta Attack Language (MAL) is a threat modeling language framework for the creation of domain specific languages (DSL). MAL is developed at KTH Royal Institute of Technolog", "repository": "https://github.com/tobiky/tree-sitter-mal", "license": "MIT", diff --git a/pyproject.toml b/pyproject.toml index e306af3..32efba8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "tree-sitter-mal" description = "IT systems are growing in complexity and the threat from cyberattacks is increasing. Threat modeling is a process that can be used to analyze potential attacks to IT systems in order to facilitate secure design. Meta Attack Language (MAL) is a threat modeling language framework for the creation of domain specific languages (DSL). MAL is developed at KTH Royal Institute of Technolog" -version = "0.1.0" +version = "0.2.0" keywords = ["incremental", "parsing", "tree-sitter", "mal"] classifiers = [ "Intended Audience :: Developers", diff --git a/src/parser.c b/src/parser.c index 935008e..7df5b0c 100644 --- a/src/parser.c +++ b/src/parser.c @@ -7875,7 +7875,7 @@ TS_PUBLIC const TSLanguage *tree_sitter_mal(void) { .max_reserved_word_set_size = 0, .metadata = { .major_version = 0, - .minor_version = 1, + .minor_version = 2, .patch_version = 0, }, }; diff --git a/tree-sitter.json b/tree-sitter.json index 3ed27be..bcccdb0 100644 --- a/tree-sitter.json +++ b/tree-sitter.json @@ -12,7 +12,7 @@ } ], "metadata": { - "version": "0.1.0", + "version": "0.2.0", "license": "MIT", "description": "IT systems are growing in complexity and the threat from cyberattacks is increasing. Threat modeling is a process that can be used to analyze potential attacks to IT systems in order to facilitate secure design. Meta Attack Language (MAL) is a threat modeling language framework for the creation of domain specific languages (DSL). MAL is developed at KTH Royal Institute of Technolog", "authors": [