52#define YYBISON_VERSION "3.7.6"
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
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
319# undef UINT_LEAST8_MAX
320# undef UINT_LEAST16_MAX
321# define UINT_LEAST8_MAX 255
322# define UINT_LEAST16_MAX 65535
325#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
327#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
328 && UINT_LEAST8_MAX <= INT_MAX)
330#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
336#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
338#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
339 && UINT_LEAST16_MAX <= INT_MAX)
341#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
348# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
349# define YYPTRDIFF_T __PTRDIFF_TYPE__
350# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
351# elif defined PTRDIFF_MAX
355# define YYPTRDIFF_T ptrdiff_t
356# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
358# define YYPTRDIFF_T long
359# define YYPTRDIFF_MAXIMUM LONG_MAX
365# define YYSIZE_T __SIZE_TYPE__
367# define YYSIZE_T size_t
368# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
370# define YYSIZE_T size_t
372# define YYSIZE_T unsigned
376#define YYSIZE_MAXIMUM \
377 YY_CAST (YYPTRDIFF_T, \
378 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
379 ? YYPTRDIFF_MAXIMUM \
380 : YY_CAST (YYSIZE_T, -1)))
382#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
392# if defined YYENABLE_NLS && YYENABLE_NLS
395# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
399# define YY_(Msgid) Msgid
404#ifndef YY_ATTRIBUTE_PURE
405# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
406# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
408# define YY_ATTRIBUTE_PURE
412#ifndef YY_ATTRIBUTE_UNUSED
413# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
414# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
416# define YY_ATTRIBUTE_UNUSED
421#if ! defined lint || defined __GNUC__
422# define YY_USE(E) ((void) (E))
427#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
429# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
430 _Pragma ("GCC diagnostic push") \
431 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
432 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
433# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
434 _Pragma ("GCC diagnostic pop")
436# define YY_INITIAL_VALUE(Value) Value
438#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
439# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
440# define YY_IGNORE_MAYBE_UNINITIALIZED_END
442#ifndef YY_INITIAL_VALUE
443# define YY_INITIAL_VALUE(Value)
446#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
447# define YY_IGNORE_USELESS_CAST_BEGIN \
448 _Pragma ("GCC diagnostic push") \
449 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
450# define YY_IGNORE_USELESS_CAST_END \
451 _Pragma ("GCC diagnostic pop")
453#ifndef YY_IGNORE_USELESS_CAST_BEGIN
454# define YY_IGNORE_USELESS_CAST_BEGIN
455# define YY_IGNORE_USELESS_CAST_END
459#define YY_ASSERT(E) ((void) (0 && (E)))
461#if !defined yyoverflow
465# ifdef YYSTACK_USE_ALLOCA
466# if YYSTACK_USE_ALLOCA
468# define YYSTACK_ALLOC __builtin_alloca
469# elif defined __BUILTIN_VA_ARG_INCR
472# define YYSTACK_ALLOC __alloca
473# elif defined _MSC_VER
475# define alloca _alloca
477# define YYSTACK_ALLOC alloca
478# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
482# define EXIT_SUCCESS 0
491# define YYSTACK_FREE(Ptr) do { ; } while (0)
492# ifndef YYSTACK_ALLOC_MAXIMUM
497# define YYSTACK_ALLOC_MAXIMUM 4032
500# define YYSTACK_ALLOC YYMALLOC
501# define YYSTACK_FREE YYFREE
502# ifndef YYSTACK_ALLOC_MAXIMUM
503# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
505# if (defined __cplusplus && ! defined EXIT_SUCCESS \
506 && ! ((defined YYMALLOC || defined malloc) \
507 && (defined YYFREE || defined free)))
510# define EXIT_SUCCESS 0
514# define YYMALLOC malloc
515# if ! defined malloc && ! defined EXIT_SUCCESS
521# if ! defined free && ! defined EXIT_SUCCESS
528#if (! defined yyoverflow \
529 && (! defined __cplusplus \
530 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
540# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
544# define YYSTACK_BYTES(N) \
545 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
546 + YYSTACK_GAP_MAXIMUM)
548# define YYCOPY_NEEDED 1
555# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
558 YYPTRDIFF_T yynewbytes; \
559 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
560 Stack = &yyptr->Stack_alloc; \
561 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
562 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
568#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
572# if defined __GNUC__ && 1 < __GNUC__
573# define YYCOPY(Dst, Src, Count) \
574 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
576# define YYCOPY(Dst, Src, Count) \
580 for (yyi = 0; yyi < (Count); yyi++) \
581 (Dst)[yyi] = (Src)[yyi]; \
608#define YYTRANSLATE(YYX) \
609 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
610 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
617 0, 2, 2, 2, 2, 2, 2, 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, 70, 2, 2, 2, 57, 52, 2,
621 61, 62, 55, 53, 63, 54, 72, 56, 2, 2,
622 2, 2, 2, 2, 2, 2, 2, 2, 67, 66,
623 48, 47, 49, 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, 68, 2, 69, 51, 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, 64, 50, 65, 71, 2, 2, 2,
630 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
631 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
632 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
633 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
634 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
635 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
636 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
637 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
638 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
639 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
640 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
641 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
642 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
643 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
644 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
645 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
646 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
654 0, 152, 152, 157, 163, 170, 170, 173, 184, 184,
655 185, 192, 202, 202, 203, 204, 219, 219, 219, 219,
656 220, 224, 224, 224, 225, 225, 225, 225, 225, 226,
657 231, 236, 239, 246, 254, 261, 270, 270, 270, 270,
658 271, 282, 290, 299, 310, 310, 310, 310, 313, 322,
659 322, 325, 385, 394, 394, 395, 395, 401, 408, 418,
660 422, 423, 424, 425, 426, 427, 428, 429, 432, 436,
661 438, 438, 440, 448, 451, 452, 453, 454, 458, 459,
662 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
663 470, 471, 472, 473, 474, 475, 476, 477, 478, 479,
664 480, 481, 482, 483, 484, 485, 486, 487, 487, 487,
665 487, 487, 490, 492, 493, 497, 500, 506, 507, 511,
666 516, 518, 524, 524, 526, 528, 538, 546
671#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
682 "\"end of file\"",
"error",
"\"invalid token\"",
"IF",
"ELSE",
"EQ",
683 "NEQ",
"SUPEQ",
"INFEQ",
"OR",
"AND",
"MATCH",
"NOMATCH",
"REP",
"FOR",
684 "REPEAT",
"UNTIL",
"FOREACH",
"WHILE",
"BREAK",
"CONTINUE",
"FUNCTION",
685 "RETURN",
"INCLUDE",
"LOCAL",
"GLOBAL",
"PLUS_PLUS",
"MINUS_MINUS",
686 "L_SHIFT",
"R_SHIFT",
"R_USHIFT",
"EXPO",
"PLUS_EQ",
"MINUS_EQ",
687 "MULT_EQ",
"DIV_EQ",
"MODULO_EQ",
"L_SHIFT_EQ",
"R_SHIFT_EQ",
688 "R_USHIFT_EQ",
"RE_MATCH",
"RE_NOMATCH",
"ARROW",
"IDENT",
"STRING1",
689 "STRING2",
"INTEGER",
"'='",
"'<'",
"'>'",
"'|'",
"'^'",
"'&'",
"'+'",
690 "'-'",
"'*'",
"'/'",
"'%'",
"NOT",
"UMINUS",
"BIT_NOT",
"'('",
"')'",
691 "','",
"'{'",
"'}'",
"';'",
"':'",
"'['",
"']'",
"'!'",
"'~'",
"'.'",
692 "$accept",
"tiptop",
"instr_decl_list",
"instr_decl",
"func_decl",
693 "arg_decl",
"arg_decl_1",
"block",
"instr_list",
"instr",
"simple_instr",
694 "ret",
"if_block",
"loop",
"for_loop",
"while_loop",
"repeat_loop",
695 "foreach_loop",
"aff_func",
"rep",
"string",
"inc",
"func_call",
696 "arg_list",
"arg_list_1",
"arg",
"aff",
"lvalue",
"identifier",
697 "array_elem",
"array_index",
"post_pre_incr",
"expr",
"const_array",
698 "list_array_data",
"array_data",
"atom",
"simple_array_data",
"var",
699 "var_name",
"ipaddr",
"loc",
"glob",
YY_NULLPTR
714 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
715 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
716 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
717 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
718 295, 296, 297, 298, 299, 300, 301, 61, 60, 62,
719 124, 94, 38, 43, 45, 42, 47, 37, 302, 303,
720 304, 40, 41, 44, 123, 125, 59, 58, 91, 93,
725#define YYPACT_NINF (-77)
727#define yypact_value_is_default(Yyn) \
728 ((Yyn) == YYPACT_NINF)
730#define YYTABLE_NINF (-70)
732#define yytable_value_is_error(Yyn) \
733 ((Yyn) == YYTABLE_NINF)
739 340, -57, -35, -77, -27, 427, -5, -15, -77, -77,
740 -5, 538, -13, -5, -5, -5, -5, -77, 373, 50,
741 -77, 111, -77, -77, -77, -12, -77, -77, -77, -77,
742 -77, -77, -77, -77, -77, 38, -77, 507, -39, -77,
743 -77, -77, -77, -77, 538, -2, 48, -8, 538, 16,
744 -77, -77, -16, 538, 538, 40, 538, 538, -77, -77,
745 124, 592, -77, 837, -77, -77, -77, -77, -77, -1,
746 -77, -77, 15, -77, -77, -3, -77, -77, 25, 400,
747 -77, -77, -77, 538, -77, -77, 538, 538, 538, 538,
748 538, 538, 538, 538, 538, 538, 538, 605, 26, -77,
749 -77, -77, 538, 538, 663, -5, 34, 65, 721, 56,
750 57, -77, 58, 32, 39, -77, -77, 65, 65, 538,
751 538, 538, 538, 538, 538, 538, 538, 538, 538, 538,
752 538, -1, -1, 538, 538, 538, 538, 538, 538, 538,
753 538, 538, 538, -77, -77, 44, -5, -77, -77, 837,
754 837, 837, 837, 837, 837, 837, 837, 837, 837, 45,
755 -77, 46, 36, 837, 49, 837, 427, 538, 466, 779,
756 427, 51, 47, -77, 43, -77, 40, 921, 921, 921,
757 921, 890, 952, 921, 921, 160, 160, 160, 65, -77,
758 -77, 921, 921, 404, 316, 240, 4, 4, 65, 65,
759 65, -77, -77, -77, 538, 538, -77, 104, 519, -77,
760 427, -77, 53, 69, -77, -77, -77, 837, 427, -2,
761 -77, -77, 55, -77, 59, 77, 427, -77, -77
769 0, 0, 0, 71, 0, 0, 0, 0, 29, 30,
770 0, 33, 0, 8, 8, 0, 0, 70, 0, 0,
771 2, 0, 6, 17, 5, 0, 25, 18, 19, 36,
772 37, 38, 39, 23, 26, 24, 21, 0, 68, 69,
773 22, 27, 28, 20, 0, 47, 0, 0, 0, 0,
774 119, 118, 117, 0, 0, 0, 0, 0, 123, 108,
775 124, 122, 96, 32, 111, 110, 107, 121, 109, 0,
776 126, 9, 10, 127, 74, 68, 75, 13, 0, 0,
777 1, 4, 16, 0, 76, 77, 0, 0, 0, 0,
778 0, 0, 0, 0, 0, 54, 0, 0, 0, 46,
779 44, 45, 0, 0, 0, 8, 0, 84, 0, 119,
780 118, 117, 0, 0, 113, 120, 115, 80, 85, 0,
781 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
782 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
783 0, 0, 0, 49, 50, 0, 0, 12, 15, 48,
784 60, 61, 62, 63, 64, 67, 65, 66, 59, 0,
785 53, 55, 124, 57, 0, 73, 0, 0, 0, 0,
786 0, 0, 0, 78, 0, 112, 0, 103, 104, 105,
787 106, 81, 79, 97, 98, 95, 93, 94, 87, 99,
788 100, 101, 102, 92, 91, 90, 82, 83, 86, 88,
789 89, 51, 11, 52, 0, 0, 72, 34, 0, 42,
790 0, 41, 0, 0, 116, 114, 56, 58, 0, 47,
791 43, 7, 0, 35, 0, 0, 0, 125, 40
797 -77, -77, 118, -77, -77, -11, -6, -71, 63, 14,
798 -77, -77, -77, -77, -77, -77, -77, -77, -76, -77,
799 -65, -77, 2, -77, -60, -77, 31, 24, 0, 12,
800 -77, 37, 189, -77, -31, -77, -54, -26, -77, -77,
807 0, 19, 20, 21, 22, 70, 71, 23, 78, 24,
808 25, 26, 27, 28, 29, 30, 31, 32, 98, 33,
809 112, 34, 58, 159, 160, 161, 59, 37, 60, 61,
810 164, 62, 163, 64, 113, 114, 65, 116, 66, 67,
819 38, 115, 35, 73, 145, 38, 47, 35, 3, 43,
820 49, 3, 39, 72, 72, 75, 75, 39, 38, 46,
821 35, 38, 95, 35, 15, 16, 44, 39, 39, 96,
822 39, 36, 79, 39, 45, 130, 36, 40, 17, 74,
823 76, 17, 40, 143, 144, 38, 48, 99, 69, 36,
824 80, 83, 36, 103, 82, 40, 106, 39, 40, 140,
825 141, 142, -68, -68, 102, 96, 189, 190, -68, -68,
826 -68, -68, -68, -68, -68, -68, 100, 105, 146, 38,
827 172, 35, 101, -68, 109, 110, 111, 50, 51, 111,
828 147, 39, 167, 79, 171, 162, 130, 95, -49, -50,
829 174, 175, 176, 205, 96, 72, 201, 203, 218, 204,
830 36, -3, 1, 212, 2, 222, 40, 18, 206, 213,
831 115, 226, 115, 227, 3, 4, 5, 225, 6, 7,
832 8, 9, 10, 11, 12, 13, 14, 15, 16, 81,
833 202, 221, 148, 224, 216, 215, 72, 0, 214, 0,
834 -68, -68, 0, 0, 17, 0, -68, -68, -68, -68,
835 -68, -68, -68, -68, 0, 0, 38, 0, 35, 0,
836 38, -68, 35, 0, 0, 18, 0, -31, 39, 0,
837 207, 0, 39, 0, 211, 95, 0, 0, -70, -70,
838 -70, 130, 96, 0, 0, 0, 0, 36, 0, 0,
839 63, 36, 0, 40, 162, 0, 0, 40, 0, 0,
840 38, 0, 35, 138, 139, 140, 141, 142, 38, 38,
841 35, 99, 39, 0, 220, 0, 38, 0, 35, 0,
842 39, 39, 223, 97, 0, 0, 0, 104, 39, 0,
843 228, 36, 107, 108, 0, 117, 118, 40, 0, 36,
844 100, 0, 0, 0, 0, 40, 101, 36, 0, 0,
845 0, 0, 0, 40, 0, 0, 0, 0, 127, 128,
846 129, 130, 149, 0, 0, 150, 151, 152, 153, 154,
847 155, 156, 157, 158, 0, 165, 0, 0, 0, 0,
848 0, 168, 169, 138, 139, 140, 141, 142, 0, 0,
849 0, 0, 0, 0, 0, 0, 0, 0, 177, 178,
850 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
851 0, 0, 191, 192, 193, 194, 195, 196, 197, 198,
852 199, 200, 0, 0, 0, 0, 0, 0, 0, 0,
853 0, 1, 0, 2, 127, 128, 129, 130, 0, 0,
854 0, 0, 0, 3, 4, 5, 208, 6, 7, 8,
855 9, 10, 11, 12, 13, 14, 15, 16, 137, 138,
856 139, 140, 141, 142, 1, 0, 2, 0, 0, 0,
857 0, 0, 0, 17, 0, 0, 3, 4, 5, 0,
858 6, 7, 8, 9, 217, 11, 12, 13, 14, 15,
859 16, 1, 0, 2, 18, 0, -31, 0, 0, 0,
860 0, 0, 0, 3, 4, 5, 17, 6, 7, 8,
861 9, 0, 11, 12, 13, 14, 15, 16, 1, 0,
862 2, 0, 127, 128, 129, 130, 0, 18, 77, -31,
863 3, 4, 5, 17, 6, 7, 8, 9, 0, 11,
864 12, 13, 14, 15, 16, 136, 137, 138, 139, 140,
865 141, 142, 0, 0, 18, -14, -31, 0, 0, 0,
866 17, 119, 120, 121, 122, 123, 124, 125, 126, 0,
867 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
868 0, 18, 0, -31, 127, 128, 129, 130, 0, 0,
869 0, 0, 0, 0, 0, 0, 131, 132, 0, 0,
870 0, 0, 0, 0, 133, 134, 135, 136, 137, 138,
871 139, 140, 141, 142, 119, 120, 121, 122, 123, 124,
872 125, 126, 209, 84, 85, 0, 0, 0, 0, 86,
873 87, 88, 89, 90, 91, 92, 93, 127, 128, 129,
874 130, 3, 0, 0, 94, 0, 0, 0, 0, 131,
875 132, 0, 0, 0, 15, 16, 0, 133, 134, 135,
876 136, 137, 138, 139, 140, 141, 142, 0, 0, 0,
877 0, 17, 50, 51, 52, 219, 0, 0, 0, 0,
878 0, 0, 53, 0, 0, 0, 0, 0, 0, 54,
879 0, 0, 0, 0, 0, 0, 55, 0, 56, 57,
880 119, 120, 121, 122, 123, 124, 125, 126, -69, -69,
881 0, 0, 0, 0, -69, -69, -69, -69, -69, -69,
882 -69, -69, 0, 127, 128, 129, 130, 0, 0, -69,
883 0, 0, 0, 0, 0, 131, 132, 0, 0, 0,
884 0, 0, 0, 133, 134, 135, 136, 137, 138, 139,
885 140, 141, 142, 0, 0, 0, 0, 166, 119, 120,
886 121, 122, 123, 124, 125, 126, 0, 0, 0, 0,
887 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
888 0, 127, 128, 129, 130, 0, 0, 0, 0, 0,
889 0, 0, 0, 131, 132, 0, 0, 0, 0, 0,
890 0, 133, 134, 135, 136, 137, 138, 139, 140, 141,
891 142, 0, 0, 0, 0, 170, 119, 120, 121, 122,
892 123, 124, 125, 126, 0, 0, 0, 0, 0, 0,
893 0, 0, 0, 0, 0, 0, 0, 0, 0, 127,
894 128, 129, 130, 0, 0, 0, 0, 0, 0, 0,
895 0, 131, 132, 0, 0, 0, 0, 0, 0, 133,
896 134, 135, 136, 137, 138, 139, 140, 141, 142, 0,
897 0, 0, 0, 173, 119, 120, 121, 122, 123, 124,
898 125, 126, 0, 0, 0, 0, 0, 0, 0, 0,
899 0, 0, 0, 0, 0, 0, 0, 127, 128, 129,
900 130, 0, 0, 0, 0, 0, 0, 0, 0, 131,
901 132, 0, 0, 0, 0, 0, 0, 133, 134, 135,
902 136, 137, 138, 139, 140, 141, 142, 0, 0, 0,
903 0, 210, 119, 120, 121, 122, 123, 124, 125, 126,
904 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
905 0, 0, 0, 0, 0, 127, 128, 129, 130, 0,
906 0, 0, 0, 0, 0, 0, 0, 131, 132, 0,
907 0, 0, 0, 0, 0, 133, 134, 135, 136, 137,
908 138, 139, 140, 141, 142, 119, 120, 121, 122, 0,
909 124, 125, 126, 0, 0, 0, 0, 0, 0, 0,
910 0, 0, 0, 0, 0, 0, 0, 0, 127, 128,
911 129, 130, 0, 0, 0, 0, -70, -70, -70, -70,
912 131, 132, -70, -70, 0, 0, 0, 0, 133, 134,
913 135, 136, 137, 138, 139, 140, 141, 142, 0, 127,
914 128, 129, 130, 0, 0, 0, 0, 119, 120, 121,
915 122, -70, -70, 125, 126, 0, 0, 0, 0, -70,
916 -70, 135, 136, 137, 138, 139, 140, 141, 142, 0,
917 127, 128, 129, 130, 0, 0, 0, 0, 0, 0,
918 0, 0, 131, 132, 0, 0, 0, 0, 0, 0,
919 133, 134, 135, 136, 137, 138, 139, 140, 141, 142
924 0, 55, 0, 14, 69, 5, 6, 5, 13, 66,
925 10, 13, 0, 13, 14, 15, 16, 5, 18, 5,
926 18, 21, 61, 21, 26, 27, 61, 15, 16, 68,
927 18, 0, 18, 21, 61, 31, 5, 0, 43, 15,
928 16, 43, 5, 44, 45, 45, 61, 45, 61, 18,
929 0, 13, 21, 61, 66, 18, 72, 45, 21, 55,
930 56, 57, 26, 27, 16, 68, 131, 132, 32, 33,
931 34, 35, 36, 37, 38, 39, 45, 61, 63, 79,
932 46, 79, 45, 47, 44, 45, 46, 44, 45, 46,
933 65, 79, 66, 79, 105, 95, 31, 61, 42, 42,
934 42, 69, 63, 67, 68, 105, 62, 62, 4, 63,
935 79, 0, 1, 62, 3, 46, 79, 64, 69, 72,
936 174, 62, 176, 46, 13, 14, 15, 72, 17, 18,
937 19, 20, 21, 22, 23, 24, 25, 26, 27, 21,
938 146, 212, 79, 219, 204, 176, 146, -1, 174, -1,
939 26, 27, -1, -1, 43, -1, 32, 33, 34, 35,
940 36, 37, 38, 39, -1, -1, 166, -1, 166, -1,
941 170, 47, 170, -1, -1, 64, -1, 66, 166, -1,
942 166, -1, 170, -1, 170, 61, -1, -1, 28, 29,
943 30, 31, 68, -1, -1, -1, -1, 166, -1, -1,
944 11, 170, -1, 166, 204, -1, -1, 170, -1, -1,
945 210, -1, 210, 53, 54, 55, 56, 57, 218, 219,
946 218, 219, 210, -1, 210, -1, 226, -1, 226, -1,
947 218, 219, 218, 44, -1, -1, -1, 48, 226, -1,
948 226, 210, 53, 54, -1, 56, 57, 210, -1, 218,
949 219, -1, -1, -1, -1, 218, 219, 226, -1, -1,
950 -1, -1, -1, 226, -1, -1, -1, -1, 28, 29,
951 30, 31, 83, -1, -1, 86, 87, 88, 89, 90,
952 91, 92, 93, 94, -1, 96, -1, -1, -1, -1,
953 -1, 102, 103, 53, 54, 55, 56, 57, -1, -1,
954 -1, -1, -1, -1, -1, -1, -1, -1, 119, 120,
955 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
956 -1, -1, 133, 134, 135, 136, 137, 138, 139, 140,
957 141, 142, -1, -1, -1, -1, -1, -1, -1, -1,
958 -1, 1, -1, 3, 28, 29, 30, 31, -1, -1,
959 -1, -1, -1, 13, 14, 15, 167, 17, 18, 19,
960 20, 21, 22, 23, 24, 25, 26, 27, 52, 53,
961 54, 55, 56, 57, 1, -1, 3, -1, -1, -1,
962 -1, -1, -1, 43, -1, -1, 13, 14, 15, -1,
963 17, 18, 19, 20, 205, 22, 23, 24, 25, 26,
964 27, 1, -1, 3, 64, -1, 66, -1, -1, -1,
965 -1, -1, -1, 13, 14, 15, 43, 17, 18, 19,
966 20, -1, 22, 23, 24, 25, 26, 27, 1, -1,
967 3, -1, 28, 29, 30, 31, -1, 64, 65, 66,
968 13, 14, 15, 43, 17, 18, 19, 20, -1, 22,
969 23, 24, 25, 26, 27, 51, 52, 53, 54, 55,
970 56, 57, -1, -1, 64, 65, 66, -1, -1, -1,
971 43, 5, 6, 7, 8, 9, 10, 11, 12, -1,
972 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
973 -1, 64, -1, 66, 28, 29, 30, 31, -1, -1,
974 -1, -1, -1, -1, -1, -1, 40, 41, -1, -1,
975 -1, -1, -1, -1, 48, 49, 50, 51, 52, 53,
976 54, 55, 56, 57, 5, 6, 7, 8, 9, 10,
977 11, 12, 66, 26, 27, -1, -1, -1, -1, 32,
978 33, 34, 35, 36, 37, 38, 39, 28, 29, 30,
979 31, 13, -1, -1, 47, -1, -1, -1, -1, 40,
980 41, -1, -1, -1, 26, 27, -1, 48, 49, 50,
981 51, 52, 53, 54, 55, 56, 57, -1, -1, -1,
982 -1, 43, 44, 45, 46, 66, -1, -1, -1, -1,
983 -1, -1, 54, -1, -1, -1, -1, -1, -1, 61,
984 -1, -1, -1, -1, -1, -1, 68, -1, 70, 71,
985 5, 6, 7, 8, 9, 10, 11, 12, 26, 27,
986 -1, -1, -1, -1, 32, 33, 34, 35, 36, 37,
987 38, 39, -1, 28, 29, 30, 31, -1, -1, 47,
988 -1, -1, -1, -1, -1, 40, 41, -1, -1, -1,
989 -1, -1, -1, 48, 49, 50, 51, 52, 53, 54,
990 55, 56, 57, -1, -1, -1, -1, 62, 5, 6,
991 7, 8, 9, 10, 11, 12, -1, -1, -1, -1,
992 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
993 -1, 28, 29, 30, 31, -1, -1, -1, -1, -1,
994 -1, -1, -1, 40, 41, -1, -1, -1, -1, -1,
995 -1, 48, 49, 50, 51, 52, 53, 54, 55, 56,
996 57, -1, -1, -1, -1, 62, 5, 6, 7, 8,
997 9, 10, 11, 12, -1, -1, -1, -1, -1, -1,
998 -1, -1, -1, -1, -1, -1, -1, -1, -1, 28,
999 29, 30, 31, -1, -1, -1, -1, -1, -1, -1,
1000 -1, 40, 41, -1, -1, -1, -1, -1, -1, 48,
1001 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
1002 -1, -1, -1, 62, 5, 6, 7, 8, 9, 10,
1003 11, 12, -1, -1, -1, -1, -1, -1, -1, -1,
1004 -1, -1, -1, -1, -1, -1, -1, 28, 29, 30,
1005 31, -1, -1, -1, -1, -1, -1, -1, -1, 40,
1006 41, -1, -1, -1, -1, -1, -1, 48, 49, 50,
1007 51, 52, 53, 54, 55, 56, 57, -1, -1, -1,
1008 -1, 62, 5, 6, 7, 8, 9, 10, 11, 12,
1009 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1010 -1, -1, -1, -1, -1, 28, 29, 30, 31, -1,
1011 -1, -1, -1, -1, -1, -1, -1, 40, 41, -1,
1012 -1, -1, -1, -1, -1, 48, 49, 50, 51, 52,
1013 53, 54, 55, 56, 57, 5, 6, 7, 8, -1,
1014 10, 11, 12, -1, -1, -1, -1, -1, -1, -1,
1015 -1, -1, -1, -1, -1, -1, -1, -1, 28, 29,
1016 30, 31, -1, -1, -1, -1, 5, 6, 7, 8,
1017 40, 41, 11, 12, -1, -1, -1, -1, 48, 49,
1018 50, 51, 52, 53, 54, 55, 56, 57, -1, 28,
1019 29, 30, 31, -1, -1, -1, -1, 5, 6, 7,
1020 8, 40, 41, 11, 12, -1, -1, -1, -1, 48,
1021 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
1022 28, 29, 30, 31, -1, -1, -1, -1, -1, -1,
1023 -1, -1, 40, 41, -1, -1, -1, -1, -1, -1,
1024 48, 49, 50, 51, 52, 53, 54, 55, 56, 57
1031 0, 1, 3, 13, 14, 15, 17, 18, 19, 20,
1032 21, 22, 23, 24, 25, 26, 27, 43, 64, 74,
1033 75, 76, 77, 80, 82, 83, 84, 85, 86, 87,
1034 88, 89, 90, 92, 94, 95, 99, 100, 101, 102,
1035 104, 114, 115, 66, 61, 61, 82, 101, 61, 101,
1036 44, 45, 46, 54, 61, 68, 70, 71, 95, 99,
1037 101, 102, 104, 105, 106, 109, 111, 112, 113, 61,
1038 78, 79, 101, 78, 100, 101, 100, 65, 81, 82,
1039 0, 75, 66, 13, 26, 27, 32, 33, 34, 35,
1040 36, 37, 38, 39, 47, 61, 68, 105, 91, 95,
1041 99, 104, 16, 61, 105, 61, 72, 105, 105, 44,
1042 45, 46, 93, 107, 108, 109, 110, 105, 105, 5,
1043 6, 7, 8, 9, 10, 11, 12, 28, 29, 30,
1044 31, 40, 41, 48, 49, 50, 51, 52, 53, 54,
1045 55, 56, 57, 44, 45, 93, 63, 65, 81, 105,
1046 105, 105, 105, 105, 105, 105, 105, 105, 105, 96,
1047 97, 98, 101, 105, 103, 105, 62, 66, 105, 105,
1048 62, 78, 46, 62, 42, 69, 63, 105, 105, 105,
1049 105, 105, 105, 105, 105, 105, 105, 105, 105, 93,
1050 93, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1051 105, 62, 79, 62, 63, 67, 69, 82, 105, 66,
1052 62, 82, 62, 72, 110, 107, 97, 105, 4, 66,
1053 82, 80, 46, 82, 91, 72, 62, 46, 82
1059 0, 73, 74, 75, 75, 76, 76, 77, 78, 78,
1060 79, 79, 80, 80, 81, 81, 82, 82, 82, 82,
1061 82, 83, 83, 83, 83, 83, 83, 83, 83, 83,
1062 83, 83, 84, 84, 85, 85, 86, 86, 86, 86,
1063 87, 88, 89, 90, 91, 91, 91, 91, 92, 93,
1064 93, 94, 95, 96, 96, 97, 97, 98, 98, 99,
1065 99, 99, 99, 99, 99, 99, 99, 99, 100, 100,
1066 101, 101, 102, 103, 104, 104, 104, 104, 105, 105,
1067 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1068 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1069 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1070 105, 105, 106, 107, 107, 108, 108, 109, 109, 109,
1071 110, 111, 111, 111, 112, 113, 114, 115
1077 0, 2, 1, 1, 2, 1, 1, 6, 0, 1,
1078 1, 3, 3, 2, 1, 2, 2, 1, 1, 1,
1079 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1080 1, 0, 2, 1, 5, 7, 1, 1, 1, 1,
1081 9, 5, 5, 6, 1, 1, 1, 0, 3, 1,
1082 1, 4, 4, 1, 0, 1, 3, 1, 3, 3,
1083 3, 3, 3, 3, 3, 3, 3, 3, 1, 1,
1084 1, 1, 4, 1, 2, 2, 2, 2, 3, 3,
1085 2, 3, 3, 3, 2, 2, 3, 3, 3, 3,
1086 3, 3, 3, 3, 3, 3, 1, 3, 3, 3,
1087 3, 3, 3, 3, 3, 3, 3, 1, 1, 1,
1088 1, 1, 3, 1, 3, 1, 3, 1, 1, 1,
1089 1, 1, 1, 1, 1, 7, 2, 2
1095#define yyerrok (yyerrstatus = 0)
1096#define yyclearin (yychar = YYEMPTY)
1098#define YYACCEPT goto yyacceptlab
1099#define YYABORT goto yyabortlab
1100#define YYERROR goto yyerrorlab
1103#define YYRECOVERING() (!!yyerrstatus)
1105#define YYBACKUP(Token, Value) \
1107 if (yychar == YYEMPTY) \
1111 YYPOPSTACK (yylen); \
1117 yyerror (parm, err_c, YY_("syntax error: cannot back up")); \
1124#define YYERRCODE YYUNDEF
1132# define YYFPRINTF fprintf
1135# define YYDPRINTF(Args) \
1142# ifndef YY_LOCATION_PRINT
1143# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1147# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
1151 YYFPRINTF (stderr, "%s ", Title); \
1152 yy_symbol_print (stderr, \
1153 Kind, Value, parm, err_c); \
1154 YYFPRINTF (stderr, "\n"); \
1167 FILE *yyoutput = yyo;
1175 YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
1207 for (; yybottom <= yytop; yybottom++)
1209 int yybot = *yybottom;
1215# define YY_STACK_PRINT(Bottom, Top) \
1218 yy_stack_print ((Bottom), (Top)); \
1228 int yyrule,
naslctxt * parm,
int * err_c)
1231 int yynrhs =
yyr2[yyrule];
1233 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %d):\n",
1236 for (yyi = 0; yyi < yynrhs; yyi++)
1241 &yyvsp[(yyi + 1) - (yynrhs)], parm, err_c);
1246# define YY_REDUCE_PRINT(Rule) \
1249 yy_reduce_print (yyssp, yyvsp, Rule, parm, err_c); \
1256# define YYDPRINTF(Args) ((void) 0)
1257# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
1258# define YY_STACK_PRINT(Bottom, Top)
1259# define YY_REDUCE_PRINT(Rule)
1265# define YYINITDEPTH 200
1276# define YYMAXDEPTH 10000
1331 int yyerrstatus = 0;
1360#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1366 YYDPRINTF ((stderr,
"Starting parse\n"));
1385 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1392 if (yyss + yystacksize - 1 <= yyssp)
1393#if !defined yyoverflow && !defined YYSTACK_RELOCATE
1394 goto yyexhaustedlab;
1400# if defined yyoverflow
1412 yyoverflow (
YY_(
"memory exhausted"),
1413 &yyss1, yysize *
YYSIZEOF (*yyssp),
1414 &yyvs1, yysize *
YYSIZEOF (*yyvsp),
1422 goto yyexhaustedlab;
1433 goto yyexhaustedlab;
1436# undef YYSTACK_RELOCATE
1442 yyssp = yyss + yysize - 1;
1443 yyvsp = yyvs + yysize - 1;
1446 YYDPRINTF ((stderr,
"Stack size increased to %ld\n",
1447 YY_CAST (
long, yystacksize)));
1450 if (yyss + yystacksize - 1 <= yyssp)
1478 YYDPRINTF ((stderr,
"Reading a token\n"));
1479 yychar =
yylex (&yylval, parm, err_c);
1482 if (yychar <=
YYEOF)
1486 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1560 yyval = yyvsp[1-yylen];
1567#line 153 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1571#line 1572 "nasl_grammar.tab.c"
1575#line 158 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1579 (yyval.
node)->link[0] = (yyvsp[0].node);
1581#line 1582 "nasl_grammar.tab.c"
1585#line 164 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1589 (yyval.
node)->link[0] = (yyvsp[-1].node);
1590 (yyval.
node)->link[1] = (yyvsp[0].node);
1592#line 1593 "nasl_grammar.tab.c"
1596#line 174 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1602 (yyval.
node)->x.str_val = (yyvsp[-4].
str);
1603 (yyval.
node)->link[0] = (yyvsp[-2].node);
1604 (yyval.
node)->link[1] = (yyvsp[0].node);
1606#line 1607 "nasl_grammar.tab.c"
1610#line 184 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1611 { (yyval.
node) = NULL; }
1612#line 1613 "nasl_grammar.tab.c"
1616#line 184 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1617 { (yyval.
node) = (yyvsp[0].node); }
1618#line 1619 "nasl_grammar.tab.c"
1622#line 186 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1627 (yyval.
node)->x.str_val = (yyvsp[0].
str);
1629#line 1630 "nasl_grammar.tab.c"
1633#line 193 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1638 (yyval.
node)->x.str_val = (yyvsp[-2].
str);
1639 (yyval.
node)->link[0] = (yyvsp[0].node);
1641#line 1642 "nasl_grammar.tab.c"
1645#line 202 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1646 { (yyval.
node) = (yyvsp[-1].node); }
1647#line 1648 "nasl_grammar.tab.c"
1651#line 202 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1652 { (yyval.
node) = NULL; }
1653#line 1654 "nasl_grammar.tab.c"
1657#line 205 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1659 if ((yyvsp[-1].node) == NULL)
1666 (yyval.
node)->link[0] = (yyvsp[-1].node);
1667 (yyval.
node)->link[1] = (yyvsp[0].node);
1670#line 1671 "nasl_grammar.tab.c"
1674#line 219 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1675 { (yyval.
node) = (yyvsp[-1].node); }
1676#line 1677 "nasl_grammar.tab.c"
1680#line 220 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1682#line 1683 "nasl_grammar.tab.c"
1686#line 226 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1692#line 1693 "nasl_grammar.tab.c"
1696#line 231 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1702#line 1703 "nasl_grammar.tab.c"
1706#line 236 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1707 { (yyval.
node) = NULL; }
1708#line 1709 "nasl_grammar.tab.c"
1712#line 240 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1717 (yyval.
node)->link[0] = (yyvsp[0].node);
1719#line 1720 "nasl_grammar.tab.c"
1723#line 247 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1729#line 1730 "nasl_grammar.tab.c"
1733#line 255 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1738 (yyval.
node)->link[0] = (yyvsp[-2].node); (yyval.
node)->link[1] = (yyvsp[0].node);
1740#line 1741 "nasl_grammar.tab.c"
1744#line 262 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1749 (yyval.
node)->link[0] = (yyvsp[-4].node); (yyval.
node)->link[1] = (yyvsp[-2].node); (yyval.
node)->link[2] = (yyvsp[0].node);
1751#line 1752 "nasl_grammar.tab.c"
1755#line 272 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1760 (yyval.
node)->link[0] = (yyvsp[-6].node);
1761 (yyval.
node)->link[1] = (yyvsp[-4].node);
1762 (yyval.
node)->link[2] = (yyvsp[-2].node);
1763 (yyval.
node)->link[3] = (yyvsp[0].node);
1765#line 1766 "nasl_grammar.tab.c"
1769#line 283 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1774 (yyval.
node)->link[0] = (yyvsp[-2].node);
1775 (yyval.
node)->link[1] = (yyvsp[0].node);
1777#line 1778 "nasl_grammar.tab.c"
1781#line 291 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1786 (yyval.
node)->link[0] = (yyvsp[-3].node);
1787 (yyval.
node)->link[1] = (yyvsp[-1].node);
1789#line 1790 "nasl_grammar.tab.c"
1793#line 300 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1798 (yyval.
node)->x.str_val = (yyvsp[-4].
str);
1799 (yyval.
node)->link[0] = (yyvsp[-2].node);
1800 (yyval.
node)->link[1] = (yyvsp[0].node);
1802#line 1803 "nasl_grammar.tab.c"
1806#line 310 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1807 { (yyval.
node) = NULL; }
1808#line 1809 "nasl_grammar.tab.c"
1812#line 314 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1817 (yyval.
node)->link[0] = (yyvsp[-2].node);
1818 (yyval.
node)->link[1] = (yyvsp[0].node);
1820#line 1821 "nasl_grammar.tab.c"
1824#line 322 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1825 { (yyval.
str) = (yyvsp[0].data).val; }
1826#line 1827 "nasl_grammar.tab.c"
1830#line 326 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1834 #pragma GCC diagnostic push
1835 #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
1836 int * error_counter;
1837 #pragma GCC diagnostic pop
1838 error_counter = (
int*)err_c;
1840 bzero (&subctx,
sizeof (subctx));
1845 (yyval.
node) = NULL;
1850 (g_str_hash, g_str_equal, g_free,
1857 g_free ((yyvsp[-1].str));
1873 nasl_perror (NULL,
"%s: Parse error at or near line %d\n", (yyvsp[-1].str),
1875 g_free ((yyvsp[-1].str));
1881 g_free((yyvsp[-1].str));
1888#line 1889 "nasl_grammar.tab.c"
1892#line 386 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1897 (yyval.
node)->x.str_val = (yyvsp[-3].
str);
1898 (yyval.
node)->link[0] = (yyvsp[-1].node);
1900#line 1901 "nasl_grammar.tab.c"
1904#line 394 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1905 { (yyval.
node) = NULL; }
1906#line 1907 "nasl_grammar.tab.c"
1910#line 396 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1912 (yyvsp[-2].
node)->link[1] = (yyvsp[0].node);
1913 (yyval.
node) = (yyvsp[-2].node);
1915#line 1916 "nasl_grammar.tab.c"
1919#line 402 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1924 (yyval.
node)->link[0] = (yyvsp[0].node);
1926#line 1927 "nasl_grammar.tab.c"
1930#line 409 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1935 (yyval.
node)->x.str_val = (yyvsp[-2].
str);
1936 (yyval.
node)->link[0] = (yyvsp[0].node);
1938#line 1939 "nasl_grammar.tab.c"
1942#line 419 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1946#line 1947 "nasl_grammar.tab.c"
1950#line 422 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1952#line 1953 "nasl_grammar.tab.c"
1956#line 423 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1958#line 1959 "nasl_grammar.tab.c"
1962#line 424 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1964#line 1965 "nasl_grammar.tab.c"
1968#line 425 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1970#line 1971 "nasl_grammar.tab.c"
1974#line 426 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1976#line 1977 "nasl_grammar.tab.c"
1980#line 427 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1982#line 1983 "nasl_grammar.tab.c"
1986#line 428 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1988#line 1989 "nasl_grammar.tab.c"
1992#line 429 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
1994#line 1995 "nasl_grammar.tab.c"
1998#line 433 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2001 (yyval.
node)->x.str_val = (yyvsp[0].
str);
2003#line 2004 "nasl_grammar.tab.c"
2007#line 438 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2008 { (yyval.
str) = strdup(
"x"); }
2009#line 2010 "nasl_grammar.tab.c"
2013#line 441 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2017 (yyval.
node)->x.str_val = (yyvsp[-3].
str);
2018 (yyval.
node)->link[0] = (yyvsp[-1].node);
2020#line 2021 "nasl_grammar.tab.c"
2024#line 451 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2026#line 2027 "nasl_grammar.tab.c"
2030#line 452 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2032#line 2033 "nasl_grammar.tab.c"
2036#line 453 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2038#line 2039 "nasl_grammar.tab.c"
2042#line 454 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2044#line 2045 "nasl_grammar.tab.c"
2048#line 458 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2049 { (yyval.
node) = (yyvsp[-1].node); }
2050#line 2051 "nasl_grammar.tab.c"
2054#line 459 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2056#line 2057 "nasl_grammar.tab.c"
2060#line 460 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2062#line 2063 "nasl_grammar.tab.c"
2066#line 461 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2068#line 2069 "nasl_grammar.tab.c"
2072#line 462 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2074#line 2075 "nasl_grammar.tab.c"
2078#line 463 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2080#line 2081 "nasl_grammar.tab.c"
2084#line 464 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2086#line 2087 "nasl_grammar.tab.c"
2090#line 465 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2092#line 2093 "nasl_grammar.tab.c"
2096#line 466 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2098#line 2099 "nasl_grammar.tab.c"
2102#line 467 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2104#line 2105 "nasl_grammar.tab.c"
2108#line 468 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2110#line 2111 "nasl_grammar.tab.c"
2114#line 469 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2116#line 2117 "nasl_grammar.tab.c"
2120#line 470 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2122#line 2123 "nasl_grammar.tab.c"
2126#line 471 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2128#line 2129 "nasl_grammar.tab.c"
2132#line 472 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2134#line 2135 "nasl_grammar.tab.c"
2138#line 473 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2140#line 2141 "nasl_grammar.tab.c"
2144#line 474 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2146#line 2147 "nasl_grammar.tab.c"
2150#line 475 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2152#line 2153 "nasl_grammar.tab.c"
2156#line 477 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2158#line 2159 "nasl_grammar.tab.c"
2162#line 478 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2164#line 2165 "nasl_grammar.tab.c"
2168#line 479 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2170#line 2171 "nasl_grammar.tab.c"
2174#line 480 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2176#line 2177 "nasl_grammar.tab.c"
2180#line 481 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2182#line 2183 "nasl_grammar.tab.c"
2186#line 482 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2188#line 2189 "nasl_grammar.tab.c"
2192#line 483 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2194#line 2195 "nasl_grammar.tab.c"
2198#line 484 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2200#line 2201 "nasl_grammar.tab.c"
2204#line 485 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2206#line 2207 "nasl_grammar.tab.c"
2210#line 486 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2212#line 2213 "nasl_grammar.tab.c"
2216#line 490 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2218#line 2219 "nasl_grammar.tab.c"
2222#line 492 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2223 { (yyval.
node) = (yyvsp[0].node); }
2224#line 2225 "nasl_grammar.tab.c"
2228#line 493 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2230 (yyvsp[-2].
node)->link[1] = (yyvsp[0].node); (yyval.
node) = (yyvsp[-2].node);
2232#line 2233 "nasl_grammar.tab.c"
2236#line 497 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2239 (yyval.
node)->link[0] = (yyvsp[0].node);
2241#line 2242 "nasl_grammar.tab.c"
2245#line 500 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2248 (yyval.
node)->link[0] = (yyvsp[0].node);
2251#line 2252 "nasl_grammar.tab.c"
2255#line 506 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2257#line 2258 "nasl_grammar.tab.c"
2261#line 507 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2264 (yyval.
node)->size = strlen((yyvsp[0].str));
2266#line 2267 "nasl_grammar.tab.c"
2270#line 511 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2273 (yyval.
node)->size = (yyvsp[0].data).len;
2275#line 2276 "nasl_grammar.tab.c"
2279#line 519 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2283 (yyval.
node)->x.str_val = (yyvsp[0].
str);
2285#line 2286 "nasl_grammar.tab.c"
2289#line 529 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2291 char *s = g_strdup_printf (
"%ld.%ld.%ld.%ld", (yyvsp[-6].num), (yyvsp[-4].num), (yyvsp[-2].num), (yyvsp[0].num));
2294 (yyval.
node)->x.str_val = s;
2295 (yyval.
node)->size = strlen(s);
2297#line 2298 "nasl_grammar.tab.c"
2301#line 539 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2305 (yyval.
node)->link[0] = (yyvsp[0].node);
2307#line 2308 "nasl_grammar.tab.c"
2311#line 547 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2315 (yyval.
node)->link[0] = (yyvsp[0].node);
2317#line 2318 "nasl_grammar.tab.c"
2321#line 2322 "nasl_grammar.tab.c"
2348 const int yyi =
yypgoto[yylhs] + *yyssp;
2349 yystate = (0 <= yyi && yyi <=
YYLAST &&
yycheck[yyi] == *yyssp
2371 if (yyerrstatus == 3)
2376 if (yychar <=
YYEOF)
2379 if (yychar ==
YYEOF)
2385 yytoken, &yylval, parm, err_c);
2474#if !defined yyoverflow
2479 yyerror (parm, err_c,
YY_(
"memory exhausted"));
2495 yytoken, &yylval, parm, err_c);
2501 while (yyssp != yyss)
2515#line 553 "/builddir/build/BUILD/openvas-scanner-22.7.9/nasl/nasl_grammar.y"
2520#include <gvm/base/logging.h>
2521#include <gvm/base/prefs.h>
2530 g_message (
"Parse error at or near line %d:",
LNB);
2531 g_message (
" %s", s);
2565 struct stat stat_buf;
2567 if (stat (dir, &stat_buf) != 0)
2570 if (S_ISDIR(stat_buf.st_mode) != 0)
2584 static int loaded = 0;
2585 const char *base, *
prefix;
2586 char filename[2048], *fbuffer;
2593 base = prefs_get (
"plugins_folder");
2594 snprintf (filename,
sizeof (filename),
"%s/sha256sums", base);
2595 if (g_file_get_contents (filename, &fbuffer, &flen, NULL))
2599 g_warning (
"No plugins checksums file");
2605 g_warning (
"Erroneous or missing signature for checksums file %s",
2613 file = fopen (filename,
"r");
2616 g_warning (
"%s: Couldn't read file %s", __func__, filename);
2621 kb_del_items (kb,
"sha256sums:*");
2626 char buffer[2048], **splits;
2627 if (!fgets (buffer,
sizeof (buffer), file))
2629 if (strstr (buffer,
".asc")
2630 || (!strstr (buffer,
".inc") && !strstr (buffer,
".nasl")))
2632 splits = g_strsplit (buffer,
" ", -1);
2633 if (g_strv_length (splits) != 2)
2635 g_warning (
"%s: Erroneous checksum entry %s", __func__, buffer);
2636 g_strfreev (splits);
2639 splits[1][strlen (splits[1]) - 1] =
'\0';
2640 if (strstr (splits[1],
".inc"))
2641 g_snprintf (buffer,
sizeof (buffer),
"%s:%s",
prefix,
2642 basename (splits[1]));
2644 g_snprintf (buffer,
sizeof (buffer),
"%s:%s/%s",
prefix, base,
2646 kb_item_set_str (kb, buffer, splits[0], 0);
2647 g_strfreev (splits);
2663 char *content = NULL, digest[128], *result;
2664 size_t len = 0, i, alglen;
2666 assert (algorithm == GCRY_MD_SHA256);
2667 if (!filename || !g_file_get_contents (filename, &content, &
len, NULL))
2670 gcry_md_hash_buffer (algorithm, digest, content,
len);
2671 alglen = gcry_md_get_algo_dlen (algorithm);
2672 result = g_malloc0 (alglen * 2 + 1);
2673 for (i = 0; i < alglen; i++)
2674 snprintf (result + 2 * i, 3,
"%02x", (
unsigned char) digest[i]);
2698 char *full_name = NULL, key_path[2048], *checksum, *filename;
2720 while (inc_dir != NULL) {
2723 full_name = g_build_filename(inc_dir->data,
name, NULL);
2725 if ((g_file_get_contents (full_name, &pc->
buffer, &flen, NULL)))
2728 inc_dir = g_slist_next(inc_dir);
2731 if (!full_name || !pc->
buffer) {
2732 g_message (
"%s: Not able to open nor to locate it in include paths",
2745 if (strstr (full_name,
".inc"))
2746 filename = basename (full_name);
2748 filename = full_name;
2749 snprintf (key_path,
sizeof (key_path),
"signaturecheck:%s", filename);
2750 timestamp = kb_item_get_int (pc->
kb, key_path);
2758 struct stat file_stat;
2760 if (stat (full_name, &file_stat) >= 0 && timestamp > file_stat.st_mtime)
2772 snprintf (key_path,
sizeof (key_path),
"sha256sums:%s", filename);
2775 checksum = kb_item_get_str (pc->
kb, key_path);
2778 g_warning (
"No checksum for %s", full_name);
2787 snprintf (key_path,
sizeof (key_path),
"signaturecheck:%s", filename);
2788 ret = strcmp (check, checksum);
2791 kb_del_items (pc->
kb, key_path);
2792 g_warning (
"checksum for %s not matching", full_name);
2796 kb_del_items (pc->
kb, key_path);
2797 kb_item_add_int (pc->
kb, key_path, time (NULL));
2895 else if (isalpha(c) || c ==
'_')
2901 else if (isspace(c))
2905 else if (isdigit(c))
2973 *p++ =
'\f';
len ++;
2976 *p++ =
'\t';
len ++;
2982 *p++ =
'\v';
len ++;
2985 *p ++ =
'"';
len ++;
2997 for (i = 0; i < 2; i ++)
3002 nasl_perror(NULL,
"Unfinished \\x escape sequence (EOF)\n");
3009 if (c >=
'0' && c <=
'9')
3010 x = x * 16 + (c -
'0');
3011 else if (c >=
'a' && c <=
'f')
3012 x = x * 16 + 10 + (c -
'a');
3015 nasl_perror(NULL,
"Unfinished \\x escape sequence\n");
3026 nasl_perror(NULL,
"Unknown escape sequence \\%c\n", c);
3039 if (isalnum(c) || c ==
'_')
3055 if (c ==
'x' || c ==
'X')
3057 else if (isdigit(c))
3167 if (! isprint(c)) c =
'.';
3168 g_message (
"lexer error: invalid token >!%c "
3169 "parsed as >!< %c", c, c);
3422 nasl_perror(NULL,
"Invalid token 0x parsed as 0 at line %d\n",
3436 #pragma GCC diagnostic push
3437 #pragma GCC diagnostic ignored "-Wunused-parameter"
3439 #pragma GCC diagnostic pop
3440 int x =
mylex (lvalp, parm);
int naslparse(naslctxt *, int *)
int nasl_verify_signature(const char *filename)
void nasl_set_filename(const char *filename)
void nasl_set_function_filename(const char *function)
void nasl_perror(lex_ctxt *lexic, char *msg,...)
const char * nasl_get_filename(const char *function)
int nasl_get_include_order(const char *c)
static const char * yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
static void naslerror(naslctxt *, int *, const char *)
static char * file_checksum(const char *filename, int algorithm)
Get the checksum of a file.
static const yytype_int8 yytranslate[]
@ YYSYMBOL_instr_decl_list
@ YYSYMBOL_simple_array_data
@ YYSYMBOL_list_array_data
static int mylex(YYSTYPE *lvalp, void *parm)
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
static const yytype_int8 yydefact[]
void nasl_clean_ctx(naslctxt *c)
#define YY_IGNORE_USELESS_CAST_END
static const yytype_int16 yyrline[]
void nasl_clean_inc(void)
static int checksum_algorithm
#define YY_REDUCE_PRINT(Rule)
#define YY_CAST(Type, Val)
static const yytype_int16 yypact[]
static char * parse_buffer
static const yytype_uint8 yydefgoto[]
#define YY_ACCESSING_SYMBOL(State)
#define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
static const yytype_int16 yypgoto[]
#define YY_INITIAL_VALUE(Value)
int init_nasl_ctx(naslctxt *pc, const char *name)
Initialize a NASL context for a NASL file.
unsigned char yytype_uint8
#define YY_STACK_PRINT(Bottom, Top)
static void yy_symbol_value_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, naslctxt *parm, int *err_c)
#define YY_IGNORE_USELESS_CAST_BEGIN
static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, naslctxt *parm, int *err_c)
static const yytype_int8 yyr2[]
GHashTable * includes_hash
static const yytype_int16 yytable[]
#define yytable_value_is_error(Yyn)
static const yytype_int8 yystos[]
#define YY_ATTRIBUTE_UNUSED
int add_nasl_inc_dir(const char *dir)
Adds the given string as directory for searching for includes.
static const char *const yytname[]
static const yytype_int8 yyr1[]
static void yy_reduce_print(yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule, naslctxt *parm, int *err_c)
static void load_checksums(kb_t kb)
static int nasllex(YYSTYPE *lvalp, void *parm, int *err_c)
unsigned short yytype_uint16
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
#define yypact_value_is_default(Yyn)
static void yy_stack_print(yy_state_t *yybottom, yy_state_t *yytop)
static const yytype_int16 yycheck[]
static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, naslctxt *parm, int *err_c)
void ref_cell(tree_cell *c)
tree_cell * alloc_RE_cell(int lnb, int t, tree_cell *l, char *re_str, int *err_c)
tree_cell * alloc_expr_cell(int lnb, int t, tree_cell *l, tree_cell *r)
tree_cell * alloc_typed_cell(int typ)
static void prefix(int n, int i)
void deref_cell(tree_cell *c)
tree_cell * make_array_from_elems(tree_cell *el)
unsigned int include_order
struct YYSTYPE::asciiz data