47 #define YYBISON_VERSION "3.0.5" 50 #define YYSKELETON_NAME "yacc.c" 63 #define yyparse naslparse 65 #define yyerror naslerror 66 #define yydebug nasldebug 67 #define yynerrs naslnerrs 71 #line 5 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 91 #define YYPARSE_PARAM parm 92 #define YYLEX_PARAM parm 94 #define LNB (((naslctxt*)parm)->line_nb) 109 static void naslerror(
naslctxt *,
const char *);
113 #define YYERROR_VERBOSE 115 #line 116 "nasl_grammar.tab.c" 118 # if defined __cplusplus && 201103L <= __cplusplus 119 # define YY_NULLPTR nullptr 121 # define YY_NULLPTR 0 126 #ifdef YYERROR_VERBOSE 127 # undef YYERROR_VERBOSE 128 # define YYERROR_VERBOSE 1 130 # define YYERROR_VERBOSE 0 135 #ifndef YY_NASL_NASL_GRAMMAR_TAB_H_INCLUDED 136 # define YY_NASL_NASL_GRAMMAR_TAB_H_INCLUDED 201 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 205 #line 49 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 215 #line 216 "nasl_grammar.tab.c" 219 # define YYSTYPE_IS_TRIVIAL 1 220 # define YYSTYPE_IS_DECLARED 1 230 #line 59 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 232 static int nasllex(
YYSTYPE * lvalp,
void * parm);
234 #line 235 "nasl_grammar.tab.c" 265 # ifdef __SIZE_TYPE__ 266 # define YYSIZE_T __SIZE_TYPE__ 267 # elif defined size_t 268 # define YYSIZE_T size_t 269 # elif ! defined YYSIZE_T 271 # define YYSIZE_T size_t 273 # define YYSIZE_T unsigned int 277 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 280 # if defined YYENABLE_NLS && YYENABLE_NLS 282 # include <libintl.h> 283 # define YY_(Msgid) dgettext ("bison-runtime", Msgid) 287 # define YY_(Msgid) Msgid 292 # if (defined __GNUC__ \ 293 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ 294 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C 295 # define YY_ATTRIBUTE(Spec) __attribute__(Spec) 297 # define YY_ATTRIBUTE(Spec) 301 #ifndef YY_ATTRIBUTE_PURE 302 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) 305 #ifndef YY_ATTRIBUTE_UNUSED 306 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) 309 #if !defined _Noreturn \ 310 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) 311 # if defined _MSC_VER && 1200 <= _MSC_VER 312 # define _Noreturn __declspec (noreturn) 314 # define _Noreturn YY_ATTRIBUTE ((__noreturn__)) 319 #if ! defined lint || defined __GNUC__ 320 # define YYUSE(E) ((void) (E)) 325 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ 327 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ 328 _Pragma ("GCC diagnostic push") \ 329 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ 330 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") 331 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ 332 _Pragma ("GCC diagnostic pop") 334 # define YY_INITIAL_VALUE(Value) Value 336 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 337 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 338 # define YY_IGNORE_MAYBE_UNINITIALIZED_END 340 #ifndef YY_INITIAL_VALUE 341 # define YY_INITIAL_VALUE(Value) 345 #if ! defined yyoverflow || YYERROR_VERBOSE 349 # ifdef YYSTACK_USE_ALLOCA 350 # if YYSTACK_USE_ALLOCA 352 # define YYSTACK_ALLOC __builtin_alloca 353 # elif defined __BUILTIN_VA_ARG_INCR 356 # define YYSTACK_ALLOC __alloca 357 # elif defined _MSC_VER 359 # define alloca _alloca 361 # define YYSTACK_ALLOC alloca 362 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS 365 # ifndef EXIT_SUCCESS 366 # define EXIT_SUCCESS 0 373 # ifdef YYSTACK_ALLOC 375 # define YYSTACK_FREE(Ptr) do { ; } while (0) 376 # ifndef YYSTACK_ALLOC_MAXIMUM 381 # define YYSTACK_ALLOC_MAXIMUM 4032 384 # define YYSTACK_ALLOC YYMALLOC 385 # define YYSTACK_FREE YYFREE 386 # ifndef YYSTACK_ALLOC_MAXIMUM 387 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 389 # if (defined __cplusplus && ! defined EXIT_SUCCESS \ 390 && ! ((defined YYMALLOC || defined malloc) \ 391 && (defined YYFREE || defined free))) 393 # ifndef EXIT_SUCCESS 394 # define EXIT_SUCCESS 0 398 # define YYMALLOC malloc 399 # if ! defined malloc && ! defined EXIT_SUCCESS 405 # if ! defined free && ! defined EXIT_SUCCESS 413 #if (! defined yyoverflow \ 414 && (! defined __cplusplus \ 415 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 425 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 429 # define YYSTACK_BYTES(N) \ 430 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 431 + YYSTACK_GAP_MAXIMUM) 433 # define YYCOPY_NEEDED 1 440 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 443 YYSIZE_T yynewbytes; \ 444 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 445 Stack = &yyptr->Stack_alloc; \ 446 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 447 yyptr += yynewbytes / sizeof (*yyptr); \ 453 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED 457 # if defined __GNUC__ && 1 < __GNUC__ 458 # define YYCOPY(Dst, Src, Count) \ 459 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) 461 # define YYCOPY(Dst, Src, Count) \ 465 for (yyi = 0; yyi < (Count); yyi++) \ 466 (Dst)[yyi] = (Src)[yyi]; \ 485 #define YYNSTATES 227 490 #define YYMAXUTOK 304 492 #define YYTRANSLATE(YYX) \ 493 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 499 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
500 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
501 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
502 2, 2, 2, 70, 2, 2, 2, 57, 52, 2,
503 61, 62, 55, 53, 63, 54, 72, 56, 2, 2,
504 2, 2, 2, 2, 2, 2, 2, 2, 67, 66,
505 48, 47, 49, 2, 2, 2, 2, 2, 2, 2,
506 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
507 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
508 2, 68, 2, 69, 51, 2, 2, 2, 2, 2,
509 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
510 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
511 2, 2, 2, 64, 50, 65, 71, 2, 2, 2,
512 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
513 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
514 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
515 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
516 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
517 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
518 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
519 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
520 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
521 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
522 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
523 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
524 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
525 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
526 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
527 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
528 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
536 0, 144, 144, 149, 155, 162, 162, 165, 174, 174,
537 175, 176, 184, 184, 185, 186, 200, 200, 200, 200,
538 203, 203, 203, 204, 204, 204, 204, 204, 205, 209,
539 213, 216, 222, 229, 235, 243, 243, 243, 243, 244,
540 254, 261, 269, 278, 278, 278, 278, 281, 289, 289,
541 292, 345, 352, 352, 353, 353, 359, 365, 373, 377,
542 378, 379, 380, 381, 382, 383, 384, 387, 387, 389,
543 389, 391, 398, 401, 402, 403, 404, 408, 409, 410,
544 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
545 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
546 431, 432, 433, 434, 435, 436, 437, 437, 437, 437,
547 437, 440, 442, 443, 447, 450, 456, 457, 461, 466,
548 468, 469, 469, 471, 473, 482, 490
552 #if YYDEBUG || YYERROR_VERBOSE || 0 555 static const char *
const yytname[] =
557 "$end",
"error",
"$undefined",
"IF",
"ELSE",
"EQ",
"NEQ",
"SUPEQ",
558 "INFEQ",
"OR",
"AND",
"MATCH",
"NOMATCH",
"REP",
"FOR",
"REPEAT",
559 "UNTIL",
"FOREACH",
"WHILE",
"BREAK",
"CONTINUE",
"FUNCTION",
"RETURN",
560 "INCLUDE",
"LOCAL",
"GLOBAL",
"PLUS_PLUS",
"MINUS_MINUS",
"L_SHIFT",
561 "R_SHIFT",
"R_USHIFT",
"EXPO",
"PLUS_EQ",
"MINUS_EQ",
"MULT_EQ",
562 "DIV_EQ",
"MODULO_EQ",
"L_SHIFT_EQ",
"R_SHIFT_EQ",
"R_USHIFT_EQ",
563 "RE_MATCH",
"RE_NOMATCH",
"ARROW",
"IDENT",
"STRING1",
"STRING2",
564 "INTEGER",
"'='",
"'<'",
"'>'",
"'|'",
"'^'",
"'&'",
"'+'",
"'-'",
"'*'",
565 "'/'",
"'%'",
"NOT",
"UMINUS",
"BIT_NOT",
"'('",
"')'",
"','",
"'{'",
566 "'}'",
"';'",
"':'",
"'['",
"']'",
"'!'",
"'~'",
"'.'",
"$accept",
567 "tiptop",
"instr_decl_list",
"instr_decl",
"func_decl",
"arg_decl",
568 "arg_decl_1",
"block",
"instr_list",
"instr",
"simple_instr",
"ret",
569 "if_block",
"loop",
"for_loop",
"while_loop",
"repeat_loop",
570 "foreach_loop",
"aff_func",
"rep",
"string",
"inc",
"func_call",
571 "arg_list",
"arg_list_1",
"arg",
"aff",
"lvalue",
"identifier",
572 "array_elem",
"array_index",
"post_pre_incr",
"expr",
"const_array",
573 "list_array_data",
"array_data",
"atom",
"simple_array_data",
"var",
574 "var_name",
"ipaddr",
"loc",
"glob",
YY_NULLPTR 583 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
584 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
585 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
586 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
587 295, 296, 297, 298, 299, 300, 301, 61, 60, 62,
588 124, 94, 38, 43, 45, 42, 47, 37, 302, 303,
589 304, 40, 41, 44, 123, 125, 59, 58, 91, 93,
594 #define YYPACT_NINF -91 596 #define yypact_value_is_default(Yystate) \ 597 (!!((Yystate) == (-91))) 599 #define YYTABLE_NINF -69 601 #define yytable_value_is_error(Yytable_value) \ 602 (!!((Yytable_value) == (-69))) 608 464, -53, -91, -50, 491, -6, -42, -91, -91, -6,
609 499, -40, -6, -6, -6, -6, -91, 259, 25, -91,
610 91, -91, -91, -91, -39, -91, -91, -91, -91, -91,
611 -91, -91, -91, -91, 23, -91, 553, -13, -91, -91,
612 -91, -91, 499, 26, 29, -30, 499, -21, -91, -91,
613 -18, 499, 499, 13, 499, 499, -91, -91, 961, 611,
614 -91, 798, -91, -91, -91, -91, -91, 19, -91, -91,
615 -12, -91, -91, -26, -91, -91, -9, 123, -91, -91,
616 -91, 499, -91, -91, 499, 499, 499, 499, 499, 499,
617 499, 499, 499, 499, 499, 566, -4, -91, -91, -91,
618 499, 499, 624, -6, 14, 37, 682, 39, 40, -91,
619 42, 7, 22, -91, -91, 37, 37, 499, 499, 499,
620 499, 499, 499, 499, 499, 499, 499, 499, 499, 19,
621 19, 499, 499, 499, 499, 499, 499, 499, 499, 499,
622 499, -91, -91, 28, -6, -91, -91, 798, 798, 798,
623 798, 798, 798, 798, 798, 798, 798, 35, -91, 33,
624 945, 798, 17, 798, 491, 499, 347, 740, 491, 36,
625 16, -91, 34, -91, 13, 882, 882, 882, 882, 851,
626 913, 882, 882, 398, 398, 398, 37, -91, -91, 882,
627 882, 354, 337, 415, 15, 15, 37, 37, 37, -91,
628 -91, -91, 499, 499, -91, 83, 409, -91, 491, -91,
629 27, 53, -91, -91, -91, 798, 491, 26, -91, -91,
630 47, -91, 38, 56, 491, -91, -91
638 30, 0, 70, 0, 30, 0, 0, 28, 29, 0,
639 32, 0, 8, 8, 0, 0, 69, 30, 0, 2,
640 3, 6, 17, 5, 0, 24, 18, 19, 35, 36,
641 37, 38, 22, 25, 23, 20, 0, 67, 68, 21,
642 26, 27, 0, 46, 0, 0, 0, 0, 118, 117,
643 116, 0, 0, 0, 0, 0, 122, 107, 123, 121,
644 95, 31, 110, 109, 106, 120, 108, 0, 125, 9,
645 10, 126, 73, 67, 74, 13, 0, 14, 1, 4,
646 16, 0, 75, 76, 0, 0, 0, 0, 0, 0,
647 0, 0, 0, 53, 0, 0, 0, 45, 43, 44,
648 0, 0, 0, 8, 0, 83, 0, 118, 117, 116,
649 0, 0, 112, 119, 114, 79, 84, 0, 0, 0,
650 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
651 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
652 0, 48, 49, 0, 0, 12, 15, 47, 59, 60,
653 61, 62, 63, 66, 64, 65, 58, 0, 52, 54,
654 123, 56, 0, 72, 30, 0, 0, 0, 30, 0,
655 0, 77, 0, 111, 0, 102, 103, 104, 105, 80,
656 78, 96, 97, 94, 92, 93, 86, 98, 99, 100,
657 101, 91, 90, 89, 81, 82, 85, 87, 88, 50,
658 11, 51, 0, 0, 71, 33, 0, 41, 30, 40,
659 0, 0, 115, 113, 55, 57, 30, 46, 42, 7,
660 0, 34, 0, 0, 30, 124, 39
666 -91, -91, 101, -91, -91, -11, -20, -87, 48, 12,
667 -91, -91, -91, -91, -91, -91, -91, -91, -90, -91,
668 -64, -91, 6, -91, -74, -91, 24, 60, 0, 18,
669 -91, 30, 209, -91, -45, -91, -52, -41, -91, -91,
676 -1, 18, 19, 20, 21, 68, 69, 22, 76, 23,
677 24, 25, 26, 27, 28, 29, 30, 31, 96, 32,
678 110, 33, 56, 157, 158, 159, 57, 36, 58, 59,
679 162, 60, 161, 62, 111, 112, 63, 114, 64, 65,
688 37, 113, 71, 143, 37, 45, 34, 2, 42, 47,
689 34, 43, 70, 70, 73, 73, 44, 37, 38, 46,
690 37, 67, 38, 34, 35, 78, 34, 80, 35, 77,
691 39, 101, 38, 38, 39, 38, 81, 16, 38, 2,
692 103, 35, 94, 37, 35, 100, 128, 39, 93, 97,
693 39, 144, 14, 15, 104, 94, 145, 107, 108, 109,
694 170, 38, 165, 141, 142, 187, 188, 98, 128, 16,
695 138, 139, 140, 99, 72, 74, 173, 37, 48, 49,
696 109, -48, -49, 34, 172, 174, 204, 216, 211, 77,
697 199, 17, 169, 160, 1, 38, 202, 201, 210, 220,
698 224, 35, 225, 70, 2, 3, 4, 39, 5, 6,
699 7, 8, 9, 10, 11, 12, 13, 14, 15, 223,
700 113, 79, 113, 219, 200, 146, 1, 222, 214, 213,
701 0, 212, 0, 0, 16, 0, 2, 3, 4, 0,
702 5, 6, 7, 8, 70, 10, 11, 12, 13, 14,
703 15, 0, 0, 0, 0, 17, 0, -30, 0, 0,
704 0, 0, 0, 0, 37, 0, 16, 0, 37, 0,
705 34, 0, 0, 0, 34, 0, 205, 0, 0, 0,
706 209, 0, 38, 0, 0, 0, 38, 17, 35, -30,
707 0, 0, 35, 0, 39, 0, 0, 0, 39, 0,
708 0, 0, 160, 0, 0, 0, 0, 0, 37, 0,
709 0, 0, 0, 0, 34, 0, 37, 37, 0, 61,
710 218, 0, 34, 97, 37, 0, 38, 0, 221, 0,
711 34, 0, 35, 0, 38, 38, 226, 0, 39, 0,
712 35, 98, 38, 0, 0, 0, 39, 99, 35, 0,
713 0, 95, 0, 0, 39, 102, 0, 0, 0, 0,
714 105, 106, 1, 115, 116, 0, 0, 0, 0, 0,
715 0, 0, 2, 3, 4, 0, 5, 6, 7, 8,
716 0, 10, 11, 12, 13, 14, 15, 0, 0, 0,
717 147, 0, 0, 148, 149, 150, 151, 152, 153, 154,
718 155, 156, 16, 163, 0, 0, 0, 0, 0, 166,
719 167, 0, 0, 0, 0, 0, 0, 0, 0, 0,
720 0, 0, 0, 17, 75, 0, 175, 176, 177, 178,
721 179, 180, 181, 182, 183, 184, 185, 186, 0, 0,
722 189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
723 0, 0, 117, 118, 119, 120, 121, 122, 123, 124,
724 0, 0, 0, 0, 0, 125, 126, 127, 128, 0,
725 0, 0, 0, 0, 206, 125, 126, 127, 128, 0,
726 0, 0, 125, 126, 127, 128, 0, 129, 130, 135,
727 136, 137, 138, 139, 140, 131, 132, 133, 134, 135,
728 136, 137, 138, 139, 140, 134, 135, 136, 137, 138,
729 139, 140, 215, 207, 117, 118, 119, 120, 121, 122,
730 123, 124, 0, 0, 0, 0, -69, -69, -69, 128,
731 0, 0, 0, 0, 0, 0, 0, 125, 126, 127,
732 128, 0, 0, 125, 126, 127, 128, 0, 0, 129,
733 130, 136, 137, 138, 139, 140, 0, 131, 132, 133,
734 134, 135, 136, 137, 138, 139, 140, 1, 136, 137,
735 138, 139, 140, 0, 0, 217, 0, 2, 3, 4,
736 0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
737 14, 15, 0, 0, 1, 0, 0, 0, 0, 0,
738 0, 0, 0, 0, 2, 3, 4, 16, 5, 6,
739 7, 8, 2, 10, 11, 12, 13, 14, 15, 0,
740 0, 0, 0, 0, 0, 14, 15, 0, 17, 0,
741 0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
742 0, 0, 16, 48, 49, 50, 0, 0, 0, 0,
743 0, 0, 0, 51, 0, 17, 0, 0, 0, 0,
744 52, 0, 0, 0, 0, 0, 0, 53, 0, 54,
745 55, 117, 118, 119, 120, 121, 122, 123, 124, 82,
746 83, 0, 0, 0, 0, 84, 85, 86, 87, 88,
747 89, 90, 91, 0, 125, 126, 127, 128, 0, 0,
748 92, 0, 0, 0, 0, 0, 129, 130, 0, 0,
749 0, 0, 0, 0, 131, 132, 133, 134, 135, 136,
750 137, 138, 139, 140, 0, 0, 0, 0, 164, 117,
751 118, 119, 120, 121, 122, 123, 124, -68, -68, 0,
752 0, 0, 0, -68, -68, -68, -68, -68, -68, -68,
753 -68, 0, 125, 126, 127, 128, 0, 0, -68, 0,
754 0, 0, 0, 0, 129, 130, 0, 0, 0, 0,
755 0, 0, 131, 132, 133, 134, 135, 136, 137, 138,
756 139, 140, 0, 0, 0, 0, 168, 117, 118, 119,
757 120, 121, 122, 123, 124, 0, 0, 0, 0, 0,
758 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
759 125, 126, 127, 128, 0, 0, 0, 0, 0, 0,
760 0, 0, 129, 130, 0, 0, 0, 0, 0, 0,
761 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
762 0, 0, 0, 0, 171, 117, 118, 119, 120, 121,
763 122, 123, 124, 0, 0, 0, 0, 0, 0, 0,
764 0, 0, 0, 0, 0, 0, 0, 0, 125, 126,
765 127, 128, 0, 0, 0, 0, 0, 0, 0, 0,
766 129, 130, 0, 0, 0, 0, 0, 0, 131, 132,
767 133, 134, 135, 136, 137, 138, 139, 140, 0, 0,
768 0, 0, 208, 117, 118, 119, 120, 121, 122, 123,
769 124, 0, 0, 0, 0, 0, 0, 0, 0, 0,
770 0, 0, 0, 0, 0, 0, 125, 126, 127, 128,
771 0, 0, 0, 0, 0, 0, 0, 0, 129, 130,
772 0, 0, 0, 0, 0, 0, 131, 132, 133, 134,
773 135, 136, 137, 138, 139, 140, 117, 118, 119, 120,
774 0, 122, 123, 124, 0, 0, 0, 0, 0, 0,
775 0, 0, 0, 0, 0, 0, 0, 0, 0, 125,
776 126, 127, 128, 0, 0, 0, 0, -69, -69, -69,
777 -69, 129, 130, -69, -69, 0, 0, 0, 0, 131,
778 132, 133, 134, 135, 136, 137, 138, 139, 140, 0,
779 125, 126, 127, 128, 0, 0, 0, 0, 117, 118,
780 119, 120, -69, -69, 123, 124, 0, 0, 0, 0,
781 -69, -69, 133, 134, 135, 136, 137, 138, 139, 140,
782 0, 125, 126, 127, 128, 0, 0, 0, 0, 0,
783 0, 0, 0, 129, 130, 0, 0, 0, 0, 0,
784 0, 131, 132, 133, 134, 135, 136, 137, 138, 139,
785 140, -67, -67, 0, 0, 0, 0, -67, -67, -67,
786 -67, -67, -67, -67, -67, 0, 0, -67, -67, 0,
787 0, 0, -67, -67, -67, -67, -67, -67, -67, -67,
788 -67, 0, 0, 0, 0, 0, 93, 0, -67, 0,
789 0, 0, 203, 94, 0, 0, 0, 0, 0, 0,
790 0, 0, 93, 0, 0, 0, 0, 0, 0, 94
795 0, 53, 13, 67, 4, 5, 0, 13, 61, 9,
796 4, 61, 12, 13, 14, 15, 4, 17, 0, 61,
797 20, 61, 4, 17, 0, 0, 20, 66, 4, 17,
798 0, 61, 14, 15, 4, 17, 13, 43, 20, 13,
799 61, 17, 68, 43, 20, 16, 31, 17, 61, 43,
800 20, 63, 26, 27, 72, 68, 65, 44, 45, 46,
801 46, 43, 66, 44, 45, 129, 130, 43, 31, 43,
802 55, 56, 57, 43, 14, 15, 69, 77, 44, 45,
803 46, 42, 42, 77, 42, 63, 69, 4, 72, 77,
804 62, 64, 103, 93, 3, 77, 63, 62, 62, 46,
805 62, 77, 46, 103, 13, 14, 15, 77, 17, 18,
806 19, 20, 21, 22, 23, 24, 25, 26, 27, 72,
807 172, 20, 174, 210, 144, 77, 3, 217, 202, 174,
808 -1, 172, -1, -1, 43, -1, 13, 14, 15, -1,
809 17, 18, 19, 20, 144, 22, 23, 24, 25, 26,
810 27, -1, -1, -1, -1, 64, -1, 66, -1, -1,
811 -1, -1, -1, -1, 164, -1, 43, -1, 168, -1,
812 164, -1, -1, -1, 168, -1, 164, -1, -1, -1,
813 168, -1, 164, -1, -1, -1, 168, 64, 164, 66,
814 -1, -1, 168, -1, 164, -1, -1, -1, 168, -1,
815 -1, -1, 202, -1, -1, -1, -1, -1, 208, -1,
816 -1, -1, -1, -1, 208, -1, 216, 217, -1, 10,
817 208, -1, 216, 217, 224, -1, 208, -1, 216, -1,
818 224, -1, 208, -1, 216, 217, 224, -1, 208, -1,
819 216, 217, 224, -1, -1, -1, 216, 217, 224, -1,
820 -1, 42, -1, -1, 224, 46, -1, -1, -1, -1,
821 51, 52, 3, 54, 55, -1, -1, -1, -1, -1,
822 -1, -1, 13, 14, 15, -1, 17, 18, 19, 20,
823 -1, 22, 23, 24, 25, 26, 27, -1, -1, -1,
824 81, -1, -1, 84, 85, 86, 87, 88, 89, 90,
825 91, 92, 43, 94, -1, -1, -1, -1, -1, 100,
826 101, -1, -1, -1, -1, -1, -1, -1, -1, -1,
827 -1, -1, -1, 64, 65, -1, 117, 118, 119, 120,
828 121, 122, 123, 124, 125, 126, 127, 128, -1, -1,
829 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
830 -1, -1, 5, 6, 7, 8, 9, 10, 11, 12,
831 -1, -1, -1, -1, -1, 28, 29, 30, 31, -1,
832 -1, -1, -1, -1, 165, 28, 29, 30, 31, -1,
833 -1, -1, 28, 29, 30, 31, -1, 40, 41, 52,
834 53, 54, 55, 56, 57, 48, 49, 50, 51, 52,
835 53, 54, 55, 56, 57, 51, 52, 53, 54, 55,
836 56, 57, 203, 66, 5, 6, 7, 8, 9, 10,
837 11, 12, -1, -1, -1, -1, 28, 29, 30, 31,
838 -1, -1, -1, -1, -1, -1, -1, 28, 29, 30,
839 31, -1, -1, 28, 29, 30, 31, -1, -1, 40,
840 41, 53, 54, 55, 56, 57, -1, 48, 49, 50,
841 51, 52, 53, 54, 55, 56, 57, 3, 53, 54,
842 55, 56, 57, -1, -1, 66, -1, 13, 14, 15,
843 -1, 17, 18, 19, 20, 21, 22, 23, 24, 25,
844 26, 27, -1, -1, 3, -1, -1, -1, -1, -1,
845 -1, -1, -1, -1, 13, 14, 15, 43, 17, 18,
846 19, 20, 13, 22, 23, 24, 25, 26, 27, -1,
847 -1, -1, -1, -1, -1, 26, 27, -1, 64, -1,
848 -1, -1, -1, -1, 43, -1, -1, -1, -1, -1,
849 -1, -1, 43, 44, 45, 46, -1, -1, -1, -1,
850 -1, -1, -1, 54, -1, 64, -1, -1, -1, -1,
851 61, -1, -1, -1, -1, -1, -1, 68, -1, 70,
852 71, 5, 6, 7, 8, 9, 10, 11, 12, 26,
853 27, -1, -1, -1, -1, 32, 33, 34, 35, 36,
854 37, 38, 39, -1, 28, 29, 30, 31, -1, -1,
855 47, -1, -1, -1, -1, -1, 40, 41, -1, -1,
856 -1, -1, -1, -1, 48, 49, 50, 51, 52, 53,
857 54, 55, 56, 57, -1, -1, -1, -1, 62, 5,
858 6, 7, 8, 9, 10, 11, 12, 26, 27, -1,
859 -1, -1, -1, 32, 33, 34, 35, 36, 37, 38,
860 39, -1, 28, 29, 30, 31, -1, -1, 47, -1,
861 -1, -1, -1, -1, 40, 41, -1, -1, -1, -1,
862 -1, -1, 48, 49, 50, 51, 52, 53, 54, 55,
863 56, 57, -1, -1, -1, -1, 62, 5, 6, 7,
864 8, 9, 10, 11, 12, -1, -1, -1, -1, -1,
865 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
866 28, 29, 30, 31, -1, -1, -1, -1, -1, -1,
867 -1, -1, 40, 41, -1, -1, -1, -1, -1, -1,
868 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
869 -1, -1, -1, -1, 62, 5, 6, 7, 8, 9,
870 10, 11, 12, -1, -1, -1, -1, -1, -1, -1,
871 -1, -1, -1, -1, -1, -1, -1, -1, 28, 29,
872 30, 31, -1, -1, -1, -1, -1, -1, -1, -1,
873 40, 41, -1, -1, -1, -1, -1, -1, 48, 49,
874 50, 51, 52, 53, 54, 55, 56, 57, -1, -1,
875 -1, -1, 62, 5, 6, 7, 8, 9, 10, 11,
876 12, -1, -1, -1, -1, -1, -1, -1, -1, -1,
877 -1, -1, -1, -1, -1, -1, 28, 29, 30, 31,
878 -1, -1, -1, -1, -1, -1, -1, -1, 40, 41,
879 -1, -1, -1, -1, -1, -1, 48, 49, 50, 51,
880 52, 53, 54, 55, 56, 57, 5, 6, 7, 8,
881 -1, 10, 11, 12, -1, -1, -1, -1, -1, -1,
882 -1, -1, -1, -1, -1, -1, -1, -1, -1, 28,
883 29, 30, 31, -1, -1, -1, -1, 5, 6, 7,
884 8, 40, 41, 11, 12, -1, -1, -1, -1, 48,
885 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
886 28, 29, 30, 31, -1, -1, -1, -1, 5, 6,
887 7, 8, 40, 41, 11, 12, -1, -1, -1, -1,
888 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
889 -1, 28, 29, 30, 31, -1, -1, -1, -1, -1,
890 -1, -1, -1, 40, 41, -1, -1, -1, -1, -1,
891 -1, 48, 49, 50, 51, 52, 53, 54, 55, 56,
892 57, 26, 27, -1, -1, -1, -1, 32, 33, 34,
893 35, 36, 37, 38, 39, -1, -1, 26, 27, -1,
894 -1, -1, 47, 32, 33, 34, 35, 36, 37, 38,
895 39, -1, -1, -1, -1, -1, 61, -1, 47, -1,
896 -1, -1, 67, 68, -1, -1, -1, -1, -1, -1,
897 -1, -1, 61, -1, -1, -1, -1, -1, -1, 68
904 0, 3, 13, 14, 15, 17, 18, 19, 20, 21,
905 22, 23, 24, 25, 26, 27, 43, 64, 74, 75,
906 76, 77, 80, 82, 83, 84, 85, 86, 87, 88,
907 89, 90, 92, 94, 95, 99, 100, 101, 102, 104,
908 114, 115, 61, 61, 82, 101, 61, 101, 44, 45,
909 46, 54, 61, 68, 70, 71, 95, 99, 101, 102,
910 104, 105, 106, 109, 111, 112, 113, 61, 78, 79,
911 101, 78, 100, 101, 100, 65, 81, 82, 0, 75,
912 66, 13, 26, 27, 32, 33, 34, 35, 36, 37,
913 38, 39, 47, 61, 68, 105, 91, 95, 99, 104,
914 16, 61, 105, 61, 72, 105, 105, 44, 45, 46,
915 93, 107, 108, 109, 110, 105, 105, 5, 6, 7,
916 8, 9, 10, 11, 12, 28, 29, 30, 31, 40,
917 41, 48, 49, 50, 51, 52, 53, 54, 55, 56,
918 57, 44, 45, 93, 63, 65, 81, 105, 105, 105,
919 105, 105, 105, 105, 105, 105, 105, 96, 97, 98,
920 101, 105, 103, 105, 62, 66, 105, 105, 62, 78,
921 46, 62, 42, 69, 63, 105, 105, 105, 105, 105,
922 105, 105, 105, 105, 105, 105, 105, 93, 93, 105,
923 105, 105, 105, 105, 105, 105, 105, 105, 105, 62,
924 79, 62, 63, 67, 69, 82, 105, 66, 62, 82,
925 62, 72, 110, 107, 97, 105, 4, 66, 82, 80,
926 46, 82, 91, 72, 62, 46, 82
932 0, 73, 74, 75, 75, 76, 76, 77, 78, 78,
933 79, 79, 80, 80, 81, 81, 82, 82, 82, 82,
934 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
935 83, 84, 84, 85, 85, 86, 86, 86, 86, 87,
936 88, 89, 90, 91, 91, 91, 91, 92, 93, 93,
937 94, 95, 96, 96, 97, 97, 98, 98, 99, 99,
938 99, 99, 99, 99, 99, 99, 99, 100, 100, 101,
939 101, 102, 103, 104, 104, 104, 104, 105, 105, 105,
940 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
941 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
942 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
943 105, 106, 107, 107, 108, 108, 109, 109, 109, 110,
944 111, 111, 111, 112, 113, 114, 115
950 0, 2, 1, 1, 2, 1, 1, 6, 0, 1,
951 1, 3, 3, 2, 1, 2, 2, 1, 1, 1,
952 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
953 0, 2, 1, 5, 7, 1, 1, 1, 1, 9,
954 5, 5, 6, 1, 1, 1, 0, 3, 1, 1,
955 4, 4, 1, 0, 1, 3, 1, 3, 3, 3,
956 3, 3, 3, 3, 3, 3, 3, 1, 1, 1,
957 1, 4, 1, 2, 2, 2, 2, 3, 3, 2,
958 3, 3, 3, 2, 2, 3, 3, 3, 3, 3,
959 3, 3, 3, 3, 3, 1, 3, 3, 3, 3,
960 3, 3, 3, 3, 3, 3, 1, 1, 1, 1,
961 1, 3, 1, 3, 1, 3, 1, 1, 1, 1,
966 #define yyerrok (yyerrstatus = 0) 967 #define yyclearin (yychar = YYEMPTY) 971 #define YYACCEPT goto yyacceptlab 972 #define YYABORT goto yyabortlab 973 #define YYERROR goto yyerrorlab 976 #define YYRECOVERING() (!!yyerrstatus) 978 #define YYBACKUP(Token, Value) \ 980 if (yychar == YYEMPTY) \ 984 YYPOPSTACK (yylen); \ 990 yyerror (parm, YY_("syntax error: cannot back up")); \ 997 #define YYERRCODE 256 1006 # define YYFPRINTF fprintf 1009 # define YYDPRINTF(Args) \ 1016 #ifndef YY_LOCATION_PRINT 1017 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 1021 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 1025 YYFPRINTF (stderr, "%s ", Title); \ 1026 yy_symbol_print (stderr, \ 1027 Type, Value, parm); \ 1028 YYFPRINTF (stderr, "\n"); \ 1038 yy_symbol_value_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep,
naslctxt * parm)
1040 FILE *yyo = yyoutput;
1047 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1058 yy_symbol_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep,
naslctxt * parm)
1061 yytype <
YYNTOKENS ?
"token" :
"nterm", yytname[yytype]);
1063 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parm);
1076 for (; yybottom <= yytop; yybottom++)
1078 int yybot = *yybottom;
1084 # define YY_STACK_PRINT(Bottom, Top) \ 1087 yy_stack_print ((Bottom), (Top)); \ 1098 unsigned long int yylno = yyrline[yyrule];
1099 int yynrhs = yyr2[yyrule];
1101 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
1104 for (yyi = 0; yyi < yynrhs; yyi++)
1107 yy_symbol_print (stderr,
1108 yystos[yyssp[yyi + 1 - yynrhs]],
1109 &(yyvsp[(yyi + 1) - (yynrhs)])
1115 # define YY_REDUCE_PRINT(Rule) \ 1118 yy_reduce_print (yyssp, yyvsp, Rule, parm); \ 1125 # define YYDPRINTF(Args) 1126 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 1127 # define YY_STACK_PRINT(Bottom, Top) 1128 # define YY_REDUCE_PRINT(Rule) 1134 # define YYINITDEPTH 200 1145 # define YYMAXDEPTH 10000 1152 # if defined __GLIBC__ && defined _STRING_H 1153 # define yystrlen strlen 1157 yystrlen (
const char *yystr)
1160 for (yylen = 0; yystr[yylen]; yylen++)
1168 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 1169 # define yystpcpy stpcpy 1174 yystpcpy (
char *yydest,
const char *yysrc)
1177 const char *yys = yysrc;
1179 while ((*yyd++ = *yys++) !=
'\0')
1196 yytnamerr (
char *yyres,
const char *yystr)
1201 char const *yyp = yystr;
1208 goto do_not_strip_quotes;
1212 goto do_not_strip_quotes;
1225 do_not_strip_quotes: ;
1229 return yystrlen (yystr);
1231 return yystpcpy (yyres, yystr) - yyres;
1244 yysyntax_error (
YYSIZE_T *yymsg_alloc,
char **yymsg,
1249 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1253 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1283 int yyn = yypact[*yyssp];
1284 yyarg[yycount++] = yytname[yytoken];
1290 int yyxbegin = yyn < 0 ? -yyn : 0;
1292 int yychecklim =
YYLAST - yyn + 1;
1296 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1297 if (yycheck[yyx + yyn] == yyx && yyx !=
YYTERROR 1300 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1306 yyarg[yycount++] = yytname[yyx];
1309 if (! (yysize <= yysize1
1320 # define YYCASE_(N, S) \ 1326 YYCASE_(1,
YY_(
"syntax error, unexpected %s"));
1327 YYCASE_(2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1328 YYCASE_(3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1329 YYCASE_(4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1330 YYCASE_(5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1335 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1341 if (*yymsg_alloc < yysize)
1343 *yymsg_alloc = 2 * yysize;
1344 if (! (yysize <= *yymsg_alloc
1356 while ((*yyp = *yyformat) !=
'\0')
1357 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1359 yyp += yytnamerr (yyp, yyarg[yyi++]);
1377 yydestruct (
const char *yymsg,
int yytype,
YYSTYPE *yyvaluep,
naslctxt * parm)
1447 char *yymsg = yymsgbuf;
1448 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1451 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 1457 yyssp = yyss = yyssa;
1458 yyvsp = yyvs = yyvsa;
1461 YYDPRINTF ((stderr,
"Starting parse\n"));
1480 if (yyss + yystacksize - 1 <= yyssp)
1483 YYSIZE_T yysize = yyssp - yyss + 1;
1497 yyoverflow (
YY_(
"memory exhausted"),
1498 &yyss1, yysize *
sizeof (*yyssp),
1499 &yyvs1, yysize *
sizeof (*yyvsp),
1506 # ifndef YYSTACK_RELOCATE 1507 goto yyexhaustedlab;
1511 goto yyexhaustedlab;
1521 goto yyexhaustedlab;
1524 # undef YYSTACK_RELOCATE 1531 yyssp = yyss + yysize - 1;
1532 yyvsp = yyvs + yysize - 1;
1534 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1535 (
unsigned long int) yystacksize));
1537 if (yyss + yystacksize - 1 <= yyssp)
1541 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1557 yyn = yypact[yystate];
1566 YYDPRINTF ((stderr,
"Reading a token: "));
1567 yychar =
yylex (&yylval, parm);
1570 if (yychar <=
YYEOF)
1572 yychar = yytoken =
YYEOF;
1573 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1584 if (yyn < 0 ||
YYLAST < yyn || yycheck[yyn] != yytoken)
1618 yyn = yydefact[yystate];
1639 yyval = yyvsp[1-yylen];
1646 #line 145 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1648 ((
naslctxt*)parm)->tree = (yyvsp[0].node);
1650 #line 1651 "nasl_grammar.tab.c" 1654 #line 150 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1658 (yyval.
node)->link[0] = (yyvsp[0].node);
1660 #line 1661 "nasl_grammar.tab.c" 1664 #line 156 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1668 (yyval.
node)->link[0] = (yyvsp[-1].node);
1669 (yyval.
node)->link[1] = (yyvsp[0].node);
1671 #line 1672 "nasl_grammar.tab.c" 1675 #line 166 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1680 (yyval.
node)->link[0] = (yyvsp[-2].node);
1681 (yyval.
node)->link[1] = (yyvsp[0].node);
1683 #line 1684 "nasl_grammar.tab.c" 1687 #line 174 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1688 { (yyval.
node) = NULL; }
1689 #line 1690 "nasl_grammar.tab.c" 1693 #line 174 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1694 { (yyval.
node) = (yyvsp[0].node); }
1695 #line 1696 "nasl_grammar.tab.c" 1699 #line 175 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1701 #line 1702 "nasl_grammar.tab.c" 1705 #line 177 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1709 (yyval.
node)->link[0] = (yyvsp[0].node);
1711 #line 1712 "nasl_grammar.tab.c" 1715 #line 184 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1716 { (yyval.
node) = (yyvsp[-1].node); }
1717 #line 1718 "nasl_grammar.tab.c" 1721 #line 184 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1722 { (yyval.
node) = NULL; }
1723 #line 1724 "nasl_grammar.tab.c" 1727 #line 187 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1729 if ((yyvsp[-1].node) == NULL)
1730 (yyval.
node) = (yyvsp[0].node);
1735 (yyval.
node)->link[0] = (yyvsp[-1].node);
1736 (yyval.
node)->link[1] = (yyvsp[0].node);
1739 #line 1740 "nasl_grammar.tab.c" 1743 #line 200 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1744 { (yyval.
node) = (yyvsp[-1].node); }
1745 #line 1746 "nasl_grammar.tab.c" 1749 #line 205 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1754 #line 1755 "nasl_grammar.tab.c" 1758 #line 209 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1763 #line 1764 "nasl_grammar.tab.c" 1767 #line 213 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1768 { (yyval.
node) = NULL; }
1769 #line 1770 "nasl_grammar.tab.c" 1773 #line 217 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1777 (yyval.
node)->link[0] = (yyvsp[0].node);
1779 #line 1780 "nasl_grammar.tab.c" 1783 #line 223 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1788 #line 1789 "nasl_grammar.tab.c" 1792 #line 230 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1796 (yyval.
node)->link[0] = (yyvsp[-2].node); (yyval.
node)->link[1] = (yyvsp[0].node);
1798 #line 1799 "nasl_grammar.tab.c" 1802 #line 236 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1806 (yyval.
node)->link[0] = (yyvsp[-4].node); (yyval.
node)->link[1] = (yyvsp[-2].node); (yyval.
node)->link[2] = (yyvsp[0].node);
1808 #line 1809 "nasl_grammar.tab.c" 1812 #line 245 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1816 (yyval.
node)->link[0] = (yyvsp[-6].node);
1817 (yyval.
node)->link[1] = (yyvsp[-4].node);
1818 (yyval.
node)->link[2] = (yyvsp[-2].node);
1819 (yyval.
node)->link[3] = (yyvsp[0].node);
1821 #line 1822 "nasl_grammar.tab.c" 1825 #line 255 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1829 (yyval.
node)->link[0] = (yyvsp[-2].node);
1830 (yyval.
node)->link[1] = (yyvsp[0].node);
1832 #line 1833 "nasl_grammar.tab.c" 1836 #line 262 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1840 (yyval.
node)->link[0] = (yyvsp[-3].node);
1841 (yyval.
node)->link[1] = (yyvsp[-1].node);
1843 #line 1844 "nasl_grammar.tab.c" 1847 #line 270 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1851 (yyval.
node)->link[0] = (yyvsp[-2].node);
1852 (yyval.
node)->link[1] = (yyvsp[0].node);
1854 #line 1855 "nasl_grammar.tab.c" 1858 #line 278 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1859 { (yyval.
node) = NULL; }
1860 #line 1861 "nasl_grammar.tab.c" 1864 #line 282 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1868 (yyval.
node)->link[0] = (yyvsp[-2].node);
1869 (yyval.
node)->link[1] = (yyvsp[0].node);
1871 #line 1872 "nasl_grammar.tab.c" 1875 #line 289 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1876 { (yyval.
str) = (yyvsp[0].data).val; }
1877 #line 1878 "nasl_grammar.tab.c" 1881 #line 293 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1886 bzero (&subctx,
sizeof (subctx));
1890 (yyval.
node) = NULL;
1895 (g_str_hash, g_str_equal, g_free,
1902 g_free ((yyvsp[-1].str));
1914 nasl_perror (NULL,
"%s: Parse error at or near line %d\n",
1915 (yyvsp[-1].str), subctx.
line_nb);
1916 g_free ((yyvsp[-1].str));
1925 g_free((yyvsp[-1].str));
1932 #line 1933 "nasl_grammar.tab.c" 1936 #line 346 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1940 (yyval.
node)->link[0] = (yyvsp[-1].node);
1942 #line 1943 "nasl_grammar.tab.c" 1946 #line 352 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1947 { (yyval.
node) = NULL; }
1948 #line 1949 "nasl_grammar.tab.c" 1952 #line 354 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1954 (yyvsp[-2].node)->link[1] = (yyvsp[0].node);
1955 (yyval.
node) = (yyvsp[-2].node);
1957 #line 1958 "nasl_grammar.tab.c" 1961 #line 360 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1965 (yyval.
node)->link[0] = (yyvsp[0].node);
1967 #line 1968 "nasl_grammar.tab.c" 1971 #line 366 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1975 (yyval.
node)->link[0] = (yyvsp[0].node);
1977 #line 1978 "nasl_grammar.tab.c" 1981 #line 374 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1985 #line 1986 "nasl_grammar.tab.c" 1989 #line 377 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1991 #line 1992 "nasl_grammar.tab.c" 1995 #line 378 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 1997 #line 1998 "nasl_grammar.tab.c" 2001 #line 379 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2003 #line 2004 "nasl_grammar.tab.c" 2007 #line 380 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2009 #line 2010 "nasl_grammar.tab.c" 2013 #line 381 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2015 #line 2016 "nasl_grammar.tab.c" 2019 #line 382 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2021 #line 2022 "nasl_grammar.tab.c" 2025 #line 383 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2027 #line 2028 "nasl_grammar.tab.c" 2031 #line 384 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2033 #line 2034 "nasl_grammar.tab.c" 2037 #line 387 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2039 #line 2040 "nasl_grammar.tab.c" 2043 #line 389 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2044 { (yyval.
str) = strdup(
"x"); }
2045 #line 2046 "nasl_grammar.tab.c" 2049 #line 392 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2053 (yyval.
node)->link[0] = (yyvsp[-1].node);
2055 #line 2056 "nasl_grammar.tab.c" 2059 #line 401 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2061 #line 2062 "nasl_grammar.tab.c" 2065 #line 402 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2067 #line 2068 "nasl_grammar.tab.c" 2071 #line 403 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2073 #line 2074 "nasl_grammar.tab.c" 2077 #line 404 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2079 #line 2080 "nasl_grammar.tab.c" 2083 #line 408 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2084 { (yyval.
node) = (yyvsp[-1].node); }
2085 #line 2086 "nasl_grammar.tab.c" 2089 #line 409 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2091 #line 2092 "nasl_grammar.tab.c" 2095 #line 410 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2097 #line 2098 "nasl_grammar.tab.c" 2101 #line 411 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2103 #line 2104 "nasl_grammar.tab.c" 2107 #line 412 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2109 #line 2110 "nasl_grammar.tab.c" 2113 #line 413 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2115 #line 2116 "nasl_grammar.tab.c" 2119 #line 414 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2121 #line 2122 "nasl_grammar.tab.c" 2125 #line 415 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2127 #line 2128 "nasl_grammar.tab.c" 2131 #line 416 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2133 #line 2134 "nasl_grammar.tab.c" 2137 #line 417 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2139 #line 2140 "nasl_grammar.tab.c" 2143 #line 418 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2145 #line 2146 "nasl_grammar.tab.c" 2149 #line 419 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2151 #line 2152 "nasl_grammar.tab.c" 2155 #line 420 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2157 #line 2158 "nasl_grammar.tab.c" 2161 #line 421 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2163 #line 2164 "nasl_grammar.tab.c" 2167 #line 422 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2169 #line 2170 "nasl_grammar.tab.c" 2173 #line 423 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2175 #line 2176 "nasl_grammar.tab.c" 2179 #line 424 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2181 #line 2182 "nasl_grammar.tab.c" 2185 #line 425 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2187 #line 2188 "nasl_grammar.tab.c" 2191 #line 427 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2193 #line 2194 "nasl_grammar.tab.c" 2197 #line 428 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2199 #line 2200 "nasl_grammar.tab.c" 2203 #line 429 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2205 #line 2206 "nasl_grammar.tab.c" 2209 #line 430 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2211 #line 2212 "nasl_grammar.tab.c" 2215 #line 431 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2217 #line 2218 "nasl_grammar.tab.c" 2221 #line 432 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2223 #line 2224 "nasl_grammar.tab.c" 2227 #line 433 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2229 #line 2230 "nasl_grammar.tab.c" 2233 #line 434 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2235 #line 2236 "nasl_grammar.tab.c" 2239 #line 435 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2241 #line 2242 "nasl_grammar.tab.c" 2245 #line 436 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2247 #line 2248 "nasl_grammar.tab.c" 2251 #line 440 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2253 #line 2254 "nasl_grammar.tab.c" 2257 #line 442 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2258 { (yyval.
node) = (yyvsp[0].node); }
2259 #line 2260 "nasl_grammar.tab.c" 2263 #line 443 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2265 (yyvsp[-2].node)->link[1] = (yyvsp[0].node); (yyval.
node) = (yyvsp[-2].node);
2267 #line 2268 "nasl_grammar.tab.c" 2271 #line 447 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2274 (yyval.
node)->link[0] = (yyvsp[0].node);
2276 #line 2277 "nasl_grammar.tab.c" 2280 #line 450 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2283 (yyval.
node)->link[0] = (yyvsp[0].node);
2286 #line 2287 "nasl_grammar.tab.c" 2290 #line 456 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2292 #line 2293 "nasl_grammar.tab.c" 2296 #line 457 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2299 (yyval.
node)->size = strlen((yyvsp[0].str));
2301 #line 2302 "nasl_grammar.tab.c" 2305 #line 461 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2308 (yyval.
node)->size = (yyvsp[0].data).len;
2310 #line 2311 "nasl_grammar.tab.c" 2314 #line 468 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2316 #line 2317 "nasl_grammar.tab.c" 2320 #line 474 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2322 char *s = g_strdup_printf (
"%ld.%ld.%ld.%ld", (yyvsp[-6].num), (yyvsp[-4].num), (yyvsp[-2].num), (yyvsp[0].num));
2325 (yyval.
node)->size = strlen(s);
2327 #line 2328 "nasl_grammar.tab.c" 2331 #line 483 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2335 (yyval.
node)->link[0] = (yyvsp[0].node);
2337 #line 2338 "nasl_grammar.tab.c" 2341 #line 491 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2345 (yyval.
node)->link[0] = (yyvsp[0].node);
2347 #line 2348 "nasl_grammar.tab.c" 2351 #line 2352 "nasl_grammar.tab.c" 2379 yystate = yypgoto[yyn -
YYNTOKENS] + *yyssp;
2380 if (0 <= yystate && yystate <=
YYLAST && yycheck[yystate] == *yyssp)
2381 yystate = yytable[yystate];
2400 #if ! YYERROR_VERBOSE 2403 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 2406 char const *yymsgp =
YY_(
"syntax error");
2407 int yysyntax_error_status;
2409 if (yysyntax_error_status == 0)
2411 else if (yysyntax_error_status == 1)
2413 if (yymsg != yymsgbuf)
2419 yymsg_alloc =
sizeof yymsgbuf;
2420 yysyntax_error_status = 2;
2429 if (yysyntax_error_status == 2)
2430 goto yyexhaustedlab;
2432 # undef YYSYNTAX_ERROR 2438 if (yyerrstatus == 3)
2443 if (yychar <=
YYEOF)
2446 if (yychar ==
YYEOF)
2451 yydestruct (
"Error: discarding",
2452 yytoken, &yylval, parm);
2490 yyn = yypact[yystate];
2507 yydestruct (
"Error: popping",
2508 yystos[yystate], yyvsp, parm);
2540 #if !defined yyoverflow || YYERROR_VERBOSE 2556 yydestruct (
"Cleanup: discarding lookahead",
2557 yytoken, &yylval, parm);
2563 while (yyssp != yyss)
2565 yydestruct (
"Cleanup: popping",
2566 yystos[*yyssp], yyvsp, parm);
2574 if (yymsg != yymsgbuf)
2579 #line 497 "/builddir/build/BUILD/gvm-libs-9.0.3/nasl/nasl_grammar.y" 2584 #include "../misc/openvas_logging.h" 2585 #include "../misc/prefs.h" 2586 #include "../base/openvas_file.h" 2591 naslerror(
naslctxt *parm,
const char *s)
2596 static GSList * inc_dirs = NULL;
2620 inc_dirs = g_slist_append (inc_dirs, g_strdup((gchar *)dir));
2624 struct stat stat_buf;
2626 if (stat (dir, &stat_buf) != 0)
2629 if (S_ISDIR(stat_buf.st_mode) != 0)
2631 inc_dirs = g_slist_append (inc_dirs, g_strdup((gchar *)dir));
2647 file_checksum (
const char *filename,
int algorithm)
2649 char *content = NULL, digest[128], *result;
2650 size_t len = 0, i, alglen;
2652 assert (algorithm == GCRY_MD_MD5 || algorithm == GCRY_MD_SHA256);
2653 if (!filename || !g_file_get_contents (filename, &content, &len, NULL))
2656 gcry_md_hash_buffer (algorithm, digest, content, len);
2657 alglen = gcry_md_get_algo_dlen (algorithm);
2658 result = g_malloc0 (alglen * 2 + 1);
2659 for (i = 0; i < alglen; i++)
2660 snprintf (result + 2 * i, 3,
"%02x", (
unsigned char) digest[i]);
2666 static int checksum_algorithm = GCRY_MD_NONE;
2668 static char checksum_file[2048];
2671 init_checksum_algorithm (
void)
2673 const char *base =
prefs_get (
"plugins_folder");
2675 checksum_algorithm = GCRY_MD_SHA256;
2676 snprintf (checksum_file,
sizeof (checksum_file),
"%s/sha256sums", base);
2677 if (g_file_test (checksum_file, G_FILE_TEST_EXISTS))
2679 checksum_algorithm = GCRY_MD_MD5;
2680 snprintf (checksum_file,
sizeof (checksum_file),
"%s/md5sums", base);
2681 if (g_file_test (checksum_file, G_FILE_TEST_EXISTS))
2683 if (checksum_algorithm == GCRY_MD_NONE)
2693 static int loaded = 0;
2694 const char *base, *prefix;
2710 file = fopen (checksum_file,
"r");
2717 if (checksum_algorithm == GCRY_MD_MD5)
2719 kb_del_items (
kb,
"md5sums:*");
2724 kb_del_items (
kb,
"sha256sums:*");
2725 prefix =
"sha256sums";
2729 char buffer[2048], **splits;
2730 if (!fgets (buffer,
sizeof (buffer), file))
2732 if (strstr (buffer,
".asc")
2733 || (!strstr (buffer,
".inc") && !strstr (buffer,
".nasl")))
2735 splits = g_strsplit (buffer,
" ", -1);
2736 if (g_strv_length (splits) != 2)
2740 g_strfreev (splits);
2743 splits[1][strlen (splits[1]) - 1] =
'\0';
2744 if (strstr (splits[1],
".inc"))
2745 g_snprintf (buffer,
sizeof (buffer),
"%s:%s", prefix,
2746 basename (splits[1]));
2748 g_snprintf (buffer,
sizeof (buffer),
"%s:%s/%s", prefix, base,
2750 kb_item_set_str (
kb, buffer, splits[0]);
2751 g_strfreev (splits);
2775 char *full_name = NULL, key_path[2048], *checksum, *filename, *check = NULL;
2776 GSList * inc_dir = inc_dirs;
2783 pc->
buffer = g_malloc0 (80);
2787 while (inc_dir != NULL) {
2790 full_name = g_build_filename(inc_dir->data,
name, NULL);
2792 if ((pc->
fp = fopen(full_name,
"r")) != NULL)
2795 inc_dir = g_slist_next(inc_dir);
2799 log_legacy_write (
"%s: Not able to open nor to locate it in include paths",
2813 filename = full_name;
2814 if (strstr (full_name,
".inc"))
2815 filename = basename (full_name);
2816 init_checksum_algorithm ();
2817 if (checksum_algorithm == GCRY_MD_NONE)
2820 snprintf (key_path,
sizeof (key_path),
"checksum:%s", filename);
2821 checksum = kb_item_get_str (pc->
kb, key_path);
2825 check = file_checksum (full_name, checksum_algorithm);
2826 ret = strcmp (check, checksum);
2839 load_checksums (pc->
kb);
2840 if (checksum_algorithm == GCRY_MD_MD5)
2841 snprintf (key_path,
sizeof (key_path),
"md5sums:%s", filename);
2842 else if (checksum_algorithm == GCRY_MD_SHA256)
2843 snprintf (key_path,
sizeof (key_path),
"sha256sums:%s", filename);
2846 checksum = kb_item_get_str (pc->
kb, key_path);
2857 check = file_checksum (full_name, checksum_algorithm);
2858 ret = strcmp (check, checksum);
2863 snprintf (key_path,
sizeof (key_path),
"checksum:%s", filename);
2864 kb_item_set_str (pc->
kb, key_path, check);
2945 while ((c = getc(fp)) != EOF)
2955 else if (isalpha(c) || c ==
'_')
2961 else if (isspace(c))
2965 else if (isdigit(c))
3032 *p++ =
'\f'; len ++;
3035 *p++ =
'\t'; len ++;
3041 *p++ =
'\v'; len ++;
3044 *p ++ =
'"'; len ++;
3056 for (i = 0; i < 2; i ++)
3061 nasl_perror(NULL,
"Unfinished \\x escape sequence (EOF)\n");
3068 if (c >=
'0' && c <=
'9')
3069 x = x * 16 + (c -
'0');
3070 else if (c >=
'a' && c <=
'f')
3071 x = x * 16 + 10 + (c -
'a');
3074 nasl_perror(NULL,
"Unfinished \\x escape sequence\n");
3085 nasl_perror(NULL,
"Unknown escape sequence \\%c\n", c);
3100 if (isalnum(c) || c ==
'_')
3116 if (c ==
'x' || c ==
'X')
3118 else if (isdigit(c))
3228 if (! isprint(c)) c =
'.';
3230 "parsed as >!< %c", c, c);
3400 int offs = p - ctx->
buffer;
3420 lvalp->str = g_strdup(ctx->
buffer);
3425 lvalp->data.val = g_malloc0 (len+2);
3426 memcpy(lvalp->data.val, ctx->
buffer, len+1);
3427 lvalp->data.len = len;
3431 if (strcmp(ctx->
buffer,
"if") == 0)
3433 else if (strcmp(ctx->
buffer,
"else") == 0)
3435 else if (strcmp(ctx->
buffer,
"for") == 0)
3437 else if (strcmp(ctx->
buffer,
"while") == 0)
3439 else if (strcmp(ctx->
buffer,
"repeat") == 0)
3441 else if (strcmp(ctx->
buffer,
"until") == 0)
3443 else if (strcmp(ctx->
buffer,
"foreach") == 0)
3445 else if (strcmp(ctx->
buffer,
"function") == 0)
3447 else if (strcmp(ctx->
buffer,
"return") == 0)
3449 else if (strcmp(ctx->
buffer,
"x") == 0)
3451 else if (strcmp(ctx->
buffer,
"include") == 0)
3453 else if (strcmp(ctx->
buffer,
"break") == 0)
3455 else if (strcmp(ctx->
buffer,
"continue") == 0)
3457 else if (strcmp(ctx->
buffer,
"local_var") == 0)
3459 else if (strcmp(ctx->
buffer,
"global_var") == 0)
3464 lvalp->str = g_strdup(ctx->
buffer);
3473 lvalp->num = x = strtoul(ctx->
buffer, NULL, 10);
3474 #if NASL_DEBUG > 1 && defined(ULONG_MAX) && defined(ERANGE) 3475 if (x == ULONG_MAX && errno == ERANGE)
3481 lvalp->num = x = strtoul(ctx->
buffer, NULL, 8);
3482 #if NASL_DEBUG > 1 && defined(ULONG_MAX) && defined(ERANGE) 3483 if (x == ULONG_MAX && errno == ERANGE)
3489 lvalp->num = x = strtoul(ctx->
buffer, NULL, 16);
3490 #if NASL_DEBUG > 1 && defined(ULONG_MAX) 3492 nasl_perror(NULL,
"Possible integer overflow while converting %s at or near line %d\n", ctx->
buffer, ctx->
line_nb);
3497 nasl_perror(NULL,
"Invalid token 0x parsed as 0 at line %d\n",
3508 nasllex(
YYSTYPE * lvalp,
void * parm)
3510 int x = mylex (lvalp, parm);
#define YY_INITIAL_VALUE(Value)
const char * nasl_get_filename(const char *function)
void ref_cell(tree_cell *c)
void nasl_clean_ctx(naslctxt *c)
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
struct YYSTYPE::asciiz data
void nasl_dump_tree(const tree_cell *c)
void nasl_clean_inc(void)
tree_cell * make_array_from_elems(tree_cell *el)
void deref_cell(tree_cell *c)
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
#define yypact_value_is_default(Yystate)
unsigned short int yytype_uint16
#define yytable_value_is_error(Yytable_value)
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
void nasl_set_filename(const char *filename)
void log_legacy_write(const char *format,...)
Legacy function to write a log message.
const gchar * prefs_get(const gchar *key)
Get a string preference value via a key.
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
tree_cell * alloc_typed_cell(int typ)
int add_nasl_inc_dir(const char *dir)
Adds the given string as directory for searching for includes.
tree_cell * alloc_RE_cell(int lnb, int t, tree_cell *l, char *re_str)
#define YY_REDUCE_PRINT(Rule)
Top-level KB. This is to be inherited by KB implementations.
void nasl_perror(lex_ctxt *lexic, char *msg,...)
int nasl_verify_signature(const char *filename)
int naslparse(naslctxt *parm)
unsigned char yytype_uint8
tree_cell * alloc_tree_cell(int lnb, char *s)
void nasl_set_function_filename(const char *function)
#define YYSTACK_ALLOC_MAXIMUM
tree_cell * alloc_expr_cell(int lnb, int t, tree_cell *l, tree_cell *r)
GHashTable * includes_hash
#define YY_STACK_PRINT(Bottom, Top)
int init_nasl_ctx(naslctxt *pc, const char *name)
Initialize a NASL context for a NASL file.