diff --git a/g4/SecLangParser.g4 b/g4/SecLangParser.g4 index 152a92f..244af6b 100644 --- a/g4/SecLangParser.g4 +++ b/g4/SecLangParser.g4 @@ -414,6 +414,7 @@ metadata_action_with_params: | ACTION_SEVERITY # ACTION_SEVERITY | ACTION_TAG # ACTION_TAG | ACTION_VER # ACTION_VER + | ACTION_LOG_DATA # ACTION_LOG_DATA ; disruptive_action_with_params: @@ -428,7 +429,6 @@ non_disruptive_action_with_params: | ACTION_EXPIRE_VAR | ACTION_DEPRECATE_VAR | ACTION_INITCOL - | ACTION_LOG_DATA | ACTION_PREPEND | ACTION_SANITISE_ARG | ACTION_SANITISE_MATCHED_BYTES diff --git a/listener.go b/listener.go index 68946e4..b663544 100644 --- a/listener.go +++ b/listener.go @@ -31,6 +31,7 @@ type ParserResult struct { SetvarCollections []string `yaml:"setvar_collections"` SetvarNames []string `yaml:"setvar_names"` SetvarOperations []string `yaml:"setvar_operations"` + LogdataActionCount int `yaml:"logdata_action_count"` } type TreeShapeListener struct { @@ -220,3 +221,7 @@ func (l *TreeShapeListener) EnterTransformation_action_value(ctx *parser.Transfo func (l *TreeShapeListener) EnterComment_block(ctx *parser.Comment_blockContext) { l.results.CommentsBlocks++ } + +func (l *TreeShapeListener) EnterACTION_LOG_DATA(ctx *parser.ACTION_LOG_DATAContext) { + l.results.LogdataActionCount += 1 +} diff --git a/parser/seclang_parser.go b/parser/seclang_parser.go index 2854067..d8ee7be 100644 --- a/parser/seclang_parser.go +++ b/parser/seclang_parser.go @@ -183,7 +183,7 @@ func seclangparserParserInit() { } staticData.PredictionContextCache = antlr.NewPredictionContextCache() staticData.serializedATN = []int32{ - 4, 1, 270, 683, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, + 4, 1, 270, 684, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, @@ -245,61 +245,61 @@ func seclangparserParserInit() { 46, 1, 46, 1, 46, 1, 46, 3, 46, 584, 8, 46, 1, 47, 1, 47, 1, 47, 3, 47, 589, 8, 47, 1, 48, 1, 48, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 3, 51, 602, 8, 51, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, - 1, 52, 1, 52, 1, 52, 3, 52, 612, 8, 52, 1, 53, 1, 53, 1, 54, 1, 54, 1, - 55, 1, 55, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, - 1, 57, 1, 57, 3, 57, 631, 8, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, - 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 644, 8, 58, 1, 59, 1, 59, - 1, 60, 1, 60, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 3, 62, 655, 8, 62, 1, - 63, 1, 63, 1, 63, 3, 63, 660, 8, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, - 1, 64, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, 4, 66, 673, 8, 66, 11, 66, 12, - 66, 674, 1, 67, 1, 67, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 0, 0, 70, 0, - 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, - 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, - 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, - 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, - 0, 15, 1, 1, 259, 259, 8, 0, 131, 139, 150, 167, 169, 175, 178, 178, 180, - 180, 182, 183, 185, 185, 209, 216, 3, 0, 225, 225, 233, 233, 241, 241, - 3, 0, 140, 149, 193, 197, 227, 227, 1, 0, 89, 125, 2, 0, 85, 85, 87, 87, - 5, 0, 27, 27, 30, 30, 44, 44, 46, 46, 58, 59, 5, 0, 29, 29, 31, 31, 52, - 52, 55, 57, 67, 67, 1, 0, 62, 63, 8, 0, 28, 28, 33, 33, 45, 45, 47, 48, - 50, 51, 61, 61, 65, 66, 68, 74, 2, 0, 79, 79, 82, 82, 1, 0, 77, 78, 1, - 0, 34, 43, 2, 0, 3, 3, 5, 6, 1, 0, 226, 227, 753, 0, 143, 1, 0, 0, 0, 2, - 246, 1, 0, 0, 0, 4, 249, 1, 0, 0, 0, 6, 256, 1, 0, 0, 0, 8, 260, 1, 0, - 0, 0, 10, 290, 1, 0, 0, 0, 12, 296, 1, 0, 0, 0, 14, 298, 1, 0, 0, 0, 16, - 300, 1, 0, 0, 0, 18, 302, 1, 0, 0, 0, 20, 304, 1, 0, 0, 0, 22, 306, 1, - 0, 0, 0, 24, 310, 1, 0, 0, 0, 26, 312, 1, 0, 0, 0, 28, 316, 1, 0, 0, 0, - 30, 320, 1, 0, 0, 0, 32, 322, 1, 0, 0, 0, 34, 326, 1, 0, 0, 0, 36, 328, - 1, 0, 0, 0, 38, 333, 1, 0, 0, 0, 40, 335, 1, 0, 0, 0, 42, 337, 1, 0, 0, - 0, 44, 339, 1, 0, 0, 0, 46, 341, 1, 0, 0, 0, 48, 352, 1, 0, 0, 0, 50, 356, - 1, 0, 0, 0, 52, 360, 1, 0, 0, 0, 54, 362, 1, 0, 0, 0, 56, 387, 1, 0, 0, - 0, 58, 413, 1, 0, 0, 0, 60, 418, 1, 0, 0, 0, 62, 420, 1, 0, 0, 0, 64, 438, - 1, 0, 0, 0, 66, 440, 1, 0, 0, 0, 68, 472, 1, 0, 0, 0, 70, 474, 1, 0, 0, - 0, 72, 476, 1, 0, 0, 0, 74, 479, 1, 0, 0, 0, 76, 508, 1, 0, 0, 0, 78, 536, - 1, 0, 0, 0, 80, 544, 1, 0, 0, 0, 82, 546, 1, 0, 0, 0, 84, 548, 1, 0, 0, - 0, 86, 550, 1, 0, 0, 0, 88, 552, 1, 0, 0, 0, 90, 554, 1, 0, 0, 0, 92, 583, - 1, 0, 0, 0, 94, 588, 1, 0, 0, 0, 96, 590, 1, 0, 0, 0, 98, 592, 1, 0, 0, - 0, 100, 594, 1, 0, 0, 0, 102, 601, 1, 0, 0, 0, 104, 611, 1, 0, 0, 0, 106, - 613, 1, 0, 0, 0, 108, 615, 1, 0, 0, 0, 110, 617, 1, 0, 0, 0, 112, 619, - 1, 0, 0, 0, 114, 630, 1, 0, 0, 0, 116, 643, 1, 0, 0, 0, 118, 645, 1, 0, - 0, 0, 120, 647, 1, 0, 0, 0, 122, 649, 1, 0, 0, 0, 124, 654, 1, 0, 0, 0, - 126, 659, 1, 0, 0, 0, 128, 661, 1, 0, 0, 0, 130, 667, 1, 0, 0, 0, 132, - 672, 1, 0, 0, 0, 134, 676, 1, 0, 0, 0, 136, 678, 1, 0, 0, 0, 138, 680, - 1, 0, 0, 0, 140, 142, 3, 2, 1, 0, 141, 140, 1, 0, 0, 0, 142, 145, 1, 0, - 0, 0, 143, 141, 1, 0, 0, 0, 143, 144, 1, 0, 0, 0, 144, 146, 1, 0, 0, 0, - 145, 143, 1, 0, 0, 0, 146, 147, 5, 0, 0, 1, 147, 1, 1, 0, 0, 0, 148, 150, - 3, 4, 2, 0, 149, 148, 1, 0, 0, 0, 149, 150, 1, 0, 0, 0, 150, 151, 1, 0, - 0, 0, 151, 152, 3, 8, 4, 0, 152, 153, 3, 74, 37, 0, 153, 155, 3, 64, 32, - 0, 154, 156, 3, 90, 45, 0, 155, 154, 1, 0, 0, 0, 155, 156, 1, 0, 0, 0, - 156, 247, 1, 0, 0, 0, 157, 159, 3, 4, 2, 0, 158, 157, 1, 0, 0, 0, 158, - 159, 1, 0, 0, 0, 159, 160, 1, 0, 0, 0, 160, 161, 3, 18, 9, 0, 161, 163, - 3, 20, 10, 0, 162, 164, 3, 90, 45, 0, 163, 162, 1, 0, 0, 0, 163, 164, 1, - 0, 0, 0, 164, 247, 1, 0, 0, 0, 165, 167, 3, 4, 2, 0, 166, 165, 1, 0, 0, - 0, 166, 167, 1, 0, 0, 0, 167, 168, 1, 0, 0, 0, 168, 169, 3, 18, 9, 0, 169, - 170, 5, 1, 0, 0, 170, 171, 3, 20, 10, 0, 171, 173, 5, 1, 0, 0, 172, 174, - 3, 90, 45, 0, 173, 172, 1, 0, 0, 0, 173, 174, 1, 0, 0, 0, 174, 247, 1, - 0, 0, 0, 175, 177, 3, 4, 2, 0, 176, 175, 1, 0, 0, 0, 176, 177, 1, 0, 0, - 0, 177, 178, 1, 0, 0, 0, 178, 180, 3, 22, 11, 0, 179, 181, 3, 24, 12, 0, - 180, 179, 1, 0, 0, 0, 181, 182, 1, 0, 0, 0, 182, 180, 1, 0, 0, 0, 182, + 1, 52, 1, 52, 1, 52, 1, 52, 3, 52, 613, 8, 52, 1, 53, 1, 53, 1, 54, 1, + 54, 1, 55, 1, 55, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, + 1, 57, 1, 57, 1, 57, 3, 57, 632, 8, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, + 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 645, 8, 58, 1, 59, + 1, 59, 1, 60, 1, 60, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 3, 62, 656, 8, + 62, 1, 63, 1, 63, 1, 63, 3, 63, 661, 8, 63, 1, 64, 1, 64, 1, 64, 1, 64, + 1, 64, 1, 64, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, 4, 66, 674, 8, 66, 11, + 66, 12, 66, 675, 1, 67, 1, 67, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 0, 0, + 70, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, + 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, + 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, + 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, + 136, 138, 0, 15, 1, 1, 259, 259, 8, 0, 131, 139, 150, 167, 169, 175, 178, + 178, 180, 180, 182, 183, 185, 185, 209, 216, 3, 0, 225, 225, 233, 233, + 241, 241, 3, 0, 140, 149, 193, 197, 227, 227, 1, 0, 89, 125, 2, 0, 85, + 85, 87, 87, 5, 0, 27, 27, 30, 30, 44, 44, 46, 46, 58, 59, 5, 0, 29, 29, + 31, 31, 52, 52, 55, 57, 67, 67, 1, 0, 62, 63, 8, 0, 28, 28, 33, 33, 45, + 45, 47, 48, 50, 50, 61, 61, 65, 66, 68, 74, 2, 0, 79, 79, 82, 82, 1, 0, + 77, 78, 1, 0, 34, 43, 2, 0, 3, 3, 5, 6, 1, 0, 226, 227, 755, 0, 143, 1, + 0, 0, 0, 2, 246, 1, 0, 0, 0, 4, 249, 1, 0, 0, 0, 6, 256, 1, 0, 0, 0, 8, + 260, 1, 0, 0, 0, 10, 290, 1, 0, 0, 0, 12, 296, 1, 0, 0, 0, 14, 298, 1, + 0, 0, 0, 16, 300, 1, 0, 0, 0, 18, 302, 1, 0, 0, 0, 20, 304, 1, 0, 0, 0, + 22, 306, 1, 0, 0, 0, 24, 310, 1, 0, 0, 0, 26, 312, 1, 0, 0, 0, 28, 316, + 1, 0, 0, 0, 30, 320, 1, 0, 0, 0, 32, 322, 1, 0, 0, 0, 34, 326, 1, 0, 0, + 0, 36, 328, 1, 0, 0, 0, 38, 333, 1, 0, 0, 0, 40, 335, 1, 0, 0, 0, 42, 337, + 1, 0, 0, 0, 44, 339, 1, 0, 0, 0, 46, 341, 1, 0, 0, 0, 48, 352, 1, 0, 0, + 0, 50, 356, 1, 0, 0, 0, 52, 360, 1, 0, 0, 0, 54, 362, 1, 0, 0, 0, 56, 387, + 1, 0, 0, 0, 58, 413, 1, 0, 0, 0, 60, 418, 1, 0, 0, 0, 62, 420, 1, 0, 0, + 0, 64, 438, 1, 0, 0, 0, 66, 440, 1, 0, 0, 0, 68, 472, 1, 0, 0, 0, 70, 474, + 1, 0, 0, 0, 72, 476, 1, 0, 0, 0, 74, 479, 1, 0, 0, 0, 76, 508, 1, 0, 0, + 0, 78, 536, 1, 0, 0, 0, 80, 544, 1, 0, 0, 0, 82, 546, 1, 0, 0, 0, 84, 548, + 1, 0, 0, 0, 86, 550, 1, 0, 0, 0, 88, 552, 1, 0, 0, 0, 90, 554, 1, 0, 0, + 0, 92, 583, 1, 0, 0, 0, 94, 588, 1, 0, 0, 0, 96, 590, 1, 0, 0, 0, 98, 592, + 1, 0, 0, 0, 100, 594, 1, 0, 0, 0, 102, 601, 1, 0, 0, 0, 104, 612, 1, 0, + 0, 0, 106, 614, 1, 0, 0, 0, 108, 616, 1, 0, 0, 0, 110, 618, 1, 0, 0, 0, + 112, 620, 1, 0, 0, 0, 114, 631, 1, 0, 0, 0, 116, 644, 1, 0, 0, 0, 118, + 646, 1, 0, 0, 0, 120, 648, 1, 0, 0, 0, 122, 650, 1, 0, 0, 0, 124, 655, + 1, 0, 0, 0, 126, 660, 1, 0, 0, 0, 128, 662, 1, 0, 0, 0, 130, 668, 1, 0, + 0, 0, 132, 673, 1, 0, 0, 0, 134, 677, 1, 0, 0, 0, 136, 679, 1, 0, 0, 0, + 138, 681, 1, 0, 0, 0, 140, 142, 3, 2, 1, 0, 141, 140, 1, 0, 0, 0, 142, + 145, 1, 0, 0, 0, 143, 141, 1, 0, 0, 0, 143, 144, 1, 0, 0, 0, 144, 146, + 1, 0, 0, 0, 145, 143, 1, 0, 0, 0, 146, 147, 5, 0, 0, 1, 147, 1, 1, 0, 0, + 0, 148, 150, 3, 4, 2, 0, 149, 148, 1, 0, 0, 0, 149, 150, 1, 0, 0, 0, 150, + 151, 1, 0, 0, 0, 151, 152, 3, 8, 4, 0, 152, 153, 3, 74, 37, 0, 153, 155, + 3, 64, 32, 0, 154, 156, 3, 90, 45, 0, 155, 154, 1, 0, 0, 0, 155, 156, 1, + 0, 0, 0, 156, 247, 1, 0, 0, 0, 157, 159, 3, 4, 2, 0, 158, 157, 1, 0, 0, + 0, 158, 159, 1, 0, 0, 0, 159, 160, 1, 0, 0, 0, 160, 161, 3, 18, 9, 0, 161, + 163, 3, 20, 10, 0, 162, 164, 3, 90, 45, 0, 163, 162, 1, 0, 0, 0, 163, 164, + 1, 0, 0, 0, 164, 247, 1, 0, 0, 0, 165, 167, 3, 4, 2, 0, 166, 165, 1, 0, + 0, 0, 166, 167, 1, 0, 0, 0, 167, 168, 1, 0, 0, 0, 168, 169, 3, 18, 9, 0, + 169, 170, 5, 1, 0, 0, 170, 171, 3, 20, 10, 0, 171, 173, 5, 1, 0, 0, 172, + 174, 3, 90, 45, 0, 173, 172, 1, 0, 0, 0, 173, 174, 1, 0, 0, 0, 174, 247, + 1, 0, 0, 0, 175, 177, 3, 4, 2, 0, 176, 175, 1, 0, 0, 0, 176, 177, 1, 0, + 0, 0, 177, 178, 1, 0, 0, 0, 178, 180, 3, 22, 11, 0, 179, 181, 3, 24, 12, + 0, 180, 179, 1, 0, 0, 0, 181, 182, 1, 0, 0, 0, 182, 180, 1, 0, 0, 0, 182, 183, 1, 0, 0, 0, 183, 247, 1, 0, 0, 0, 184, 186, 3, 4, 2, 0, 185, 184, 1, 0, 0, 0, 185, 186, 1, 0, 0, 0, 186, 187, 1, 0, 0, 0, 187, 188, 3, 34, 17, 0, 188, 189, 3, 36, 18, 0, 189, 247, 1, 0, 0, 0, 190, 192, 3, 4, 2, @@ -464,44 +464,45 @@ func seclangparserParserInit() { 101, 1, 0, 0, 0, 596, 602, 3, 104, 52, 0, 597, 602, 3, 106, 53, 0, 598, 602, 3, 108, 54, 0, 599, 602, 3, 112, 56, 0, 600, 602, 3, 110, 55, 0, 601, 596, 1, 0, 0, 0, 601, 597, 1, 0, 0, 0, 601, 598, 1, 0, 0, 0, 601, 599, - 1, 0, 0, 0, 601, 600, 1, 0, 0, 0, 602, 103, 1, 0, 0, 0, 603, 612, 5, 60, - 0, 0, 604, 612, 5, 49, 0, 0, 605, 612, 5, 53, 0, 0, 606, 612, 5, 54, 0, - 0, 607, 612, 5, 64, 0, 0, 608, 612, 5, 75, 0, 0, 609, 612, 5, 80, 0, 0, - 610, 612, 5, 81, 0, 0, 611, 603, 1, 0, 0, 0, 611, 604, 1, 0, 0, 0, 611, - 605, 1, 0, 0, 0, 611, 606, 1, 0, 0, 0, 611, 607, 1, 0, 0, 0, 611, 608, - 1, 0, 0, 0, 611, 609, 1, 0, 0, 0, 611, 610, 1, 0, 0, 0, 612, 105, 1, 0, - 0, 0, 613, 614, 7, 8, 0, 0, 614, 107, 1, 0, 0, 0, 615, 616, 7, 9, 0, 0, - 616, 109, 1, 0, 0, 0, 617, 618, 7, 10, 0, 0, 618, 111, 1, 0, 0, 0, 619, - 620, 7, 11, 0, 0, 620, 113, 1, 0, 0, 0, 621, 631, 3, 116, 58, 0, 622, 623, - 5, 2, 0, 0, 623, 624, 3, 116, 58, 0, 624, 625, 5, 2, 0, 0, 625, 631, 1, - 0, 0, 0, 626, 627, 5, 2, 0, 0, 627, 628, 3, 118, 59, 0, 628, 629, 5, 2, - 0, 0, 629, 631, 1, 0, 0, 0, 630, 621, 1, 0, 0, 0, 630, 622, 1, 0, 0, 0, - 630, 626, 1, 0, 0, 0, 631, 115, 1, 0, 0, 0, 632, 644, 5, 227, 0, 0, 633, - 644, 3, 124, 62, 0, 634, 644, 3, 128, 64, 0, 635, 636, 3, 120, 60, 0, 636, - 637, 3, 134, 67, 0, 637, 638, 3, 56, 28, 0, 638, 644, 1, 0, 0, 0, 639, - 644, 5, 225, 0, 0, 640, 644, 5, 76, 0, 0, 641, 644, 5, 231, 0, 0, 642, - 644, 5, 241, 0, 0, 643, 632, 1, 0, 0, 0, 643, 633, 1, 0, 0, 0, 643, 634, - 1, 0, 0, 0, 643, 635, 1, 0, 0, 0, 643, 639, 1, 0, 0, 0, 643, 640, 1, 0, - 0, 0, 643, 641, 1, 0, 0, 0, 643, 642, 1, 0, 0, 0, 644, 117, 1, 0, 0, 0, - 645, 646, 5, 246, 0, 0, 646, 119, 1, 0, 0, 0, 647, 648, 7, 12, 0, 0, 648, - 121, 1, 0, 0, 0, 649, 650, 5, 84, 0, 0, 650, 123, 1, 0, 0, 0, 651, 655, - 1, 0, 0, 0, 652, 655, 5, 243, 0, 0, 653, 655, 5, 250, 0, 0, 654, 651, 1, - 0, 0, 0, 654, 652, 1, 0, 0, 0, 654, 653, 1, 0, 0, 0, 655, 125, 1, 0, 0, - 0, 656, 660, 1, 0, 0, 0, 657, 660, 5, 243, 0, 0, 658, 660, 5, 250, 0, 0, - 659, 656, 1, 0, 0, 0, 659, 657, 1, 0, 0, 0, 659, 658, 1, 0, 0, 0, 660, - 127, 1, 0, 0, 0, 661, 662, 3, 130, 65, 0, 662, 663, 5, 236, 0, 0, 663, - 664, 3, 132, 66, 0, 664, 665, 3, 134, 67, 0, 665, 666, 3, 136, 68, 0, 666, - 129, 1, 0, 0, 0, 667, 668, 5, 235, 0, 0, 668, 131, 1, 0, 0, 0, 669, 673, - 5, 237, 0, 0, 670, 671, 5, 238, 0, 0, 671, 673, 5, 234, 0, 0, 672, 669, - 1, 0, 0, 0, 672, 670, 1, 0, 0, 0, 673, 674, 1, 0, 0, 0, 674, 672, 1, 0, - 0, 0, 674, 675, 1, 0, 0, 0, 675, 133, 1, 0, 0, 0, 676, 677, 7, 13, 0, 0, - 677, 135, 1, 0, 0, 0, 678, 679, 5, 239, 0, 0, 679, 137, 1, 0, 0, 0, 680, - 681, 7, 14, 0, 0, 681, 139, 1, 0, 0, 0, 74, 143, 149, 155, 158, 163, 166, - 173, 176, 182, 185, 191, 199, 206, 215, 224, 235, 242, 246, 251, 254, 258, - 290, 296, 310, 326, 333, 347, 360, 387, 395, 405, 411, 413, 418, 424, 429, - 438, 447, 452, 458, 463, 467, 472, 479, 482, 485, 489, 493, 496, 500, 504, - 508, 511, 514, 518, 522, 525, 529, 533, 542, 544, 560, 568, 571, 583, 588, - 601, 611, 630, 643, 654, 659, 672, 674, + 1, 0, 0, 0, 601, 600, 1, 0, 0, 0, 602, 103, 1, 0, 0, 0, 603, 613, 5, 60, + 0, 0, 604, 613, 5, 49, 0, 0, 605, 613, 5, 53, 0, 0, 606, 613, 5, 54, 0, + 0, 607, 613, 5, 64, 0, 0, 608, 613, 5, 75, 0, 0, 609, 613, 5, 80, 0, 0, + 610, 613, 5, 81, 0, 0, 611, 613, 5, 51, 0, 0, 612, 603, 1, 0, 0, 0, 612, + 604, 1, 0, 0, 0, 612, 605, 1, 0, 0, 0, 612, 606, 1, 0, 0, 0, 612, 607, + 1, 0, 0, 0, 612, 608, 1, 0, 0, 0, 612, 609, 1, 0, 0, 0, 612, 610, 1, 0, + 0, 0, 612, 611, 1, 0, 0, 0, 613, 105, 1, 0, 0, 0, 614, 615, 7, 8, 0, 0, + 615, 107, 1, 0, 0, 0, 616, 617, 7, 9, 0, 0, 617, 109, 1, 0, 0, 0, 618, + 619, 7, 10, 0, 0, 619, 111, 1, 0, 0, 0, 620, 621, 7, 11, 0, 0, 621, 113, + 1, 0, 0, 0, 622, 632, 3, 116, 58, 0, 623, 624, 5, 2, 0, 0, 624, 625, 3, + 116, 58, 0, 625, 626, 5, 2, 0, 0, 626, 632, 1, 0, 0, 0, 627, 628, 5, 2, + 0, 0, 628, 629, 3, 118, 59, 0, 629, 630, 5, 2, 0, 0, 630, 632, 1, 0, 0, + 0, 631, 622, 1, 0, 0, 0, 631, 623, 1, 0, 0, 0, 631, 627, 1, 0, 0, 0, 632, + 115, 1, 0, 0, 0, 633, 645, 5, 227, 0, 0, 634, 645, 3, 124, 62, 0, 635, + 645, 3, 128, 64, 0, 636, 637, 3, 120, 60, 0, 637, 638, 3, 134, 67, 0, 638, + 639, 3, 56, 28, 0, 639, 645, 1, 0, 0, 0, 640, 645, 5, 225, 0, 0, 641, 645, + 5, 76, 0, 0, 642, 645, 5, 231, 0, 0, 643, 645, 5, 241, 0, 0, 644, 633, + 1, 0, 0, 0, 644, 634, 1, 0, 0, 0, 644, 635, 1, 0, 0, 0, 644, 636, 1, 0, + 0, 0, 644, 640, 1, 0, 0, 0, 644, 641, 1, 0, 0, 0, 644, 642, 1, 0, 0, 0, + 644, 643, 1, 0, 0, 0, 645, 117, 1, 0, 0, 0, 646, 647, 5, 246, 0, 0, 647, + 119, 1, 0, 0, 0, 648, 649, 7, 12, 0, 0, 649, 121, 1, 0, 0, 0, 650, 651, + 5, 84, 0, 0, 651, 123, 1, 0, 0, 0, 652, 656, 1, 0, 0, 0, 653, 656, 5, 243, + 0, 0, 654, 656, 5, 250, 0, 0, 655, 652, 1, 0, 0, 0, 655, 653, 1, 0, 0, + 0, 655, 654, 1, 0, 0, 0, 656, 125, 1, 0, 0, 0, 657, 661, 1, 0, 0, 0, 658, + 661, 5, 243, 0, 0, 659, 661, 5, 250, 0, 0, 660, 657, 1, 0, 0, 0, 660, 658, + 1, 0, 0, 0, 660, 659, 1, 0, 0, 0, 661, 127, 1, 0, 0, 0, 662, 663, 3, 130, + 65, 0, 663, 664, 5, 236, 0, 0, 664, 665, 3, 132, 66, 0, 665, 666, 3, 134, + 67, 0, 666, 667, 3, 136, 68, 0, 667, 129, 1, 0, 0, 0, 668, 669, 5, 235, + 0, 0, 669, 131, 1, 0, 0, 0, 670, 674, 5, 237, 0, 0, 671, 672, 5, 238, 0, + 0, 672, 674, 5, 234, 0, 0, 673, 670, 1, 0, 0, 0, 673, 671, 1, 0, 0, 0, + 674, 675, 1, 0, 0, 0, 675, 673, 1, 0, 0, 0, 675, 676, 1, 0, 0, 0, 676, + 133, 1, 0, 0, 0, 677, 678, 7, 13, 0, 0, 678, 135, 1, 0, 0, 0, 679, 680, + 5, 239, 0, 0, 680, 137, 1, 0, 0, 0, 681, 682, 7, 14, 0, 0, 682, 139, 1, + 0, 0, 0, 74, 143, 149, 155, 158, 163, 166, 173, 176, 182, 185, 191, 199, + 206, 215, 224, 235, 242, 246, 251, 254, 258, 290, 296, 310, 326, 333, 347, + 360, 387, 395, 405, 411, 413, 418, 424, 429, 438, 447, 452, 458, 463, 467, + 472, 479, 482, 485, 489, 493, 496, 500, 504, 508, 511, 514, 518, 522, 525, + 529, 533, 542, 544, 560, 568, 571, 583, 588, 601, 612, 631, 644, 655, 660, + 673, 675, } deserializer := antlr.NewATNDeserializer(nil) staticData.atn = deserializer.Deserialize(staticData.serializedATN) @@ -10520,7 +10521,7 @@ func (p *SecLangParser) Action_with_params() (localctx IAction_with_paramsContex } switch p.GetTokenStream().LA(1) { - case SecLangParserACTION_ID, SecLangParserACTION_MATURITY, SecLangParserACTION_MSG, SecLangParserACTION_PHASE, SecLangParserACTION_REV, SecLangParserACTION_SEVERITY, SecLangParserACTION_TAG, SecLangParserACTION_VER: + case SecLangParserACTION_ID, SecLangParserACTION_LOG_DATA, SecLangParserACTION_MATURITY, SecLangParserACTION_MSG, SecLangParserACTION_PHASE, SecLangParserACTION_REV, SecLangParserACTION_SEVERITY, SecLangParserACTION_TAG, SecLangParserACTION_VER: p.EnterOuterAlt(localctx, 1) { p.SetState(596) @@ -10534,7 +10535,7 @@ func (p *SecLangParser) Action_with_params() (localctx IAction_with_paramsContex p.Disruptive_action_with_params() } - case SecLangParserACTION_APPEND, SecLangParserACTION_CTL, SecLangParserACTION_DEPRECATE_VAR, SecLangParserACTION_EXEC, SecLangParserACTION_EXPIRE_VAR, SecLangParserACTION_INITCOL, SecLangParserACTION_LOG_DATA, SecLangParserACTION_PREPEND, SecLangParserACTION_SANITISE_ARG, SecLangParserACTION_SANITISE_MATCHED_BYTES, SecLangParserACTION_SANITISE_REQUEST_HEADER, SecLangParserACTION_SANITISE_RESPONSE_HEADER, SecLangParserACTION_SETENV, SecLangParserACTION_SETRSC, SecLangParserACTION_SETSID, SecLangParserACTION_SETUID, SecLangParserACTION_SETVAR: + case SecLangParserACTION_APPEND, SecLangParserACTION_CTL, SecLangParserACTION_DEPRECATE_VAR, SecLangParserACTION_EXEC, SecLangParserACTION_EXPIRE_VAR, SecLangParserACTION_INITCOL, SecLangParserACTION_PREPEND, SecLangParserACTION_SANITISE_ARG, SecLangParserACTION_SANITISE_MATCHED_BYTES, SecLangParserACTION_SANITISE_REQUEST_HEADER, SecLangParserACTION_SANITISE_RESPONSE_HEADER, SecLangParserACTION_SETENV, SecLangParserACTION_SETRSC, SecLangParserACTION_SETSID, SecLangParserACTION_SETUID, SecLangParserACTION_SETVAR: p.EnterOuterAlt(localctx, 3) { p.SetState(598) @@ -10797,6 +10798,40 @@ func (s *ACTION_MSGContext) ExitRule(listener antlr.ParseTreeListener) { } } +type ACTION_LOG_DATAContext struct { + Metadata_action_with_paramsContext +} + +func NewACTION_LOG_DATAContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ACTION_LOG_DATAContext { + var p = new(ACTION_LOG_DATAContext) + + InitEmptyMetadata_action_with_paramsContext(&p.Metadata_action_with_paramsContext) + p.parser = parser + p.CopyAll(ctx.(*Metadata_action_with_paramsContext)) + + return p +} + +func (s *ACTION_LOG_DATAContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ACTION_LOG_DATAContext) ACTION_LOG_DATA() antlr.TerminalNode { + return s.GetToken(SecLangParserACTION_LOG_DATA, 0) +} + +func (s *ACTION_LOG_DATAContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(SecLangParserListener); ok { + listenerT.EnterACTION_LOG_DATA(s) + } +} + +func (s *ACTION_LOG_DATAContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(SecLangParserListener); ok { + listenerT.ExitACTION_LOG_DATA(s) + } +} + type ACTION_PHASEContext struct { Metadata_action_with_paramsContext } @@ -10902,7 +10937,7 @@ func (s *ACTION_TAGContext) ExitRule(listener antlr.ParseTreeListener) { func (p *SecLangParser) Metadata_action_with_params() (localctx IMetadata_action_with_paramsContext) { localctx = NewMetadata_action_with_paramsContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 104, SecLangParserRULE_metadata_action_with_params) - p.SetState(611) + p.SetState(612) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -11005,6 +11040,18 @@ func (p *SecLangParser) Metadata_action_with_params() (localctx IMetadata_action } } + case SecLangParserACTION_LOG_DATA: + localctx = NewACTION_LOG_DATAContext(p, localctx) + p.EnterOuterAlt(localctx, 9) + { + p.SetState(611) + p.Match(SecLangParserACTION_LOG_DATA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + default: p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) goto errorExit @@ -11105,7 +11152,7 @@ func (p *SecLangParser) Disruptive_action_with_params() (localctx IDisruptive_ac p.EnterOuterAlt(localctx, 1) { - p.SetState(613) + p.SetState(614) _la = p.GetTokenStream().LA(1) if !(_la == SecLangParserACTION_PROXY || _la == SecLangParserACTION_REDIRECT) { @@ -11143,7 +11190,6 @@ type INon_disruptive_action_with_paramsContext interface { ACTION_EXPIRE_VAR() antlr.TerminalNode ACTION_DEPRECATE_VAR() antlr.TerminalNode ACTION_INITCOL() antlr.TerminalNode - ACTION_LOG_DATA() antlr.TerminalNode ACTION_PREPEND() antlr.TerminalNode ACTION_SANITISE_ARG() antlr.TerminalNode ACTION_SANITISE_MATCHED_BYTES() antlr.TerminalNode @@ -11215,10 +11261,6 @@ func (s *Non_disruptive_action_with_paramsContext) ACTION_INITCOL() antlr.Termin return s.GetToken(SecLangParserACTION_INITCOL, 0) } -func (s *Non_disruptive_action_with_paramsContext) ACTION_LOG_DATA() antlr.TerminalNode { - return s.GetToken(SecLangParserACTION_LOG_DATA, 0) -} - func (s *Non_disruptive_action_with_paramsContext) ACTION_PREPEND() antlr.TerminalNode { return s.GetToken(SecLangParserACTION_PREPEND, 0) } @@ -11286,10 +11328,10 @@ func (p *SecLangParser) Non_disruptive_action_with_params() (localctx INon_disru p.EnterOuterAlt(localctx, 1) { - p.SetState(615) + p.SetState(616) _la = p.GetTokenStream().LA(1) - if !((int64((_la-28)) & ^0x3f) == 0 && ((int64(1)<<(_la-28))&140058897809441) != 0) { + if !((int64((_la-28)) & ^0x3f) == 0 && ((int64(1)<<(_la-28))&140058889420833) != 0) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) @@ -11392,7 +11434,7 @@ func (p *SecLangParser) Data_action_with_params() (localctx IData_action_with_pa p.EnterOuterAlt(localctx, 1) { - p.SetState(617) + p.SetState(618) _la = p.GetTokenStream().LA(1) if !(_la == SecLangParserACTION_STATUS || _la == SecLangParserACTION_XMLNS) { @@ -11498,7 +11540,7 @@ func (p *SecLangParser) Flow_action_with_params() (localctx IFlow_action_with_pa p.EnterOuterAlt(localctx, 1) { - p.SetState(619) + p.SetState(620) _la = p.GetTokenStream().LA(1) if !(_la == SecLangParserACTION_SKIP_AFTER || _la == SecLangParserACTION_SKIP) { @@ -11634,7 +11676,7 @@ func (s *Action_valueContext) ExitRule(listener antlr.ParseTreeListener) { func (p *SecLangParser) Action_value() (localctx IAction_valueContext) { localctx = NewAction_valueContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 114, SecLangParserRULE_action_value) - p.SetState(630) + p.SetState(631) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -11644,14 +11686,14 @@ func (p *SecLangParser) Action_value() (localctx IAction_valueContext) { case 1: p.EnterOuterAlt(localctx, 1) { - p.SetState(621) + p.SetState(622) p.Action_value_types() } case 2: p.EnterOuterAlt(localctx, 2) { - p.SetState(622) + p.SetState(623) p.Match(SecLangParserSINGLE_QUOTE) if p.HasError() { // Recognition error - abort rule @@ -11659,11 +11701,11 @@ func (p *SecLangParser) Action_value() (localctx IAction_valueContext) { } } { - p.SetState(623) + p.SetState(624) p.Action_value_types() } { - p.SetState(624) + p.SetState(625) p.Match(SecLangParserSINGLE_QUOTE) if p.HasError() { // Recognition error - abort rule @@ -11674,7 +11716,7 @@ func (p *SecLangParser) Action_value() (localctx IAction_valueContext) { case 3: p.EnterOuterAlt(localctx, 3) { - p.SetState(626) + p.SetState(627) p.Match(SecLangParserSINGLE_QUOTE) if p.HasError() { // Recognition error - abort rule @@ -11682,11 +11724,11 @@ func (p *SecLangParser) Action_value() (localctx IAction_valueContext) { } } { - p.SetState(627) + p.SetState(628) p.String_literal() } { - p.SetState(628) + p.SetState(629) p.Match(SecLangParserSINGLE_QUOTE) if p.HasError() { // Recognition error - abort rule @@ -11889,7 +11931,7 @@ func (s *Action_value_typesContext) ExitRule(listener antlr.ParseTreeListener) { func (p *SecLangParser) Action_value_types() (localctx IAction_value_typesContext) { localctx = NewAction_value_typesContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 116, SecLangParserRULE_action_value_types) - p.SetState(643) + p.SetState(644) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -11899,7 +11941,7 @@ func (p *SecLangParser) Action_value_types() (localctx IAction_value_typesContex case SecLangParserINT: p.EnterOuterAlt(localctx, 1) { - p.SetState(632) + p.SetState(633) p.Match(SecLangParserINT) if p.HasError() { // Recognition error - abort rule @@ -11910,36 +11952,36 @@ func (p *SecLangParser) Action_value_types() (localctx IAction_value_typesContex case SecLangParserQUOTE, SecLangParserSINGLE_QUOTE, SecLangParserCOMMA, SecLangParserXPATH_EXPRESSION, SecLangParserCOLLECTION_ELEMENT_VALUE: p.EnterOuterAlt(localctx, 2) { - p.SetState(633) + p.SetState(634) p.Collection_value() } case SecLangParserCOLLECTION_NAME_SETVAR: p.EnterOuterAlt(localctx, 3) { - p.SetState(634) + p.SetState(635) p.Setvar_action() } case SecLangParserACTION_CTL_AUDIT_ENGINE, SecLangParserACTION_CTL_AUDIT_LOG_PARTS, SecLangParserACTION_CTL_REQUEST_BODY_PROCESSOR, SecLangParserACTION_CTL_FORCE_REQ_BODY_VAR, SecLangParserACTION_CTL_REQUEST_BODY_ACCESS, SecLangParserACTION_CTL_RULE_ENGINE, SecLangParserACTION_CTL_RULE_REMOVE_BY_TAG, SecLangParserACTION_CTL_RULE_REMOVE_BY_ID, SecLangParserACTION_CTL_RULE_REMOVE_TARGET_BY_ID, SecLangParserACTION_CTL_RULE_REMOVE_TARGET_BY_TAG: p.EnterOuterAlt(localctx, 4) { - p.SetState(635) + p.SetState(636) p.Ctl_action() } { - p.SetState(636) + p.SetState(637) p.Assignment() } { - p.SetState(637) + p.SetState(638) p.Values() } case SecLangParserVARIABLE_NAME: p.EnterOuterAlt(localctx, 5) { - p.SetState(639) + p.SetState(640) p.Match(SecLangParserVARIABLE_NAME) if p.HasError() { // Recognition error - abort rule @@ -11950,7 +11992,7 @@ func (p *SecLangParser) Action_value_types() (localctx IAction_value_typesContex case SecLangParserACTION_SEVERITY_VALUE: p.EnterOuterAlt(localctx, 6) { - p.SetState(640) + p.SetState(641) p.Match(SecLangParserACTION_SEVERITY_VALUE) if p.HasError() { // Recognition error - abort rule @@ -11961,7 +12003,7 @@ func (p *SecLangParser) Action_value_types() (localctx IAction_value_typesContex case SecLangParserFREE_TEXT_QUOTE_MACRO_EXPANSION: p.EnterOuterAlt(localctx, 7) { - p.SetState(641) + p.SetState(642) p.Match(SecLangParserFREE_TEXT_QUOTE_MACRO_EXPANSION) if p.HasError() { // Recognition error - abort rule @@ -11972,7 +12014,7 @@ func (p *SecLangParser) Action_value_types() (localctx IAction_value_typesContex case SecLangParserCOMMA_SEPARATED_STRING: p.EnterOuterAlt(localctx, 8) { - p.SetState(642) + p.SetState(643) p.Match(SecLangParserCOMMA_SEPARATED_STRING) if p.HasError() { // Recognition error - abort rule @@ -12073,7 +12115,7 @@ func (p *SecLangParser) String_literal() (localctx IString_literalContext) { p.EnterRule(localctx, 118, SecLangParserRULE_string_literal) p.EnterOuterAlt(localctx, 1) { - p.SetState(645) + p.SetState(646) p.Match(SecLangParserSTRING_LITERAL) if p.HasError() { // Recognition error - abort rule @@ -12216,7 +12258,7 @@ func (p *SecLangParser) Ctl_action() (localctx ICtl_actionContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(647) + p.SetState(648) _la = p.GetTokenStream().LA(1) if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&17575006175232) != 0) { @@ -12315,7 +12357,7 @@ func (p *SecLangParser) Transformation_action_value() (localctx ITransformation_ p.EnterRule(localctx, 122, SecLangParserRULE_transformation_action_value) p.EnterOuterAlt(localctx, 1) { - p.SetState(649) + p.SetState(650) p.Match(SecLangParserTRANSFORMATION_VALUE) if p.HasError() { // Recognition error - abort rule @@ -12414,7 +12456,7 @@ func (s *Collection_valueContext) ExitRule(listener antlr.ParseTreeListener) { func (p *SecLangParser) Collection_value() (localctx ICollection_valueContext) { localctx = NewCollection_valueContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 124, SecLangParserRULE_collection_value) - p.SetState(654) + p.SetState(655) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -12427,7 +12469,7 @@ func (p *SecLangParser) Collection_value() (localctx ICollection_valueContext) { case SecLangParserXPATH_EXPRESSION: p.EnterOuterAlt(localctx, 2) { - p.SetState(652) + p.SetState(653) p.Match(SecLangParserXPATH_EXPRESSION) if p.HasError() { // Recognition error - abort rule @@ -12438,7 +12480,7 @@ func (p *SecLangParser) Collection_value() (localctx ICollection_valueContext) { case SecLangParserCOLLECTION_ELEMENT_VALUE: p.EnterOuterAlt(localctx, 3) { - p.SetState(653) + p.SetState(654) p.Match(SecLangParserCOLLECTION_ELEMENT_VALUE) if p.HasError() { // Recognition error - abort rule @@ -12542,7 +12584,7 @@ func (s *Ctl_collection_valueContext) ExitRule(listener antlr.ParseTreeListener) func (p *SecLangParser) Ctl_collection_value() (localctx ICtl_collection_valueContext) { localctx = NewCtl_collection_valueContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 126, SecLangParserRULE_ctl_collection_value) - p.SetState(659) + p.SetState(660) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -12555,7 +12597,7 @@ func (p *SecLangParser) Ctl_collection_value() (localctx ICtl_collection_valueCo case SecLangParserXPATH_EXPRESSION: p.EnterOuterAlt(localctx, 2) { - p.SetState(657) + p.SetState(658) p.Match(SecLangParserXPATH_EXPRESSION) if p.HasError() { // Recognition error - abort rule @@ -12566,7 +12608,7 @@ func (p *SecLangParser) Ctl_collection_value() (localctx ICtl_collection_valueCo case SecLangParserCOLLECTION_ELEMENT_VALUE: p.EnterOuterAlt(localctx, 3) { - p.SetState(658) + p.SetState(659) p.Match(SecLangParserCOLLECTION_ELEMENT_VALUE) if p.HasError() { // Recognition error - abort rule @@ -12735,11 +12777,11 @@ func (p *SecLangParser) Setvar_action() (localctx ISetvar_actionContext) { p.EnterRule(localctx, 128, SecLangParserRULE_setvar_action) p.EnterOuterAlt(localctx, 1) { - p.SetState(661) + p.SetState(662) p.Col_name() } { - p.SetState(662) + p.SetState(663) p.Match(SecLangParserDOT) if p.HasError() { // Recognition error - abort rule @@ -12747,15 +12789,15 @@ func (p *SecLangParser) Setvar_action() (localctx ISetvar_actionContext) { } } { - p.SetState(663) + p.SetState(664) p.Setvar_stmt() } { - p.SetState(664) + p.SetState(665) p.Assignment() } { - p.SetState(665) + p.SetState(666) p.Var_assignment() } @@ -12847,7 +12889,7 @@ func (p *SecLangParser) Col_name() (localctx ICol_nameContext) { p.EnterRule(localctx, 130, SecLangParserRULE_col_name) p.EnterOuterAlt(localctx, 1) { - p.SetState(667) + p.SetState(668) p.Match(SecLangParserCOLLECTION_NAME_SETVAR) if p.HasError() { // Recognition error - abort rule @@ -12969,7 +13011,7 @@ func (p *SecLangParser) Setvar_stmt() (localctx ISetvar_stmtContext) { var _la int p.EnterOuterAlt(localctx, 1) - p.SetState(672) + p.SetState(673) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -12977,7 +13019,7 @@ func (p *SecLangParser) Setvar_stmt() (localctx ISetvar_stmtContext) { _la = p.GetTokenStream().LA(1) for ok := true; ok; ok = _la == SecLangParserCOLLECTION_ELEMENT || _la == SecLangParserCOLLECTION_WITH_MACRO { - p.SetState(672) + p.SetState(673) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -12986,7 +13028,7 @@ func (p *SecLangParser) Setvar_stmt() (localctx ISetvar_stmtContext) { switch p.GetTokenStream().LA(1) { case SecLangParserCOLLECTION_ELEMENT: { - p.SetState(669) + p.SetState(670) p.Match(SecLangParserCOLLECTION_ELEMENT) if p.HasError() { // Recognition error - abort rule @@ -12996,7 +13038,7 @@ func (p *SecLangParser) Setvar_stmt() (localctx ISetvar_stmtContext) { case SecLangParserCOLLECTION_WITH_MACRO: { - p.SetState(670) + p.SetState(671) p.Match(SecLangParserCOLLECTION_WITH_MACRO) if p.HasError() { // Recognition error - abort rule @@ -13004,7 +13046,7 @@ func (p *SecLangParser) Setvar_stmt() (localctx ISetvar_stmtContext) { } } { - p.SetState(671) + p.SetState(672) p.Match(SecLangParserMACRO_EXPANSION) if p.HasError() { // Recognition error - abort rule @@ -13017,7 +13059,7 @@ func (p *SecLangParser) Setvar_stmt() (localctx ISetvar_stmtContext) { goto errorExit } - p.SetState(674) + p.SetState(675) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -13125,7 +13167,7 @@ func (p *SecLangParser) Assignment() (localctx IAssignmentContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(676) + p.SetState(677) _la = p.GetTokenStream().LA(1) if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&104) != 0) { @@ -13224,7 +13266,7 @@ func (p *SecLangParser) Var_assignment() (localctx IVar_assignmentContext) { p.EnterRule(localctx, 136, SecLangParserRULE_var_assignment) p.EnterOuterAlt(localctx, 1) { - p.SetState(678) + p.SetState(679) p.Match(SecLangParserVAR_ASSIGNMENT) if p.HasError() { // Recognition error - abort rule @@ -13327,7 +13369,7 @@ func (p *SecLangParser) Ctl_id() (localctx ICtl_idContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(680) + p.SetState(681) _la = p.GetTokenStream().LA(1) if !(_la == SecLangParserIDENT || _la == SecLangParserINT) { diff --git a/parser/seclangparser_base_listener.go b/parser/seclangparser_base_listener.go index 8ec6545..c8551be 100644 --- a/parser/seclangparser_base_listener.go +++ b/parser/seclangparser_base_listener.go @@ -432,6 +432,12 @@ func (s *BaseSecLangParserListener) EnterACTION_VER(ctx *ACTION_VERContext) {} // ExitACTION_VER is called when production ACTION_VER is exited. func (s *BaseSecLangParserListener) ExitACTION_VER(ctx *ACTION_VERContext) {} +// EnterACTION_LOG_DATA is called when production ACTION_LOG_DATA is entered. +func (s *BaseSecLangParserListener) EnterACTION_LOG_DATA(ctx *ACTION_LOG_DATAContext) {} + +// ExitACTION_LOG_DATA is called when production ACTION_LOG_DATA is exited. +func (s *BaseSecLangParserListener) ExitACTION_LOG_DATA(ctx *ACTION_LOG_DATAContext) {} + // EnterDisruptive_action_with_params is called when production disruptive_action_with_params is entered. func (s *BaseSecLangParserListener) EnterDisruptive_action_with_params(ctx *Disruptive_action_with_paramsContext) { } diff --git a/parser/seclangparser_listener.go b/parser/seclangparser_listener.go index 99978ff..8ed637e 100644 --- a/parser/seclangparser_listener.go +++ b/parser/seclangparser_listener.go @@ -202,6 +202,9 @@ type SecLangParserListener interface { // EnterACTION_VER is called when entering the ACTION_VER production. EnterACTION_VER(c *ACTION_VERContext) + // EnterACTION_LOG_DATA is called when entering the ACTION_LOG_DATA production. + EnterACTION_LOG_DATA(c *ACTION_LOG_DATAContext) + // EnterDisruptive_action_with_params is called when entering the disruptive_action_with_params production. EnterDisruptive_action_with_params(c *Disruptive_action_with_paramsContext) @@ -448,6 +451,9 @@ type SecLangParserListener interface { // ExitACTION_VER is called when exiting the ACTION_VER production. ExitACTION_VER(c *ACTION_VERContext) + // ExitACTION_LOG_DATA is called when exiting the ACTION_LOG_DATA production. + ExitACTION_LOG_DATA(c *ACTION_LOG_DATAContext) + // ExitDisruptive_action_with_params is called when exiting the disruptive_action_with_params production. ExitDisruptive_action_with_params(c *Disruptive_action_with_paramsContext) diff --git a/src/seclang_parser/SecLangParser.py b/src/seclang_parser/SecLangParser.py index bed37c4..32d6725 100644 --- a/src/seclang_parser/SecLangParser.py +++ b/src/seclang_parser/SecLangParser.py @@ -10,7 +10,7 @@ def serializedATN(): return [ - 4,1,270,683,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6, + 4,1,270,684,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6, 7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7, 13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2, 20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7, @@ -59,218 +59,218 @@ def serializedATN(): 46,3,46,569,8,46,1,46,3,46,572,8,46,1,46,1,46,1,46,1,46,1,46,1,46, 1,46,1,46,1,46,1,46,3,46,584,8,46,1,47,1,47,1,47,3,47,589,8,47,1, 48,1,48,1,49,1,49,1,50,1,50,1,51,1,51,1,51,1,51,1,51,3,51,602,8, - 51,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,3,52,612,8,52,1,53,1, - 53,1,54,1,54,1,55,1,55,1,56,1,56,1,57,1,57,1,57,1,57,1,57,1,57,1, - 57,1,57,1,57,3,57,631,8,57,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1, - 58,1,58,1,58,1,58,3,58,644,8,58,1,59,1,59,1,60,1,60,1,61,1,61,1, - 62,1,62,1,62,3,62,655,8,62,1,63,1,63,1,63,3,63,660,8,63,1,64,1,64, - 1,64,1,64,1,64,1,64,1,65,1,65,1,66,1,66,1,66,4,66,673,8,66,11,66, - 12,66,674,1,67,1,67,1,68,1,68,1,69,1,69,1,69,0,0,70,0,2,4,6,8,10, - 12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54, - 56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98, - 100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130, - 132,134,136,138,0,15,1,1,259,259,8,0,131,139,150,167,169,175,178, - 178,180,180,182,183,185,185,209,216,3,0,225,225,233,233,241,241, - 3,0,140,149,193,197,227,227,1,0,89,125,2,0,85,85,87,87,5,0,27,27, - 30,30,44,44,46,46,58,59,5,0,29,29,31,31,52,52,55,57,67,67,1,0,62, - 63,8,0,28,28,33,33,45,45,47,48,50,51,61,61,65,66,68,74,2,0,79,79, - 82,82,1,0,77,78,1,0,34,43,2,0,3,3,5,6,1,0,226,227,753,0,143,1,0, - 0,0,2,246,1,0,0,0,4,249,1,0,0,0,6,256,1,0,0,0,8,260,1,0,0,0,10,290, - 1,0,0,0,12,296,1,0,0,0,14,298,1,0,0,0,16,300,1,0,0,0,18,302,1,0, - 0,0,20,304,1,0,0,0,22,306,1,0,0,0,24,310,1,0,0,0,26,312,1,0,0,0, - 28,316,1,0,0,0,30,320,1,0,0,0,32,322,1,0,0,0,34,326,1,0,0,0,36,328, - 1,0,0,0,38,333,1,0,0,0,40,335,1,0,0,0,42,337,1,0,0,0,44,339,1,0, - 0,0,46,341,1,0,0,0,48,352,1,0,0,0,50,356,1,0,0,0,52,360,1,0,0,0, - 54,362,1,0,0,0,56,387,1,0,0,0,58,413,1,0,0,0,60,418,1,0,0,0,62,420, - 1,0,0,0,64,438,1,0,0,0,66,440,1,0,0,0,68,472,1,0,0,0,70,474,1,0, - 0,0,72,476,1,0,0,0,74,479,1,0,0,0,76,508,1,0,0,0,78,536,1,0,0,0, - 80,544,1,0,0,0,82,546,1,0,0,0,84,548,1,0,0,0,86,550,1,0,0,0,88,552, - 1,0,0,0,90,554,1,0,0,0,92,583,1,0,0,0,94,588,1,0,0,0,96,590,1,0, - 0,0,98,592,1,0,0,0,100,594,1,0,0,0,102,601,1,0,0,0,104,611,1,0,0, - 0,106,613,1,0,0,0,108,615,1,0,0,0,110,617,1,0,0,0,112,619,1,0,0, - 0,114,630,1,0,0,0,116,643,1,0,0,0,118,645,1,0,0,0,120,647,1,0,0, - 0,122,649,1,0,0,0,124,654,1,0,0,0,126,659,1,0,0,0,128,661,1,0,0, - 0,130,667,1,0,0,0,132,672,1,0,0,0,134,676,1,0,0,0,136,678,1,0,0, - 0,138,680,1,0,0,0,140,142,3,2,1,0,141,140,1,0,0,0,142,145,1,0,0, - 0,143,141,1,0,0,0,143,144,1,0,0,0,144,146,1,0,0,0,145,143,1,0,0, - 0,146,147,5,0,0,1,147,1,1,0,0,0,148,150,3,4,2,0,149,148,1,0,0,0, - 149,150,1,0,0,0,150,151,1,0,0,0,151,152,3,8,4,0,152,153,3,74,37, - 0,153,155,3,64,32,0,154,156,3,90,45,0,155,154,1,0,0,0,155,156,1, - 0,0,0,156,247,1,0,0,0,157,159,3,4,2,0,158,157,1,0,0,0,158,159,1, - 0,0,0,159,160,1,0,0,0,160,161,3,18,9,0,161,163,3,20,10,0,162,164, - 3,90,45,0,163,162,1,0,0,0,163,164,1,0,0,0,164,247,1,0,0,0,165,167, - 3,4,2,0,166,165,1,0,0,0,166,167,1,0,0,0,167,168,1,0,0,0,168,169, - 3,18,9,0,169,170,5,1,0,0,170,171,3,20,10,0,171,173,5,1,0,0,172,174, - 3,90,45,0,173,172,1,0,0,0,173,174,1,0,0,0,174,247,1,0,0,0,175,177, - 3,4,2,0,176,175,1,0,0,0,176,177,1,0,0,0,177,178,1,0,0,0,178,180, - 3,22,11,0,179,181,3,24,12,0,180,179,1,0,0,0,181,182,1,0,0,0,182, - 180,1,0,0,0,182,183,1,0,0,0,183,247,1,0,0,0,184,186,3,4,2,0,185, - 184,1,0,0,0,185,186,1,0,0,0,186,187,1,0,0,0,187,188,3,34,17,0,188, - 189,3,36,18,0,189,247,1,0,0,0,190,192,3,4,2,0,191,190,1,0,0,0,191, - 192,1,0,0,0,192,193,1,0,0,0,193,194,3,34,17,0,194,195,5,1,0,0,195, - 196,3,36,18,0,196,197,5,1,0,0,197,247,1,0,0,0,198,200,3,4,2,0,199, - 198,1,0,0,0,199,200,1,0,0,0,200,201,1,0,0,0,201,202,3,38,19,0,202, - 203,3,60,30,0,203,204,3,76,38,0,204,247,1,0,0,0,205,207,3,4,2,0, - 206,205,1,0,0,0,206,207,1,0,0,0,207,208,1,0,0,0,208,209,3,38,19, - 0,209,210,5,1,0,0,210,211,3,60,30,0,211,212,5,1,0,0,212,213,3,76, - 38,0,213,247,1,0,0,0,214,216,3,4,2,0,215,214,1,0,0,0,215,216,1,0, - 0,0,216,217,1,0,0,0,217,218,3,38,19,0,218,219,3,60,30,0,219,220, - 3,76,38,0,220,221,5,8,0,0,221,222,3,78,39,0,222,247,1,0,0,0,223, - 225,3,4,2,0,224,223,1,0,0,0,224,225,1,0,0,0,225,226,1,0,0,0,226, - 227,3,38,19,0,227,228,5,1,0,0,228,229,3,60,30,0,229,230,5,1,0,0, - 230,231,3,76,38,0,231,232,5,8,0,0,232,233,3,78,39,0,233,247,1,0, - 0,0,234,236,3,4,2,0,235,234,1,0,0,0,235,236,1,0,0,0,236,237,1,0, - 0,0,237,238,3,40,20,0,238,239,3,42,21,0,239,240,3,90,45,0,240,247, - 1,0,0,0,241,243,3,4,2,0,242,241,1,0,0,0,242,243,1,0,0,0,243,244, - 1,0,0,0,244,247,3,10,5,0,245,247,3,4,2,0,246,149,1,0,0,0,246,158, - 1,0,0,0,246,166,1,0,0,0,246,176,1,0,0,0,246,185,1,0,0,0,246,191, - 1,0,0,0,246,199,1,0,0,0,246,206,1,0,0,0,246,215,1,0,0,0,246,224, - 1,0,0,0,246,235,1,0,0,0,246,242,1,0,0,0,246,245,1,0,0,0,247,3,1, - 0,0,0,248,250,3,6,3,0,249,248,1,0,0,0,250,251,1,0,0,0,251,249,1, - 0,0,0,251,252,1,0,0,0,252,254,1,0,0,0,253,255,7,0,0,0,254,253,1, - 0,0,0,254,255,1,0,0,0,255,5,1,0,0,0,256,258,5,12,0,0,257,259,5,257, - 0,0,258,257,1,0,0,0,258,259,1,0,0,0,259,7,1,0,0,0,260,261,5,217, - 0,0,261,9,1,0,0,0,262,263,3,54,27,0,263,264,3,56,28,0,264,291,1, - 0,0,0,265,266,3,54,27,0,266,267,5,1,0,0,267,268,3,56,28,0,268,269, - 5,1,0,0,269,291,1,0,0,0,270,271,3,52,26,0,271,272,3,90,45,0,272, - 291,1,0,0,0,273,274,3,12,6,0,274,275,5,1,0,0,275,276,3,56,28,0,276, - 277,5,1,0,0,277,291,1,0,0,0,278,279,3,14,7,0,279,280,5,1,0,0,280, - 281,3,56,28,0,281,282,5,1,0,0,282,291,1,0,0,0,283,284,3,16,8,0,284, - 285,3,56,28,0,285,291,1,0,0,0,286,287,3,44,22,0,287,288,3,56,28, - 0,288,289,3,46,23,0,289,291,1,0,0,0,290,262,1,0,0,0,290,265,1,0, - 0,0,290,270,1,0,0,0,290,273,1,0,0,0,290,278,1,0,0,0,290,283,1,0, - 0,0,290,286,1,0,0,0,291,11,1,0,0,0,292,297,1,0,0,0,293,297,5,127, - 0,0,294,297,5,128,0,0,295,297,5,129,0,0,296,292,1,0,0,0,296,293, - 1,0,0,0,296,294,1,0,0,0,296,295,1,0,0,0,297,13,1,0,0,0,298,299,5, - 179,0,0,299,15,1,0,0,0,300,301,7,1,0,0,301,17,1,0,0,0,302,303,5, - 218,0,0,303,19,1,0,0,0,304,305,5,9,0,0,305,21,1,0,0,0,306,307,5, - 186,0,0,307,23,1,0,0,0,308,311,5,227,0,0,309,311,3,28,14,0,310,308, - 1,0,0,0,310,309,1,0,0,0,311,25,1,0,0,0,312,313,5,261,0,0,313,314, - 5,262,0,0,314,315,5,261,0,0,315,27,1,0,0,0,316,317,3,30,15,0,317, - 318,5,14,0,0,318,319,3,32,16,0,319,29,1,0,0,0,320,321,5,227,0,0, - 321,31,1,0,0,0,322,323,5,227,0,0,323,33,1,0,0,0,324,327,5,187,0, - 0,325,327,5,188,0,0,326,324,1,0,0,0,326,325,1,0,0,0,327,35,1,0,0, - 0,328,329,7,2,0,0,329,37,1,0,0,0,330,334,5,191,0,0,331,334,5,190, - 0,0,332,334,5,189,0,0,333,330,1,0,0,0,333,331,1,0,0,0,333,332,1, - 0,0,0,334,39,1,0,0,0,335,336,5,192,0,0,336,41,1,0,0,0,337,338,5, - 227,0,0,338,43,1,0,0,0,339,340,5,130,0,0,340,45,1,0,0,0,341,342, - 5,1,0,0,342,347,3,48,24,0,343,344,5,7,0,0,344,346,3,48,24,0,345, - 343,1,0,0,0,346,349,1,0,0,0,347,345,1,0,0,0,347,348,1,0,0,0,348, - 350,1,0,0,0,349,347,1,0,0,0,350,351,5,1,0,0,351,47,1,0,0,0,352,353, - 3,50,25,0,353,354,5,4,0,0,354,355,3,56,28,0,355,49,1,0,0,0,356,357, - 5,219,0,0,357,51,1,0,0,0,358,361,5,176,0,0,359,361,5,177,0,0,360, - 358,1,0,0,0,360,359,1,0,0,0,361,53,1,0,0,0,362,363,7,3,0,0,363,55, - 1,0,0,0,364,388,5,227,0,0,365,388,3,28,14,0,366,388,5,202,0,0,367, - 388,5,201,0,0,368,388,5,207,0,0,369,388,5,203,0,0,370,388,5,200, - 0,0,371,388,5,206,0,0,372,388,5,223,0,0,373,388,5,198,0,0,374,388, - 5,208,0,0,375,388,5,199,0,0,376,388,5,204,0,0,377,388,5,205,0,0, - 378,379,5,9,0,0,379,388,5,227,0,0,380,388,5,9,0,0,381,388,5,233, - 0,0,382,388,5,225,0,0,383,388,5,241,0,0,384,388,5,245,0,0,385,388, - 5,126,0,0,386,388,3,58,29,0,387,364,1,0,0,0,387,365,1,0,0,0,387, - 366,1,0,0,0,387,367,1,0,0,0,387,368,1,0,0,0,387,369,1,0,0,0,387, - 370,1,0,0,0,387,371,1,0,0,0,387,372,1,0,0,0,387,373,1,0,0,0,387, - 374,1,0,0,0,387,375,1,0,0,0,387,376,1,0,0,0,387,377,1,0,0,0,387, - 378,1,0,0,0,387,380,1,0,0,0,387,381,1,0,0,0,387,382,1,0,0,0,387, - 383,1,0,0,0,387,384,1,0,0,0,387,385,1,0,0,0,387,386,1,0,0,0,388, - 57,1,0,0,0,389,396,3,138,69,0,390,391,5,2,0,0,391,392,3,118,59,0, - 392,393,5,2,0,0,393,396,1,0,0,0,394,396,5,225,0,0,395,389,1,0,0, - 0,395,390,1,0,0,0,395,394,1,0,0,0,396,397,1,0,0,0,397,398,5,18,0, - 0,398,414,3,84,42,0,399,406,3,138,69,0,400,401,5,2,0,0,401,402,3, - 118,59,0,402,403,5,2,0,0,403,406,1,0,0,0,404,406,5,225,0,0,405,399, - 1,0,0,0,405,400,1,0,0,0,405,404,1,0,0,0,406,407,1,0,0,0,407,408, - 5,18,0,0,408,411,3,88,44,0,409,410,5,4,0,0,410,412,3,126,63,0,411, - 409,1,0,0,0,411,412,1,0,0,0,412,414,1,0,0,0,413,395,1,0,0,0,413, - 405,1,0,0,0,414,59,1,0,0,0,415,419,5,227,0,0,416,419,3,28,14,0,417, - 419,5,233,0,0,418,415,1,0,0,0,418,416,1,0,0,0,418,417,1,0,0,0,419, - 61,1,0,0,0,420,421,5,10,0,0,421,63,1,0,0,0,422,424,5,1,0,0,423,425, - 3,62,31,0,424,423,1,0,0,0,424,425,1,0,0,0,425,426,1,0,0,0,426,427, - 5,255,0,0,427,429,3,66,33,0,428,430,3,68,34,0,429,428,1,0,0,0,429, - 430,1,0,0,0,430,431,1,0,0,0,431,432,5,1,0,0,432,439,1,0,0,0,433, - 434,5,1,0,0,434,435,3,68,34,0,435,436,5,1,0,0,436,439,1,0,0,0,437, - 439,3,68,34,0,438,422,1,0,0,0,438,433,1,0,0,0,438,437,1,0,0,0,439, - 65,1,0,0,0,440,441,7,4,0,0,441,67,1,0,0,0,442,473,3,82,41,0,443, - 473,5,233,0,0,444,446,5,263,0,0,445,444,1,0,0,0,446,449,1,0,0,0, - 447,445,1,0,0,0,447,448,1,0,0,0,448,452,1,0,0,0,449,447,1,0,0,0, - 450,453,5,261,0,0,451,453,3,26,13,0,452,450,1,0,0,0,452,451,1,0, - 0,0,453,467,1,0,0,0,454,458,5,7,0,0,455,457,5,263,0,0,456,455,1, - 0,0,0,457,460,1,0,0,0,458,456,1,0,0,0,458,459,1,0,0,0,459,463,1, - 0,0,0,460,458,1,0,0,0,461,464,5,261,0,0,462,464,3,26,13,0,463,461, - 1,0,0,0,463,462,1,0,0,0,464,466,1,0,0,0,465,454,1,0,0,0,466,469, - 1,0,0,0,467,465,1,0,0,0,467,468,1,0,0,0,468,473,1,0,0,0,469,467, - 1,0,0,0,470,473,5,254,0,0,471,473,5,256,0,0,472,442,1,0,0,0,472, - 443,1,0,0,0,472,447,1,0,0,0,472,470,1,0,0,0,472,471,1,0,0,0,473, - 69,1,0,0,0,474,475,5,10,0,0,475,71,1,0,0,0,476,477,5,88,0,0,477, - 73,1,0,0,0,478,480,5,1,0,0,479,478,1,0,0,0,479,480,1,0,0,0,480,482, - 1,0,0,0,481,483,3,70,35,0,482,481,1,0,0,0,482,483,1,0,0,0,483,485, - 1,0,0,0,484,486,3,72,36,0,485,484,1,0,0,0,485,486,1,0,0,0,486,487, - 1,0,0,0,487,489,3,80,40,0,488,490,5,1,0,0,489,488,1,0,0,0,489,490, - 1,0,0,0,490,504,1,0,0,0,491,493,5,8,0,0,492,494,5,1,0,0,493,492, - 1,0,0,0,493,494,1,0,0,0,494,496,1,0,0,0,495,497,3,70,35,0,496,495, - 1,0,0,0,496,497,1,0,0,0,497,498,1,0,0,0,498,500,3,80,40,0,499,501, - 5,1,0,0,500,499,1,0,0,0,500,501,1,0,0,0,501,503,1,0,0,0,502,491, - 1,0,0,0,503,506,1,0,0,0,504,502,1,0,0,0,504,505,1,0,0,0,505,75,1, - 0,0,0,506,504,1,0,0,0,507,509,5,1,0,0,508,507,1,0,0,0,508,509,1, - 0,0,0,509,511,1,0,0,0,510,512,3,70,35,0,511,510,1,0,0,0,511,512, - 1,0,0,0,512,514,1,0,0,0,513,515,3,72,36,0,514,513,1,0,0,0,514,515, - 1,0,0,0,515,516,1,0,0,0,516,518,3,80,40,0,517,519,5,1,0,0,518,517, - 1,0,0,0,518,519,1,0,0,0,519,533,1,0,0,0,520,522,5,7,0,0,521,523, - 5,1,0,0,522,521,1,0,0,0,522,523,1,0,0,0,523,525,1,0,0,0,524,526, - 3,70,35,0,525,524,1,0,0,0,525,526,1,0,0,0,526,527,1,0,0,0,527,529, - 3,80,40,0,528,530,5,1,0,0,529,528,1,0,0,0,529,530,1,0,0,0,530,532, - 1,0,0,0,531,520,1,0,0,0,532,535,1,0,0,0,533,531,1,0,0,0,533,534, - 1,0,0,0,534,77,1,0,0,0,535,533,1,0,0,0,536,537,3,80,40,0,537,79, - 1,0,0,0,538,545,3,82,41,0,539,542,3,86,43,0,540,541,5,4,0,0,541, - 543,3,124,62,0,542,540,1,0,0,0,542,543,1,0,0,0,543,545,1,0,0,0,544, - 538,1,0,0,0,544,539,1,0,0,0,545,81,1,0,0,0,546,547,5,86,0,0,547, - 83,1,0,0,0,548,549,5,86,0,0,549,85,1,0,0,0,550,551,7,5,0,0,551,87, - 1,0,0,0,552,553,7,5,0,0,553,89,1,0,0,0,554,555,5,1,0,0,555,560,3, - 92,46,0,556,557,5,7,0,0,557,559,3,92,46,0,558,556,1,0,0,0,559,562, - 1,0,0,0,560,558,1,0,0,0,560,561,1,0,0,0,561,563,1,0,0,0,562,560, - 1,0,0,0,563,564,5,1,0,0,564,91,1,0,0,0,565,566,3,102,51,0,566,568, - 5,4,0,0,567,569,5,10,0,0,568,567,1,0,0,0,568,569,1,0,0,0,569,571, - 1,0,0,0,570,572,5,3,0,0,571,570,1,0,0,0,571,572,1,0,0,0,572,573, - 1,0,0,0,573,574,3,114,57,0,574,584,1,0,0,0,575,576,3,102,51,0,576, - 577,5,4,0,0,577,578,3,114,57,0,578,584,1,0,0,0,579,580,5,83,0,0, - 580,581,5,4,0,0,581,584,3,122,61,0,582,584,3,94,47,0,583,565,1,0, - 0,0,583,575,1,0,0,0,583,579,1,0,0,0,583,582,1,0,0,0,584,93,1,0,0, - 0,585,589,3,96,48,0,586,589,3,98,49,0,587,589,3,100,50,0,588,585, - 1,0,0,0,588,586,1,0,0,0,588,587,1,0,0,0,589,95,1,0,0,0,590,591,7, - 6,0,0,591,97,1,0,0,0,592,593,7,7,0,0,593,99,1,0,0,0,594,595,5,32, - 0,0,595,101,1,0,0,0,596,602,3,104,52,0,597,602,3,106,53,0,598,602, - 3,108,54,0,599,602,3,112,56,0,600,602,3,110,55,0,601,596,1,0,0,0, - 601,597,1,0,0,0,601,598,1,0,0,0,601,599,1,0,0,0,601,600,1,0,0,0, - 602,103,1,0,0,0,603,612,5,60,0,0,604,612,5,49,0,0,605,612,5,53,0, - 0,606,612,5,54,0,0,607,612,5,64,0,0,608,612,5,75,0,0,609,612,5,80, - 0,0,610,612,5,81,0,0,611,603,1,0,0,0,611,604,1,0,0,0,611,605,1,0, - 0,0,611,606,1,0,0,0,611,607,1,0,0,0,611,608,1,0,0,0,611,609,1,0, - 0,0,611,610,1,0,0,0,612,105,1,0,0,0,613,614,7,8,0,0,614,107,1,0, - 0,0,615,616,7,9,0,0,616,109,1,0,0,0,617,618,7,10,0,0,618,111,1,0, - 0,0,619,620,7,11,0,0,620,113,1,0,0,0,621,631,3,116,58,0,622,623, - 5,2,0,0,623,624,3,116,58,0,624,625,5,2,0,0,625,631,1,0,0,0,626,627, - 5,2,0,0,627,628,3,118,59,0,628,629,5,2,0,0,629,631,1,0,0,0,630,621, - 1,0,0,0,630,622,1,0,0,0,630,626,1,0,0,0,631,115,1,0,0,0,632,644, - 5,227,0,0,633,644,3,124,62,0,634,644,3,128,64,0,635,636,3,120,60, - 0,636,637,3,134,67,0,637,638,3,56,28,0,638,644,1,0,0,0,639,644,5, - 225,0,0,640,644,5,76,0,0,641,644,5,231,0,0,642,644,5,241,0,0,643, - 632,1,0,0,0,643,633,1,0,0,0,643,634,1,0,0,0,643,635,1,0,0,0,643, - 639,1,0,0,0,643,640,1,0,0,0,643,641,1,0,0,0,643,642,1,0,0,0,644, - 117,1,0,0,0,645,646,5,246,0,0,646,119,1,0,0,0,647,648,7,12,0,0,648, - 121,1,0,0,0,649,650,5,84,0,0,650,123,1,0,0,0,651,655,1,0,0,0,652, - 655,5,243,0,0,653,655,5,250,0,0,654,651,1,0,0,0,654,652,1,0,0,0, - 654,653,1,0,0,0,655,125,1,0,0,0,656,660,1,0,0,0,657,660,5,243,0, - 0,658,660,5,250,0,0,659,656,1,0,0,0,659,657,1,0,0,0,659,658,1,0, - 0,0,660,127,1,0,0,0,661,662,3,130,65,0,662,663,5,236,0,0,663,664, - 3,132,66,0,664,665,3,134,67,0,665,666,3,136,68,0,666,129,1,0,0,0, - 667,668,5,235,0,0,668,131,1,0,0,0,669,673,5,237,0,0,670,671,5,238, - 0,0,671,673,5,234,0,0,672,669,1,0,0,0,672,670,1,0,0,0,673,674,1, - 0,0,0,674,672,1,0,0,0,674,675,1,0,0,0,675,133,1,0,0,0,676,677,7, - 13,0,0,677,135,1,0,0,0,678,679,5,239,0,0,679,137,1,0,0,0,680,681, - 7,14,0,0,681,139,1,0,0,0,74,143,149,155,158,163,166,173,176,182, - 185,191,199,206,215,224,235,242,246,251,254,258,290,296,310,326, - 333,347,360,387,395,405,411,413,418,424,429,438,447,452,458,463, - 467,472,479,482,485,489,493,496,500,504,508,511,514,518,522,525, - 529,533,542,544,560,568,571,583,588,601,611,630,643,654,659,672, - 674 + 51,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,3,52,613,8,52,1, + 53,1,53,1,54,1,54,1,55,1,55,1,56,1,56,1,57,1,57,1,57,1,57,1,57,1, + 57,1,57,1,57,1,57,3,57,632,8,57,1,58,1,58,1,58,1,58,1,58,1,58,1, + 58,1,58,1,58,1,58,1,58,3,58,645,8,58,1,59,1,59,1,60,1,60,1,61,1, + 61,1,62,1,62,1,62,3,62,656,8,62,1,63,1,63,1,63,3,63,661,8,63,1,64, + 1,64,1,64,1,64,1,64,1,64,1,65,1,65,1,66,1,66,1,66,4,66,674,8,66, + 11,66,12,66,675,1,67,1,67,1,68,1,68,1,69,1,69,1,69,0,0,70,0,2,4, + 6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48, + 50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92, + 94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126, + 128,130,132,134,136,138,0,15,1,1,259,259,8,0,131,139,150,167,169, + 175,178,178,180,180,182,183,185,185,209,216,3,0,225,225,233,233, + 241,241,3,0,140,149,193,197,227,227,1,0,89,125,2,0,85,85,87,87,5, + 0,27,27,30,30,44,44,46,46,58,59,5,0,29,29,31,31,52,52,55,57,67,67, + 1,0,62,63,8,0,28,28,33,33,45,45,47,48,50,50,61,61,65,66,68,74,2, + 0,79,79,82,82,1,0,77,78,1,0,34,43,2,0,3,3,5,6,1,0,226,227,755,0, + 143,1,0,0,0,2,246,1,0,0,0,4,249,1,0,0,0,6,256,1,0,0,0,8,260,1,0, + 0,0,10,290,1,0,0,0,12,296,1,0,0,0,14,298,1,0,0,0,16,300,1,0,0,0, + 18,302,1,0,0,0,20,304,1,0,0,0,22,306,1,0,0,0,24,310,1,0,0,0,26,312, + 1,0,0,0,28,316,1,0,0,0,30,320,1,0,0,0,32,322,1,0,0,0,34,326,1,0, + 0,0,36,328,1,0,0,0,38,333,1,0,0,0,40,335,1,0,0,0,42,337,1,0,0,0, + 44,339,1,0,0,0,46,341,1,0,0,0,48,352,1,0,0,0,50,356,1,0,0,0,52,360, + 1,0,0,0,54,362,1,0,0,0,56,387,1,0,0,0,58,413,1,0,0,0,60,418,1,0, + 0,0,62,420,1,0,0,0,64,438,1,0,0,0,66,440,1,0,0,0,68,472,1,0,0,0, + 70,474,1,0,0,0,72,476,1,0,0,0,74,479,1,0,0,0,76,508,1,0,0,0,78,536, + 1,0,0,0,80,544,1,0,0,0,82,546,1,0,0,0,84,548,1,0,0,0,86,550,1,0, + 0,0,88,552,1,0,0,0,90,554,1,0,0,0,92,583,1,0,0,0,94,588,1,0,0,0, + 96,590,1,0,0,0,98,592,1,0,0,0,100,594,1,0,0,0,102,601,1,0,0,0,104, + 612,1,0,0,0,106,614,1,0,0,0,108,616,1,0,0,0,110,618,1,0,0,0,112, + 620,1,0,0,0,114,631,1,0,0,0,116,644,1,0,0,0,118,646,1,0,0,0,120, + 648,1,0,0,0,122,650,1,0,0,0,124,655,1,0,0,0,126,660,1,0,0,0,128, + 662,1,0,0,0,130,668,1,0,0,0,132,673,1,0,0,0,134,677,1,0,0,0,136, + 679,1,0,0,0,138,681,1,0,0,0,140,142,3,2,1,0,141,140,1,0,0,0,142, + 145,1,0,0,0,143,141,1,0,0,0,143,144,1,0,0,0,144,146,1,0,0,0,145, + 143,1,0,0,0,146,147,5,0,0,1,147,1,1,0,0,0,148,150,3,4,2,0,149,148, + 1,0,0,0,149,150,1,0,0,0,150,151,1,0,0,0,151,152,3,8,4,0,152,153, + 3,74,37,0,153,155,3,64,32,0,154,156,3,90,45,0,155,154,1,0,0,0,155, + 156,1,0,0,0,156,247,1,0,0,0,157,159,3,4,2,0,158,157,1,0,0,0,158, + 159,1,0,0,0,159,160,1,0,0,0,160,161,3,18,9,0,161,163,3,20,10,0,162, + 164,3,90,45,0,163,162,1,0,0,0,163,164,1,0,0,0,164,247,1,0,0,0,165, + 167,3,4,2,0,166,165,1,0,0,0,166,167,1,0,0,0,167,168,1,0,0,0,168, + 169,3,18,9,0,169,170,5,1,0,0,170,171,3,20,10,0,171,173,5,1,0,0,172, + 174,3,90,45,0,173,172,1,0,0,0,173,174,1,0,0,0,174,247,1,0,0,0,175, + 177,3,4,2,0,176,175,1,0,0,0,176,177,1,0,0,0,177,178,1,0,0,0,178, + 180,3,22,11,0,179,181,3,24,12,0,180,179,1,0,0,0,181,182,1,0,0,0, + 182,180,1,0,0,0,182,183,1,0,0,0,183,247,1,0,0,0,184,186,3,4,2,0, + 185,184,1,0,0,0,185,186,1,0,0,0,186,187,1,0,0,0,187,188,3,34,17, + 0,188,189,3,36,18,0,189,247,1,0,0,0,190,192,3,4,2,0,191,190,1,0, + 0,0,191,192,1,0,0,0,192,193,1,0,0,0,193,194,3,34,17,0,194,195,5, + 1,0,0,195,196,3,36,18,0,196,197,5,1,0,0,197,247,1,0,0,0,198,200, + 3,4,2,0,199,198,1,0,0,0,199,200,1,0,0,0,200,201,1,0,0,0,201,202, + 3,38,19,0,202,203,3,60,30,0,203,204,3,76,38,0,204,247,1,0,0,0,205, + 207,3,4,2,0,206,205,1,0,0,0,206,207,1,0,0,0,207,208,1,0,0,0,208, + 209,3,38,19,0,209,210,5,1,0,0,210,211,3,60,30,0,211,212,5,1,0,0, + 212,213,3,76,38,0,213,247,1,0,0,0,214,216,3,4,2,0,215,214,1,0,0, + 0,215,216,1,0,0,0,216,217,1,0,0,0,217,218,3,38,19,0,218,219,3,60, + 30,0,219,220,3,76,38,0,220,221,5,8,0,0,221,222,3,78,39,0,222,247, + 1,0,0,0,223,225,3,4,2,0,224,223,1,0,0,0,224,225,1,0,0,0,225,226, + 1,0,0,0,226,227,3,38,19,0,227,228,5,1,0,0,228,229,3,60,30,0,229, + 230,5,1,0,0,230,231,3,76,38,0,231,232,5,8,0,0,232,233,3,78,39,0, + 233,247,1,0,0,0,234,236,3,4,2,0,235,234,1,0,0,0,235,236,1,0,0,0, + 236,237,1,0,0,0,237,238,3,40,20,0,238,239,3,42,21,0,239,240,3,90, + 45,0,240,247,1,0,0,0,241,243,3,4,2,0,242,241,1,0,0,0,242,243,1,0, + 0,0,243,244,1,0,0,0,244,247,3,10,5,0,245,247,3,4,2,0,246,149,1,0, + 0,0,246,158,1,0,0,0,246,166,1,0,0,0,246,176,1,0,0,0,246,185,1,0, + 0,0,246,191,1,0,0,0,246,199,1,0,0,0,246,206,1,0,0,0,246,215,1,0, + 0,0,246,224,1,0,0,0,246,235,1,0,0,0,246,242,1,0,0,0,246,245,1,0, + 0,0,247,3,1,0,0,0,248,250,3,6,3,0,249,248,1,0,0,0,250,251,1,0,0, + 0,251,249,1,0,0,0,251,252,1,0,0,0,252,254,1,0,0,0,253,255,7,0,0, + 0,254,253,1,0,0,0,254,255,1,0,0,0,255,5,1,0,0,0,256,258,5,12,0,0, + 257,259,5,257,0,0,258,257,1,0,0,0,258,259,1,0,0,0,259,7,1,0,0,0, + 260,261,5,217,0,0,261,9,1,0,0,0,262,263,3,54,27,0,263,264,3,56,28, + 0,264,291,1,0,0,0,265,266,3,54,27,0,266,267,5,1,0,0,267,268,3,56, + 28,0,268,269,5,1,0,0,269,291,1,0,0,0,270,271,3,52,26,0,271,272,3, + 90,45,0,272,291,1,0,0,0,273,274,3,12,6,0,274,275,5,1,0,0,275,276, + 3,56,28,0,276,277,5,1,0,0,277,291,1,0,0,0,278,279,3,14,7,0,279,280, + 5,1,0,0,280,281,3,56,28,0,281,282,5,1,0,0,282,291,1,0,0,0,283,284, + 3,16,8,0,284,285,3,56,28,0,285,291,1,0,0,0,286,287,3,44,22,0,287, + 288,3,56,28,0,288,289,3,46,23,0,289,291,1,0,0,0,290,262,1,0,0,0, + 290,265,1,0,0,0,290,270,1,0,0,0,290,273,1,0,0,0,290,278,1,0,0,0, + 290,283,1,0,0,0,290,286,1,0,0,0,291,11,1,0,0,0,292,297,1,0,0,0,293, + 297,5,127,0,0,294,297,5,128,0,0,295,297,5,129,0,0,296,292,1,0,0, + 0,296,293,1,0,0,0,296,294,1,0,0,0,296,295,1,0,0,0,297,13,1,0,0,0, + 298,299,5,179,0,0,299,15,1,0,0,0,300,301,7,1,0,0,301,17,1,0,0,0, + 302,303,5,218,0,0,303,19,1,0,0,0,304,305,5,9,0,0,305,21,1,0,0,0, + 306,307,5,186,0,0,307,23,1,0,0,0,308,311,5,227,0,0,309,311,3,28, + 14,0,310,308,1,0,0,0,310,309,1,0,0,0,311,25,1,0,0,0,312,313,5,261, + 0,0,313,314,5,262,0,0,314,315,5,261,0,0,315,27,1,0,0,0,316,317,3, + 30,15,0,317,318,5,14,0,0,318,319,3,32,16,0,319,29,1,0,0,0,320,321, + 5,227,0,0,321,31,1,0,0,0,322,323,5,227,0,0,323,33,1,0,0,0,324,327, + 5,187,0,0,325,327,5,188,0,0,326,324,1,0,0,0,326,325,1,0,0,0,327, + 35,1,0,0,0,328,329,7,2,0,0,329,37,1,0,0,0,330,334,5,191,0,0,331, + 334,5,190,0,0,332,334,5,189,0,0,333,330,1,0,0,0,333,331,1,0,0,0, + 333,332,1,0,0,0,334,39,1,0,0,0,335,336,5,192,0,0,336,41,1,0,0,0, + 337,338,5,227,0,0,338,43,1,0,0,0,339,340,5,130,0,0,340,45,1,0,0, + 0,341,342,5,1,0,0,342,347,3,48,24,0,343,344,5,7,0,0,344,346,3,48, + 24,0,345,343,1,0,0,0,346,349,1,0,0,0,347,345,1,0,0,0,347,348,1,0, + 0,0,348,350,1,0,0,0,349,347,1,0,0,0,350,351,5,1,0,0,351,47,1,0,0, + 0,352,353,3,50,25,0,353,354,5,4,0,0,354,355,3,56,28,0,355,49,1,0, + 0,0,356,357,5,219,0,0,357,51,1,0,0,0,358,361,5,176,0,0,359,361,5, + 177,0,0,360,358,1,0,0,0,360,359,1,0,0,0,361,53,1,0,0,0,362,363,7, + 3,0,0,363,55,1,0,0,0,364,388,5,227,0,0,365,388,3,28,14,0,366,388, + 5,202,0,0,367,388,5,201,0,0,368,388,5,207,0,0,369,388,5,203,0,0, + 370,388,5,200,0,0,371,388,5,206,0,0,372,388,5,223,0,0,373,388,5, + 198,0,0,374,388,5,208,0,0,375,388,5,199,0,0,376,388,5,204,0,0,377, + 388,5,205,0,0,378,379,5,9,0,0,379,388,5,227,0,0,380,388,5,9,0,0, + 381,388,5,233,0,0,382,388,5,225,0,0,383,388,5,241,0,0,384,388,5, + 245,0,0,385,388,5,126,0,0,386,388,3,58,29,0,387,364,1,0,0,0,387, + 365,1,0,0,0,387,366,1,0,0,0,387,367,1,0,0,0,387,368,1,0,0,0,387, + 369,1,0,0,0,387,370,1,0,0,0,387,371,1,0,0,0,387,372,1,0,0,0,387, + 373,1,0,0,0,387,374,1,0,0,0,387,375,1,0,0,0,387,376,1,0,0,0,387, + 377,1,0,0,0,387,378,1,0,0,0,387,380,1,0,0,0,387,381,1,0,0,0,387, + 382,1,0,0,0,387,383,1,0,0,0,387,384,1,0,0,0,387,385,1,0,0,0,387, + 386,1,0,0,0,388,57,1,0,0,0,389,396,3,138,69,0,390,391,5,2,0,0,391, + 392,3,118,59,0,392,393,5,2,0,0,393,396,1,0,0,0,394,396,5,225,0,0, + 395,389,1,0,0,0,395,390,1,0,0,0,395,394,1,0,0,0,396,397,1,0,0,0, + 397,398,5,18,0,0,398,414,3,84,42,0,399,406,3,138,69,0,400,401,5, + 2,0,0,401,402,3,118,59,0,402,403,5,2,0,0,403,406,1,0,0,0,404,406, + 5,225,0,0,405,399,1,0,0,0,405,400,1,0,0,0,405,404,1,0,0,0,406,407, + 1,0,0,0,407,408,5,18,0,0,408,411,3,88,44,0,409,410,5,4,0,0,410,412, + 3,126,63,0,411,409,1,0,0,0,411,412,1,0,0,0,412,414,1,0,0,0,413,395, + 1,0,0,0,413,405,1,0,0,0,414,59,1,0,0,0,415,419,5,227,0,0,416,419, + 3,28,14,0,417,419,5,233,0,0,418,415,1,0,0,0,418,416,1,0,0,0,418, + 417,1,0,0,0,419,61,1,0,0,0,420,421,5,10,0,0,421,63,1,0,0,0,422,424, + 5,1,0,0,423,425,3,62,31,0,424,423,1,0,0,0,424,425,1,0,0,0,425,426, + 1,0,0,0,426,427,5,255,0,0,427,429,3,66,33,0,428,430,3,68,34,0,429, + 428,1,0,0,0,429,430,1,0,0,0,430,431,1,0,0,0,431,432,5,1,0,0,432, + 439,1,0,0,0,433,434,5,1,0,0,434,435,3,68,34,0,435,436,5,1,0,0,436, + 439,1,0,0,0,437,439,3,68,34,0,438,422,1,0,0,0,438,433,1,0,0,0,438, + 437,1,0,0,0,439,65,1,0,0,0,440,441,7,4,0,0,441,67,1,0,0,0,442,473, + 3,82,41,0,443,473,5,233,0,0,444,446,5,263,0,0,445,444,1,0,0,0,446, + 449,1,0,0,0,447,445,1,0,0,0,447,448,1,0,0,0,448,452,1,0,0,0,449, + 447,1,0,0,0,450,453,5,261,0,0,451,453,3,26,13,0,452,450,1,0,0,0, + 452,451,1,0,0,0,453,467,1,0,0,0,454,458,5,7,0,0,455,457,5,263,0, + 0,456,455,1,0,0,0,457,460,1,0,0,0,458,456,1,0,0,0,458,459,1,0,0, + 0,459,463,1,0,0,0,460,458,1,0,0,0,461,464,5,261,0,0,462,464,3,26, + 13,0,463,461,1,0,0,0,463,462,1,0,0,0,464,466,1,0,0,0,465,454,1,0, + 0,0,466,469,1,0,0,0,467,465,1,0,0,0,467,468,1,0,0,0,468,473,1,0, + 0,0,469,467,1,0,0,0,470,473,5,254,0,0,471,473,5,256,0,0,472,442, + 1,0,0,0,472,443,1,0,0,0,472,447,1,0,0,0,472,470,1,0,0,0,472,471, + 1,0,0,0,473,69,1,0,0,0,474,475,5,10,0,0,475,71,1,0,0,0,476,477,5, + 88,0,0,477,73,1,0,0,0,478,480,5,1,0,0,479,478,1,0,0,0,479,480,1, + 0,0,0,480,482,1,0,0,0,481,483,3,70,35,0,482,481,1,0,0,0,482,483, + 1,0,0,0,483,485,1,0,0,0,484,486,3,72,36,0,485,484,1,0,0,0,485,486, + 1,0,0,0,486,487,1,0,0,0,487,489,3,80,40,0,488,490,5,1,0,0,489,488, + 1,0,0,0,489,490,1,0,0,0,490,504,1,0,0,0,491,493,5,8,0,0,492,494, + 5,1,0,0,493,492,1,0,0,0,493,494,1,0,0,0,494,496,1,0,0,0,495,497, + 3,70,35,0,496,495,1,0,0,0,496,497,1,0,0,0,497,498,1,0,0,0,498,500, + 3,80,40,0,499,501,5,1,0,0,500,499,1,0,0,0,500,501,1,0,0,0,501,503, + 1,0,0,0,502,491,1,0,0,0,503,506,1,0,0,0,504,502,1,0,0,0,504,505, + 1,0,0,0,505,75,1,0,0,0,506,504,1,0,0,0,507,509,5,1,0,0,508,507,1, + 0,0,0,508,509,1,0,0,0,509,511,1,0,0,0,510,512,3,70,35,0,511,510, + 1,0,0,0,511,512,1,0,0,0,512,514,1,0,0,0,513,515,3,72,36,0,514,513, + 1,0,0,0,514,515,1,0,0,0,515,516,1,0,0,0,516,518,3,80,40,0,517,519, + 5,1,0,0,518,517,1,0,0,0,518,519,1,0,0,0,519,533,1,0,0,0,520,522, + 5,7,0,0,521,523,5,1,0,0,522,521,1,0,0,0,522,523,1,0,0,0,523,525, + 1,0,0,0,524,526,3,70,35,0,525,524,1,0,0,0,525,526,1,0,0,0,526,527, + 1,0,0,0,527,529,3,80,40,0,528,530,5,1,0,0,529,528,1,0,0,0,529,530, + 1,0,0,0,530,532,1,0,0,0,531,520,1,0,0,0,532,535,1,0,0,0,533,531, + 1,0,0,0,533,534,1,0,0,0,534,77,1,0,0,0,535,533,1,0,0,0,536,537,3, + 80,40,0,537,79,1,0,0,0,538,545,3,82,41,0,539,542,3,86,43,0,540,541, + 5,4,0,0,541,543,3,124,62,0,542,540,1,0,0,0,542,543,1,0,0,0,543,545, + 1,0,0,0,544,538,1,0,0,0,544,539,1,0,0,0,545,81,1,0,0,0,546,547,5, + 86,0,0,547,83,1,0,0,0,548,549,5,86,0,0,549,85,1,0,0,0,550,551,7, + 5,0,0,551,87,1,0,0,0,552,553,7,5,0,0,553,89,1,0,0,0,554,555,5,1, + 0,0,555,560,3,92,46,0,556,557,5,7,0,0,557,559,3,92,46,0,558,556, + 1,0,0,0,559,562,1,0,0,0,560,558,1,0,0,0,560,561,1,0,0,0,561,563, + 1,0,0,0,562,560,1,0,0,0,563,564,5,1,0,0,564,91,1,0,0,0,565,566,3, + 102,51,0,566,568,5,4,0,0,567,569,5,10,0,0,568,567,1,0,0,0,568,569, + 1,0,0,0,569,571,1,0,0,0,570,572,5,3,0,0,571,570,1,0,0,0,571,572, + 1,0,0,0,572,573,1,0,0,0,573,574,3,114,57,0,574,584,1,0,0,0,575,576, + 3,102,51,0,576,577,5,4,0,0,577,578,3,114,57,0,578,584,1,0,0,0,579, + 580,5,83,0,0,580,581,5,4,0,0,581,584,3,122,61,0,582,584,3,94,47, + 0,583,565,1,0,0,0,583,575,1,0,0,0,583,579,1,0,0,0,583,582,1,0,0, + 0,584,93,1,0,0,0,585,589,3,96,48,0,586,589,3,98,49,0,587,589,3,100, + 50,0,588,585,1,0,0,0,588,586,1,0,0,0,588,587,1,0,0,0,589,95,1,0, + 0,0,590,591,7,6,0,0,591,97,1,0,0,0,592,593,7,7,0,0,593,99,1,0,0, + 0,594,595,5,32,0,0,595,101,1,0,0,0,596,602,3,104,52,0,597,602,3, + 106,53,0,598,602,3,108,54,0,599,602,3,112,56,0,600,602,3,110,55, + 0,601,596,1,0,0,0,601,597,1,0,0,0,601,598,1,0,0,0,601,599,1,0,0, + 0,601,600,1,0,0,0,602,103,1,0,0,0,603,613,5,60,0,0,604,613,5,49, + 0,0,605,613,5,53,0,0,606,613,5,54,0,0,607,613,5,64,0,0,608,613,5, + 75,0,0,609,613,5,80,0,0,610,613,5,81,0,0,611,613,5,51,0,0,612,603, + 1,0,0,0,612,604,1,0,0,0,612,605,1,0,0,0,612,606,1,0,0,0,612,607, + 1,0,0,0,612,608,1,0,0,0,612,609,1,0,0,0,612,610,1,0,0,0,612,611, + 1,0,0,0,613,105,1,0,0,0,614,615,7,8,0,0,615,107,1,0,0,0,616,617, + 7,9,0,0,617,109,1,0,0,0,618,619,7,10,0,0,619,111,1,0,0,0,620,621, + 7,11,0,0,621,113,1,0,0,0,622,632,3,116,58,0,623,624,5,2,0,0,624, + 625,3,116,58,0,625,626,5,2,0,0,626,632,1,0,0,0,627,628,5,2,0,0,628, + 629,3,118,59,0,629,630,5,2,0,0,630,632,1,0,0,0,631,622,1,0,0,0,631, + 623,1,0,0,0,631,627,1,0,0,0,632,115,1,0,0,0,633,645,5,227,0,0,634, + 645,3,124,62,0,635,645,3,128,64,0,636,637,3,120,60,0,637,638,3,134, + 67,0,638,639,3,56,28,0,639,645,1,0,0,0,640,645,5,225,0,0,641,645, + 5,76,0,0,642,645,5,231,0,0,643,645,5,241,0,0,644,633,1,0,0,0,644, + 634,1,0,0,0,644,635,1,0,0,0,644,636,1,0,0,0,644,640,1,0,0,0,644, + 641,1,0,0,0,644,642,1,0,0,0,644,643,1,0,0,0,645,117,1,0,0,0,646, + 647,5,246,0,0,647,119,1,0,0,0,648,649,7,12,0,0,649,121,1,0,0,0,650, + 651,5,84,0,0,651,123,1,0,0,0,652,656,1,0,0,0,653,656,5,243,0,0,654, + 656,5,250,0,0,655,652,1,0,0,0,655,653,1,0,0,0,655,654,1,0,0,0,656, + 125,1,0,0,0,657,661,1,0,0,0,658,661,5,243,0,0,659,661,5,250,0,0, + 660,657,1,0,0,0,660,658,1,0,0,0,660,659,1,0,0,0,661,127,1,0,0,0, + 662,663,3,130,65,0,663,664,5,236,0,0,664,665,3,132,66,0,665,666, + 3,134,67,0,666,667,3,136,68,0,667,129,1,0,0,0,668,669,5,235,0,0, + 669,131,1,0,0,0,670,674,5,237,0,0,671,672,5,238,0,0,672,674,5,234, + 0,0,673,670,1,0,0,0,673,671,1,0,0,0,674,675,1,0,0,0,675,673,1,0, + 0,0,675,676,1,0,0,0,676,133,1,0,0,0,677,678,7,13,0,0,678,135,1,0, + 0,0,679,680,5,239,0,0,680,137,1,0,0,0,681,682,7,14,0,0,682,139,1, + 0,0,0,74,143,149,155,158,163,166,173,176,182,185,191,199,206,215, + 224,235,242,246,251,254,258,290,296,310,326,333,347,360,387,395, + 405,411,413,418,424,429,438,447,452,458,463,467,472,479,482,485, + 489,493,496,500,504,508,511,514,518,522,525,529,533,542,544,560, + 568,571,583,588,601,612,631,644,655,660,673,675 ] class SecLangParser ( Parser ): @@ -5062,7 +5062,7 @@ def action_with_params(self): self.state = 601 self._errHandler.sync(self) token = self._input.LA(1) - if token in [49, 53, 54, 60, 64, 75, 80, 81]: + if token in [49, 51, 53, 54, 60, 64, 75, 80, 81]: self.enterOuterAlt(localctx, 1) self.state = 596 self.metadata_action_with_params() @@ -5072,7 +5072,7 @@ def action_with_params(self): self.state = 597 self.disruptive_action_with_params() pass - elif token in [28, 33, 45, 47, 48, 50, 51, 61, 65, 66, 68, 69, 70, 71, 72, 73, 74]: + elif token in [28, 33, 45, 47, 48, 50, 61, 65, 66, 68, 69, 70, 71, 72, 73, 74]: self.enterOuterAlt(localctx, 3) self.state = 598 self.non_disruptive_action_with_params() @@ -5206,6 +5206,24 @@ def exitRule(self, listener:ParseTreeListener): listener.exitACTION_MSG(self) + class ACTION_LOG_DATAContext(Metadata_action_with_paramsContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a SecLangParser.Metadata_action_with_paramsContext + super().__init__(parser) + self.copyFrom(ctx) + + def ACTION_LOG_DATA(self): + return self.getToken(SecLangParser.ACTION_LOG_DATA, 0) + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterACTION_LOG_DATA" ): + listener.enterACTION_LOG_DATA(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitACTION_LOG_DATA" ): + listener.exitACTION_LOG_DATA(self) + + class ACTION_PHASEContext(Metadata_action_with_paramsContext): def __init__(self, parser, ctx:ParserRuleContext): # actually a SecLangParser.Metadata_action_with_paramsContext @@ -5266,7 +5284,7 @@ def metadata_action_with_params(self): localctx = SecLangParser.Metadata_action_with_paramsContext(self, self._ctx, self.state) self.enterRule(localctx, 104, self.RULE_metadata_action_with_params) try: - self.state = 611 + self.state = 612 self._errHandler.sync(self) token = self._input.LA(1) if token in [60]: @@ -5317,6 +5335,12 @@ def metadata_action_with_params(self): self.state = 610 self.match(SecLangParser.ACTION_VER) pass + elif token in [51]: + localctx = SecLangParser.ACTION_LOG_DATAContext(self, localctx) + self.enterOuterAlt(localctx, 9) + self.state = 611 + self.match(SecLangParser.ACTION_LOG_DATA) + pass else: raise NoViableAltException(self) @@ -5363,7 +5387,7 @@ def disruptive_action_with_params(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 613 + self.state = 614 _la = self._input.LA(1) if not(_la==62 or _la==63): self._errHandler.recoverInline(self) @@ -5404,9 +5428,6 @@ def ACTION_DEPRECATE_VAR(self): def ACTION_INITCOL(self): return self.getToken(SecLangParser.ACTION_INITCOL, 0) - def ACTION_LOG_DATA(self): - return self.getToken(SecLangParser.ACTION_LOG_DATA, 0) - def ACTION_PREPEND(self): return self.getToken(SecLangParser.ACTION_PREPEND, 0) @@ -5458,9 +5479,9 @@ def non_disruptive_action_with_params(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 615 + self.state = 616 _la = self._input.LA(1) - if not(((((_la - 28)) & ~0x3f) == 0 and ((1 << (_la - 28)) & 140058897809441) != 0)): + if not(((((_la - 28)) & ~0x3f) == 0 and ((1 << (_la - 28)) & 140058889420833) != 0)): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) @@ -5508,7 +5529,7 @@ def data_action_with_params(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 617 + self.state = 618 _la = self._input.LA(1) if not(_la==79 or _la==82): self._errHandler.recoverInline(self) @@ -5558,7 +5579,7 @@ def flow_action_with_params(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 619 + self.state = 620 _la = self._input.LA(1) if not(_la==77 or _la==78): self._errHandler.recoverInline(self) @@ -5614,32 +5635,32 @@ def action_value(self): localctx = SecLangParser.Action_valueContext(self, self._ctx, self.state) self.enterRule(localctx, 114, self.RULE_action_value) try: - self.state = 630 + self.state = 631 self._errHandler.sync(self) la_ = self._interp.adaptivePredict(self._input,68,self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) - self.state = 621 + self.state = 622 self.action_value_types() pass elif la_ == 2: self.enterOuterAlt(localctx, 2) - self.state = 622 - self.match(SecLangParser.SINGLE_QUOTE) self.state = 623 - self.action_value_types() + self.match(SecLangParser.SINGLE_QUOTE) self.state = 624 + self.action_value_types() + self.state = 625 self.match(SecLangParser.SINGLE_QUOTE) pass elif la_ == 3: self.enterOuterAlt(localctx, 3) - self.state = 626 - self.match(SecLangParser.SINGLE_QUOTE) self.state = 627 - self.string_literal() + self.match(SecLangParser.SINGLE_QUOTE) self.state = 628 + self.string_literal() + self.state = 629 self.match(SecLangParser.SINGLE_QUOTE) pass @@ -5714,51 +5735,51 @@ def action_value_types(self): localctx = SecLangParser.Action_value_typesContext(self, self._ctx, self.state) self.enterRule(localctx, 116, self.RULE_action_value_types) try: - self.state = 643 + self.state = 644 self._errHandler.sync(self) token = self._input.LA(1) if token in [227]: self.enterOuterAlt(localctx, 1) - self.state = 632 + self.state = 633 self.match(SecLangParser.INT) pass elif token in [1, 2, 7, 243, 250]: self.enterOuterAlt(localctx, 2) - self.state = 633 + self.state = 634 self.collection_value() pass elif token in [235]: self.enterOuterAlt(localctx, 3) - self.state = 634 + self.state = 635 self.setvar_action() pass elif token in [34, 35, 36, 37, 38, 39, 40, 41, 42, 43]: self.enterOuterAlt(localctx, 4) - self.state = 635 - self.ctl_action() self.state = 636 - self.assignment() + self.ctl_action() self.state = 637 + self.assignment() + self.state = 638 self.values() pass elif token in [225]: self.enterOuterAlt(localctx, 5) - self.state = 639 + self.state = 640 self.match(SecLangParser.VARIABLE_NAME) pass elif token in [76]: self.enterOuterAlt(localctx, 6) - self.state = 640 + self.state = 641 self.match(SecLangParser.ACTION_SEVERITY_VALUE) pass elif token in [231]: self.enterOuterAlt(localctx, 7) - self.state = 641 + self.state = 642 self.match(SecLangParser.FREE_TEXT_QUOTE_MACRO_EXPANSION) pass elif token in [241]: self.enterOuterAlt(localctx, 8) - self.state = 642 + self.state = 643 self.match(SecLangParser.COMMA_SEPARATED_STRING) pass else: @@ -5803,7 +5824,7 @@ def string_literal(self): self.enterRule(localctx, 118, self.RULE_string_literal) try: self.enterOuterAlt(localctx, 1) - self.state = 645 + self.state = 646 self.match(SecLangParser.STRING_LITERAL) except RecognitionException as re: localctx.exception = re @@ -5872,7 +5893,7 @@ def ctl_action(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 647 + self.state = 648 _la = self._input.LA(1) if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 17575006175232) != 0)): self._errHandler.recoverInline(self) @@ -5918,7 +5939,7 @@ def transformation_action_value(self): self.enterRule(localctx, 122, self.RULE_transformation_action_value) try: self.enterOuterAlt(localctx, 1) - self.state = 649 + self.state = 650 self.match(SecLangParser.TRANSFORMATION_VALUE) except RecognitionException as re: localctx.exception = re @@ -5961,7 +5982,7 @@ def collection_value(self): localctx = SecLangParser.Collection_valueContext(self, self._ctx, self.state) self.enterRule(localctx, 124, self.RULE_collection_value) try: - self.state = 654 + self.state = 655 self._errHandler.sync(self) token = self._input.LA(1) if token in [-1, 1, 2, 7, 8, 12, 86, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 182, 183, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 227, 233, 254, 256, 261, 263]: @@ -5970,12 +5991,12 @@ def collection_value(self): pass elif token in [243]: self.enterOuterAlt(localctx, 2) - self.state = 652 + self.state = 653 self.match(SecLangParser.XPATH_EXPRESSION) pass elif token in [250]: self.enterOuterAlt(localctx, 3) - self.state = 653 + self.state = 654 self.match(SecLangParser.COLLECTION_ELEMENT_VALUE) pass else: @@ -6022,7 +6043,7 @@ def ctl_collection_value(self): localctx = SecLangParser.Ctl_collection_valueContext(self, self._ctx, self.state) self.enterRule(localctx, 126, self.RULE_ctl_collection_value) try: - self.state = 659 + self.state = 660 self._errHandler.sync(self) token = self._input.LA(1) if token in [-1, 1, 2, 7, 12, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 182, 183, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 227]: @@ -6031,12 +6052,12 @@ def ctl_collection_value(self): pass elif token in [243]: self.enterOuterAlt(localctx, 2) - self.state = 657 + self.state = 658 self.match(SecLangParser.XPATH_EXPRESSION) pass elif token in [250]: self.enterOuterAlt(localctx, 3) - self.state = 658 + self.state = 659 self.match(SecLangParser.COLLECTION_ELEMENT_VALUE) pass else: @@ -6097,15 +6118,15 @@ def setvar_action(self): self.enterRule(localctx, 128, self.RULE_setvar_action) try: self.enterOuterAlt(localctx, 1) - self.state = 661 - self.col_name() self.state = 662 - self.match(SecLangParser.DOT) + self.col_name() self.state = 663 - self.setvar_stmt() + self.match(SecLangParser.DOT) self.state = 664 - self.assignment() + self.setvar_stmt() self.state = 665 + self.assignment() + self.state = 666 self.var_assignment() except RecognitionException as re: localctx.exception = re @@ -6146,7 +6167,7 @@ def col_name(self): self.enterRule(localctx, 130, self.RULE_col_name) try: self.enterOuterAlt(localctx, 1) - self.state = 667 + self.state = 668 self.match(SecLangParser.COLLECTION_NAME_SETVAR) except RecognitionException as re: localctx.exception = re @@ -6203,27 +6224,27 @@ def setvar_stmt(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 672 + self.state = 673 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 672 + self.state = 673 self._errHandler.sync(self) token = self._input.LA(1) if token in [237]: - self.state = 669 + self.state = 670 self.match(SecLangParser.COLLECTION_ELEMENT) pass elif token in [238]: - self.state = 670 - self.match(SecLangParser.COLLECTION_WITH_MACRO) self.state = 671 + self.match(SecLangParser.COLLECTION_WITH_MACRO) + self.state = 672 self.match(SecLangParser.MACRO_EXPANSION) pass else: raise NoViableAltException(self) - self.state = 674 + self.state = 675 self._errHandler.sync(self) _la = self._input.LA(1) if not (_la==237 or _la==238): @@ -6275,7 +6296,7 @@ def assignment(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 676 + self.state = 677 _la = self._input.LA(1) if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 104) != 0)): self._errHandler.recoverInline(self) @@ -6321,7 +6342,7 @@ def var_assignment(self): self.enterRule(localctx, 136, self.RULE_var_assignment) try: self.enterOuterAlt(localctx, 1) - self.state = 678 + self.state = 679 self.match(SecLangParser.VAR_ASSIGNMENT) except RecognitionException as re: localctx.exception = re @@ -6366,7 +6387,7 @@ def ctl_id(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 680 + self.state = 681 _la = self._input.LA(1) if not(_la==226 or _la==227): self._errHandler.recoverInline(self) diff --git a/src/seclang_parser/SecLangParserListener.py b/src/seclang_parser/SecLangParserListener.py index d6a9f07..424fa7a 100644 --- a/src/seclang_parser/SecLangParserListener.py +++ b/src/seclang_parser/SecLangParserListener.py @@ -593,6 +593,15 @@ def exitACTION_VER(self, ctx:SecLangParser.ACTION_VERContext): pass + # Enter a parse tree produced by SecLangParser#ACTION_LOG_DATA. + def enterACTION_LOG_DATA(self, ctx:SecLangParser.ACTION_LOG_DATAContext): + pass + + # Exit a parse tree produced by SecLangParser#ACTION_LOG_DATA. + def exitACTION_LOG_DATA(self, ctx:SecLangParser.ACTION_LOG_DATAContext): + pass + + # Enter a parse tree produced by SecLangParser#disruptive_action_with_params. def enterDisruptive_action_with_params(self, ctx:SecLangParser.Disruptive_action_with_paramsContext): pass diff --git a/src/seclang_parser/listener.py b/src/seclang_parser/listener.py index 237b79c..305dc2c 100644 --- a/src/seclang_parser/listener.py +++ b/src/seclang_parser/listener.py @@ -31,6 +31,7 @@ class ParserResult: setvar_collections: list[str] = field(default_factory=list) setvar_names: list[str] = field(default_factory=list) setvar_operations: list[str] = field(default_factory=list) + logdata_action_count: int = 0 class TreeShapeListener(SecLangParserListener): @@ -148,4 +149,7 @@ def enterTransformation_action_value(self, ctx: SecLangParser.Transformation_act self.results.directive_values.append(ctx.getText()) def enterComment_block(self, ctx: SecLangParser.Comment_blockContext): - self.results.comment_blocks += 1 \ No newline at end of file + self.results.comment_blocks += 1 + + def enterACTION_LOG_DATA(self, ctx): + self.results.logdata_action_count += 1 \ No newline at end of file diff --git a/testdata/tests.yaml b/testdata/tests.yaml index d0aec2c..d53c51e 100644 --- a/testdata/tests.yaml +++ b/testdata/tests.yaml @@ -492,3 +492,4 @@ check_output_tests: directive_values: - "none" - "%{tx.warning_anomaly_score}" + logdata_action_count: 1