52 #define YYBISON_VERSION "3.7.2"
55 #define YYSKELETON_NAME "yacc.c"
68 #define yyparse naslparse
70 #define yyerror naslerror
71 #define yydebug nasldebug
72 #define yynerrs naslnerrs
75 #line 12 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
78 #define YYPARSE_PARAM parm
79 #define YYLEX_PARAM parm
80 #define YYPARSE_ERRC err_c
81 #define YYLEX_ERRC err_c
83 #define LNB (((naslctxt*)parm)->line_nb)
84 #define LN (((naslctxt*)parm)->name)
94 #include "../misc/plugutils.h"
107 #define G_LOG_DOMAIN "lib nasl"
118 #define YYERROR_VERBOSE
120 #line 121 "nasl_grammar.tab.c"
124 # define YY_CAST(Type, Val) static_cast<Type> (Val)
125 # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
127 # define YY_CAST(Type, Val) ((Type) (Val))
128 # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
132 # if defined __cplusplus
133 # if 201103L <= __cplusplus
134 # define YY_NULLPTR nullptr
136 # define YY_NULLPTR 0
139 # define YY_NULLPTR ((void*)0)
269 #line 67 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
273 #line 274 "nasl_grammar.tab.c"
284 #ifndef __PTRDIFF_MAX__
286 # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
297 #ifdef __INT_LEAST8_MAX__
299 #elif defined YY_STDINT_H
305 #ifdef __INT_LEAST16_MAX__
307 #elif defined YY_STDINT_H
313 #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
315 #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
316 && UINT_LEAST8_MAX <= INT_MAX)
318 #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
324 #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
326 #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
327 && UINT_LEAST16_MAX <= INT_MAX)
329 #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
336 # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
337 # define YYPTRDIFF_T __PTRDIFF_TYPE__
338 # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
339 # elif defined PTRDIFF_MAX
343 # define YYPTRDIFF_T ptrdiff_t
344 # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
346 # define YYPTRDIFF_T long
347 # define YYPTRDIFF_MAXIMUM LONG_MAX
352 # ifdef __SIZE_TYPE__
353 # define YYSIZE_T __SIZE_TYPE__
354 # elif defined size_t
355 # define YYSIZE_T size_t
356 # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
358 # define YYSIZE_T size_t
360 # define YYSIZE_T unsigned
364 #define YYSIZE_MAXIMUM \
365 YY_CAST (YYPTRDIFF_T, \
366 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
367 ? YYPTRDIFF_MAXIMUM \
368 : YY_CAST (YYSIZE_T, -1)))
370 #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
380 # if defined YYENABLE_NLS && YYENABLE_NLS
382 # include <libintl.h>
383 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
387 # define YY_(Msgid) Msgid
392 #ifndef YY_ATTRIBUTE_PURE
393 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
394 # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
396 # define YY_ATTRIBUTE_PURE
400 #ifndef YY_ATTRIBUTE_UNUSED
401 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
402 # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
404 # define YY_ATTRIBUTE_UNUSED
409 #if ! defined lint || defined __GNUC__
410 # define YYUSE(E) ((void) (E))
415 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
417 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
418 _Pragma ("GCC diagnostic push") \
419 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
420 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
421 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
422 _Pragma ("GCC diagnostic pop")
424 # define YY_INITIAL_VALUE(Value) Value
426 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
427 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
428 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
430 #ifndef YY_INITIAL_VALUE
431 # define YY_INITIAL_VALUE(Value)
434 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
435 # define YY_IGNORE_USELESS_CAST_BEGIN \
436 _Pragma ("GCC diagnostic push") \
437 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
438 # define YY_IGNORE_USELESS_CAST_END \
439 _Pragma ("GCC diagnostic pop")
441 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
442 # define YY_IGNORE_USELESS_CAST_BEGIN
443 # define YY_IGNORE_USELESS_CAST_END
447 #define YY_ASSERT(E) ((void) (0 && (E)))
449 #if !defined yyoverflow
453 # ifdef YYSTACK_USE_ALLOCA
454 # if YYSTACK_USE_ALLOCA
456 # define YYSTACK_ALLOC __builtin_alloca
457 # elif defined __BUILTIN_VA_ARG_INCR
460 # define YYSTACK_ALLOC __alloca
461 # elif defined _MSC_VER
463 # define alloca _alloca
465 # define YYSTACK_ALLOC alloca
466 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
469 # ifndef EXIT_SUCCESS
470 # define EXIT_SUCCESS 0
477 # ifdef YYSTACK_ALLOC
479 # define YYSTACK_FREE(Ptr) do { ; } while (0)
480 # ifndef YYSTACK_ALLOC_MAXIMUM
485 # define YYSTACK_ALLOC_MAXIMUM 4032
488 # define YYSTACK_ALLOC YYMALLOC
489 # define YYSTACK_FREE YYFREE
490 # ifndef YYSTACK_ALLOC_MAXIMUM
491 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
493 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
494 && ! ((defined YYMALLOC || defined malloc) \
495 && (defined YYFREE || defined free)))
497 # ifndef EXIT_SUCCESS
498 # define EXIT_SUCCESS 0
502 # define YYMALLOC malloc
503 # if ! defined malloc && ! defined EXIT_SUCCESS
509 # if ! defined free && ! defined EXIT_SUCCESS
516 #if (! defined yyoverflow \
517 && (! defined __cplusplus \
518 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
528 # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
532 # define YYSTACK_BYTES(N) \
533 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
534 + YYSTACK_GAP_MAXIMUM)
536 # define YYCOPY_NEEDED 1
543 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
546 YYPTRDIFF_T yynewbytes; \
547 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
548 Stack = &yyptr->Stack_alloc; \
549 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
550 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
556 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
560 # if defined __GNUC__ && 1 < __GNUC__
561 # define YYCOPY(Dst, Src, Count) \
562 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
564 # define YYCOPY(Dst, Src, Count) \
568 for (yyi = 0; yyi < (Count); yyi++) \
569 (Dst)[yyi] = (Src)[yyi]; \
588 #define YYNSTATES 229
591 #define YYMAXUTOK 304
596 #define YYTRANSLATE(YYX) \
597 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
598 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
605 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
606 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
607 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
608 2, 2, 2, 70, 2, 2, 2, 57, 52, 2,
609 61, 62, 55, 53, 63, 54, 72, 56, 2, 2,
610 2, 2, 2, 2, 2, 2, 2, 2, 67, 66,
611 48, 47, 49, 2, 2, 2, 2, 2, 2, 2,
612 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
613 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
614 2, 68, 2, 69, 51, 2, 2, 2, 2, 2,
615 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
616 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
617 2, 2, 2, 64, 50, 65, 71, 2, 2, 2,
618 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
619 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
620 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
621 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
622 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
623 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
624 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
625 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
626 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
627 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
628 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
629 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
630 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
631 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
632 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
633 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
634 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
642 0, 152, 152, 157, 163, 170, 170, 173, 184, 184,
643 185, 192, 202, 202, 203, 204, 219, 219, 219, 219,
644 220, 224, 224, 224, 225, 225, 225, 225, 225, 226,
645 231, 236, 239, 246, 254, 261, 270, 270, 270, 270,
646 271, 282, 290, 299, 310, 310, 310, 310, 313, 322,
647 322, 325, 385, 394, 394, 395, 395, 401, 408, 418,
648 422, 423, 424, 425, 426, 427, 428, 429, 432, 436,
649 438, 438, 440, 448, 451, 452, 453, 454, 458, 459,
650 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
651 470, 471, 472, 473, 474, 475, 476, 477, 478, 479,
652 480, 481, 482, 483, 484, 485, 486, 487, 487, 487,
653 487, 487, 490, 492, 493, 497, 500, 506, 507, 511,
654 516, 518, 524, 524, 526, 528, 538, 546
659 #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
670 "\"end of file\"",
"error",
"\"invalid token\"",
"IF",
"ELSE",
"EQ",
671 "NEQ",
"SUPEQ",
"INFEQ",
"OR",
"AND",
"MATCH",
"NOMATCH",
"REP",
"FOR",
672 "REPEAT",
"UNTIL",
"FOREACH",
"WHILE",
"BREAK",
"CONTINUE",
"FUNCTION",
673 "RETURN",
"INCLUDE",
"LOCAL",
"GLOBAL",
"PLUS_PLUS",
"MINUS_MINUS",
674 "L_SHIFT",
"R_SHIFT",
"R_USHIFT",
"EXPO",
"PLUS_EQ",
"MINUS_EQ",
675 "MULT_EQ",
"DIV_EQ",
"MODULO_EQ",
"L_SHIFT_EQ",
"R_SHIFT_EQ",
676 "R_USHIFT_EQ",
"RE_MATCH",
"RE_NOMATCH",
"ARROW",
"IDENT",
"STRING1",
677 "STRING2",
"INTEGER",
"'='",
"'<'",
"'>'",
"'|'",
"'^'",
"'&'",
"'+'",
678 "'-'",
"'*'",
"'/'",
"'%'",
"NOT",
"UMINUS",
"BIT_NOT",
"'('",
"')'",
679 "','",
"'{'",
"'}'",
"';'",
"':'",
"'['",
"']'",
"'!'",
"'~'",
"'.'",
680 "$accept",
"tiptop",
"instr_decl_list",
"instr_decl",
"func_decl",
681 "arg_decl",
"arg_decl_1",
"block",
"instr_list",
"instr",
"simple_instr",
682 "ret",
"if_block",
"loop",
"for_loop",
"while_loop",
"repeat_loop",
683 "foreach_loop",
"aff_func",
"rep",
"string",
"inc",
"func_call",
684 "arg_list",
"arg_list_1",
"arg",
"aff",
"lvalue",
"identifier",
685 "array_elem",
"array_index",
"post_pre_incr",
"expr",
"const_array",
686 "list_array_data",
"array_data",
"atom",
"simple_array_data",
"var",
687 "var_name",
"ipaddr",
"loc",
"glob",
YY_NULLPTR
702 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
703 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
704 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
705 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
706 295, 296, 297, 298, 299, 300, 301, 61, 60, 62,
707 124, 94, 38, 43, 45, 42, 47, 37, 302, 303,
708 304, 40, 41, 44, 123, 125, 59, 58, 91, 93,
713 #define YYPACT_NINF (-77)
715 #define yypact_value_is_default(Yyn) \
716 ((Yyn) == YYPACT_NINF)
718 #define YYTABLE_NINF (-70)
720 #define yytable_value_is_error(Yyn) \
721 ((Yyn) == YYTABLE_NINF)
727 340, -57, -35, -77, -27, 427, -5, -15, -77, -77,
728 -5, 538, -13, -5, -5, -5, -5, -77, 373, 50,
729 -77, 111, -77, -77, -77, -12, -77, -77, -77, -77,
730 -77, -77, -77, -77, -77, 38, -77, 507, -39, -77,
731 -77, -77, -77, -77, 538, -2, 48, -8, 538, 16,
732 -77, -77, -16, 538, 538, 40, 538, 538, -77, -77,
733 124, 592, -77, 837, -77, -77, -77, -77, -77, -1,
734 -77, -77, 15, -77, -77, -3, -77, -77, 25, 400,
735 -77, -77, -77, 538, -77, -77, 538, 538, 538, 538,
736 538, 538, 538, 538, 538, 538, 538, 605, 26, -77,
737 -77, -77, 538, 538, 663, -5, 34, 65, 721, 56,
738 57, -77, 58, 32, 39, -77, -77, 65, 65, 538,
739 538, 538, 538, 538, 538, 538, 538, 538, 538, 538,
740 538, -1, -1, 538, 538, 538, 538, 538, 538, 538,
741 538, 538, 538, -77, -77, 44, -5, -77, -77, 837,
742 837, 837, 837, 837, 837, 837, 837, 837, 837, 45,
743 -77, 46, 36, 837, 49, 837, 427, 538, 466, 779,
744 427, 51, 47, -77, 43, -77, 40, 921, 921, 921,
745 921, 890, 952, 921, 921, 160, 160, 160, 65, -77,
746 -77, 921, 921, 404, 316, 240, 4, 4, 65, 65,
747 65, -77, -77, -77, 538, 538, -77, 104, 519, -77,
748 427, -77, 53, 69, -77, -77, -77, 837, 427, -2,
749 -77, -77, 55, -77, 59, 77, 427, -77, -77
757 0, 0, 0, 71, 0, 0, 0, 0, 29, 30,
758 0, 33, 0, 8, 8, 0, 0, 70, 0, 0,
759 2, 0, 6, 17, 5, 0, 25, 18, 19, 36,
760 37, 38, 39, 23, 26, 24, 21, 0, 68, 69,
761 22, 27, 28, 20, 0, 47, 0, 0, 0, 0,
762 119, 118, 117, 0, 0, 0, 0, 0, 123, 108,
763 124, 122, 96, 32, 111, 110, 107, 121, 109, 0,
764 126, 9, 10, 127, 74, 68, 75, 13, 0, 0,
765 1, 4, 16, 0, 76, 77, 0, 0, 0, 0,
766 0, 0, 0, 0, 0, 54, 0, 0, 0, 46,
767 44, 45, 0, 0, 0, 8, 0, 84, 0, 119,
768 118, 117, 0, 0, 113, 120, 115, 80, 85, 0,
769 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
770 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
771 0, 0, 0, 49, 50, 0, 0, 12, 15, 48,
772 60, 61, 62, 63, 64, 67, 65, 66, 59, 0,
773 53, 55, 124, 57, 0, 73, 0, 0, 0, 0,
774 0, 0, 0, 78, 0, 112, 0, 103, 104, 105,
775 106, 81, 79, 97, 98, 95, 93, 94, 87, 99,
776 100, 101, 102, 92, 91, 90, 82, 83, 86, 88,
777 89, 51, 11, 52, 0, 0, 72, 34, 0, 42,
778 0, 41, 0, 0, 116, 114, 56, 58, 0, 47,
779 43, 7, 0, 35, 0, 0, 0, 125, 40
785 -77, -77, 118, -77, -77, -11, -6, -71, 63, 14,
786 -77, -77, -77, -77, -77, -77, -77, -77, -76, -77,
787 -65, -77, 2, -77, -60, -77, 31, 24, 0, 12,
788 -77, 37, 189, -77, -31, -77, -54, -26, -77, -77,
795 -1, 19, 20, 21, 22, 70, 71, 23, 78, 24,
796 25, 26, 27, 28, 29, 30, 31, 32, 98, 33,
797 112, 34, 58, 159, 160, 161, 59, 37, 60, 61,
798 164, 62, 163, 64, 113, 114, 65, 116, 66, 67,
807 38, 115, 35, 73, 145, 38, 47, 35, 3, 43,
808 49, 3, 39, 72, 72, 75, 75, 39, 38, 46,
809 35, 38, 95, 35, 15, 16, 44, 39, 39, 96,
810 39, 36, 79, 39, 45, 130, 36, 40, 17, 74,
811 76, 17, 40, 143, 144, 38, 48, 99, 69, 36,
812 80, 83, 36, 103, 82, 40, 106, 39, 40, 140,
813 141, 142, -68, -68, 102, 96, 189, 190, -68, -68,
814 -68, -68, -68, -68, -68, -68, 100, 105, 146, 38,
815 172, 35, 101, -68, 109, 110, 111, 50, 51, 111,
816 147, 39, 167, 79, 171, 162, 130, 95, -49, -50,
817 174, 175, 176, 205, 96, 72, 201, 203, 218, 204,
818 36, -3, 1, 212, 2, 222, 40, 18, 206, 213,
819 115, 226, 115, 227, 3, 4, 5, 225, 6, 7,
820 8, 9, 10, 11, 12, 13, 14, 15, 16, 81,
821 202, 221, 148, 224, 216, 215, 72, 0, 214, 0,
822 -68, -68, 0, 0, 17, 0, -68, -68, -68, -68,
823 -68, -68, -68, -68, 0, 0, 38, 0, 35, 0,
824 38, -68, 35, 0, 0, 18, 0, -31, 39, 0,
825 207, 0, 39, 0, 211, 95, 0, 0, -70, -70,
826 -70, 130, 96, 0, 0, 0, 0, 36, 0, 0,
827 63, 36, 0, 40, 162, 0, 0, 40, 0, 0,
828 38, 0, 35, 138, 139, 140, 141, 142, 38, 38,
829 35, 99, 39, 0, 220, 0, 38, 0, 35, 0,
830 39, 39, 223, 97, 0, 0, 0, 104, 39, 0,
831 228, 36, 107, 108, 0, 117, 118, 40, 0, 36,
832 100, 0, 0, 0, 0, 40, 101, 36, 0, 0,
833 0, 0, 0, 40, 0, 0, 0, 0, 127, 128,
834 129, 130, 149, 0, 0, 150, 151, 152, 153, 154,
835 155, 156, 157, 158, 0, 165, 0, 0, 0, 0,
836 0, 168, 169, 138, 139, 140, 141, 142, 0, 0,
837 0, 0, 0, 0, 0, 0, 0, 0, 177, 178,
838 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
839 0, 0, 191, 192, 193, 194, 195, 196, 197, 198,
840 199, 200, 0, 0, 0, 0, 0, 0, 0, 0,
841 0, 1, 0, 2, 127, 128, 129, 130, 0, 0,
842 0, 0, 0, 3, 4, 5, 208, 6, 7, 8,
843 9, 10, 11, 12, 13, 14, 15, 16, 137, 138,
844 139, 140, 141, 142, 1, 0, 2, 0, 0, 0,
845 0, 0, 0, 17, 0, 0, 3, 4, 5, 0,
846 6, 7, 8, 9, 217, 11, 12, 13, 14, 15,
847 16, 1, 0, 2, 18, 0, -31, 0, 0, 0,
848 0, 0, 0, 3, 4, 5, 17, 6, 7, 8,
849 9, 0, 11, 12, 13, 14, 15, 16, 1, 0,
850 2, 0, 127, 128, 129, 130, 0, 18, 77, -31,
851 3, 4, 5, 17, 6, 7, 8, 9, 0, 11,
852 12, 13, 14, 15, 16, 136, 137, 138, 139, 140,
853 141, 142, 0, 0, 18, -14, -31, 0, 0, 0,
854 17, 119, 120, 121, 122, 123, 124, 125, 126, 0,
855 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
856 0, 18, 0, -31, 127, 128, 129, 130, 0, 0,
857 0, 0, 0, 0, 0, 0, 131, 132, 0, 0,
858 0, 0, 0, 0, 133, 134, 135, 136, 137, 138,
859 139, 140, 141, 142, 119, 120, 121, 122, 123, 124,
860 125, 126, 209, 84, 85, 0, 0, 0, 0, 86,
861 87, 88, 89, 90, 91, 92, 93, 127, 128, 129,
862 130, 3, 0, 0, 94, 0, 0, 0, 0, 131,
863 132, 0, 0, 0, 15, 16, 0, 133, 134, 135,
864 136, 137, 138, 139, 140, 141, 142, 0, 0, 0,
865 0, 17, 50, 51, 52, 219, 0, 0, 0, 0,
866 0, 0, 53, 0, 0, 0, 0, 0, 0, 54,
867 0, 0, 0, 0, 0, 0, 55, 0, 56, 57,
868 119, 120, 121, 122, 123, 124, 125, 126, -69, -69,
869 0, 0, 0, 0, -69, -69, -69, -69, -69, -69,
870 -69, -69, 0, 127, 128, 129, 130, 0, 0, -69,
871 0, 0, 0, 0, 0, 131, 132, 0, 0, 0,
872 0, 0, 0, 133, 134, 135, 136, 137, 138, 139,
873 140, 141, 142, 0, 0, 0, 0, 166, 119, 120,
874 121, 122, 123, 124, 125, 126, 0, 0, 0, 0,
875 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
876 0, 127, 128, 129, 130, 0, 0, 0, 0, 0,
877 0, 0, 0, 131, 132, 0, 0, 0, 0, 0,
878 0, 133, 134, 135, 136, 137, 138, 139, 140, 141,
879 142, 0, 0, 0, 0, 170, 119, 120, 121, 122,
880 123, 124, 125, 126, 0, 0, 0, 0, 0, 0,
881 0, 0, 0, 0, 0, 0, 0, 0, 0, 127,
882 128, 129, 130, 0, 0, 0, 0, 0, 0, 0,
883 0, 131, 132, 0, 0, 0, 0, 0, 0, 133,
884 134, 135, 136, 137, 138, 139, 140, 141, 142, 0,
885 0, 0, 0, 173, 119, 120, 121, 122, 123, 124,
886 125, 126, 0, 0, 0, 0, 0, 0, 0, 0,
887 0, 0, 0, 0, 0, 0, 0, 127, 128, 129,
888 130, 0, 0, 0, 0, 0, 0, 0, 0, 131,
889 132, 0, 0, 0, 0, 0, 0, 133, 134, 135,
890 136, 137, 138, 139, 140, 141, 142, 0, 0, 0,
891 0, 210, 119, 120, 121, 122, 123, 124, 125, 126,
892 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
893 0, 0, 0, 0, 0, 127, 128, 129, 130, 0,
894 0, 0, 0, 0, 0, 0, 0, 131, 132, 0,
895 0, 0, 0, 0, 0, 133, 134, 135, 136, 137,
896 138, 139, 140, 141, 142, 119, 120, 121, 122, 0,
897 124, 125, 126, 0, 0, 0, 0, 0, 0, 0,
898 0, 0, 0, 0, 0, 0, 0, 0, 127, 128,
899 129, 130, 0, 0, 0, 0, -70, -70, -70, -70,
900 131, 132, -70, -70, 0, 0, 0, 0, 133, 134,
901 135, 136, 137, 138, 139, 140, 141, 142, 0, 127,
902 128, 129, 130, 0, 0, 0, 0, 119, 120, 121,
903 122, -70, -70, 125, 126, 0, 0, 0, 0, -70,
904 -70, 135, 136, 137, 138, 139, 140, 141, 142, 0,
905 127, 128, 129, 130, 0, 0, 0, 0, 0, 0,
906 0, 0, 131, 132, 0, 0, 0, 0, 0, 0,
907 133, 134, 135, 136, 137, 138, 139, 140, 141, 142
912 0, 55, 0, 14, 69, 5, 6, 5, 13, 66,
913 10, 13, 0, 13, 14, 15, 16, 5, 18, 5,
914 18, 21, 61, 21, 26, 27, 61, 15, 16, 68,
915 18, 0, 18, 21, 61, 31, 5, 0, 43, 15,
916 16, 43, 5, 44, 45, 45, 61, 45, 61, 18,
917 0, 13, 21, 61, 66, 18, 72, 45, 21, 55,
918 56, 57, 26, 27, 16, 68, 131, 132, 32, 33,
919 34, 35, 36, 37, 38, 39, 45, 61, 63, 79,
920 46, 79, 45, 47, 44, 45, 46, 44, 45, 46,
921 65, 79, 66, 79, 105, 95, 31, 61, 42, 42,
922 42, 69, 63, 67, 68, 105, 62, 62, 4, 63,
923 79, 0, 1, 62, 3, 46, 79, 64, 69, 72,
924 174, 62, 176, 46, 13, 14, 15, 72, 17, 18,
925 19, 20, 21, 22, 23, 24, 25, 26, 27, 21,
926 146, 212, 79, 219, 204, 176, 146, -1, 174, -1,
927 26, 27, -1, -1, 43, -1, 32, 33, 34, 35,
928 36, 37, 38, 39, -1, -1, 166, -1, 166, -1,
929 170, 47, 170, -1, -1, 64, -1, 66, 166, -1,
930 166, -1, 170, -1, 170, 61, -1, -1, 28, 29,
931 30, 31, 68, -1, -1, -1, -1, 166, -1, -1,
932 11, 170, -1, 166, 204, -1, -1, 170, -1, -1,
933 210, -1, 210, 53, 54, 55, 56, 57, 218, 219,
934 218, 219, 210, -1, 210, -1, 226, -1, 226, -1,
935 218, 219, 218, 44, -1, -1, -1, 48, 226, -1,
936 226, 210, 53, 54, -1, 56, 57, 210, -1, 218,
937 219, -1, -1, -1, -1, 218, 219, 226, -1, -1,
938 -1, -1, -1, 226, -1, -1, -1, -1, 28, 29,
939 30, 31, 83, -1, -1, 86, 87, 88, 89, 90,
940 91, 92, 93, 94, -1, 96, -1, -1, -1, -1,
941 -1, 102, 103, 53, 54, 55, 56, 57, -1, -1,
942 -1, -1, -1, -1, -1, -1, -1, -1, 119, 120,
943 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
944 -1, -1, 133, 134, 135, 136, 137, 138, 139, 140,
945 141, 142, -1, -1, -1, -1, -1, -1, -1, -1,
946 -1, 1, -1, 3, 28, 29, 30, 31, -1, -1,
947 -1, -1, -1, 13, 14, 15, 167, 17, 18, 19,
948 20, 21, 22, 23, 24, 25, 26, 27, 52, 53,
949 54, 55, 56, 57, 1, -1, 3, -1, -1, -1,
950 -1, -1, -1, 43, -1, -1, 13, 14, 15, -1,
951 17, 18, 19, 20, 205, 22, 23, 24, 25, 26,
952 27, 1, -1, 3, 64, -1, 66, -1, -1, -1,
953 -1, -1, -1, 13, 14, 15, 43, 17, 18, 19,
954 20, -1, 22, 23, 24, 25, 26, 27, 1, -1,
955 3, -1, 28, 29, 30, 31, -1, 64, 65, 66,
956 13, 14, 15, 43, 17, 18, 19, 20, -1, 22,
957 23, 24, 25, 26, 27, 51, 52, 53, 54, 55,
958 56, 57, -1, -1, 64, 65, 66, -1, -1, -1,
959 43, 5, 6, 7, 8, 9, 10, 11, 12, -1,
960 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
961 -1, 64, -1, 66, 28, 29, 30, 31, -1, -1,
962 -1, -1, -1, -1, -1, -1, 40, 41, -1, -1,
963 -1, -1, -1, -1, 48, 49, 50, 51, 52, 53,
964 54, 55, 56, 57, 5, 6, 7, 8, 9, 10,
965 11, 12, 66, 26, 27, -1, -1, -1, -1, 32,
966 33, 34, 35, 36, 37, 38, 39, 28, 29, 30,
967 31, 13, -1, -1, 47, -1, -1, -1, -1, 40,
968 41, -1, -1, -1, 26, 27, -1, 48, 49, 50,
969 51, 52, 53, 54, 55, 56, 57, -1, -1, -1,
970 -1, 43, 44, 45, 46, 66, -1, -1, -1, -1,
971 -1, -1, 54, -1, -1, -1, -1, -1, -1, 61,
972 -1, -1, -1, -1, -1, -1, 68, -1, 70, 71,
973 5, 6, 7, 8, 9, 10, 11, 12, 26, 27,
974 -1, -1, -1, -1, 32, 33, 34, 35, 36, 37,
975 38, 39, -1, 28, 29, 30, 31, -1, -1, 47,
976 -1, -1, -1, -1, -1, 40, 41, -1, -1, -1,
977 -1, -1, -1, 48, 49, 50, 51, 52, 53, 54,
978 55, 56, 57, -1, -1, -1, -1, 62, 5, 6,
979 7, 8, 9, 10, 11, 12, -1, -1, -1, -1,
980 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
981 -1, 28, 29, 30, 31, -1, -1, -1, -1, -1,
982 -1, -1, -1, 40, 41, -1, -1, -1, -1, -1,
983 -1, 48, 49, 50, 51, 52, 53, 54, 55, 56,
984 57, -1, -1, -1, -1, 62, 5, 6, 7, 8,
985 9, 10, 11, 12, -1, -1, -1, -1, -1, -1,
986 -1, -1, -1, -1, -1, -1, -1, -1, -1, 28,
987 29, 30, 31, -1, -1, -1, -1, -1, -1, -1,
988 -1, 40, 41, -1, -1, -1, -1, -1, -1, 48,
989 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
990 -1, -1, -1, 62, 5, 6, 7, 8, 9, 10,
991 11, 12, -1, -1, -1, -1, -1, -1, -1, -1,
992 -1, -1, -1, -1, -1, -1, -1, 28, 29, 30,
993 31, -1, -1, -1, -1, -1, -1, -1, -1, 40,
994 41, -1, -1, -1, -1, -1, -1, 48, 49, 50,
995 51, 52, 53, 54, 55, 56, 57, -1, -1, -1,
996 -1, 62, 5, 6, 7, 8, 9, 10, 11, 12,
997 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
998 -1, -1, -1, -1, -1, 28, 29, 30, 31, -1,
999 -1, -1, -1, -1, -1, -1, -1, 40, 41, -1,
1000 -1, -1, -1, -1, -1, 48, 49, 50, 51, 52,
1001 53, 54, 55, 56, 57, 5, 6, 7, 8, -1,
1002 10, 11, 12, -1, -1, -1, -1, -1, -1, -1,
1003 -1, -1, -1, -1, -1, -1, -1, -1, 28, 29,
1004 30, 31, -1, -1, -1, -1, 5, 6, 7, 8,
1005 40, 41, 11, 12, -1, -1, -1, -1, 48, 49,
1006 50, 51, 52, 53, 54, 55, 56, 57, -1, 28,
1007 29, 30, 31, -1, -1, -1, -1, 5, 6, 7,
1008 8, 40, 41, 11, 12, -1, -1, -1, -1, 48,
1009 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
1010 28, 29, 30, 31, -1, -1, -1, -1, -1, -1,
1011 -1, -1, 40, 41, -1, -1, -1, -1, -1, -1,
1012 48, 49, 50, 51, 52, 53, 54, 55, 56, 57
1019 0, 1, 3, 13, 14, 15, 17, 18, 19, 20,
1020 21, 22, 23, 24, 25, 26, 27, 43, 64, 74,
1021 75, 76, 77, 80, 82, 83, 84, 85, 86, 87,
1022 88, 89, 90, 92, 94, 95, 99, 100, 101, 102,
1023 104, 114, 115, 66, 61, 61, 82, 101, 61, 101,
1024 44, 45, 46, 54, 61, 68, 70, 71, 95, 99,
1025 101, 102, 104, 105, 106, 109, 111, 112, 113, 61,
1026 78, 79, 101, 78, 100, 101, 100, 65, 81, 82,
1027 0, 75, 66, 13, 26, 27, 32, 33, 34, 35,
1028 36, 37, 38, 39, 47, 61, 68, 105, 91, 95,
1029 99, 104, 16, 61, 105, 61, 72, 105, 105, 44,
1030 45, 46, 93, 107, 108, 109, 110, 105, 105, 5,
1031 6, 7, 8, 9, 10, 11, 12, 28, 29, 30,
1032 31, 40, 41, 48, 49, 50, 51, 52, 53, 54,
1033 55, 56, 57, 44, 45, 93, 63, 65, 81, 105,
1034 105, 105, 105, 105, 105, 105, 105, 105, 105, 96,
1035 97, 98, 101, 105, 103, 105, 62, 66, 105, 105,
1036 62, 78, 46, 62, 42, 69, 63, 105, 105, 105,
1037 105, 105, 105, 105, 105, 105, 105, 105, 105, 93,
1038 93, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1039 105, 62, 79, 62, 63, 67, 69, 82, 105, 66,
1040 62, 82, 62, 72, 110, 107, 97, 105, 4, 66,
1041 82, 80, 46, 82, 91, 72, 62, 46, 82
1047 0, 73, 74, 75, 75, 76, 76, 77, 78, 78,
1048 79, 79, 80, 80, 81, 81, 82, 82, 82, 82,
1049 82, 83, 83, 83, 83, 83, 83, 83, 83, 83,
1050 83, 83, 84, 84, 85, 85, 86, 86, 86, 86,
1051 87, 88, 89, 90, 91, 91, 91, 91, 92, 93,
1052 93, 94, 95, 96, 96, 97, 97, 98, 98, 99,
1053 99, 99, 99, 99, 99, 99, 99, 99, 100, 100,
1054 101, 101, 102, 103, 104, 104, 104, 104, 105, 105,
1055 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1056 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1057 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1058 105, 105, 106, 107, 107, 108, 108, 109, 109, 109,
1059 110, 111, 111, 111, 112, 113, 114, 115
1065 0, 2, 1, 1, 2, 1, 1, 6, 0, 1,
1066 1, 3, 3, 2, 1, 2, 2, 1, 1, 1,
1067 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1068 1, 0, 2, 1, 5, 7, 1, 1, 1, 1,
1069 9, 5, 5, 6, 1, 1, 1, 0, 3, 1,
1070 1, 4, 4, 1, 0, 1, 3, 1, 3, 3,
1071 3, 3, 3, 3, 3, 3, 3, 3, 1, 1,
1072 1, 1, 4, 1, 2, 2, 2, 2, 3, 3,
1073 2, 3, 3, 3, 2, 2, 3, 3, 3, 3,
1074 3, 3, 3, 3, 3, 3, 1, 3, 3, 3,
1075 3, 3, 3, 3, 3, 3, 3, 1, 1, 1,
1076 1, 1, 3, 1, 3, 1, 3, 1, 1, 1,
1077 1, 1, 1, 1, 1, 7, 2, 2
1083 #define yyerrok (yyerrstatus = 0)
1084 #define yyclearin (yychar = YYEMPTY)
1086 #define YYACCEPT goto yyacceptlab
1087 #define YYABORT goto yyabortlab
1088 #define YYERROR goto yyerrorlab
1091 #define YYRECOVERING() (!!yyerrstatus)
1093 #define YYBACKUP(Token, Value) \
1095 if (yychar == YYEMPTY) \
1099 YYPOPSTACK (yylen); \
1105 yyerror (parm, err_c, YY_("syntax error: cannot back up")); \
1112 #define YYERRCODE YYUNDEF
1120 # define YYFPRINTF fprintf
1123 # define YYDPRINTF(Args) \
1130 # ifndef YY_LOCATION_PRINT
1131 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1135 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
1139 YYFPRINTF (stderr, "%s ", Title); \
1140 yy_symbol_print (stderr, \
1141 Kind, Value, parm, err_c); \
1142 YYFPRINTF (stderr, "\n"); \
1155 FILE *yyoutput = yyo;
1163 YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
1195 for (; yybottom <= yytop; yybottom++)
1197 int yybot = *yybottom;
1203 # define YY_STACK_PRINT(Bottom, Top) \
1206 yy_stack_print ((Bottom), (Top)); \
1216 int yyrule,
naslctxt * parm,
int * err_c)
1219 int yynrhs =
yyr2[yyrule];
1221 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %d):\n",
1224 for (yyi = 0; yyi < yynrhs; yyi++)
1229 &yyvsp[(yyi + 1) - (yynrhs)], parm, err_c);
1234 # define YY_REDUCE_PRINT(Rule) \
1237 yy_reduce_print (yyssp, yyvsp, Rule, parm, err_c); \
1244 # define YYDPRINTF(Args) ((void) 0)
1245 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
1246 # define YY_STACK_PRINT(Bottom, Top)
1247 # define YY_REDUCE_PRINT(Rule)
1253 # define YYINITDEPTH 200
1264 # define YYMAXDEPTH 10000
1319 int yyerrstatus = 0;
1348 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1354 YYDPRINTF ((stderr,
"Starting parse\n"));
1373 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1380 if (yyss + yystacksize - 1 <= yyssp)
1381 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
1382 goto yyexhaustedlab;
1388 # if defined yyoverflow
1400 yyoverflow (
YY_(
"memory exhausted"),
1401 &yyss1, yysize *
YYSIZEOF (*yyssp),
1402 &yyvs1, yysize *
YYSIZEOF (*yyvsp),
1410 goto yyexhaustedlab;
1421 goto yyexhaustedlab;
1424 # undef YYSTACK_RELOCATE
1430 yyssp = yyss + yysize - 1;
1431 yyvsp = yyvs + yysize - 1;
1434 YYDPRINTF ((stderr,
"Stack size increased to %ld\n",
1435 YY_CAST (
long, yystacksize)));
1438 if (yyss + yystacksize - 1 <= yyssp)
1466 YYDPRINTF ((stderr,
"Reading a token\n"));
1467 yychar =
yylex (&yylval, parm, err_c);
1470 if (yychar <=
YYEOF)
1474 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1548 yyval = yyvsp[1-yylen];
1555 #line 153 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1557 ((
naslctxt*)parm)->tree = (yyvsp[0].node);
1559 #line 1560 "nasl_grammar.tab.c"
1563 #line 158 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1567 (yyval.
node)->link[0] = (yyvsp[0].node);
1569 #line 1570 "nasl_grammar.tab.c"
1573 #line 164 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1577 (yyval.
node)->link[0] = (yyvsp[-1].node);
1578 (yyval.
node)->link[1] = (yyvsp[0].node);
1580 #line 1581 "nasl_grammar.tab.c"
1584 #line 174 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1590 (yyval.
node)->x.str_val = (yyvsp[-4].str);
1591 (yyval.
node)->link[0] = (yyvsp[-2].node);
1592 (yyval.
node)->link[1] = (yyvsp[0].node);
1594 #line 1595 "nasl_grammar.tab.c"
1598 #line 184 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1599 { (yyval.
node) = NULL; }
1600 #line 1601 "nasl_grammar.tab.c"
1604 #line 184 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1605 { (yyval.
node) = (yyvsp[0].node); }
1606 #line 1607 "nasl_grammar.tab.c"
1610 #line 186 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1615 (yyval.
node)->x.str_val = (yyvsp[0].str);
1617 #line 1618 "nasl_grammar.tab.c"
1621 #line 193 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1626 (yyval.
node)->x.str_val = (yyvsp[-2].str);
1627 (yyval.
node)->link[0] = (yyvsp[0].node);
1629 #line 1630 "nasl_grammar.tab.c"
1633 #line 202 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1634 { (yyval.
node) = (yyvsp[-1].node); }
1635 #line 1636 "nasl_grammar.tab.c"
1639 #line 202 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1640 { (yyval.
node) = NULL; }
1641 #line 1642 "nasl_grammar.tab.c"
1645 #line 205 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1647 if ((yyvsp[-1].node) == NULL)
1648 (yyval.
node) = (yyvsp[0].node);
1654 (yyval.
node)->link[0] = (yyvsp[-1].node);
1655 (yyval.
node)->link[1] = (yyvsp[0].node);
1658 #line 1659 "nasl_grammar.tab.c"
1662 #line 219 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1663 { (yyval.
node) = (yyvsp[-1].node); }
1664 #line 1665 "nasl_grammar.tab.c"
1668 #line 220 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1670 #line 1671 "nasl_grammar.tab.c"
1674 #line 226 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1680 #line 1681 "nasl_grammar.tab.c"
1684 #line 231 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1690 #line 1691 "nasl_grammar.tab.c"
1694 #line 236 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1695 { (yyval.
node) = NULL; }
1696 #line 1697 "nasl_grammar.tab.c"
1700 #line 240 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1705 (yyval.
node)->link[0] = (yyvsp[0].node);
1707 #line 1708 "nasl_grammar.tab.c"
1711 #line 247 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1717 #line 1718 "nasl_grammar.tab.c"
1721 #line 255 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1726 (yyval.
node)->link[0] = (yyvsp[-2].node); (yyval.
node)->link[1] = (yyvsp[0].node);
1728 #line 1729 "nasl_grammar.tab.c"
1732 #line 262 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1737 (yyval.
node)->link[0] = (yyvsp[-4].node); (yyval.
node)->link[1] = (yyvsp[-2].node); (yyval.
node)->link[2] = (yyvsp[0].node);
1739 #line 1740 "nasl_grammar.tab.c"
1743 #line 272 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1748 (yyval.
node)->link[0] = (yyvsp[-6].node);
1749 (yyval.
node)->link[1] = (yyvsp[-4].node);
1750 (yyval.
node)->link[2] = (yyvsp[-2].node);
1751 (yyval.
node)->link[3] = (yyvsp[0].node);
1753 #line 1754 "nasl_grammar.tab.c"
1757 #line 283 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1762 (yyval.
node)->link[0] = (yyvsp[-2].node);
1763 (yyval.
node)->link[1] = (yyvsp[0].node);
1765 #line 1766 "nasl_grammar.tab.c"
1769 #line 291 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1774 (yyval.
node)->link[0] = (yyvsp[-3].node);
1775 (yyval.
node)->link[1] = (yyvsp[-1].node);
1777 #line 1778 "nasl_grammar.tab.c"
1781 #line 300 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1786 (yyval.
node)->x.str_val = (yyvsp[-4].str);
1787 (yyval.
node)->link[0] = (yyvsp[-2].node);
1788 (yyval.
node)->link[1] = (yyvsp[0].node);
1790 #line 1791 "nasl_grammar.tab.c"
1794 #line 310 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1795 { (yyval.
node) = NULL; }
1796 #line 1797 "nasl_grammar.tab.c"
1800 #line 314 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1805 (yyval.
node)->link[0] = (yyvsp[-2].node);
1806 (yyval.
node)->link[1] = (yyvsp[0].node);
1808 #line 1809 "nasl_grammar.tab.c"
1812 #line 322 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1813 { (yyval.
str) = (yyvsp[0].data).val; }
1814 #line 1815 "nasl_grammar.tab.c"
1818 #line 326 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1822 #pragma GCC diagnostic push
1823 #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
1824 int * error_counter;
1825 #pragma GCC diagnostic pop
1826 error_counter = (
int*)err_c;
1828 bzero (&subctx,
sizeof (subctx));
1833 (yyval.
node) = NULL;
1838 (g_str_hash, g_str_equal, g_free,
1845 g_free ((yyvsp[-1].str));
1853 subctx.
tree->
name = (yyvsp[-1].str);
1861 nasl_perror (NULL,
"%s: Parse error at or near line %d\n", (yyvsp[-1].str),
1863 g_free ((yyvsp[-1].str));
1869 g_free((yyvsp[-1].str));
1876 #line 1877 "nasl_grammar.tab.c"
1880 #line 386 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1885 (yyval.
node)->x.str_val = (yyvsp[-3].str);
1886 (yyval.
node)->link[0] = (yyvsp[-1].node);
1888 #line 1889 "nasl_grammar.tab.c"
1892 #line 394 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1893 { (yyval.
node) = NULL; }
1894 #line 1895 "nasl_grammar.tab.c"
1898 #line 396 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1900 (yyvsp[-2].node)->link[1] = (yyvsp[0].node);
1901 (yyval.
node) = (yyvsp[-2].node);
1903 #line 1904 "nasl_grammar.tab.c"
1907 #line 402 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1912 (yyval.
node)->link[0] = (yyvsp[0].node);
1914 #line 1915 "nasl_grammar.tab.c"
1918 #line 409 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1923 (yyval.
node)->x.str_val = (yyvsp[-2].str);
1924 (yyval.
node)->link[0] = (yyvsp[0].node);
1926 #line 1927 "nasl_grammar.tab.c"
1930 #line 419 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1934 #line 1935 "nasl_grammar.tab.c"
1938 #line 422 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1940 #line 1941 "nasl_grammar.tab.c"
1944 #line 423 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1946 #line 1947 "nasl_grammar.tab.c"
1950 #line 424 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1952 #line 1953 "nasl_grammar.tab.c"
1956 #line 425 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1958 #line 1959 "nasl_grammar.tab.c"
1962 #line 426 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1964 #line 1965 "nasl_grammar.tab.c"
1968 #line 427 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1970 #line 1971 "nasl_grammar.tab.c"
1974 #line 428 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1976 #line 1977 "nasl_grammar.tab.c"
1980 #line 429 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1982 #line 1983 "nasl_grammar.tab.c"
1986 #line 433 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1989 (yyval.
node)->x.str_val = (yyvsp[0].str);
1991 #line 1992 "nasl_grammar.tab.c"
1995 #line 438 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1996 { (yyval.
str) = strdup(
"x"); }
1997 #line 1998 "nasl_grammar.tab.c"
2001 #line 441 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2005 (yyval.
node)->x.str_val = (yyvsp[-3].str);
2006 (yyval.
node)->link[0] = (yyvsp[-1].node);
2008 #line 2009 "nasl_grammar.tab.c"
2012 #line 451 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2014 #line 2015 "nasl_grammar.tab.c"
2018 #line 452 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2020 #line 2021 "nasl_grammar.tab.c"
2024 #line 453 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2026 #line 2027 "nasl_grammar.tab.c"
2030 #line 454 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2032 #line 2033 "nasl_grammar.tab.c"
2036 #line 458 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2037 { (yyval.
node) = (yyvsp[-1].node); }
2038 #line 2039 "nasl_grammar.tab.c"
2042 #line 459 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2044 #line 2045 "nasl_grammar.tab.c"
2048 #line 460 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2050 #line 2051 "nasl_grammar.tab.c"
2054 #line 461 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2056 #line 2057 "nasl_grammar.tab.c"
2060 #line 462 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2062 #line 2063 "nasl_grammar.tab.c"
2066 #line 463 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2068 #line 2069 "nasl_grammar.tab.c"
2072 #line 464 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2074 #line 2075 "nasl_grammar.tab.c"
2078 #line 465 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2080 #line 2081 "nasl_grammar.tab.c"
2084 #line 466 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2086 #line 2087 "nasl_grammar.tab.c"
2090 #line 467 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2092 #line 2093 "nasl_grammar.tab.c"
2096 #line 468 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2098 #line 2099 "nasl_grammar.tab.c"
2102 #line 469 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2104 #line 2105 "nasl_grammar.tab.c"
2108 #line 470 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2110 #line 2111 "nasl_grammar.tab.c"
2114 #line 471 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2116 #line 2117 "nasl_grammar.tab.c"
2120 #line 472 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2122 #line 2123 "nasl_grammar.tab.c"
2126 #line 473 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2128 #line 2129 "nasl_grammar.tab.c"
2132 #line 474 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2134 #line 2135 "nasl_grammar.tab.c"
2138 #line 475 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2140 #line 2141 "nasl_grammar.tab.c"
2144 #line 477 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2146 #line 2147 "nasl_grammar.tab.c"
2150 #line 478 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2152 #line 2153 "nasl_grammar.tab.c"
2156 #line 479 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2158 #line 2159 "nasl_grammar.tab.c"
2162 #line 480 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2164 #line 2165 "nasl_grammar.tab.c"
2168 #line 481 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2170 #line 2171 "nasl_grammar.tab.c"
2174 #line 482 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2176 #line 2177 "nasl_grammar.tab.c"
2180 #line 483 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2182 #line 2183 "nasl_grammar.tab.c"
2186 #line 484 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2188 #line 2189 "nasl_grammar.tab.c"
2192 #line 485 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2194 #line 2195 "nasl_grammar.tab.c"
2198 #line 486 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2200 #line 2201 "nasl_grammar.tab.c"
2204 #line 490 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2206 #line 2207 "nasl_grammar.tab.c"
2210 #line 492 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2211 { (yyval.
node) = (yyvsp[0].node); }
2212 #line 2213 "nasl_grammar.tab.c"
2216 #line 493 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2218 (yyvsp[-2].node)->link[1] = (yyvsp[0].node); (yyval.
node) = (yyvsp[-2].node);
2220 #line 2221 "nasl_grammar.tab.c"
2224 #line 497 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2227 (yyval.
node)->link[0] = (yyvsp[0].node);
2229 #line 2230 "nasl_grammar.tab.c"
2233 #line 500 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2236 (yyval.
node)->link[0] = (yyvsp[0].node);
2239 #line 2240 "nasl_grammar.tab.c"
2243 #line 506 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2245 #line 2246 "nasl_grammar.tab.c"
2249 #line 507 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2252 (yyval.
node)->size = strlen((yyvsp[0].str));
2254 #line 2255 "nasl_grammar.tab.c"
2258 #line 511 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2261 (yyval.
node)->size = (yyvsp[0].data).len;
2263 #line 2264 "nasl_grammar.tab.c"
2267 #line 519 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2271 (yyval.
node)->x.str_val = (yyvsp[0].str);
2273 #line 2274 "nasl_grammar.tab.c"
2277 #line 529 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2279 char *s = g_strdup_printf (
"%ld.%ld.%ld.%ld", (yyvsp[-6].num), (yyvsp[-4].num), (yyvsp[-2].num), (yyvsp[0].num));
2282 (yyval.
node)->x.str_val = s;
2283 (yyval.
node)->size = strlen(s);
2285 #line 2286 "nasl_grammar.tab.c"
2289 #line 539 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2293 (yyval.
node)->link[0] = (yyvsp[0].node);
2295 #line 2296 "nasl_grammar.tab.c"
2299 #line 547 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2303 (yyval.
node)->link[0] = (yyvsp[0].node);
2305 #line 2306 "nasl_grammar.tab.c"
2309 #line 2310 "nasl_grammar.tab.c"
2336 const int yyi =
yypgoto[yylhs] + *yyssp;
2337 yystate = (0 <= yyi && yyi <=
YYLAST &&
yycheck[yyi] == *yyssp
2359 if (yyerrstatus == 3)
2364 if (yychar <=
YYEOF)
2367 if (yychar ==
YYEOF)
2373 yytoken, &yylval, parm, err_c);
2462 #if !defined yyoverflow
2467 yyerror (parm, err_c,
YY_(
"memory exhausted"));
2483 yytoken, &yylval, parm, err_c);
2489 while (yyssp != yyss)
2503 #line 553 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2508 #include <gvm/base/logging.h>
2509 #include <gvm/base/prefs.h>
2518 g_message (
"Parse error at or near line %d:",
LNB);
2519 g_message (
" %s", s);
2553 struct stat stat_buf;
2555 if (stat (dir, &stat_buf) != 0)
2558 if (S_ISDIR(stat_buf.st_mode) != 0)
2572 static int loaded = 0;
2573 const char *base, *
prefix;
2574 char filename[2048], *fbuffer;
2581 base = prefs_get (
"plugins_folder");
2582 snprintf (filename,
sizeof (filename),
"%s/sha256sums", base);
2583 if (g_file_get_contents (filename, &fbuffer, &flen, NULL))
2587 g_warning (
"No plugins checksums file");
2593 g_warning (
"Erroneous or missing signature for checksums file %s",
2601 file = fopen (filename,
"r");
2604 g_warning (
"%s: Couldn't read file %s", __func__, filename);
2609 kb_del_items (kb,
"sha256sums:*");
2614 char buffer[2048], **splits;
2615 if (!fgets (buffer,
sizeof (buffer), file))
2617 if (strstr (buffer,
".asc")
2618 || (!strstr (buffer,
".inc") && !strstr (buffer,
".nasl")))
2620 splits = g_strsplit (buffer,
" ", -1);
2621 if (g_strv_length (splits) != 2)
2623 g_warning (
"%s: Erroneous checksum entry %s", __func__, buffer);
2624 g_strfreev (splits);
2627 splits[1][strlen (splits[1]) - 1] =
'\0';
2628 if (strstr (splits[1],
".inc"))
2629 g_snprintf (buffer,
sizeof (buffer),
"%s:%s",
prefix,
2630 basename (splits[1]));
2632 g_snprintf (buffer,
sizeof (buffer),
"%s:%s/%s",
prefix, base,
2634 kb_item_set_str (kb, buffer, splits[0], 0);
2635 g_strfreev (splits);
2651 char *content = NULL, digest[128], *result;
2652 size_t len = 0, i, alglen;
2654 assert (algorithm == GCRY_MD_SHA256);
2655 if (!filename || !g_file_get_contents (filename, &content, &
len, NULL))
2658 gcry_md_hash_buffer (algorithm, digest, content,
len);
2659 alglen = gcry_md_get_algo_dlen (algorithm);
2660 result = g_malloc0 (alglen * 2 + 1);
2661 for (i = 0; i < alglen; i++)
2662 snprintf (result + 2 * i, 3,
"%02x", (
unsigned char) digest[i]);
2686 char *full_name = NULL, key_path[2048], *checksum, *filename;
2708 while (inc_dir != NULL) {
2711 full_name = g_build_filename(inc_dir->data,
name, NULL);
2713 if ((g_file_get_contents (full_name, &pc->
buffer, &flen, NULL)))
2716 inc_dir = g_slist_next(inc_dir);
2719 if (!full_name || !pc->
buffer) {
2720 g_message (
"%s: Not able to open nor to locate it in include paths",
2733 if (strstr (full_name,
".inc"))
2734 filename = basename (full_name);
2736 filename = full_name;
2737 snprintf (key_path,
sizeof (key_path),
"signaturecheck:%s", filename);
2738 timestamp = kb_item_get_int (pc->
kb, key_path);
2746 struct stat file_stat;
2748 if (stat (full_name, &file_stat) >= 0 && timestamp > file_stat.st_mtime)
2760 snprintf (key_path,
sizeof (key_path),
"sha256sums:%s", filename);
2763 checksum = kb_item_get_str (pc->
kb, key_path);
2766 g_warning (
"No checksum for %s", full_name);
2775 snprintf (key_path,
sizeof (key_path),
"signaturecheck:%s", filename);
2776 ret = strcmp (check, checksum);
2779 kb_del_items (pc->
kb, key_path);
2780 g_warning (
"checksum for %s not matching", full_name);
2784 kb_del_items (pc->
kb, key_path);
2785 kb_item_add_int (pc->
kb, key_path, time (NULL));
2883 else if (isalpha(c) || c ==
'_')
2889 else if (isspace(c))
2893 else if (isdigit(c))
2961 *p++ =
'\f';
len ++;
2964 *p++ =
'\t';
len ++;
2970 *p++ =
'\v';
len ++;
2973 *p ++ =
'"';
len ++;
2985 for (i = 0; i < 2; i ++)
2990 nasl_perror(NULL,
"Unfinished \\x escape sequence (EOF)\n");
2997 if (c >=
'0' && c <=
'9')
2998 x = x * 16 + (c -
'0');
2999 else if (c >=
'a' && c <=
'f')
3000 x = x * 16 + 10 + (c -
'a');
3003 nasl_perror(NULL,
"Unfinished \\x escape sequence\n");
3014 nasl_perror(NULL,
"Unknown escape sequence \\%c\n", c);
3027 if (isalnum(c) || c ==
'_')
3043 if (c ==
'x' || c ==
'X')
3045 else if (isdigit(c))
3155 if (! isprint(c)) c =
'.';
3156 g_message (
"lexer error: invalid token >!%c "
3157 "parsed as >!< %c", c, c);
3410 nasl_perror(NULL,
"Invalid token 0x parsed as 0 at line %d\n",
3424 #pragma GCC diagnostic push
3425 #pragma GCC diagnostic ignored "-Wunused-parameter"
3427 #pragma GCC diagnostic pop
3428 int x =
mylex (lvalp, parm);