47 #define YYBISON_VERSION "3.0.4" 50 #define YYSKELETON_NAME "yacc.c" 63 #define yyparse naslparse 65 #define yyerror naslerror 66 #define yydebug nasldebug 67 #define yynerrs naslnerrs 71 #line 5 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 91 #define YYPARSE_PARAM parm 92 #define YYLEX_PARAM parm 94 #define LNB (((naslctxt*)parm)->line_nb) 115 #define G_LOG_DOMAIN "lib nasl" 125 #define YYERROR_VERBOSE 127 #line 128 "nasl_grammar.tab.c" 130 # if defined __cplusplus && 201103L <= __cplusplus 131 # define YY_NULLPTR nullptr 133 # define YY_NULLPTR 0 138 #ifdef YYERROR_VERBOSE 139 # undef YYERROR_VERBOSE 140 # define YYERROR_VERBOSE 1 142 # define YYERROR_VERBOSE 0 147 #ifndef YY_NASL_NASL_GRAMMAR_TAB_H_INCLUDED 148 # define YY_NASL_NASL_GRAMMAR_TAB_H_INCLUDED 213 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 217 #line 61 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 227 #line 228 "nasl_grammar.tab.c" 231 # define YYSTYPE_IS_TRIVIAL 1 232 # define YYSTYPE_IS_DECLARED 1 242 #line 71 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 246 #line 247 "nasl_grammar.tab.c" 277 # ifdef __SIZE_TYPE__ 278 # define YYSIZE_T __SIZE_TYPE__ 279 # elif defined size_t 280 # define YYSIZE_T size_t 281 # elif ! defined YYSIZE_T 283 # define YYSIZE_T size_t 285 # define YYSIZE_T unsigned int 289 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 292 # if defined YYENABLE_NLS && YYENABLE_NLS 294 # include <libintl.h> 295 # define YY_(Msgid) dgettext ("bison-runtime", Msgid) 299 # define YY_(Msgid) Msgid 304 # if (defined __GNUC__ \ 305 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ 306 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C 307 # define YY_ATTRIBUTE(Spec) __attribute__(Spec) 309 # define YY_ATTRIBUTE(Spec) 313 #ifndef YY_ATTRIBUTE_PURE 314 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) 317 #ifndef YY_ATTRIBUTE_UNUSED 318 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) 321 #if !defined _Noreturn \ 322 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) 323 # if defined _MSC_VER && 1200 <= _MSC_VER 324 # define _Noreturn __declspec (noreturn) 326 # define _Noreturn YY_ATTRIBUTE ((__noreturn__)) 331 #if ! defined lint || defined __GNUC__ 332 # define YYUSE(E) ((void) (E)) 337 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ 339 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ 340 _Pragma ("GCC diagnostic push") \ 341 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ 342 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") 343 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ 344 _Pragma ("GCC diagnostic pop") 346 # define YY_INITIAL_VALUE(Value) Value 348 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 349 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 350 # define YY_IGNORE_MAYBE_UNINITIALIZED_END 352 #ifndef YY_INITIAL_VALUE 353 # define YY_INITIAL_VALUE(Value) 357 #if ! defined yyoverflow || YYERROR_VERBOSE 361 # ifdef YYSTACK_USE_ALLOCA 362 # if YYSTACK_USE_ALLOCA 364 # define YYSTACK_ALLOC __builtin_alloca 365 # elif defined __BUILTIN_VA_ARG_INCR 368 # define YYSTACK_ALLOC __alloca 369 # elif defined _MSC_VER 371 # define alloca _alloca 373 # define YYSTACK_ALLOC alloca 374 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS 377 # ifndef EXIT_SUCCESS 378 # define EXIT_SUCCESS 0 385 # ifdef YYSTACK_ALLOC 387 # define YYSTACK_FREE(Ptr) do { ; } while (0) 388 # ifndef YYSTACK_ALLOC_MAXIMUM 393 # define YYSTACK_ALLOC_MAXIMUM 4032 396 # define YYSTACK_ALLOC YYMALLOC 397 # define YYSTACK_FREE YYFREE 398 # ifndef YYSTACK_ALLOC_MAXIMUM 399 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 401 # if (defined __cplusplus && ! defined EXIT_SUCCESS \ 402 && ! ((defined YYMALLOC || defined malloc) \ 403 && (defined YYFREE || defined free))) 405 # ifndef EXIT_SUCCESS 406 # define EXIT_SUCCESS 0 410 # define YYMALLOC malloc 411 # if ! defined malloc && ! defined EXIT_SUCCESS 417 # if ! defined free && ! defined EXIT_SUCCESS 425 #if (! defined yyoverflow \ 426 && (! defined __cplusplus \ 427 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 437 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 441 # define YYSTACK_BYTES(N) \ 442 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 443 + YYSTACK_GAP_MAXIMUM) 445 # define YYCOPY_NEEDED 1 452 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 455 YYSIZE_T yynewbytes; \ 456 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 457 Stack = &yyptr->Stack_alloc; \ 458 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 459 yyptr += yynewbytes / sizeof (*yyptr); \ 465 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED 469 # if defined __GNUC__ && 1 < __GNUC__ 470 # define YYCOPY(Dst, Src, Count) \ 471 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) 473 # define YYCOPY(Dst, Src, Count) \ 477 for (yyi = 0; yyi < (Count); yyi++) \ 478 (Dst)[yyi] = (Src)[yyi]; \ 497 #define YYNSTATES 227 502 #define YYMAXUTOK 304 504 #define YYTRANSLATE(YYX) \ 505 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 511 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
512 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
513 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
514 2, 2, 2, 70, 2, 2, 2, 57, 52, 2,
515 61, 62, 55, 53, 63, 54, 72, 56, 2, 2,
516 2, 2, 2, 2, 2, 2, 2, 2, 67, 66,
517 48, 47, 49, 2, 2, 2, 2, 2, 2, 2,
518 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
519 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
520 2, 68, 2, 69, 51, 2, 2, 2, 2, 2,
521 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
522 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
523 2, 2, 2, 64, 50, 65, 71, 2, 2, 2,
524 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
525 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
526 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
527 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
528 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
529 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
530 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
531 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
532 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
533 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
534 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
535 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
536 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
537 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
538 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
539 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
540 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
548 0, 156, 156, 161, 167, 174, 174, 177, 187, 187,
549 188, 194, 203, 203, 204, 205, 219, 219, 219, 219,
550 222, 222, 222, 223, 223, 223, 223, 223, 224, 228,
551 232, 235, 241, 248, 254, 262, 262, 262, 262, 263,
552 273, 280, 288, 298, 298, 298, 298, 301, 309, 309,
553 312, 362, 370, 370, 371, 371, 377, 383, 392, 396,
554 397, 398, 399, 400, 401, 402, 403, 406, 410, 412,
555 412, 414, 422, 425, 426, 427, 428, 432, 433, 434,
556 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
557 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
558 455, 456, 457, 458, 459, 460, 461, 461, 461, 461,
559 461, 464, 466, 467, 471, 474, 480, 481, 485, 490,
560 492, 498, 498, 500, 502, 512, 520
564 #if YYDEBUG || YYERROR_VERBOSE || 0 569 "$end",
"error",
"$undefined",
"IF",
"ELSE",
"EQ",
"NEQ",
"SUPEQ",
570 "INFEQ",
"OR",
"AND",
"MATCH",
"NOMATCH",
"REP",
"FOR",
"REPEAT",
571 "UNTIL",
"FOREACH",
"WHILE",
"BREAK",
"CONTINUE",
"FUNCTION",
"RETURN",
572 "INCLUDE",
"LOCAL",
"GLOBAL",
"PLUS_PLUS",
"MINUS_MINUS",
"L_SHIFT",
573 "R_SHIFT",
"R_USHIFT",
"EXPO",
"PLUS_EQ",
"MINUS_EQ",
"MULT_EQ",
574 "DIV_EQ",
"MODULO_EQ",
"L_SHIFT_EQ",
"R_SHIFT_EQ",
"R_USHIFT_EQ",
575 "RE_MATCH",
"RE_NOMATCH",
"ARROW",
"IDENT",
"STRING1",
"STRING2",
576 "INTEGER",
"'='",
"'<'",
"'>'",
"'|'",
"'^'",
"'&'",
"'+'",
"'-'",
"'*'",
577 "'/'",
"'%'",
"NOT",
"UMINUS",
"BIT_NOT",
"'('",
"')'",
"','",
"'{'",
578 "'}'",
"';'",
"':'",
"'['",
"']'",
"'!'",
"'~'",
"'.'",
"$accept",
579 "tiptop",
"instr_decl_list",
"instr_decl",
"func_decl",
"arg_decl",
580 "arg_decl_1",
"block",
"instr_list",
"instr",
"simple_instr",
"ret",
581 "if_block",
"loop",
"for_loop",
"while_loop",
"repeat_loop",
582 "foreach_loop",
"aff_func",
"rep",
"string",
"inc",
"func_call",
583 "arg_list",
"arg_list_1",
"arg",
"aff",
"lvalue",
"identifier",
584 "array_elem",
"array_index",
"post_pre_incr",
"expr",
"const_array",
585 "list_array_data",
"array_data",
"atom",
"simple_array_data",
"var",
586 "var_name",
"ipaddr",
"loc",
"glob",
YY_NULLPTR 595 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
596 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
597 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
598 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
599 295, 296, 297, 298, 299, 300, 301, 61, 60, 62,
600 124, 94, 38, 43, 45, 42, 47, 37, 302, 303,
601 304, 40, 41, 44, 123, 125, 59, 58, 91, 93,
606 #define YYPACT_NINF -91 608 #define yypact_value_is_default(Yystate) \ 609 (!!((Yystate) == (-91))) 611 #define YYTABLE_NINF -69 613 #define yytable_value_is_error(Yytable_value) \ 614 (!!((Yytable_value) == (-69))) 620 464, -53, -91, -50, 491, -6, -42, -91, -91, -6,
621 499, -40, -6, -6, -6, -6, -91, 259, 25, -91,
622 91, -91, -91, -91, -39, -91, -91, -91, -91, -91,
623 -91, -91, -91, -91, 23, -91, 553, -13, -91, -91,
624 -91, -91, 499, 26, 29, -30, 499, -21, -91, -91,
625 -18, 499, 499, 13, 499, 499, -91, -91, 961, 611,
626 -91, 798, -91, -91, -91, -91, -91, 19, -91, -91,
627 -12, -91, -91, -26, -91, -91, -9, 123, -91, -91,
628 -91, 499, -91, -91, 499, 499, 499, 499, 499, 499,
629 499, 499, 499, 499, 499, 566, -4, -91, -91, -91,
630 499, 499, 624, -6, 14, 37, 682, 39, 40, -91,
631 42, 7, 22, -91, -91, 37, 37, 499, 499, 499,
632 499, 499, 499, 499, 499, 499, 499, 499, 499, 19,
633 19, 499, 499, 499, 499, 499, 499, 499, 499, 499,
634 499, -91, -91, 28, -6, -91, -91, 798, 798, 798,
635 798, 798, 798, 798, 798, 798, 798, 35, -91, 33,
636 945, 798, 17, 798, 491, 499, 347, 740, 491, 36,
637 16, -91, 34, -91, 13, 882, 882, 882, 882, 851,
638 913, 882, 882, 398, 398, 398, 37, -91, -91, 882,
639 882, 354, 337, 415, 15, 15, 37, 37, 37, -91,
640 -91, -91, 499, 499, -91, 83, 409, -91, 491, -91,
641 27, 53, -91, -91, -91, 798, 491, 26, -91, -91,
642 47, -91, 38, 56, 491, -91, -91
650 30, 0, 70, 0, 30, 0, 0, 28, 29, 0,
651 32, 0, 8, 8, 0, 0, 69, 30, 0, 2,
652 3, 6, 17, 5, 0, 24, 18, 19, 35, 36,
653 37, 38, 22, 25, 23, 20, 0, 67, 68, 21,
654 26, 27, 0, 46, 0, 0, 0, 0, 118, 117,
655 116, 0, 0, 0, 0, 0, 122, 107, 123, 121,
656 95, 31, 110, 109, 106, 120, 108, 0, 125, 9,
657 10, 126, 73, 67, 74, 13, 0, 14, 1, 4,
658 16, 0, 75, 76, 0, 0, 0, 0, 0, 0,
659 0, 0, 0, 53, 0, 0, 0, 45, 43, 44,
660 0, 0, 0, 8, 0, 83, 0, 118, 117, 116,
661 0, 0, 112, 119, 114, 79, 84, 0, 0, 0,
662 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
663 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
664 0, 48, 49, 0, 0, 12, 15, 47, 59, 60,
665 61, 62, 63, 66, 64, 65, 58, 0, 52, 54,
666 123, 56, 0, 72, 30, 0, 0, 0, 30, 0,
667 0, 77, 0, 111, 0, 102, 103, 104, 105, 80,
668 78, 96, 97, 94, 92, 93, 86, 98, 99, 100,
669 101, 91, 90, 89, 81, 82, 85, 87, 88, 50,
670 11, 51, 0, 0, 71, 33, 0, 41, 30, 40,
671 0, 0, 115, 113, 55, 57, 30, 46, 42, 7,
672 0, 34, 0, 0, 30, 124, 39
678 -91, -91, 101, -91, -91, -11, -20, -87, 48, 12,
679 -91, -91, -91, -91, -91, -91, -91, -91, -90, -91,
680 -64, -91, 6, -91, -74, -91, 24, 60, 0, 18,
681 -91, 30, 209, -91, -45, -91, -52, -41, -91, -91,
688 -1, 18, 19, 20, 21, 68, 69, 22, 76, 23,
689 24, 25, 26, 27, 28, 29, 30, 31, 96, 32,
690 110, 33, 56, 157, 158, 159, 57, 36, 58, 59,
691 162, 60, 161, 62, 111, 112, 63, 114, 64, 65,
700 37, 113, 71, 143, 37, 45, 34, 2, 42, 47,
701 34, 43, 70, 70, 73, 73, 44, 37, 38, 46,
702 37, 67, 38, 34, 35, 78, 34, 80, 35, 77,
703 39, 101, 38, 38, 39, 38, 81, 16, 38, 2,
704 103, 35, 94, 37, 35, 100, 128, 39, 93, 97,
705 39, 144, 14, 15, 104, 94, 145, 107, 108, 109,
706 170, 38, 165, 141, 142, 187, 188, 98, 128, 16,
707 138, 139, 140, 99, 72, 74, 173, 37, 48, 49,
708 109, -48, -49, 34, 172, 174, 204, 216, 211, 77,
709 199, 17, 169, 160, 1, 38, 202, 201, 210, 220,
710 224, 35, 225, 70, 2, 3, 4, 39, 5, 6,
711 7, 8, 9, 10, 11, 12, 13, 14, 15, 223,
712 113, 79, 113, 219, 200, 146, 1, 222, 214, 213,
713 0, 212, 0, 0, 16, 0, 2, 3, 4, 0,
714 5, 6, 7, 8, 70, 10, 11, 12, 13, 14,
715 15, 0, 0, 0, 0, 17, 0, -30, 0, 0,
716 0, 0, 0, 0, 37, 0, 16, 0, 37, 0,
717 34, 0, 0, 0, 34, 0, 205, 0, 0, 0,
718 209, 0, 38, 0, 0, 0, 38, 17, 35, -30,
719 0, 0, 35, 0, 39, 0, 0, 0, 39, 0,
720 0, 0, 160, 0, 0, 0, 0, 0, 37, 0,
721 0, 0, 0, 0, 34, 0, 37, 37, 0, 61,
722 218, 0, 34, 97, 37, 0, 38, 0, 221, 0,
723 34, 0, 35, 0, 38, 38, 226, 0, 39, 0,
724 35, 98, 38, 0, 0, 0, 39, 99, 35, 0,
725 0, 95, 0, 0, 39, 102, 0, 0, 0, 0,
726 105, 106, 1, 115, 116, 0, 0, 0, 0, 0,
727 0, 0, 2, 3, 4, 0, 5, 6, 7, 8,
728 0, 10, 11, 12, 13, 14, 15, 0, 0, 0,
729 147, 0, 0, 148, 149, 150, 151, 152, 153, 154,
730 155, 156, 16, 163, 0, 0, 0, 0, 0, 166,
731 167, 0, 0, 0, 0, 0, 0, 0, 0, 0,
732 0, 0, 0, 17, 75, 0, 175, 176, 177, 178,
733 179, 180, 181, 182, 183, 184, 185, 186, 0, 0,
734 189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
735 0, 0, 117, 118, 119, 120, 121, 122, 123, 124,
736 0, 0, 0, 0, 0, 125, 126, 127, 128, 0,
737 0, 0, 0, 0, 206, 125, 126, 127, 128, 0,
738 0, 0, 125, 126, 127, 128, 0, 129, 130, 135,
739 136, 137, 138, 139, 140, 131, 132, 133, 134, 135,
740 136, 137, 138, 139, 140, 134, 135, 136, 137, 138,
741 139, 140, 215, 207, 117, 118, 119, 120, 121, 122,
742 123, 124, 0, 0, 0, 0, -69, -69, -69, 128,
743 0, 0, 0, 0, 0, 0, 0, 125, 126, 127,
744 128, 0, 0, 125, 126, 127, 128, 0, 0, 129,
745 130, 136, 137, 138, 139, 140, 0, 131, 132, 133,
746 134, 135, 136, 137, 138, 139, 140, 1, 136, 137,
747 138, 139, 140, 0, 0, 217, 0, 2, 3, 4,
748 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
749 14, 15, 0, 0, 1, 0, 0, 0, 0, 0,
750 0, 0, 0, 0, 2, 3, 4, 16, 5, 6,
751 7, 8, 2, 10, 11, 12, 13, 14, 15, 0,
752 0, 0, 0, 0, 0, 14, 15, 0, 17, 0,
753 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
754 0, 0, 16, 48, 49, 50, 0, 0, 0, 0,
755 0, 0, 0, 51, 0, 17, 0, 0, 0, 0,
756 52, 0, 0, 0, 0, 0, 0, 53, 0, 54,
757 55, 117, 118, 119, 120, 121, 122, 123, 124, 82,
758 83, 0, 0, 0, 0, 84, 85, 86, 87, 88,
759 89, 90, 91, 0, 125, 126, 127, 128, 0, 0,
760 92, 0, 0, 0, 0, 0, 129, 130, 0, 0,
761 0, 0, 0, 0, 131, 132, 133, 134, 135, 136,
762 137, 138, 139, 140, 0, 0, 0, 0, 164, 117,
763 118, 119, 120, 121, 122, 123, 124, -68, -68, 0,
764 0, 0, 0, -68, -68, -68, -68, -68, -68, -68,
765 -68, 0, 125, 126, 127, 128, 0, 0, -68, 0,
766 0, 0, 0, 0, 129, 130, 0, 0, 0, 0,
767 0, 0, 131, 132, 133, 134, 135, 136, 137, 138,
768 139, 140, 0, 0, 0, 0, 168, 117, 118, 119,
769 120, 121, 122, 123, 124, 0, 0, 0, 0, 0,
770 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
771 125, 126, 127, 128, 0, 0, 0, 0, 0, 0,
772 0, 0, 129, 130, 0, 0, 0, 0, 0, 0,
773 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
774 0, 0, 0, 0, 171, 117, 118, 119, 120, 121,
775 122, 123, 124, 0, 0, 0, 0, 0, 0, 0,
776 0, 0, 0, 0, 0, 0, 0, 0, 125, 126,
777 127, 128, 0, 0, 0, 0, 0, 0, 0, 0,
778 129, 130, 0, 0, 0, 0, 0, 0, 131, 132,
779 133, 134, 135, 136, 137, 138, 139, 140, 0, 0,
780 0, 0, 208, 117, 118, 119, 120, 121, 122, 123,
781 124, 0, 0, 0, 0, 0, 0, 0, 0, 0,
782 0, 0, 0, 0, 0, 0, 125, 126, 127, 128,
783 0, 0, 0, 0, 0, 0, 0, 0, 129, 130,
784 0, 0, 0, 0, 0, 0, 131, 132, 133, 134,
785 135, 136, 137, 138, 139, 140, 117, 118, 119, 120,
786 0, 122, 123, 124, 0, 0, 0, 0, 0, 0,
787 0, 0, 0, 0, 0, 0, 0, 0, 0, 125,
788 126, 127, 128, 0, 0, 0, 0, -69, -69, -69,
789 -69, 129, 130, -69, -69, 0, 0, 0, 0, 131,
790 132, 133, 134, 135, 136, 137, 138, 139, 140, 0,
791 125, 126, 127, 128, 0, 0, 0, 0, 117, 118,
792 119, 120, -69, -69, 123, 124, 0, 0, 0, 0,
793 -69, -69, 133, 134, 135, 136, 137, 138, 139, 140,
794 0, 125, 126, 127, 128, 0, 0, 0, 0, 0,
795 0, 0, 0, 129, 130, 0, 0, 0, 0, 0,
796 0, 131, 132, 133, 134, 135, 136, 137, 138, 139,
797 140, -67, -67, 0, 0, 0, 0, -67, -67, -67,
798 -67, -67, -67, -67, -67, 0, 0, -67, -67, 0,
799 0, 0, -67, -67, -67, -67, -67, -67, -67, -67,
800 -67, 0, 0, 0, 0, 0, 93, 0, -67, 0,
801 0, 0, 203, 94, 0, 0, 0, 0, 0, 0,
802 0, 0, 93, 0, 0, 0, 0, 0, 0, 94
807 0, 53, 13, 67, 4, 5, 0, 13, 61, 9,
808 4, 61, 12, 13, 14, 15, 4, 17, 0, 61,
809 20, 61, 4, 17, 0, 0, 20, 66, 4, 17,
810 0, 61, 14, 15, 4, 17, 13, 43, 20, 13,
811 61, 17, 68, 43, 20, 16, 31, 17, 61, 43,
812 20, 63, 26, 27, 72, 68, 65, 44, 45, 46,
813 46, 43, 66, 44, 45, 129, 130, 43, 31, 43,
814 55, 56, 57, 43, 14, 15, 69, 77, 44, 45,
815 46, 42, 42, 77, 42, 63, 69, 4, 72, 77,
816 62, 64, 103, 93, 3, 77, 63, 62, 62, 46,
817 62, 77, 46, 103, 13, 14, 15, 77, 17, 18,
818 19, 20, 21, 22, 23, 24, 25, 26, 27, 72,
819 172, 20, 174, 210, 144, 77, 3, 217, 202, 174,
820 -1, 172, -1, -1, 43, -1, 13, 14, 15, -1,
821 17, 18, 19, 20, 144, 22, 23, 24, 25, 26,
822 27, -1, -1, -1, -1, 64, -1, 66, -1, -1,
823 -1, -1, -1, -1, 164, -1, 43, -1, 168, -1,
824 164, -1, -1, -1, 168, -1, 164, -1, -1, -1,
825 168, -1, 164, -1, -1, -1, 168, 64, 164, 66,
826 -1, -1, 168, -1, 164, -1, -1, -1, 168, -1,
827 -1, -1, 202, -1, -1, -1, -1, -1, 208, -1,
828 -1, -1, -1, -1, 208, -1, 216, 217, -1, 10,
829 208, -1, 216, 217, 224, -1, 208, -1, 216, -1,
830 224, -1, 208, -1, 216, 217, 224, -1, 208, -1,
831 216, 217, 224, -1, -1, -1, 216, 217, 224, -1,
832 -1, 42, -1, -1, 224, 46, -1, -1, -1, -1,
833 51, 52, 3, 54, 55, -1, -1, -1, -1, -1,
834 -1, -1, 13, 14, 15, -1, 17, 18, 19, 20,
835 -1, 22, 23, 24, 25, 26, 27, -1, -1, -1,
836 81, -1, -1, 84, 85, 86, 87, 88, 89, 90,
837 91, 92, 43, 94, -1, -1, -1, -1, -1, 100,
838 101, -1, -1, -1, -1, -1, -1, -1, -1, -1,
839 -1, -1, -1, 64, 65, -1, 117, 118, 119, 120,
840 121, 122, 123, 124, 125, 126, 127, 128, -1, -1,
841 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
842 -1, -1, 5, 6, 7, 8, 9, 10, 11, 12,
843 -1, -1, -1, -1, -1, 28, 29, 30, 31, -1,
844 -1, -1, -1, -1, 165, 28, 29, 30, 31, -1,
845 -1, -1, 28, 29, 30, 31, -1, 40, 41, 52,
846 53, 54, 55, 56, 57, 48, 49, 50, 51, 52,
847 53, 54, 55, 56, 57, 51, 52, 53, 54, 55,
848 56, 57, 203, 66, 5, 6, 7, 8, 9, 10,
849 11, 12, -1, -1, -1, -1, 28, 29, 30, 31,
850 -1, -1, -1, -1, -1, -1, -1, 28, 29, 30,
851 31, -1, -1, 28, 29, 30, 31, -1, -1, 40,
852 41, 53, 54, 55, 56, 57, -1, 48, 49, 50,
853 51, 52, 53, 54, 55, 56, 57, 3, 53, 54,
854 55, 56, 57, -1, -1, 66, -1, 13, 14, 15,
855 -1, 17, 18, 19, 20, 21, 22, 23, 24, 25,
856 26, 27, -1, -1, 3, -1, -1, -1, -1, -1,
857 -1, -1, -1, -1, 13, 14, 15, 43, 17, 18,
858 19, 20, 13, 22, 23, 24, 25, 26, 27, -1,
859 -1, -1, -1, -1, -1, 26, 27, -1, 64, -1,
860 -1, -1, -1, -1, 43, -1, -1, -1, -1, -1,
861 -1, -1, 43, 44, 45, 46, -1, -1, -1, -1,
862 -1, -1, -1, 54, -1, 64, -1, -1, -1, -1,
863 61, -1, -1, -1, -1, -1, -1, 68, -1, 70,
864 71, 5, 6, 7, 8, 9, 10, 11, 12, 26,
865 27, -1, -1, -1, -1, 32, 33, 34, 35, 36,
866 37, 38, 39, -1, 28, 29, 30, 31, -1, -1,
867 47, -1, -1, -1, -1, -1, 40, 41, -1, -1,
868 -1, -1, -1, -1, 48, 49, 50, 51, 52, 53,
869 54, 55, 56, 57, -1, -1, -1, -1, 62, 5,
870 6, 7, 8, 9, 10, 11, 12, 26, 27, -1,
871 -1, -1, -1, 32, 33, 34, 35, 36, 37, 38,
872 39, -1, 28, 29, 30, 31, -1, -1, 47, -1,
873 -1, -1, -1, -1, 40, 41, -1, -1, -1, -1,
874 -1, -1, 48, 49, 50, 51, 52, 53, 54, 55,
875 56, 57, -1, -1, -1, -1, 62, 5, 6, 7,
876 8, 9, 10, 11, 12, -1, -1, -1, -1, -1,
877 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
878 28, 29, 30, 31, -1, -1, -1, -1, -1, -1,
879 -1, -1, 40, 41, -1, -1, -1, -1, -1, -1,
880 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
881 -1, -1, -1, -1, 62, 5, 6, 7, 8, 9,
882 10, 11, 12, -1, -1, -1, -1, -1, -1, -1,
883 -1, -1, -1, -1, -1, -1, -1, -1, 28, 29,
884 30, 31, -1, -1, -1, -1, -1, -1, -1, -1,
885 40, 41, -1, -1, -1, -1, -1, -1, 48, 49,
886 50, 51, 52, 53, 54, 55, 56, 57, -1, -1,
887 -1, -1, 62, 5, 6, 7, 8, 9, 10, 11,
888 12, -1, -1, -1, -1, -1, -1, -1, -1, -1,
889 -1, -1, -1, -1, -1, -1, 28, 29, 30, 31,
890 -1, -1, -1, -1, -1, -1, -1, -1, 40, 41,
891 -1, -1, -1, -1, -1, -1, 48, 49, 50, 51,
892 52, 53, 54, 55, 56, 57, 5, 6, 7, 8,
893 -1, 10, 11, 12, -1, -1, -1, -1, -1, -1,
894 -1, -1, -1, -1, -1, -1, -1, -1, -1, 28,
895 29, 30, 31, -1, -1, -1, -1, 5, 6, 7,
896 8, 40, 41, 11, 12, -1, -1, -1, -1, 48,
897 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
898 28, 29, 30, 31, -1, -1, -1, -1, 5, 6,
899 7, 8, 40, 41, 11, 12, -1, -1, -1, -1,
900 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
901 -1, 28, 29, 30, 31, -1, -1, -1, -1, -1,
902 -1, -1, -1, 40, 41, -1, -1, -1, -1, -1,
903 -1, 48, 49, 50, 51, 52, 53, 54, 55, 56,
904 57, 26, 27, -1, -1, -1, -1, 32, 33, 34,
905 35, 36, 37, 38, 39, -1, -1, 26, 27, -1,
906 -1, -1, 47, 32, 33, 34, 35, 36, 37, 38,
907 39, -1, -1, -1, -1, -1, 61, -1, 47, -1,
908 -1, -1, 67, 68, -1, -1, -1, -1, -1, -1,
909 -1, -1, 61, -1, -1, -1, -1, -1, -1, 68
916 0, 3, 13, 14, 15, 17, 18, 19, 20, 21,
917 22, 23, 24, 25, 26, 27, 43, 64, 74, 75,
918 76, 77, 80, 82, 83, 84, 85, 86, 87, 88,
919 89, 90, 92, 94, 95, 99, 100, 101, 102, 104,
920 114, 115, 61, 61, 82, 101, 61, 101, 44, 45,
921 46, 54, 61, 68, 70, 71, 95, 99, 101, 102,
922 104, 105, 106, 109, 111, 112, 113, 61, 78, 79,
923 101, 78, 100, 101, 100, 65, 81, 82, 0, 75,
924 66, 13, 26, 27, 32, 33, 34, 35, 36, 37,
925 38, 39, 47, 61, 68, 105, 91, 95, 99, 104,
926 16, 61, 105, 61, 72, 105, 105, 44, 45, 46,
927 93, 107, 108, 109, 110, 105, 105, 5, 6, 7,
928 8, 9, 10, 11, 12, 28, 29, 30, 31, 40,
929 41, 48, 49, 50, 51, 52, 53, 54, 55, 56,
930 57, 44, 45, 93, 63, 65, 81, 105, 105, 105,
931 105, 105, 105, 105, 105, 105, 105, 96, 97, 98,
932 101, 105, 103, 105, 62, 66, 105, 105, 62, 78,
933 46, 62, 42, 69, 63, 105, 105, 105, 105, 105,
934 105, 105, 105, 105, 105, 105, 105, 93, 93, 105,
935 105, 105, 105, 105, 105, 105, 105, 105, 105, 62,
936 79, 62, 63, 67, 69, 82, 105, 66, 62, 82,
937 62, 72, 110, 107, 97, 105, 4, 66, 82, 80,
938 46, 82, 91, 72, 62, 46, 82
944 0, 73, 74, 75, 75, 76, 76, 77, 78, 78,
945 79, 79, 80, 80, 81, 81, 82, 82, 82, 82,
946 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
947 83, 84, 84, 85, 85, 86, 86, 86, 86, 87,
948 88, 89, 90, 91, 91, 91, 91, 92, 93, 93,
949 94, 95, 96, 96, 97, 97, 98, 98, 99, 99,
950 99, 99, 99, 99, 99, 99, 99, 100, 100, 101,
951 101, 102, 103, 104, 104, 104, 104, 105, 105, 105,
952 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
953 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
954 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
955 105, 106, 107, 107, 108, 108, 109, 109, 109, 110,
956 111, 111, 111, 112, 113, 114, 115
962 0, 2, 1, 1, 2, 1, 1, 6, 0, 1,
963 1, 3, 3, 2, 1, 2, 2, 1, 1, 1,
964 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
965 0, 2, 1, 5, 7, 1, 1, 1, 1, 9,
966 5, 5, 6, 1, 1, 1, 0, 3, 1, 1,
967 4, 4, 1, 0, 1, 3, 1, 3, 3, 3,
968 3, 3, 3, 3, 3, 3, 3, 1, 1, 1,
969 1, 4, 1, 2, 2, 2, 2, 3, 3, 2,
970 3, 3, 3, 2, 2, 3, 3, 3, 3, 3,
971 3, 3, 3, 3, 3, 1, 3, 3, 3, 3,
972 3, 3, 3, 3, 3, 3, 1, 1, 1, 1,
973 1, 3, 1, 3, 1, 3, 1, 1, 1, 1,
978 #define yyerrok (yyerrstatus = 0) 979 #define yyclearin (yychar = YYEMPTY) 983 #define YYACCEPT goto yyacceptlab 984 #define YYABORT goto yyabortlab 985 #define YYERROR goto yyerrorlab 988 #define YYRECOVERING() (!!yyerrstatus) 990 #define YYBACKUP(Token, Value) \ 992 if (yychar == YYEMPTY) \ 996 YYPOPSTACK (yylen); \ 1002 yyerror (parm, YY_("syntax error: cannot back up")); \ 1009 #define YYERRCODE 256 1018 # define YYFPRINTF fprintf 1021 # define YYDPRINTF(Args) \ 1028 #ifndef YY_LOCATION_PRINT 1029 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 1033 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 1037 YYFPRINTF (stderr, "%s ", Title); \ 1038 yy_symbol_print (stderr, \ 1039 Type, Value, parm); \ 1040 YYFPRINTF (stderr, "\n"); \ 1052 FILE *yyo = yyoutput;
1059 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1088 for (; yybottom <= yytop; yybottom++)
1090 int yybot = *yybottom;
1096 # define YY_STACK_PRINT(Bottom, Top) \ 1099 yy_stack_print ((Bottom), (Top)); \ 1110 unsigned long int yylno =
yyrline[yyrule];
1111 int yynrhs =
yyr2[yyrule];
1113 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
1116 for (yyi = 0; yyi < yynrhs; yyi++)
1120 yystos[yyssp[yyi + 1 - yynrhs]],
1121 &(yyvsp[(yyi + 1) - (yynrhs)])
1127 # define YY_REDUCE_PRINT(Rule) \ 1130 yy_reduce_print (yyssp, yyvsp, Rule, parm); \ 1137 # define YYDPRINTF(Args) 1138 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 1139 # define YY_STACK_PRINT(Bottom, Top) 1140 # define YY_REDUCE_PRINT(Rule) 1146 # define YYINITDEPTH 200 1157 # define YYMAXDEPTH 10000 1164 # if defined __GLIBC__ && defined _STRING_H 1165 # define yystrlen strlen 1172 for (yylen = 0; yystr[yylen]; yylen++)
1180 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 1181 # define yystpcpy stpcpy 1189 const char *yys = yysrc;
1191 while ((*yyd++ = *yys++) !=
'\0')
1213 char const *yyp = yystr;
1220 goto do_not_strip_quotes;
1224 goto do_not_strip_quotes;
1237 do_not_strip_quotes: ;
1243 return yystpcpy (yyres, yystr) - yyres;
1261 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1265 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1295 int yyn =
yypact[*yyssp];
1296 yyarg[yycount++] =
yytname[yytoken];
1302 int yyxbegin = yyn < 0 ? -yyn : 0;
1304 int yychecklim =
YYLAST - yyn + 1;
1308 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1312 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1318 yyarg[yycount++] =
yytname[yyx];
1321 if (! (yysize <= yysize1
1332 # define YYCASE_(N, S) \ 1337 YYCASE_(1,
YY_(
"syntax error, unexpected %s"));
1338 YYCASE_(2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1339 YYCASE_(3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1340 YYCASE_(4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1341 YYCASE_(5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1352 if (*yymsg_alloc < yysize)
1354 *yymsg_alloc = 2 * yysize;
1355 if (! (yysize <= *yymsg_alloc
1367 while ((*yyp = *yyformat) !=
'\0')
1368 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1458 char *yymsg = yymsgbuf;
1459 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1462 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 1468 yyssp = yyss = yyssa;
1469 yyvsp = yyvs = yyvsa;
1472 YYDPRINTF ((stderr,
"Starting parse\n"));
1491 if (yyss + yystacksize - 1 <= yyssp)
1494 YYSIZE_T yysize = yyssp - yyss + 1;
1508 yyoverflow (
YY_(
"memory exhausted"),
1509 &yyss1, yysize *
sizeof (*yyssp),
1510 &yyvs1, yysize *
sizeof (*yyvsp),
1517 # ifndef YYSTACK_RELOCATE 1518 goto yyexhaustedlab;
1522 goto yyexhaustedlab;
1532 goto yyexhaustedlab;
1535 # undef YYSTACK_RELOCATE 1542 yyssp = yyss + yysize - 1;
1543 yyvsp = yyvs + yysize - 1;
1545 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1546 (
unsigned long int) yystacksize));
1548 if (yyss + yystacksize - 1 <= yyssp)
1552 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1577 YYDPRINTF ((stderr,
"Reading a token: "));
1578 yychar =
yylex (&yylval, parm);
1581 if (yychar <=
YYEOF)
1583 yychar = yytoken =
YYEOF;
1584 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1650 yyval = yyvsp[1-yylen];
1657 #line 157 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1659 ((
naslctxt*)parm)->tree = (yyvsp[0].node);
1661 #line 1662 "nasl_grammar.tab.c" 1665 #line 162 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1669 (yyval.
node)->link[0] = (yyvsp[0].node);
1671 #line 1672 "nasl_grammar.tab.c" 1675 #line 168 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1679 (yyval.
node)->link[0] = (yyvsp[-1].node);
1680 (yyval.
node)->link[1] = (yyvsp[0].node);
1682 #line 1683 "nasl_grammar.tab.c" 1686 #line 178 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1691 (yyval.
node)->x.str_val = (yyvsp[-4].str);
1692 (yyval.
node)->link[0] = (yyvsp[-2].node);
1693 (yyval.
node)->link[1] = (yyvsp[0].node);
1695 #line 1696 "nasl_grammar.tab.c" 1699 #line 187 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1700 { (yyval.
node) = NULL; }
1701 #line 1702 "nasl_grammar.tab.c" 1705 #line 187 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1706 { (yyval.
node) = (yyvsp[0].node); }
1707 #line 1708 "nasl_grammar.tab.c" 1711 #line 189 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1715 (yyval.
node)->x.str_val = (yyvsp[0].str);
1717 #line 1718 "nasl_grammar.tab.c" 1721 #line 195 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1725 (yyval.
node)->x.str_val = (yyvsp[-2].str);
1726 (yyval.
node)->link[0] = (yyvsp[0].node);
1728 #line 1729 "nasl_grammar.tab.c" 1732 #line 203 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1733 { (yyval.
node) = (yyvsp[-1].node); }
1734 #line 1735 "nasl_grammar.tab.c" 1738 #line 203 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1739 { (yyval.
node) = NULL; }
1740 #line 1741 "nasl_grammar.tab.c" 1744 #line 206 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1746 if ((yyvsp[-1].node) == NULL)
1747 (yyval.
node) = (yyvsp[0].node);
1752 (yyval.
node)->link[0] = (yyvsp[-1].node);
1753 (yyval.
node)->link[1] = (yyvsp[0].node);
1756 #line 1757 "nasl_grammar.tab.c" 1760 #line 219 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1761 { (yyval.
node) = (yyvsp[-1].node); }
1762 #line 1763 "nasl_grammar.tab.c" 1766 #line 224 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1771 #line 1772 "nasl_grammar.tab.c" 1775 #line 228 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1780 #line 1781 "nasl_grammar.tab.c" 1784 #line 232 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1785 { (yyval.
node) = NULL; }
1786 #line 1787 "nasl_grammar.tab.c" 1790 #line 236 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1794 (yyval.
node)->link[0] = (yyvsp[0].node);
1796 #line 1797 "nasl_grammar.tab.c" 1800 #line 242 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1805 #line 1806 "nasl_grammar.tab.c" 1809 #line 249 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1813 (yyval.
node)->link[0] = (yyvsp[-2].node); (yyval.
node)->link[1] = (yyvsp[0].node);
1815 #line 1816 "nasl_grammar.tab.c" 1819 #line 255 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1823 (yyval.
node)->link[0] = (yyvsp[-4].node); (yyval.
node)->link[1] = (yyvsp[-2].node); (yyval.
node)->link[2] = (yyvsp[0].node);
1825 #line 1826 "nasl_grammar.tab.c" 1829 #line 264 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1833 (yyval.
node)->link[0] = (yyvsp[-6].node);
1834 (yyval.
node)->link[1] = (yyvsp[-4].node);
1835 (yyval.
node)->link[2] = (yyvsp[-2].node);
1836 (yyval.
node)->link[3] = (yyvsp[0].node);
1838 #line 1839 "nasl_grammar.tab.c" 1842 #line 274 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1846 (yyval.
node)->link[0] = (yyvsp[-2].node);
1847 (yyval.
node)->link[1] = (yyvsp[0].node);
1849 #line 1850 "nasl_grammar.tab.c" 1853 #line 281 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1857 (yyval.
node)->link[0] = (yyvsp[-3].node);
1858 (yyval.
node)->link[1] = (yyvsp[-1].node);
1860 #line 1861 "nasl_grammar.tab.c" 1864 #line 289 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1868 (yyval.
node)->x.str_val = (yyvsp[-4].str);
1869 (yyval.
node)->link[0] = (yyvsp[-2].node);
1870 (yyval.
node)->link[1] = (yyvsp[0].node);
1872 #line 1873 "nasl_grammar.tab.c" 1876 #line 298 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1877 { (yyval.
node) = NULL; }
1878 #line 1879 "nasl_grammar.tab.c" 1882 #line 302 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1886 (yyval.
node)->link[0] = (yyvsp[-2].node);
1887 (yyval.
node)->link[1] = (yyvsp[0].node);
1889 #line 1890 "nasl_grammar.tab.c" 1893 #line 309 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1894 { (yyval.
str) = (yyvsp[0].data).val; }
1895 #line 1896 "nasl_grammar.tab.c" 1899 #line 313 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1904 bzero (&subctx,
sizeof (subctx));
1908 (yyval.
node) = NULL;
1913 (g_str_hash, g_str_equal, g_free,
1920 g_free ((yyvsp[-1].str));
1932 nasl_perror (NULL,
"%s: Parse error at or near line %d\n", (yyvsp[-1].str),
1934 g_free ((yyvsp[-1].str));
1940 g_free((yyvsp[-1].str));
1947 #line 1948 "nasl_grammar.tab.c" 1951 #line 363 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1955 (yyval.
node)->x.str_val = (yyvsp[-3].str);
1956 (yyval.
node)->link[0] = (yyvsp[-1].node);
1958 #line 1959 "nasl_grammar.tab.c" 1962 #line 370 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1963 { (yyval.
node) = NULL; }
1964 #line 1965 "nasl_grammar.tab.c" 1968 #line 372 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1970 (yyvsp[-2].node)->link[1] = (yyvsp[0].node);
1971 (yyval.
node) = (yyvsp[-2].node);
1973 #line 1974 "nasl_grammar.tab.c" 1977 #line 378 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1981 (yyval.
node)->link[0] = (yyvsp[0].node);
1983 #line 1984 "nasl_grammar.tab.c" 1987 #line 384 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 1991 (yyval.
node)->x.str_val = (yyvsp[-2].str);
1992 (yyval.
node)->link[0] = (yyvsp[0].node);
1994 #line 1995 "nasl_grammar.tab.c" 1998 #line 393 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2002 #line 2003 "nasl_grammar.tab.c" 2006 #line 396 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2008 #line 2009 "nasl_grammar.tab.c" 2012 #line 397 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2014 #line 2015 "nasl_grammar.tab.c" 2018 #line 398 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2020 #line 2021 "nasl_grammar.tab.c" 2024 #line 399 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2026 #line 2027 "nasl_grammar.tab.c" 2030 #line 400 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2032 #line 2033 "nasl_grammar.tab.c" 2036 #line 401 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2038 #line 2039 "nasl_grammar.tab.c" 2042 #line 402 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2044 #line 2045 "nasl_grammar.tab.c" 2048 #line 403 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2050 #line 2051 "nasl_grammar.tab.c" 2054 #line 407 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2057 (yyval.
node)->x.str_val = (yyvsp[0].str);
2059 #line 2060 "nasl_grammar.tab.c" 2063 #line 412 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2064 { (yyval.
str) = strdup(
"x"); }
2065 #line 2066 "nasl_grammar.tab.c" 2069 #line 415 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2073 (yyval.
node)->x.str_val = (yyvsp[-3].str);
2074 (yyval.
node)->link[0] = (yyvsp[-1].node);
2076 #line 2077 "nasl_grammar.tab.c" 2080 #line 425 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2082 #line 2083 "nasl_grammar.tab.c" 2086 #line 426 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2088 #line 2089 "nasl_grammar.tab.c" 2092 #line 427 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2094 #line 2095 "nasl_grammar.tab.c" 2098 #line 428 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2100 #line 2101 "nasl_grammar.tab.c" 2104 #line 432 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2105 { (yyval.
node) = (yyvsp[-1].node); }
2106 #line 2107 "nasl_grammar.tab.c" 2110 #line 433 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2112 #line 2113 "nasl_grammar.tab.c" 2116 #line 434 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2118 #line 2119 "nasl_grammar.tab.c" 2122 #line 435 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2124 #line 2125 "nasl_grammar.tab.c" 2128 #line 436 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2130 #line 2131 "nasl_grammar.tab.c" 2134 #line 437 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2136 #line 2137 "nasl_grammar.tab.c" 2140 #line 438 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2142 #line 2143 "nasl_grammar.tab.c" 2146 #line 439 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2148 #line 2149 "nasl_grammar.tab.c" 2152 #line 440 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2154 #line 2155 "nasl_grammar.tab.c" 2158 #line 441 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2160 #line 2161 "nasl_grammar.tab.c" 2164 #line 442 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2166 #line 2167 "nasl_grammar.tab.c" 2170 #line 443 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2172 #line 2173 "nasl_grammar.tab.c" 2176 #line 444 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2178 #line 2179 "nasl_grammar.tab.c" 2182 #line 445 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2184 #line 2185 "nasl_grammar.tab.c" 2188 #line 446 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2190 #line 2191 "nasl_grammar.tab.c" 2194 #line 447 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2196 #line 2197 "nasl_grammar.tab.c" 2200 #line 448 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2202 #line 2203 "nasl_grammar.tab.c" 2206 #line 449 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2208 #line 2209 "nasl_grammar.tab.c" 2212 #line 451 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2214 #line 2215 "nasl_grammar.tab.c" 2218 #line 452 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2220 #line 2221 "nasl_grammar.tab.c" 2224 #line 453 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2226 #line 2227 "nasl_grammar.tab.c" 2230 #line 454 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2232 #line 2233 "nasl_grammar.tab.c" 2236 #line 455 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2238 #line 2239 "nasl_grammar.tab.c" 2242 #line 456 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2244 #line 2245 "nasl_grammar.tab.c" 2248 #line 457 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2250 #line 2251 "nasl_grammar.tab.c" 2254 #line 458 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2256 #line 2257 "nasl_grammar.tab.c" 2260 #line 459 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2262 #line 2263 "nasl_grammar.tab.c" 2266 #line 460 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2268 #line 2269 "nasl_grammar.tab.c" 2272 #line 464 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2274 #line 2275 "nasl_grammar.tab.c" 2278 #line 466 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2279 { (yyval.
node) = (yyvsp[0].node); }
2280 #line 2281 "nasl_grammar.tab.c" 2284 #line 467 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2286 (yyvsp[-2].node)->link[1] = (yyvsp[0].node); (yyval.
node) = (yyvsp[-2].node);
2288 #line 2289 "nasl_grammar.tab.c" 2292 #line 471 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2295 (yyval.
node)->link[0] = (yyvsp[0].node);
2297 #line 2298 "nasl_grammar.tab.c" 2301 #line 474 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2304 (yyval.
node)->link[0] = (yyvsp[0].node);
2307 #line 2308 "nasl_grammar.tab.c" 2311 #line 480 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2313 #line 2314 "nasl_grammar.tab.c" 2317 #line 481 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2320 (yyval.
node)->size = strlen((yyvsp[0].str));
2322 #line 2323 "nasl_grammar.tab.c" 2326 #line 485 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2329 (yyval.
node)->size = (yyvsp[0].data).len;
2331 #line 2332 "nasl_grammar.tab.c" 2335 #line 493 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2339 (yyval.
node)->x.str_val = (yyvsp[0].str);
2341 #line 2342 "nasl_grammar.tab.c" 2345 #line 503 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2347 char *s = g_strdup_printf (
"%ld.%ld.%ld.%ld", (yyvsp[-6].num), (yyvsp[-4].num), (yyvsp[-2].num), (yyvsp[0].num));
2350 (yyval.
node)->x.str_val = s;
2351 (yyval.
node)->size = strlen(s);
2353 #line 2354 "nasl_grammar.tab.c" 2357 #line 513 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2361 (yyval.
node)->link[0] = (yyvsp[0].node);
2363 #line 2364 "nasl_grammar.tab.c" 2367 #line 521 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2371 (yyval.
node)->link[0] = (yyvsp[0].node);
2373 #line 2374 "nasl_grammar.tab.c" 2377 #line 2378 "nasl_grammar.tab.c" 2406 if (0 <= yystate && yystate <=
YYLAST &&
yycheck[yystate] == *yyssp)
2426 #if ! YYERROR_VERBOSE 2429 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 2432 char const *yymsgp =
YY_(
"syntax error");
2433 int yysyntax_error_status;
2435 if (yysyntax_error_status == 0)
2437 else if (yysyntax_error_status == 1)
2439 if (yymsg != yymsgbuf)
2445 yymsg_alloc =
sizeof yymsgbuf;
2446 yysyntax_error_status = 2;
2455 if (yysyntax_error_status == 2)
2456 goto yyexhaustedlab;
2458 # undef YYSYNTAX_ERROR 2464 if (yyerrstatus == 3)
2469 if (yychar <=
YYEOF)
2472 if (yychar ==
YYEOF)
2478 yytoken, &yylval, parm);
2534 yystos[yystate], yyvsp, parm);
2566 #if !defined yyoverflow || YYERROR_VERBOSE 2583 yytoken, &yylval, parm);
2589 while (yyssp != yyss)
2592 yystos[*yyssp], yyvsp, parm);
2600 if (yymsg != yymsgbuf)
2605 #line 527 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y" 2610 #include <gvm/base/logging.h> 2611 #include <gvm/base/prefs.h> 2619 g_message (
"%s", s);
2650 struct stat stat_buf;
2652 if (stat (dir, &stat_buf) != 0)
2655 if (S_ISDIR(stat_buf.st_mode) != 0)
2669 static int loaded = 0;
2670 const char *base, *
prefix;
2671 char filename[2048], *fbuffer;
2678 base = prefs_get (
"plugins_folder");
2679 snprintf (filename,
sizeof (filename),
"%s/sha256sums", base);
2680 if (g_file_get_contents (filename, &fbuffer, &flen, NULL))
2684 snprintf (filename,
sizeof (filename),
"%s/md5sums", base);
2685 if (g_file_get_contents (filename, &fbuffer, &flen, NULL))
2690 g_warning (
"No plugins checksums file");
2696 g_warning (
"Erroneous or missing signature for checksums file %s",
2704 file = fopen (filename,
"r");
2707 g_warning (
"%s: Couldn't read file %s", __FUNCTION__, filename);
2712 kb_del_items (kb,
"md5sums:*");
2717 kb_del_items (kb,
"sha256sums:*");
2722 char buffer[2048], **splits;
2723 if (!fgets (buffer,
sizeof (buffer), file))
2725 if (strstr (buffer,
".asc")
2726 || (!strstr (buffer,
".inc") && !strstr (buffer,
".nasl")))
2728 splits = g_strsplit (buffer,
" ", -1);
2729 if (g_strv_length (splits) != 2)
2731 g_warning (
"%s: Erroneous checksum entry %s", __FUNCTION__, buffer);
2732 g_strfreev (splits);
2735 splits[1][strlen (splits[1]) - 1] =
'\0';
2736 if (strstr (splits[1],
".inc"))
2737 g_snprintf (buffer,
sizeof (buffer),
"%s:%s",
prefix,
2738 basename (splits[1]));
2740 g_snprintf (buffer,
sizeof (buffer),
"%s:%s/%s",
prefix, base,
2742 kb_item_set_str (kb, buffer, splits[0], 0);
2743 g_strfreev (splits);
2759 char *content = NULL, digest[128], *result;
2760 size_t len = 0, i, alglen;
2762 assert (algorithm == GCRY_MD_MD5 || algorithm == GCRY_MD_SHA256);
2763 if (!filename || !g_file_get_contents (filename, &content, &len, NULL))
2766 gcry_md_hash_buffer (algorithm, digest, content, len);
2767 alglen = gcry_md_get_algo_dlen (algorithm);
2768 result = g_malloc0 (alglen * 2 + 1);
2769 for (i = 0; i < alglen; i++)
2770 snprintf (result + 2 * i, 3,
"%02x", (
unsigned char) digest[i]);
2794 char *full_name = NULL, key_path[2048], *checksum, *filename;
2814 while (inc_dir != NULL) {
2817 full_name = g_build_filename(inc_dir->data,
name, NULL);
2819 if ((g_file_get_contents (full_name, &pc->
buffer, &flen, NULL)))
2822 inc_dir = g_slist_next(inc_dir);
2825 if (!full_name || !pc->
buffer) {
2826 g_message (
"%s: Not able to open nor to locate it in include paths",
2839 if (strstr (full_name,
".inc"))
2840 filename = basename (full_name);
2842 filename = full_name;
2843 snprintf (key_path,
sizeof (key_path),
"signaturecheck:%s", filename);
2844 timestamp = kb_item_get_int (pc->
kb, key_path);
2847 struct stat file_stat;
2849 if (stat (full_name, &file_stat) >= 0 && timestamp > file_stat.st_mtime)
2861 snprintf (key_path,
sizeof (key_path),
"md5sums:%s", filename);
2863 snprintf (key_path,
sizeof (key_path),
"sha256sums:%s", filename);
2866 checksum = kb_item_get_str (pc->
kb, key_path);
2869 g_warning (
"No checksum for %s", full_name);
2878 ret = strcmp (check, checksum);
2880 g_warning (
"checksum for %s not matching", full_name);
2883 snprintf (key_path,
sizeof (key_path),
"signaturecheck:%s", filename);
2884 kb_item_add_int (pc->
kb, key_path, time (NULL));
2965 else if (isalpha(c) || c ==
'_')
2971 else if (isspace(c))
2975 else if (isdigit(c))
3043 *p++ =
'\f'; len ++;
3046 *p++ =
'\t'; len ++;
3052 *p++ =
'\v'; len ++;
3055 *p ++ =
'"'; len ++;
3067 for (i = 0; i < 2; i ++)
3072 nasl_perror(NULL,
"Unfinished \\x escape sequence (EOF)\n");
3079 if (c >=
'0' && c <=
'9')
3080 x = x * 16 + (c -
'0');
3081 else if (c >=
'a' && c <=
'f')
3082 x = x * 16 + 10 + (c -
'a');
3085 nasl_perror(NULL,
"Unfinished \\x escape sequence\n");
3096 nasl_perror(NULL,
"Unknown escape sequence \\%c\n", c);
3109 if (isalnum(c) || c ==
'_')
3125 if (c ==
'x' || c ==
'X')
3127 else if (isdigit(c))
3237 if (! isprint(c)) c =
'.';
3238 g_message (
"lexer error: invalid token >!%c " 3239 "parsed as >!< %c", c, c);
3432 lvalp->
data.
val = g_malloc0 (len+2);
3492 nasl_perror(NULL,
"Invalid token 0x parsed as 0 at line %d\n",
3506 int x =
mylex (lvalp, parm);
static int yysyntax_error(YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken)
static void load_checksums(kb_t kb)
#define YY_INITIAL_VALUE(Value)
const char * nasl_get_filename(const char *function)
void ref_cell(tree_cell *c)
static void yy_stack_print(yytype_int16 *yybottom, yytype_int16 *yytop)
static int nasllex(YYSTYPE *lvalp, void *parm)
static int checksum_algorithm
static const yytype_uint16 yyrline[]
void nasl_clean_ctx(naslctxt *c)
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
struct YYSTYPE::asciiz data
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep, naslctxt *parm)
static const yytype_int16 yypgoto[]
void nasl_clean_inc(void)
static const yytype_int16 yypact[]
tree_cell * make_array_from_elems(tree_cell *el)
static const yytype_int16 yycheck[]
void deref_cell(tree_cell *c)
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
static void yy_symbol_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep, naslctxt *parm)
#define yypact_value_is_default(Yystate)
static YYSIZE_T yystrlen(const char *yystr)
unsigned short int yytype_uint16
#define yytable_value_is_error(Yytable_value)
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
void nasl_set_filename(const char *filename)
static const yytype_uint8 yystos[]
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
tree_cell * alloc_typed_cell(int typ)
static const yytype_uint8 yyr2[]
int add_nasl_inc_dir(const char *dir)
Adds the given string as directory for searching for includes.
tree_cell * alloc_RE_cell(int lnb, int t, tree_cell *l, char *re_str)
static const yytype_uint8 yydefact[]
#define YY_REDUCE_PRINT(Rule)
static void yy_symbol_value_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep, naslctxt *parm)
static const yytype_int16 yytable[]
static const char *const yytname[]
static char * parse_buffer
static int mylex(YYSTYPE *lvalp, void *parm)
static const yytype_int16 yydefgoto[]
static YYSIZE_T yytnamerr(char *yyres, const char *yystr)
static char * yystpcpy(char *yydest, const char *yysrc)
static void yy_reduce_print(yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, naslctxt *parm)
void nasl_perror(lex_ctxt *lexic, char *msg,...)
int nasl_verify_signature(const char *filename)
int naslparse(naslctxt *parm)
static const yytype_uint8 yyr1[]
unsigned char yytype_uint8
static void naslerror(naslctxt *, const char *)
void nasl_set_function_filename(const char *function)
static const yytype_uint8 yytranslate[]
#define YYSTACK_ALLOC_MAXIMUM
static void prefix(int n, int i)
tree_cell * alloc_expr_cell(int lnb, int t, tree_cell *l, tree_cell *r)
GHashTable * includes_hash
#define YY_STACK_PRINT(Bottom, Top)
static char * file_checksum(const char *filename, int algorithm)
Get the checksum of a file.
int init_nasl_ctx(naslctxt *pc, const char *name)
Initialize a NASL context for a NASL file.