OpenVAS Scanner  7.0.1~git
nasl_grammar.tab.c
Go to the documentation of this file.
1 /* A Bison parser, made by GNU Bison 3.5. */
2 
3 /* Bison implementation for Yacc-like parsers in C
4 
5  Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
6  Inc.
7 
8  This program is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation, either version 3 of the License, or
11  (at your option) any later version.
12 
13  This program is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 
21 /* As a special exception, you may create a larger work that contains
22  part or all of the Bison parser skeleton and distribute that work
23  under terms of your choice, so long as that work isn't itself a
24  parser generator using the skeleton or a modified version thereof
25  as a parser skeleton. Alternatively, if you modify or redistribute
26  the parser skeleton itself, you may (at your option) remove this
27  special exception, which will cause the skeleton and the resulting
28  Bison output files to be licensed under the GNU General Public
29  License without this special exception.
30 
31  This special exception was added by the Free Software Foundation in
32  version 2.2 of Bison. */
33 
34 /* C LALR(1) parser skeleton written by Richard Stallman, by
35  simplifying the original so-called "semantic" parser. */
36 
37 /* All symbols defined below should begin with yy or YY, to avoid
38  infringing on user name space. This should be done even for local
39  variables, as they might otherwise be expanded by user macros.
40  There are some unavoidable exceptions within include files to
41  define necessary library symbols; they are noted "INFRINGES ON
42  USER NAME SPACE" below. */
43 
44 /* Undocumented macros, especially those whose name start with YY_,
45  are private implementation details. Do not rely on them. */
46 
47 /* Identify Bison output. */
48 #define YYBISON 1
49 
50 /* Bison version. */
51 #define YYBISON_VERSION "3.5"
52 
53 /* Skeleton name. */
54 #define YYSKELETON_NAME "yacc.c"
55 
56 /* Pure parsers. */
57 #define YYPURE 1
58 
59 /* Push parsers. */
60 #define YYPUSH 0
61 
62 /* Pull parsers. */
63 #define YYPULL 1
64 
65 
66 /* Substitute the variable and function names. */
67 #define yyparse naslparse
68 #define yylex nasllex
69 #define yyerror naslerror
70 #define yydebug nasldebug
71 #define yynerrs naslnerrs
72 
73 /* First part of user prologue. */
74 #line 5 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
75 
76 /* Based on work Copyright (C) 2002 - 2004 Michel Arboi and Renaud Deraison
77  *
78  * SPDX-License-Identifier: GPL-2.0-only
79  *
80  * This program is free software; you can redistribute it and/or
81  * modify it under the terms of the GNU General Public License
82  * version 2 as published by the Free Software Foundation.
83  *
84  * This program is distributed in the hope that it will be useful,
85  * but WITHOUT ANY WARRANTY; without even the implied warranty of
86  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
87  * GNU General Public License for more details.
88  *
89  * You should have received a copy of the GNU General Public License
90  * along with this program; if not, write to the Free Software
91  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
92  */
93 
94 #define YYPARSE_PARAM parm
95 #define YYLEX_PARAM parm
96 
97 #define LNB (((naslctxt*)parm)->line_nb)
98 
99 #include <ctype.h> /* for isalpha */
100 #include <pcap.h> /* for islocalhost */
101 #include <string.h> /* for strlen */
102 #include <sys/stat.h> /* for stat */
103 
104 #include <glib.h>
105 
106 #include "nasl_tree.h"
107 #include "nasl_global_ctxt.h"
108 #include "nasl_func.h"
109 #include "nasl_var.h"
110 #include "nasl_lex_ctxt.h"
111 #include "nasl_debug.h"
112 #include "nasl_signature.h"
113 
114 #undef G_LOG_DOMAIN
115 
118 #define G_LOG_DOMAIN "lib nasl"
119 
120 static char *parse_buffer = NULL;
121 
122 static int parse_len = 0;
123 
124 static void naslerror(naslctxt *, const char *);
125 
126 GHashTable *includes_hash = NULL;
127 
128 #define YYERROR_VERBOSE
129 
130 #line 131 "nasl_grammar.tab.c"
131 
132 # ifndef YY_CAST
133 # ifdef __cplusplus
134 # define YY_CAST(Type, Val) static_cast<Type> (Val)
135 # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
136 # else
137 # define YY_CAST(Type, Val) ((Type) (Val))
138 # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
139 # endif
140 # endif
141 # ifndef YY_NULLPTR
142 # if defined __cplusplus
143 # if 201103L <= __cplusplus
144 # define YY_NULLPTR nullptr
145 # else
146 # define YY_NULLPTR 0
147 # endif
148 # else
149 # define YY_NULLPTR ((void*)0)
150 # endif
151 # endif
152 
153 /* Enabling verbose error messages. */
154 #ifdef YYERROR_VERBOSE
155 # undef YYERROR_VERBOSE
156 # define YYERROR_VERBOSE 1
157 #else
158 # define YYERROR_VERBOSE 0
159 #endif
160 
161 /* Use api.header.include to #include this header
162  instead of duplicating it here. */
163 #ifndef YY_NASL_NASL_GRAMMAR_TAB_H_INCLUDED
164 # define YY_NASL_NASL_GRAMMAR_TAB_H_INCLUDED
165 /* Debug traces. */
166 #ifndef YYDEBUG
167 # define YYDEBUG 1
168 #endif
169 #if YYDEBUG
170 extern int nasldebug;
171 #endif
172 
173 /* Token type. */
174 #ifndef YYTOKENTYPE
175 # define YYTOKENTYPE
177  {
178  IF = 258,
179  ELSE = 259,
180  EQ = 260,
181  NEQ = 261,
182  SUPEQ = 262,
183  INFEQ = 263,
184  OR = 264,
185  AND = 265,
186  MATCH = 266,
187  NOMATCH = 267,
188  REP = 268,
189  FOR = 269,
190  REPEAT = 270,
191  UNTIL = 271,
192  FOREACH = 272,
193  WHILE = 273,
194  BREAK = 274,
195  CONTINUE = 275,
196  FUNCTION = 276,
197  RETURN = 277,
198  INCLUDE = 278,
199  LOCAL = 279,
200  GLOBAL = 280,
201  PLUS_PLUS = 281,
202  MINUS_MINUS = 282,
203  L_SHIFT = 283,
204  R_SHIFT = 284,
205  R_USHIFT = 285,
206  EXPO = 286,
207  PLUS_EQ = 287,
208  MINUS_EQ = 288,
209  MULT_EQ = 289,
210  DIV_EQ = 290,
211  MODULO_EQ = 291,
212  L_SHIFT_EQ = 292,
213  R_SHIFT_EQ = 293,
214  R_USHIFT_EQ = 294,
215  RE_MATCH = 295,
216  RE_NOMATCH = 296,
217  ARROW = 297,
218  IDENT = 298,
219  STRING1 = 299,
220  STRING2 = 300,
221  INTEGER = 301,
222  NOT = 302,
223  UMINUS = 303,
224  BIT_NOT = 304
225  };
226 #endif
227 
228 /* Value type. */
229 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
230 union YYSTYPE
231 {
232 #line 61 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
233 
234  long int num;
235  char *str;
236  struct asciiz {
237  char *val;
238  int len;
239  } data;
241 
242 #line 243 "nasl_grammar.tab.c"
243 
244 };
245 typedef union YYSTYPE YYSTYPE;
246 # define YYSTYPE_IS_TRIVIAL 1
247 # define YYSTYPE_IS_DECLARED 1
248 #endif
249 
250 
251 
252 int naslparse (naslctxt * parm);
253 
254 #endif /* !YY_NASL_NASL_GRAMMAR_TAB_H_INCLUDED */
255 
256 /* Second part of user prologue. */
257 #line 71 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
258 
259 static int nasllex(YYSTYPE * lvalp, void * parm);
260 
261 #line 262 "nasl_grammar.tab.c"
262 
263 
264 #ifdef short
265 # undef short
266 #endif
267 
268 /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
269  <limits.h> and (if available) <stdint.h> are included
270  so that the code can choose integer types of a good width. */
271 
272 #ifndef __PTRDIFF_MAX__
273 # include <limits.h> /* INFRINGES ON USER NAME SPACE */
274 # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
275 # include <stdint.h> /* INFRINGES ON USER NAME SPACE */
276 # define YY_STDINT_H
277 # endif
278 #endif
279 
280 /* Narrow types that promote to a signed type and that can represent a
281  signed or unsigned integer of at least N bits. In tables they can
282  save space and decrease cache pressure. Promoting to a signed type
283  helps avoid bugs in integer arithmetic. */
284 
285 #ifdef __INT_LEAST8_MAX__
286 typedef __INT_LEAST8_TYPE__ yytype_int8;
287 #elif defined YY_STDINT_H
288 typedef int_least8_t yytype_int8;
289 #else
290 typedef signed char yytype_int8;
291 #endif
292 
293 #ifdef __INT_LEAST16_MAX__
294 typedef __INT_LEAST16_TYPE__ yytype_int16;
295 #elif defined YY_STDINT_H
296 typedef int_least16_t yytype_int16;
297 #else
298 typedef short yytype_int16;
299 #endif
300 
301 #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
302 typedef __UINT_LEAST8_TYPE__ yytype_uint8;
303 #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
304  && UINT_LEAST8_MAX <= INT_MAX)
305 typedef uint_least8_t yytype_uint8;
306 #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
307 typedef unsigned char yytype_uint8;
308 #else
309 typedef short yytype_uint8;
310 #endif
311 
312 #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
313 typedef __UINT_LEAST16_TYPE__ yytype_uint16;
314 #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
315  && UINT_LEAST16_MAX <= INT_MAX)
316 typedef uint_least16_t yytype_uint16;
317 #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
318 typedef unsigned short yytype_uint16;
319 #else
320 typedef int yytype_uint16;
321 #endif
322 
323 #ifndef YYPTRDIFF_T
324 # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
325 # define YYPTRDIFF_T __PTRDIFF_TYPE__
326 # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
327 # elif defined PTRDIFF_MAX
328 # ifndef ptrdiff_t
329 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
330 # endif
331 # define YYPTRDIFF_T ptrdiff_t
332 # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
333 # else
334 # define YYPTRDIFF_T long
335 # define YYPTRDIFF_MAXIMUM LONG_MAX
336 # endif
337 #endif
338 
339 #ifndef YYSIZE_T
340 # ifdef __SIZE_TYPE__
341 # define YYSIZE_T __SIZE_TYPE__
342 # elif defined size_t
343 # define YYSIZE_T size_t
344 # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
345 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
346 # define YYSIZE_T size_t
347 # else
348 # define YYSIZE_T unsigned
349 # endif
350 #endif
351 
352 #define YYSIZE_MAXIMUM \
353  YY_CAST (YYPTRDIFF_T, \
354  (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
355  ? YYPTRDIFF_MAXIMUM \
356  : YY_CAST (YYSIZE_T, -1)))
357 
358 #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
359 
360 /* Stored state numbers (used for stacks). */
362 
363 /* State numbers in computations. */
364 typedef int yy_state_fast_t;
365 
366 #ifndef YY_
367 # if defined YYENABLE_NLS && YYENABLE_NLS
368 # if ENABLE_NLS
369 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
370 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
371 # endif
372 # endif
373 # ifndef YY_
374 # define YY_(Msgid) Msgid
375 # endif
376 #endif
377 
378 #ifndef YY_ATTRIBUTE_PURE
379 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
380 # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
381 # else
382 # define YY_ATTRIBUTE_PURE
383 # endif
384 #endif
385 
386 #ifndef YY_ATTRIBUTE_UNUSED
387 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
388 # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
389 # else
390 # define YY_ATTRIBUTE_UNUSED
391 # endif
392 #endif
393 
394 /* Suppress unused-variable warnings by "using" E. */
395 #if ! defined lint || defined __GNUC__
396 # define YYUSE(E) ((void) (E))
397 #else
398 # define YYUSE(E) /* empty */
399 #endif
400 
401 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
402 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
403 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
404  _Pragma ("GCC diagnostic push") \
405  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
406  _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
407 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
408  _Pragma ("GCC diagnostic pop")
409 #else
410 # define YY_INITIAL_VALUE(Value) Value
411 #endif
412 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
413 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
414 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
415 #endif
416 #ifndef YY_INITIAL_VALUE
417 # define YY_INITIAL_VALUE(Value) /* Nothing. */
418 #endif
419 
420 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
421 # define YY_IGNORE_USELESS_CAST_BEGIN \
422  _Pragma ("GCC diagnostic push") \
423  _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
424 # define YY_IGNORE_USELESS_CAST_END \
425  _Pragma ("GCC diagnostic pop")
426 #endif
427 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
428 # define YY_IGNORE_USELESS_CAST_BEGIN
429 # define YY_IGNORE_USELESS_CAST_END
430 #endif
431 
432 
433 #define YY_ASSERT(E) ((void) (0 && (E)))
434 
435 #if ! defined yyoverflow || YYERROR_VERBOSE
436 
437 /* The parser invokes alloca or malloc; define the necessary symbols. */
438 
439 # ifdef YYSTACK_USE_ALLOCA
440 # if YYSTACK_USE_ALLOCA
441 # ifdef __GNUC__
442 # define YYSTACK_ALLOC __builtin_alloca
443 # elif defined __BUILTIN_VA_ARG_INCR
444 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
445 # elif defined _AIX
446 # define YYSTACK_ALLOC __alloca
447 # elif defined _MSC_VER
448 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
449 # define alloca _alloca
450 # else
451 # define YYSTACK_ALLOC alloca
452 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
453 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
454  /* Use EXIT_SUCCESS as a witness for stdlib.h. */
455 # ifndef EXIT_SUCCESS
456 # define EXIT_SUCCESS 0
457 # endif
458 # endif
459 # endif
460 # endif
461 # endif
462 
463 # ifdef YYSTACK_ALLOC
464  /* Pacify GCC's 'empty if-body' warning. */
465 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
466 # ifndef YYSTACK_ALLOC_MAXIMUM
467  /* The OS might guarantee only one guard page at the bottom of the stack,
468  and a page size can be as small as 4096 bytes. So we cannot safely
469  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
470  to allow for a few compiler-allocated temporary stack slots. */
471 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
472 # endif
473 # else
474 # define YYSTACK_ALLOC YYMALLOC
475 # define YYSTACK_FREE YYFREE
476 # ifndef YYSTACK_ALLOC_MAXIMUM
477 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
478 # endif
479 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
480  && ! ((defined YYMALLOC || defined malloc) \
481  && (defined YYFREE || defined free)))
482 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
483 # ifndef EXIT_SUCCESS
484 # define EXIT_SUCCESS 0
485 # endif
486 # endif
487 # ifndef YYMALLOC
488 # define YYMALLOC malloc
489 # if ! defined malloc && ! defined EXIT_SUCCESS
490 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
491 # endif
492 # endif
493 # ifndef YYFREE
494 # define YYFREE free
495 # if ! defined free && ! defined EXIT_SUCCESS
496 void free (void *); /* INFRINGES ON USER NAME SPACE */
497 # endif
498 # endif
499 # endif
500 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
501 
502 
503 #if (! defined yyoverflow \
504  && (! defined __cplusplus \
505  || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
506 
507 /* A type that is properly aligned for any stack member. */
508 union yyalloc
509 {
512 };
513 
514 /* The size of the maximum gap between one aligned stack and the next. */
515 # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
516 
517 /* The size of an array large to enough to hold all stacks, each with
518  N elements. */
519 # define YYSTACK_BYTES(N) \
520  ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
521  + YYSTACK_GAP_MAXIMUM)
522 
523 # define YYCOPY_NEEDED 1
524 
525 /* Relocate STACK from its old location to the new one. The
526  local variables YYSIZE and YYSTACKSIZE give the old and new number of
527  elements in the stack, and YYPTR gives the new location of the
528  stack. Advance YYPTR to a properly aligned location for the next
529  stack. */
530 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
531  do \
532  { \
533  YYPTRDIFF_T yynewbytes; \
534  YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
535  Stack = &yyptr->Stack_alloc; \
536  yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
537  yyptr += yynewbytes / YYSIZEOF (*yyptr); \
538  } \
539  while (0)
540 
541 #endif
542 
543 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
544 /* Copy COUNT objects from SRC to DST. The source and destination do
545  not overlap. */
546 # ifndef YYCOPY
547 # if defined __GNUC__ && 1 < __GNUC__
548 # define YYCOPY(Dst, Src, Count) \
549  __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
550 # else
551 # define YYCOPY(Dst, Src, Count) \
552  do \
553  { \
554  YYPTRDIFF_T yyi; \
555  for (yyi = 0; yyi < (Count); yyi++) \
556  (Dst)[yyi] = (Src)[yyi]; \
557  } \
558  while (0)
559 # endif
560 # endif
561 #endif /* !YYCOPY_NEEDED */
562 
563 /* YYFINAL -- State number of the termination state. */
564 #define YYFINAL 78
565 /* YYLAST -- Last index in YYTABLE. */
566 #define YYLAST 1029
567 
568 /* YYNTOKENS -- Number of terminals. */
569 #define YYNTOKENS 73
570 /* YYNNTS -- Number of nonterminals. */
571 #define YYNNTS 43
572 /* YYNRULES -- Number of rules. */
573 #define YYNRULES 126
574 /* YYNSTATES -- Number of states. */
575 #define YYNSTATES 227
576 
577 #define YYUNDEFTOK 2
578 #define YYMAXUTOK 304
579 
580 
581 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
582  as returned by yylex, with out-of-bounds checking. */
583 #define YYTRANSLATE(YYX) \
584  (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
585 
586 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
587  as returned by yylex. */
588 static const yytype_int8 yytranslate[] =
589 {
590  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
591  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
592  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
593  2, 2, 2, 70, 2, 2, 2, 57, 52, 2,
594  61, 62, 55, 53, 63, 54, 72, 56, 2, 2,
595  2, 2, 2, 2, 2, 2, 2, 2, 67, 66,
596  48, 47, 49, 2, 2, 2, 2, 2, 2, 2,
597  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
598  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
599  2, 68, 2, 69, 51, 2, 2, 2, 2, 2,
600  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
601  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
602  2, 2, 2, 64, 50, 65, 71, 2, 2, 2,
603  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
604  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
605  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
606  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
607  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
608  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
609  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
610  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
611  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
612  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
613  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
614  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
615  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
616  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
617  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
618  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
619  35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
620  45, 46, 58, 59, 60
621 };
622 
623 #if YYDEBUG
624  /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
625 static const yytype_int16 yyrline[] =
626 {
627  0, 156, 156, 161, 167, 174, 174, 177, 187, 187,
628  188, 194, 203, 203, 204, 205, 219, 219, 219, 219,
629  222, 222, 222, 223, 223, 223, 223, 223, 224, 228,
630  232, 235, 241, 248, 254, 262, 262, 262, 262, 263,
631  273, 280, 288, 298, 298, 298, 298, 301, 309, 309,
632  312, 362, 370, 370, 371, 371, 377, 383, 392, 396,
633  397, 398, 399, 400, 401, 402, 403, 406, 410, 412,
634  412, 414, 422, 425, 426, 427, 428, 432, 433, 434,
635  435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
636  445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
637  455, 456, 457, 458, 459, 460, 461, 461, 461, 461,
638  461, 464, 466, 467, 471, 474, 480, 481, 485, 490,
639  492, 498, 498, 500, 502, 512, 520
640 };
641 #endif
642 
643 #if YYDEBUG || YYERROR_VERBOSE || 0
644 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
645  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
646 static const char *const yytname[] =
647 {
648  "$end", "error", "$undefined", "IF", "ELSE", "EQ", "NEQ", "SUPEQ",
649  "INFEQ", "OR", "AND", "MATCH", "NOMATCH", "REP", "FOR", "REPEAT",
650  "UNTIL", "FOREACH", "WHILE", "BREAK", "CONTINUE", "FUNCTION", "RETURN",
651  "INCLUDE", "LOCAL", "GLOBAL", "PLUS_PLUS", "MINUS_MINUS", "L_SHIFT",
652  "R_SHIFT", "R_USHIFT", "EXPO", "PLUS_EQ", "MINUS_EQ", "MULT_EQ",
653  "DIV_EQ", "MODULO_EQ", "L_SHIFT_EQ", "R_SHIFT_EQ", "R_USHIFT_EQ",
654  "RE_MATCH", "RE_NOMATCH", "ARROW", "IDENT", "STRING1", "STRING2",
655  "INTEGER", "'='", "'<'", "'>'", "'|'", "'^'", "'&'", "'+'", "'-'", "'*'",
656  "'/'", "'%'", "NOT", "UMINUS", "BIT_NOT", "'('", "')'", "','", "'{'",
657  "'}'", "';'", "':'", "'['", "']'", "'!'", "'~'", "'.'", "$accept",
658  "tiptop", "instr_decl_list", "instr_decl", "func_decl", "arg_decl",
659  "arg_decl_1", "block", "instr_list", "instr", "simple_instr", "ret",
660  "if_block", "loop", "for_loop", "while_loop", "repeat_loop",
661  "foreach_loop", "aff_func", "rep", "string", "inc", "func_call",
662  "arg_list", "arg_list_1", "arg", "aff", "lvalue", "identifier",
663  "array_elem", "array_index", "post_pre_incr", "expr", "const_array",
664  "list_array_data", "array_data", "atom", "simple_array_data", "var",
665  "var_name", "ipaddr", "loc", "glob", YY_NULLPTR
666 };
667 #endif
668 
669 # ifdef YYPRINT
670 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
671  (internal) symbol number NUM (which must be that of a token). */
672 static const yytype_int16 yytoknum[] =
673 {
674  0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
675  265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
676  275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
677  285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
678  295, 296, 297, 298, 299, 300, 301, 61, 60, 62,
679  124, 94, 38, 43, 45, 42, 47, 37, 302, 303,
680  304, 40, 41, 44, 123, 125, 59, 58, 91, 93,
681  33, 126, 46
682 };
683 # endif
684 
685 #define YYPACT_NINF (-91)
686 
687 #define yypact_value_is_default(Yyn) \
688  ((Yyn) == YYPACT_NINF)
689 
690 #define YYTABLE_NINF (-69)
691 
692 #define yytable_value_is_error(Yyn) \
693  ((Yyn) == YYTABLE_NINF)
694 
695  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
696  STATE-NUM. */
697 static const yytype_int16 yypact[] =
698 {
699  464, -53, -91, -50, 491, -6, -42, -91, -91, -6,
700  499, -40, -6, -6, -6, -6, -91, 259, 25, -91,
701  91, -91, -91, -91, -39, -91, -91, -91, -91, -91,
702  -91, -91, -91, -91, 23, -91, 553, -13, -91, -91,
703  -91, -91, 499, 26, 29, -30, 499, -21, -91, -91,
704  -18, 499, 499, 13, 499, 499, -91, -91, 961, 611,
705  -91, 798, -91, -91, -91, -91, -91, 19, -91, -91,
706  -12, -91, -91, -26, -91, -91, -9, 123, -91, -91,
707  -91, 499, -91, -91, 499, 499, 499, 499, 499, 499,
708  499, 499, 499, 499, 499, 566, -4, -91, -91, -91,
709  499, 499, 624, -6, 14, 37, 682, 39, 40, -91,
710  42, 7, 22, -91, -91, 37, 37, 499, 499, 499,
711  499, 499, 499, 499, 499, 499, 499, 499, 499, 19,
712  19, 499, 499, 499, 499, 499, 499, 499, 499, 499,
713  499, -91, -91, 28, -6, -91, -91, 798, 798, 798,
714  798, 798, 798, 798, 798, 798, 798, 35, -91, 33,
715  945, 798, 17, 798, 491, 499, 347, 740, 491, 36,
716  16, -91, 34, -91, 13, 882, 882, 882, 882, 851,
717  913, 882, 882, 398, 398, 398, 37, -91, -91, 882,
718  882, 354, 337, 415, 15, 15, 37, 37, 37, -91,
719  -91, -91, 499, 499, -91, 83, 409, -91, 491, -91,
720  27, 53, -91, -91, -91, 798, 491, 26, -91, -91,
721  47, -91, 38, 56, 491, -91, -91
722 };
723 
724  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
725  Performed when YYTABLE does not specify something else to do. Zero
726  means the default is an error. */
727 static const yytype_int8 yydefact[] =
728 {
729  30, 0, 70, 0, 30, 0, 0, 28, 29, 0,
730  32, 0, 8, 8, 0, 0, 69, 30, 0, 2,
731  3, 6, 17, 5, 0, 24, 18, 19, 35, 36,
732  37, 38, 22, 25, 23, 20, 0, 67, 68, 21,
733  26, 27, 0, 46, 0, 0, 0, 0, 118, 117,
734  116, 0, 0, 0, 0, 0, 122, 107, 123, 121,
735  95, 31, 110, 109, 106, 120, 108, 0, 125, 9,
736  10, 126, 73, 67, 74, 13, 0, 14, 1, 4,
737  16, 0, 75, 76, 0, 0, 0, 0, 0, 0,
738  0, 0, 0, 53, 0, 0, 0, 45, 43, 44,
739  0, 0, 0, 8, 0, 83, 0, 118, 117, 116,
740  0, 0, 112, 119, 114, 79, 84, 0, 0, 0,
741  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
742  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
743  0, 48, 49, 0, 0, 12, 15, 47, 59, 60,
744  61, 62, 63, 66, 64, 65, 58, 0, 52, 54,
745  123, 56, 0, 72, 30, 0, 0, 0, 30, 0,
746  0, 77, 0, 111, 0, 102, 103, 104, 105, 80,
747  78, 96, 97, 94, 92, 93, 86, 98, 99, 100,
748  101, 91, 90, 89, 81, 82, 85, 87, 88, 50,
749  11, 51, 0, 0, 71, 33, 0, 41, 30, 40,
750  0, 0, 115, 113, 55, 57, 30, 46, 42, 7,
751  0, 34, 0, 0, 30, 124, 39
752 };
753 
754  /* YYPGOTO[NTERM-NUM]. */
755 static const yytype_int16 yypgoto[] =
756 {
757  -91, -91, 101, -91, -91, -11, -20, -87, 48, 12,
758  -91, -91, -91, -91, -91, -91, -91, -91, -90, -91,
759  -64, -91, 6, -91, -74, -91, 24, 60, 0, 18,
760  -91, 30, 209, -91, -45, -91, -52, -41, -91, -91,
761  -91, -91, -91
762 };
763 
764  /* YYDEFGOTO[NTERM-NUM]. */
765 static const yytype_int16 yydefgoto[] =
766 {
767  -1, 18, 19, 20, 21, 68, 69, 22, 76, 23,
768  24, 25, 26, 27, 28, 29, 30, 31, 96, 32,
769  110, 33, 56, 157, 158, 159, 57, 36, 58, 59,
770  162, 60, 161, 62, 111, 112, 63, 114, 64, 65,
771  66, 40, 41
772 };
773 
774  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
775  positive, shift that token. If negative, reduce the rule whose
776  number is the opposite. If YYTABLE_NINF, syntax error. */
777 static const yytype_int16 yytable[] =
778 {
779  37, 113, 71, 143, 37, 45, 34, 2, 42, 47,
780  34, 43, 70, 70, 73, 73, 44, 37, 38, 46,
781  37, 67, 38, 34, 35, 78, 34, 80, 35, 77,
782  39, 101, 38, 38, 39, 38, 81, 16, 38, 2,
783  103, 35, 94, 37, 35, 100, 128, 39, 93, 97,
784  39, 144, 14, 15, 104, 94, 145, 107, 108, 109,
785  170, 38, 165, 141, 142, 187, 188, 98, 128, 16,
786  138, 139, 140, 99, 72, 74, 173, 37, 48, 49,
787  109, -48, -49, 34, 172, 174, 204, 216, 211, 77,
788  199, 17, 169, 160, 1, 38, 202, 201, 210, 220,
789  224, 35, 225, 70, 2, 3, 4, 39, 5, 6,
790  7, 8, 9, 10, 11, 12, 13, 14, 15, 223,
791  113, 79, 113, 219, 200, 146, 1, 222, 214, 213,
792  0, 212, 0, 0, 16, 0, 2, 3, 4, 0,
793  5, 6, 7, 8, 70, 10, 11, 12, 13, 14,
794  15, 0, 0, 0, 0, 17, 0, -30, 0, 0,
795  0, 0, 0, 0, 37, 0, 16, 0, 37, 0,
796  34, 0, 0, 0, 34, 0, 205, 0, 0, 0,
797  209, 0, 38, 0, 0, 0, 38, 17, 35, -30,
798  0, 0, 35, 0, 39, 0, 0, 0, 39, 0,
799  0, 0, 160, 0, 0, 0, 0, 0, 37, 0,
800  0, 0, 0, 0, 34, 0, 37, 37, 0, 61,
801  218, 0, 34, 97, 37, 0, 38, 0, 221, 0,
802  34, 0, 35, 0, 38, 38, 226, 0, 39, 0,
803  35, 98, 38, 0, 0, 0, 39, 99, 35, 0,
804  0, 95, 0, 0, 39, 102, 0, 0, 0, 0,
805  105, 106, 1, 115, 116, 0, 0, 0, 0, 0,
806  0, 0, 2, 3, 4, 0, 5, 6, 7, 8,
807  0, 10, 11, 12, 13, 14, 15, 0, 0, 0,
808  147, 0, 0, 148, 149, 150, 151, 152, 153, 154,
809  155, 156, 16, 163, 0, 0, 0, 0, 0, 166,
810  167, 0, 0, 0, 0, 0, 0, 0, 0, 0,
811  0, 0, 0, 17, 75, 0, 175, 176, 177, 178,
812  179, 180, 181, 182, 183, 184, 185, 186, 0, 0,
813  189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
814  0, 0, 117, 118, 119, 120, 121, 122, 123, 124,
815  0, 0, 0, 0, 0, 125, 126, 127, 128, 0,
816  0, 0, 0, 0, 206, 125, 126, 127, 128, 0,
817  0, 0, 125, 126, 127, 128, 0, 129, 130, 135,
818  136, 137, 138, 139, 140, 131, 132, 133, 134, 135,
819  136, 137, 138, 139, 140, 134, 135, 136, 137, 138,
820  139, 140, 215, 207, 117, 118, 119, 120, 121, 122,
821  123, 124, 0, 0, 0, 0, -69, -69, -69, 128,
822  0, 0, 0, 0, 0, 0, 0, 125, 126, 127,
823  128, 0, 0, 125, 126, 127, 128, 0, 0, 129,
824  130, 136, 137, 138, 139, 140, 0, 131, 132, 133,
825  134, 135, 136, 137, 138, 139, 140, 1, 136, 137,
826  138, 139, 140, 0, 0, 217, 0, 2, 3, 4,
827  0, 5, 6, 7, 8, 9, 10, 11, 12, 13,
828  14, 15, 0, 0, 1, 0, 0, 0, 0, 0,
829  0, 0, 0, 0, 2, 3, 4, 16, 5, 6,
830  7, 8, 2, 10, 11, 12, 13, 14, 15, 0,
831  0, 0, 0, 0, 0, 14, 15, 0, 17, 0,
832  0, 0, 0, 0, 16, 0, 0, 0, 0, 0,
833  0, 0, 16, 48, 49, 50, 0, 0, 0, 0,
834  0, 0, 0, 51, 0, 17, 0, 0, 0, 0,
835  52, 0, 0, 0, 0, 0, 0, 53, 0, 54,
836  55, 117, 118, 119, 120, 121, 122, 123, 124, 82,
837  83, 0, 0, 0, 0, 84, 85, 86, 87, 88,
838  89, 90, 91, 0, 125, 126, 127, 128, 0, 0,
839  92, 0, 0, 0, 0, 0, 129, 130, 0, 0,
840  0, 0, 0, 0, 131, 132, 133, 134, 135, 136,
841  137, 138, 139, 140, 0, 0, 0, 0, 164, 117,
842  118, 119, 120, 121, 122, 123, 124, -68, -68, 0,
843  0, 0, 0, -68, -68, -68, -68, -68, -68, -68,
844  -68, 0, 125, 126, 127, 128, 0, 0, -68, 0,
845  0, 0, 0, 0, 129, 130, 0, 0, 0, 0,
846  0, 0, 131, 132, 133, 134, 135, 136, 137, 138,
847  139, 140, 0, 0, 0, 0, 168, 117, 118, 119,
848  120, 121, 122, 123, 124, 0, 0, 0, 0, 0,
849  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
850  125, 126, 127, 128, 0, 0, 0, 0, 0, 0,
851  0, 0, 129, 130, 0, 0, 0, 0, 0, 0,
852  131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
853  0, 0, 0, 0, 171, 117, 118, 119, 120, 121,
854  122, 123, 124, 0, 0, 0, 0, 0, 0, 0,
855  0, 0, 0, 0, 0, 0, 0, 0, 125, 126,
856  127, 128, 0, 0, 0, 0, 0, 0, 0, 0,
857  129, 130, 0, 0, 0, 0, 0, 0, 131, 132,
858  133, 134, 135, 136, 137, 138, 139, 140, 0, 0,
859  0, 0, 208, 117, 118, 119, 120, 121, 122, 123,
860  124, 0, 0, 0, 0, 0, 0, 0, 0, 0,
861  0, 0, 0, 0, 0, 0, 125, 126, 127, 128,
862  0, 0, 0, 0, 0, 0, 0, 0, 129, 130,
863  0, 0, 0, 0, 0, 0, 131, 132, 133, 134,
864  135, 136, 137, 138, 139, 140, 117, 118, 119, 120,
865  0, 122, 123, 124, 0, 0, 0, 0, 0, 0,
866  0, 0, 0, 0, 0, 0, 0, 0, 0, 125,
867  126, 127, 128, 0, 0, 0, 0, -69, -69, -69,
868  -69, 129, 130, -69, -69, 0, 0, 0, 0, 131,
869  132, 133, 134, 135, 136, 137, 138, 139, 140, 0,
870  125, 126, 127, 128, 0, 0, 0, 0, 117, 118,
871  119, 120, -69, -69, 123, 124, 0, 0, 0, 0,
872  -69, -69, 133, 134, 135, 136, 137, 138, 139, 140,
873  0, 125, 126, 127, 128, 0, 0, 0, 0, 0,
874  0, 0, 0, 129, 130, 0, 0, 0, 0, 0,
875  0, 131, 132, 133, 134, 135, 136, 137, 138, 139,
876  140, -67, -67, 0, 0, 0, 0, -67, -67, -67,
877  -67, -67, -67, -67, -67, 0, 0, -67, -67, 0,
878  0, 0, -67, -67, -67, -67, -67, -67, -67, -67,
879  -67, 0, 0, 0, 0, 0, 93, 0, -67, 0,
880  0, 0, 203, 94, 0, 0, 0, 0, 0, 0,
881  0, 0, 93, 0, 0, 0, 0, 0, 0, 94
882 };
883 
884 static const yytype_int16 yycheck[] =
885 {
886  0, 53, 13, 67, 4, 5, 0, 13, 61, 9,
887  4, 61, 12, 13, 14, 15, 4, 17, 0, 61,
888  20, 61, 4, 17, 0, 0, 20, 66, 4, 17,
889  0, 61, 14, 15, 4, 17, 13, 43, 20, 13,
890  61, 17, 68, 43, 20, 16, 31, 17, 61, 43,
891  20, 63, 26, 27, 72, 68, 65, 44, 45, 46,
892  46, 43, 66, 44, 45, 129, 130, 43, 31, 43,
893  55, 56, 57, 43, 14, 15, 69, 77, 44, 45,
894  46, 42, 42, 77, 42, 63, 69, 4, 72, 77,
895  62, 64, 103, 93, 3, 77, 63, 62, 62, 46,
896  62, 77, 46, 103, 13, 14, 15, 77, 17, 18,
897  19, 20, 21, 22, 23, 24, 25, 26, 27, 72,
898  172, 20, 174, 210, 144, 77, 3, 217, 202, 174,
899  -1, 172, -1, -1, 43, -1, 13, 14, 15, -1,
900  17, 18, 19, 20, 144, 22, 23, 24, 25, 26,
901  27, -1, -1, -1, -1, 64, -1, 66, -1, -1,
902  -1, -1, -1, -1, 164, -1, 43, -1, 168, -1,
903  164, -1, -1, -1, 168, -1, 164, -1, -1, -1,
904  168, -1, 164, -1, -1, -1, 168, 64, 164, 66,
905  -1, -1, 168, -1, 164, -1, -1, -1, 168, -1,
906  -1, -1, 202, -1, -1, -1, -1, -1, 208, -1,
907  -1, -1, -1, -1, 208, -1, 216, 217, -1, 10,
908  208, -1, 216, 217, 224, -1, 208, -1, 216, -1,
909  224, -1, 208, -1, 216, 217, 224, -1, 208, -1,
910  216, 217, 224, -1, -1, -1, 216, 217, 224, -1,
911  -1, 42, -1, -1, 224, 46, -1, -1, -1, -1,
912  51, 52, 3, 54, 55, -1, -1, -1, -1, -1,
913  -1, -1, 13, 14, 15, -1, 17, 18, 19, 20,
914  -1, 22, 23, 24, 25, 26, 27, -1, -1, -1,
915  81, -1, -1, 84, 85, 86, 87, 88, 89, 90,
916  91, 92, 43, 94, -1, -1, -1, -1, -1, 100,
917  101, -1, -1, -1, -1, -1, -1, -1, -1, -1,
918  -1, -1, -1, 64, 65, -1, 117, 118, 119, 120,
919  121, 122, 123, 124, 125, 126, 127, 128, -1, -1,
920  131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
921  -1, -1, 5, 6, 7, 8, 9, 10, 11, 12,
922  -1, -1, -1, -1, -1, 28, 29, 30, 31, -1,
923  -1, -1, -1, -1, 165, 28, 29, 30, 31, -1,
924  -1, -1, 28, 29, 30, 31, -1, 40, 41, 52,
925  53, 54, 55, 56, 57, 48, 49, 50, 51, 52,
926  53, 54, 55, 56, 57, 51, 52, 53, 54, 55,
927  56, 57, 203, 66, 5, 6, 7, 8, 9, 10,
928  11, 12, -1, -1, -1, -1, 28, 29, 30, 31,
929  -1, -1, -1, -1, -1, -1, -1, 28, 29, 30,
930  31, -1, -1, 28, 29, 30, 31, -1, -1, 40,
931  41, 53, 54, 55, 56, 57, -1, 48, 49, 50,
932  51, 52, 53, 54, 55, 56, 57, 3, 53, 54,
933  55, 56, 57, -1, -1, 66, -1, 13, 14, 15,
934  -1, 17, 18, 19, 20, 21, 22, 23, 24, 25,
935  26, 27, -1, -1, 3, -1, -1, -1, -1, -1,
936  -1, -1, -1, -1, 13, 14, 15, 43, 17, 18,
937  19, 20, 13, 22, 23, 24, 25, 26, 27, -1,
938  -1, -1, -1, -1, -1, 26, 27, -1, 64, -1,
939  -1, -1, -1, -1, 43, -1, -1, -1, -1, -1,
940  -1, -1, 43, 44, 45, 46, -1, -1, -1, -1,
941  -1, -1, -1, 54, -1, 64, -1, -1, -1, -1,
942  61, -1, -1, -1, -1, -1, -1, 68, -1, 70,
943  71, 5, 6, 7, 8, 9, 10, 11, 12, 26,
944  27, -1, -1, -1, -1, 32, 33, 34, 35, 36,
945  37, 38, 39, -1, 28, 29, 30, 31, -1, -1,
946  47, -1, -1, -1, -1, -1, 40, 41, -1, -1,
947  -1, -1, -1, -1, 48, 49, 50, 51, 52, 53,
948  54, 55, 56, 57, -1, -1, -1, -1, 62, 5,
949  6, 7, 8, 9, 10, 11, 12, 26, 27, -1,
950  -1, -1, -1, 32, 33, 34, 35, 36, 37, 38,
951  39, -1, 28, 29, 30, 31, -1, -1, 47, -1,
952  -1, -1, -1, -1, 40, 41, -1, -1, -1, -1,
953  -1, -1, 48, 49, 50, 51, 52, 53, 54, 55,
954  56, 57, -1, -1, -1, -1, 62, 5, 6, 7,
955  8, 9, 10, 11, 12, -1, -1, -1, -1, -1,
956  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
957  28, 29, 30, 31, -1, -1, -1, -1, -1, -1,
958  -1, -1, 40, 41, -1, -1, -1, -1, -1, -1,
959  48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
960  -1, -1, -1, -1, 62, 5, 6, 7, 8, 9,
961  10, 11, 12, -1, -1, -1, -1, -1, -1, -1,
962  -1, -1, -1, -1, -1, -1, -1, -1, 28, 29,
963  30, 31, -1, -1, -1, -1, -1, -1, -1, -1,
964  40, 41, -1, -1, -1, -1, -1, -1, 48, 49,
965  50, 51, 52, 53, 54, 55, 56, 57, -1, -1,
966  -1, -1, 62, 5, 6, 7, 8, 9, 10, 11,
967  12, -1, -1, -1, -1, -1, -1, -1, -1, -1,
968  -1, -1, -1, -1, -1, -1, 28, 29, 30, 31,
969  -1, -1, -1, -1, -1, -1, -1, -1, 40, 41,
970  -1, -1, -1, -1, -1, -1, 48, 49, 50, 51,
971  52, 53, 54, 55, 56, 57, 5, 6, 7, 8,
972  -1, 10, 11, 12, -1, -1, -1, -1, -1, -1,
973  -1, -1, -1, -1, -1, -1, -1, -1, -1, 28,
974  29, 30, 31, -1, -1, -1, -1, 5, 6, 7,
975  8, 40, 41, 11, 12, -1, -1, -1, -1, 48,
976  49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
977  28, 29, 30, 31, -1, -1, -1, -1, 5, 6,
978  7, 8, 40, 41, 11, 12, -1, -1, -1, -1,
979  48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
980  -1, 28, 29, 30, 31, -1, -1, -1, -1, -1,
981  -1, -1, -1, 40, 41, -1, -1, -1, -1, -1,
982  -1, 48, 49, 50, 51, 52, 53, 54, 55, 56,
983  57, 26, 27, -1, -1, -1, -1, 32, 33, 34,
984  35, 36, 37, 38, 39, -1, -1, 26, 27, -1,
985  -1, -1, 47, 32, 33, 34, 35, 36, 37, 38,
986  39, -1, -1, -1, -1, -1, 61, -1, 47, -1,
987  -1, -1, 67, 68, -1, -1, -1, -1, -1, -1,
988  -1, -1, 61, -1, -1, -1, -1, -1, -1, 68
989 };
990 
991  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
992  symbol of state STATE-NUM. */
993 static const yytype_int8 yystos[] =
994 {
995  0, 3, 13, 14, 15, 17, 18, 19, 20, 21,
996  22, 23, 24, 25, 26, 27, 43, 64, 74, 75,
997  76, 77, 80, 82, 83, 84, 85, 86, 87, 88,
998  89, 90, 92, 94, 95, 99, 100, 101, 102, 104,
999  114, 115, 61, 61, 82, 101, 61, 101, 44, 45,
1000  46, 54, 61, 68, 70, 71, 95, 99, 101, 102,
1001  104, 105, 106, 109, 111, 112, 113, 61, 78, 79,
1002  101, 78, 100, 101, 100, 65, 81, 82, 0, 75,
1003  66, 13, 26, 27, 32, 33, 34, 35, 36, 37,
1004  38, 39, 47, 61, 68, 105, 91, 95, 99, 104,
1005  16, 61, 105, 61, 72, 105, 105, 44, 45, 46,
1006  93, 107, 108, 109, 110, 105, 105, 5, 6, 7,
1007  8, 9, 10, 11, 12, 28, 29, 30, 31, 40,
1008  41, 48, 49, 50, 51, 52, 53, 54, 55, 56,
1009  57, 44, 45, 93, 63, 65, 81, 105, 105, 105,
1010  105, 105, 105, 105, 105, 105, 105, 96, 97, 98,
1011  101, 105, 103, 105, 62, 66, 105, 105, 62, 78,
1012  46, 62, 42, 69, 63, 105, 105, 105, 105, 105,
1013  105, 105, 105, 105, 105, 105, 105, 93, 93, 105,
1014  105, 105, 105, 105, 105, 105, 105, 105, 105, 62,
1015  79, 62, 63, 67, 69, 82, 105, 66, 62, 82,
1016  62, 72, 110, 107, 97, 105, 4, 66, 82, 80,
1017  46, 82, 91, 72, 62, 46, 82
1018 };
1019 
1020  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1021 static const yytype_int8 yyr1[] =
1022 {
1023  0, 73, 74, 75, 75, 76, 76, 77, 78, 78,
1024  79, 79, 80, 80, 81, 81, 82, 82, 82, 82,
1025  83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
1026  83, 84, 84, 85, 85, 86, 86, 86, 86, 87,
1027  88, 89, 90, 91, 91, 91, 91, 92, 93, 93,
1028  94, 95, 96, 96, 97, 97, 98, 98, 99, 99,
1029  99, 99, 99, 99, 99, 99, 99, 100, 100, 101,
1030  101, 102, 103, 104, 104, 104, 104, 105, 105, 105,
1031  105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1032  105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1033  105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1034  105, 106, 107, 107, 108, 108, 109, 109, 109, 110,
1035  111, 111, 111, 112, 113, 114, 115
1036 };
1037 
1038  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1039 static const yytype_int8 yyr2[] =
1040 {
1041  0, 2, 1, 1, 2, 1, 1, 6, 0, 1,
1042  1, 3, 3, 2, 1, 2, 2, 1, 1, 1,
1043  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1044  0, 2, 1, 5, 7, 1, 1, 1, 1, 9,
1045  5, 5, 6, 1, 1, 1, 0, 3, 1, 1,
1046  4, 4, 1, 0, 1, 3, 1, 3, 3, 3,
1047  3, 3, 3, 3, 3, 3, 3, 1, 1, 1,
1048  1, 4, 1, 2, 2, 2, 2, 3, 3, 2,
1049  3, 3, 3, 2, 2, 3, 3, 3, 3, 3,
1050  3, 3, 3, 3, 3, 1, 3, 3, 3, 3,
1051  3, 3, 3, 3, 3, 3, 1, 1, 1, 1,
1052  1, 3, 1, 3, 1, 3, 1, 1, 1, 1,
1053  1, 1, 1, 1, 7, 2, 2
1054 };
1055 
1056 
1057 #define yyerrok (yyerrstatus = 0)
1058 #define yyclearin (yychar = YYEMPTY)
1059 #define YYEMPTY (-2)
1060 #define YYEOF 0
1061 
1062 #define YYACCEPT goto yyacceptlab
1063 #define YYABORT goto yyabortlab
1064 #define YYERROR goto yyerrorlab
1065 
1066 
1067 #define YYRECOVERING() (!!yyerrstatus)
1068 
1069 #define YYBACKUP(Token, Value) \
1070  do \
1071  if (yychar == YYEMPTY) \
1072  { \
1073  yychar = (Token); \
1074  yylval = (Value); \
1075  YYPOPSTACK (yylen); \
1076  yystate = *yyssp; \
1077  goto yybackup; \
1078  } \
1079  else \
1080  { \
1081  yyerror (parm, YY_("syntax error: cannot back up")); \
1082  YYERROR; \
1083  } \
1084  while (0)
1085 
1086 /* Error token number */
1087 #define YYTERROR 1
1088 #define YYERRCODE 256
1089 
1090 
1091 
1092 /* Enable debugging if requested. */
1093 #if YYDEBUG
1094 
1095 # ifndef YYFPRINTF
1096 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1097 # define YYFPRINTF fprintf
1098 # endif
1099 
1100 # define YYDPRINTF(Args) \
1101 do { \
1102  if (yydebug) \
1103  YYFPRINTF Args; \
1104 } while (0)
1105 
1106 /* This macro is provided for backward compatibility. */
1107 #ifndef YY_LOCATION_PRINT
1108 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1109 #endif
1110 
1111 
1112 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1113 do { \
1114  if (yydebug) \
1115  { \
1116  YYFPRINTF (stderr, "%s ", Title); \
1117  yy_symbol_print (stderr, \
1118  Type, Value, parm); \
1119  YYFPRINTF (stderr, "\n"); \
1120  } \
1121 } while (0)
1122 
1123 
1124 /*-----------------------------------.
1125 | Print this symbol's value on YYO. |
1126 `-----------------------------------*/
1127 
1128 static void
1129 yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, naslctxt * parm)
1130 {
1131  FILE *yyoutput = yyo;
1132  YYUSE (yyoutput);
1133  YYUSE (parm);
1134  if (!yyvaluep)
1135  return;
1136 # ifdef YYPRINT
1137  if (yytype < YYNTOKENS)
1138  YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
1139 # endif
1141  YYUSE (yytype);
1143 }
1144 
1145 
1146 /*---------------------------.
1147 | Print this symbol on YYO. |
1148 `---------------------------*/
1149 
1150 static void
1151 yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, naslctxt * parm)
1152 {
1153  YYFPRINTF (yyo, "%s %s (",
1154  yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1155 
1156  yy_symbol_value_print (yyo, yytype, yyvaluep, parm);
1157  YYFPRINTF (yyo, ")");
1158 }
1159 
1160 /*------------------------------------------------------------------.
1161 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1162 | TOP (included). |
1163 `------------------------------------------------------------------*/
1164 
1165 static void
1167 {
1168  YYFPRINTF (stderr, "Stack now");
1169  for (; yybottom <= yytop; yybottom++)
1170  {
1171  int yybot = *yybottom;
1172  YYFPRINTF (stderr, " %d", yybot);
1173  }
1174  YYFPRINTF (stderr, "\n");
1175 }
1176 
1177 # define YY_STACK_PRINT(Bottom, Top) \
1178 do { \
1179  if (yydebug) \
1180  yy_stack_print ((Bottom), (Top)); \
1181 } while (0)
1182 
1183 
1184 /*------------------------------------------------.
1185 | Report that the YYRULE is going to be reduced. |
1186 `------------------------------------------------*/
1187 
1188 static void
1189 yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule, naslctxt * parm)
1190 {
1191  int yylno = yyrline[yyrule];
1192  int yynrhs = yyr2[yyrule];
1193  int yyi;
1194  YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
1195  yyrule - 1, yylno);
1196  /* The symbols being reduced. */
1197  for (yyi = 0; yyi < yynrhs; yyi++)
1198  {
1199  YYFPRINTF (stderr, " $%d = ", yyi + 1);
1200  yy_symbol_print (stderr,
1201  yystos[yyssp[yyi + 1 - yynrhs]],
1202  &yyvsp[(yyi + 1) - (yynrhs)]
1203  , parm);
1204  YYFPRINTF (stderr, "\n");
1205  }
1206 }
1207 
1208 # define YY_REDUCE_PRINT(Rule) \
1209 do { \
1210  if (yydebug) \
1211  yy_reduce_print (yyssp, yyvsp, Rule, parm); \
1212 } while (0)
1213 
1214 /* Nonzero means print parse trace. It is left uninitialized so that
1215  multiple parsers can coexist. */
1217 #else /* !YYDEBUG */
1218 # define YYDPRINTF(Args)
1219 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1220 # define YY_STACK_PRINT(Bottom, Top)
1221 # define YY_REDUCE_PRINT(Rule)
1222 #endif /* !YYDEBUG */
1223 
1224 
1225 /* YYINITDEPTH -- initial size of the parser's stacks. */
1226 #ifndef YYINITDEPTH
1227 # define YYINITDEPTH 200
1228 #endif
1229 
1230 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1231  if the built-in stack extension method is used).
1232 
1233  Do not make this value too large; the results are undefined if
1234  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1235  evaluated with infinite-precision integer arithmetic. */
1236 
1237 #ifndef YYMAXDEPTH
1238 # define YYMAXDEPTH 10000
1239 #endif
1240 
1241 
1242 #if YYERROR_VERBOSE
1243 
1244 # ifndef yystrlen
1245 # if defined __GLIBC__ && defined _STRING_H
1246 # define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
1247 # else
1248 /* Return the length of YYSTR. */
1249 static YYPTRDIFF_T
1250 yystrlen (const char *yystr)
1251 {
1252  YYPTRDIFF_T yylen;
1253  for (yylen = 0; yystr[yylen]; yylen++)
1254  continue;
1255  return yylen;
1256 }
1257 # endif
1258 # endif
1259 
1260 # ifndef yystpcpy
1261 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1262 # define yystpcpy stpcpy
1263 # else
1264 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1265  YYDEST. */
1266 static char *
1267 yystpcpy (char *yydest, const char *yysrc)
1268 {
1269  char *yyd = yydest;
1270  const char *yys = yysrc;
1271 
1272  while ((*yyd++ = *yys++) != '\0')
1273  continue;
1274 
1275  return yyd - 1;
1276 }
1277 # endif
1278 # endif
1279 
1280 # ifndef yytnamerr
1281 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1282  quotes and backslashes, so that it's suitable for yyerror. The
1283  heuristic is that double-quoting is unnecessary unless the string
1284  contains an apostrophe, a comma, or backslash (other than
1285  backslash-backslash). YYSTR is taken from yytname. If YYRES is
1286  null, do not copy; instead, return the length of what the result
1287  would have been. */
1288 static YYPTRDIFF_T
1289 yytnamerr (char *yyres, const char *yystr)
1290 {
1291  if (*yystr == '"')
1292  {
1293  YYPTRDIFF_T yyn = 0;
1294  char const *yyp = yystr;
1295 
1296  for (;;)
1297  switch (*++yyp)
1298  {
1299  case '\'':
1300  case ',':
1301  goto do_not_strip_quotes;
1302 
1303  case '\\':
1304  if (*++yyp != '\\')
1305  goto do_not_strip_quotes;
1306  else
1307  goto append;
1308 
1309  append:
1310  default:
1311  if (yyres)
1312  yyres[yyn] = *yyp;
1313  yyn++;
1314  break;
1315 
1316  case '"':
1317  if (yyres)
1318  yyres[yyn] = '\0';
1319  return yyn;
1320  }
1321  do_not_strip_quotes: ;
1322  }
1323 
1324  if (yyres)
1325  return yystpcpy (yyres, yystr) - yyres;
1326  else
1327  return yystrlen (yystr);
1328 }
1329 # endif
1330 
1331 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1332  about the unexpected token YYTOKEN for the state stack whose top is
1333  YYSSP.
1334 
1335  Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1336  not large enough to hold the message. In that case, also set
1337  *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1338  required number of bytes is too large to store. */
1339 static int
1340 yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
1341  yy_state_t *yyssp, int yytoken)
1342 {
1343  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1344  /* Internationalized format string. */
1345  const char *yyformat = YY_NULLPTR;
1346  /* Arguments of yyformat: reported tokens (one for the "unexpected",
1347  one per "expected"). */
1348  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1349  /* Actual size of YYARG. */
1350  int yycount = 0;
1351  /* Cumulated lengths of YYARG. */
1352  YYPTRDIFF_T yysize = 0;
1353 
1354  /* There are many possibilities here to consider:
1355  - If this state is a consistent state with a default action, then
1356  the only way this function was invoked is if the default action
1357  is an error action. In that case, don't check for expected
1358  tokens because there are none.
1359  - The only way there can be no lookahead present (in yychar) is if
1360  this state is a consistent state with a default action. Thus,
1361  detecting the absence of a lookahead is sufficient to determine
1362  that there is no unexpected or expected token to report. In that
1363  case, just report a simple "syntax error".
1364  - Don't assume there isn't a lookahead just because this state is a
1365  consistent state with a default action. There might have been a
1366  previous inconsistent state, consistent state with a non-default
1367  action, or user semantic action that manipulated yychar.
1368  - Of course, the expected token list depends on states to have
1369  correct lookahead information, and it depends on the parser not
1370  to perform extra reductions after fetching a lookahead from the
1371  scanner and before detecting a syntax error. Thus, state merging
1372  (from LALR or IELR) and default reductions corrupt the expected
1373  token list. However, the list is correct for canonical LR with
1374  one exception: it will still contain any token that will not be
1375  accepted due to an error action in a later state.
1376  */
1377  if (yytoken != YYEMPTY)
1378  {
1379  int yyn = yypact[*yyssp];
1380  YYPTRDIFF_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1381  yysize = yysize0;
1382  yyarg[yycount++] = yytname[yytoken];
1383  if (!yypact_value_is_default (yyn))
1384  {
1385  /* Start YYX at -YYN if negative to avoid negative indexes in
1386  YYCHECK. In other words, skip the first -YYN actions for
1387  this state because they are default actions. */
1388  int yyxbegin = yyn < 0 ? -yyn : 0;
1389  /* Stay within bounds of both yycheck and yytname. */
1390  int yychecklim = YYLAST - yyn + 1;
1391  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1392  int yyx;
1393 
1394  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1395  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1396  && !yytable_value_is_error (yytable[yyx + yyn]))
1397  {
1398  if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1399  {
1400  yycount = 1;
1401  yysize = yysize0;
1402  break;
1403  }
1404  yyarg[yycount++] = yytname[yyx];
1405  {
1406  YYPTRDIFF_T yysize1
1407  = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1408  if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1409  yysize = yysize1;
1410  else
1411  return 2;
1412  }
1413  }
1414  }
1415  }
1416 
1417  switch (yycount)
1418  {
1419 # define YYCASE_(N, S) \
1420  case N: \
1421  yyformat = S; \
1422  break
1423  default: /* Avoid compiler warnings. */
1424  YYCASE_(0, YY_("syntax error"));
1425  YYCASE_(1, YY_("syntax error, unexpected %s"));
1426  YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1427  YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1428  YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1429  YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1430 # undef YYCASE_
1431  }
1432 
1433  {
1434  /* Don't count the "%s"s in the final size, but reserve room for
1435  the terminator. */
1436  YYPTRDIFF_T yysize1 = yysize + (yystrlen (yyformat) - 2 * yycount) + 1;
1437  if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1438  yysize = yysize1;
1439  else
1440  return 2;
1441  }
1442 
1443  if (*yymsg_alloc < yysize)
1444  {
1445  *yymsg_alloc = 2 * yysize;
1446  if (! (yysize <= *yymsg_alloc
1447  && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1448  *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1449  return 1;
1450  }
1451 
1452  /* Avoid sprintf, as that infringes on the user's name space.
1453  Don't have undefined behavior even if the translation
1454  produced a string with the wrong number of "%s"s. */
1455  {
1456  char *yyp = *yymsg;
1457  int yyi = 0;
1458  while ((*yyp = *yyformat) != '\0')
1459  if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1460  {
1461  yyp += yytnamerr (yyp, yyarg[yyi++]);
1462  yyformat += 2;
1463  }
1464  else
1465  {
1466  ++yyp;
1467  ++yyformat;
1468  }
1469  }
1470  return 0;
1471 }
1472 #endif /* YYERROR_VERBOSE */
1473 
1474 /*-----------------------------------------------.
1475 | Release the memory associated to this symbol. |
1476 `-----------------------------------------------*/
1477 
1478 static void
1479 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, naslctxt * parm)
1480 {
1481  YYUSE (yyvaluep);
1482  YYUSE (parm);
1483  if (!yymsg)
1484  yymsg = "Deleting";
1485  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1486 
1488  YYUSE (yytype);
1490 }
1491 
1492 
1493 
1494 
1495 /*----------.
1496 | yyparse. |
1497 `----------*/
1498 
1499 int
1501 {
1502 /* The lookahead symbol. */
1503 int yychar;
1504 
1505 
1506 /* The semantic value of the lookahead symbol. */
1507 /* Default value used for initialization, for pacifying older GCCs
1508  or non-GCC compilers. */
1509 YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
1510 YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
1511 
1512  /* Number of syntax errors so far. */
1513  int yynerrs;
1514 
1515  yy_state_fast_t yystate;
1516  /* Number of tokens to shift before error messages enabled. */
1517  int yyerrstatus;
1518 
1519  /* The stacks and their tools:
1520  'yyss': related to states.
1521  'yyvs': related to semantic values.
1522 
1523  Refer to the stacks through separate pointers, to allow yyoverflow
1524  to reallocate them elsewhere. */
1525 
1526  /* The state stack. */
1527  yy_state_t yyssa[YYINITDEPTH];
1528  yy_state_t *yyss;
1529  yy_state_t *yyssp;
1530 
1531  /* The semantic value stack. */
1532  YYSTYPE yyvsa[YYINITDEPTH];
1533  YYSTYPE *yyvs;
1534  YYSTYPE *yyvsp;
1535 
1536  YYPTRDIFF_T yystacksize;
1537 
1538  int yyn;
1539  int yyresult;
1540  /* Lookahead token as an internal (translated) token number. */
1541  int yytoken = 0;
1542  /* The variables used to return semantic value and location from the
1543  action routines. */
1544  YYSTYPE yyval;
1545 
1546 #if YYERROR_VERBOSE
1547  /* Buffer for error messages, and its allocated size. */
1548  char yymsgbuf[128];
1549  char *yymsg = yymsgbuf;
1550  YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
1551 #endif
1552 
1553 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1554 
1555  /* The number of symbols on the RHS of the reduced rule.
1556  Keep to zero when no symbol should be popped. */
1557  int yylen = 0;
1558 
1559  yyssp = yyss = yyssa;
1560  yyvsp = yyvs = yyvsa;
1561  yystacksize = YYINITDEPTH;
1562 
1563  YYDPRINTF ((stderr, "Starting parse\n"));
1564 
1565  yystate = 0;
1566  yyerrstatus = 0;
1567  yynerrs = 0;
1568  yychar = YYEMPTY; /* Cause a token to be read. */
1569  goto yysetstate;
1570 
1571 
1572 /*------------------------------------------------------------.
1573 | yynewstate -- push a new state, which is found in yystate. |
1574 `------------------------------------------------------------*/
1575 yynewstate:
1576  /* In all cases, when you get here, the value and location stacks
1577  have just been pushed. So pushing a state here evens the stacks. */
1578  yyssp++;
1579 
1580 
1581 /*--------------------------------------------------------------------.
1582 | yysetstate -- set current state (the top of the stack) to yystate. |
1583 `--------------------------------------------------------------------*/
1584 yysetstate:
1585  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1586  YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1588  *yyssp = YY_CAST (yy_state_t, yystate);
1590 
1591  if (yyss + yystacksize - 1 <= yyssp)
1592 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
1593  goto yyexhaustedlab;
1594 #else
1595  {
1596  /* Get the current used size of the three stacks, in elements. */
1597  YYPTRDIFF_T yysize = yyssp - yyss + 1;
1598 
1599 # if defined yyoverflow
1600  {
1601  /* Give user a chance to reallocate the stack. Use copies of
1602  these so that the &'s don't force the real ones into
1603  memory. */
1604  yy_state_t *yyss1 = yyss;
1605  YYSTYPE *yyvs1 = yyvs;
1606 
1607  /* Each stack pointer address is followed by the size of the
1608  data in use in that stack, in bytes. This used to be a
1609  conditional around just the two extra args, but that might
1610  be undefined if yyoverflow is a macro. */
1611  yyoverflow (YY_("memory exhausted"),
1612  &yyss1, yysize * YYSIZEOF (*yyssp),
1613  &yyvs1, yysize * YYSIZEOF (*yyvsp),
1614  &yystacksize);
1615  yyss = yyss1;
1616  yyvs = yyvs1;
1617  }
1618 # else /* defined YYSTACK_RELOCATE */
1619  /* Extend the stack our own way. */
1620  if (YYMAXDEPTH <= yystacksize)
1621  goto yyexhaustedlab;
1622  yystacksize *= 2;
1623  if (YYMAXDEPTH < yystacksize)
1624  yystacksize = YYMAXDEPTH;
1625 
1626  {
1627  yy_state_t *yyss1 = yyss;
1628  union yyalloc *yyptr =
1629  YY_CAST (union yyalloc *,
1630  YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
1631  if (! yyptr)
1632  goto yyexhaustedlab;
1633  YYSTACK_RELOCATE (yyss_alloc, yyss);
1634  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1635 # undef YYSTACK_RELOCATE
1636  if (yyss1 != yyssa)
1637  YYSTACK_FREE (yyss1);
1638  }
1639 # endif
1640 
1641  yyssp = yyss + yysize - 1;
1642  yyvsp = yyvs + yysize - 1;
1643 
1645  YYDPRINTF ((stderr, "Stack size increased to %ld\n",
1646  YY_CAST (long, yystacksize)));
1648 
1649  if (yyss + yystacksize - 1 <= yyssp)
1650  YYABORT;
1651  }
1652 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
1653 
1654  if (yystate == YYFINAL)
1655  YYACCEPT;
1656 
1657  goto yybackup;
1658 
1659 
1660 /*-----------.
1661 | yybackup. |
1662 `-----------*/
1663 yybackup:
1664  /* Do appropriate processing given the current state. Read a
1665  lookahead token if we need one and don't already have one. */
1666 
1667  /* First try to decide what to do without reference to lookahead token. */
1668  yyn = yypact[yystate];
1669  if (yypact_value_is_default (yyn))
1670  goto yydefault;
1671 
1672  /* Not known => get a lookahead token if don't already have one. */
1673 
1674  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1675  if (yychar == YYEMPTY)
1676  {
1677  YYDPRINTF ((stderr, "Reading a token: "));
1678  yychar = yylex (&yylval, parm);
1679  }
1680 
1681  if (yychar <= YYEOF)
1682  {
1683  yychar = yytoken = YYEOF;
1684  YYDPRINTF ((stderr, "Now at end of input.\n"));
1685  }
1686  else
1687  {
1688  yytoken = YYTRANSLATE (yychar);
1689  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1690  }
1691 
1692  /* If the proper action on seeing token YYTOKEN is to reduce or to
1693  detect an error, take that action. */
1694  yyn += yytoken;
1695  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1696  goto yydefault;
1697  yyn = yytable[yyn];
1698  if (yyn <= 0)
1699  {
1700  if (yytable_value_is_error (yyn))
1701  goto yyerrlab;
1702  yyn = -yyn;
1703  goto yyreduce;
1704  }
1705 
1706  /* Count tokens shifted since error; after three, turn off error
1707  status. */
1708  if (yyerrstatus)
1709  yyerrstatus--;
1710 
1711  /* Shift the lookahead token. */
1712  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1713  yystate = yyn;
1715  *++yyvsp = yylval;
1717 
1718  /* Discard the shifted token. */
1719  yychar = YYEMPTY;
1720  goto yynewstate;
1721 
1722 
1723 /*-----------------------------------------------------------.
1724 | yydefault -- do the default action for the current state. |
1725 `-----------------------------------------------------------*/
1726 yydefault:
1727  yyn = yydefact[yystate];
1728  if (yyn == 0)
1729  goto yyerrlab;
1730  goto yyreduce;
1731 
1732 
1733 /*-----------------------------.
1734 | yyreduce -- do a reduction. |
1735 `-----------------------------*/
1736 yyreduce:
1737  /* yyn is the number of a rule to reduce with. */
1738  yylen = yyr2[yyn];
1739 
1740  /* If YYLEN is nonzero, implement the default value of the action:
1741  '$$ = $1'.
1742 
1743  Otherwise, the following line sets YYVAL to garbage.
1744  This behavior is undocumented and Bison
1745  users should not rely upon it. Assigning to YYVAL
1746  unconditionally makes the parser a bit smaller, and it avoids a
1747  GCC warning that YYVAL may be used uninitialized. */
1748  yyval = yyvsp[1-yylen];
1749 
1750 
1751  YY_REDUCE_PRINT (yyn);
1752  switch (yyn)
1753  {
1754  case 2:
1755 #line 157 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1756  {
1757  ((naslctxt*)parm)->tree = (yyvsp[0].node);
1758  }
1759 #line 1760 "nasl_grammar.tab.c"
1760  break;
1761 
1762  case 3:
1763 #line 162 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1764  {
1765  (yyval.node) = alloc_typed_cell (NODE_INSTR_L);
1766  (yyval.node)->line_nb = LNB;
1767  (yyval.node)->link[0] = (yyvsp[0].node);
1768  }
1769 #line 1770 "nasl_grammar.tab.c"
1770  break;
1771 
1772  case 4:
1773 #line 168 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1774  {
1775  (yyval.node) = alloc_typed_cell (NODE_INSTR_L);
1776  (yyval.node)->line_nb = LNB;
1777  (yyval.node)->link[0] = (yyvsp[-1].node);
1778  (yyval.node)->link[1] = (yyvsp[0].node);
1779  }
1780 #line 1781 "nasl_grammar.tab.c"
1781  break;
1782 
1783  case 7:
1784 #line 178 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1785  {
1786  nasl_set_function_filename ((yyvsp[-4].str));
1787  (yyval.node) = alloc_typed_cell (NODE_FUN_DEF);
1788  (yyval.node)->line_nb = LNB;
1789  (yyval.node)->x.str_val = (yyvsp[-4].str);
1790  (yyval.node)->link[0] = (yyvsp[-2].node);
1791  (yyval.node)->link[1] = (yyvsp[0].node);
1792  }
1793 #line 1794 "nasl_grammar.tab.c"
1794  break;
1795 
1796  case 8:
1797 #line 187 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1798  { (yyval.node) = NULL; }
1799 #line 1800 "nasl_grammar.tab.c"
1800  break;
1801 
1802  case 9:
1803 #line 187 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1804  { (yyval.node) = (yyvsp[0].node); }
1805 #line 1806 "nasl_grammar.tab.c"
1806  break;
1807 
1808  case 10:
1809 #line 189 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1810  {
1811  (yyval.node) = alloc_typed_cell (NODE_DECL);
1812  (yyval.node)->line_nb = LNB;
1813  (yyval.node)->x.str_val = (yyvsp[0].str);
1814  }
1815 #line 1816 "nasl_grammar.tab.c"
1816  break;
1817 
1818  case 11:
1819 #line 195 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1820  {
1821  (yyval.node) = alloc_typed_cell (NODE_DECL);
1822  (yyval.node)->line_nb = LNB;
1823  (yyval.node)->x.str_val = (yyvsp[-2].str);
1824  (yyval.node)->link[0] = (yyvsp[0].node);
1825  }
1826 #line 1827 "nasl_grammar.tab.c"
1827  break;
1828 
1829  case 12:
1830 #line 203 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1831  { (yyval.node) = (yyvsp[-1].node); }
1832 #line 1833 "nasl_grammar.tab.c"
1833  break;
1834 
1835  case 13:
1836 #line 203 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1837  { (yyval.node) = NULL; }
1838 #line 1839 "nasl_grammar.tab.c"
1839  break;
1840 
1841  case 15:
1842 #line 206 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1843  {
1844  if ((yyvsp[-1].node) == NULL)
1845  (yyval.node) = (yyvsp[0].node);
1846  else
1847  {
1848  (yyval.node) = alloc_typed_cell (NODE_INSTR_L);
1849  (yyval.node)->line_nb = LNB;
1850  (yyval.node)->link[0] = (yyvsp[-1].node);
1851  (yyval.node)->link[1] = (yyvsp[0].node);
1852  }
1853  }
1854 #line 1855 "nasl_grammar.tab.c"
1855  break;
1856 
1857  case 16:
1858 #line 219 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1859  { (yyval.node) = (yyvsp[-1].node); }
1860 #line 1861 "nasl_grammar.tab.c"
1861  break;
1862 
1863  case 28:
1864 #line 224 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1865  {
1866  (yyval.node) = alloc_typed_cell (NODE_BREAK);
1867  (yyval.node)->line_nb = LNB;
1868  }
1869 #line 1870 "nasl_grammar.tab.c"
1870  break;
1871 
1872  case 29:
1873 #line 228 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1874  {
1875  (yyval.node) = alloc_typed_cell (NODE_CONTINUE);
1876  (yyval.node)->line_nb = LNB;
1877  }
1878 #line 1879 "nasl_grammar.tab.c"
1879  break;
1880 
1881  case 30:
1882 #line 232 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1883  { (yyval.node) = NULL; }
1884 #line 1885 "nasl_grammar.tab.c"
1885  break;
1886 
1887  case 31:
1888 #line 236 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1889  {
1890  (yyval.node) = alloc_typed_cell (NODE_RETURN);
1891  (yyval.node)->line_nb = LNB;
1892  (yyval.node)->link[0] = (yyvsp[0].node);
1893  }
1894 #line 1895 "nasl_grammar.tab.c"
1895  break;
1896 
1897  case 32:
1898 #line 242 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1899  {
1900  (yyval.node) = alloc_typed_cell (NODE_RETURN);
1901  (yyval.node)->line_nb = LNB;
1902  }
1903 #line 1904 "nasl_grammar.tab.c"
1904  break;
1905 
1906  case 33:
1907 #line 249 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1908  {
1909  (yyval.node) = alloc_typed_cell (NODE_IF_ELSE);
1910  (yyval.node)->line_nb = LNB;
1911  (yyval.node)->link[0] = (yyvsp[-2].node); (yyval.node)->link[1] = (yyvsp[0].node);
1912  }
1913 #line 1914 "nasl_grammar.tab.c"
1914  break;
1915 
1916  case 34:
1917 #line 255 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1918  {
1919  (yyval.node) = alloc_typed_cell (NODE_IF_ELSE);
1920  (yyval.node)->line_nb = LNB;
1921  (yyval.node)->link[0] = (yyvsp[-4].node); (yyval.node)->link[1] = (yyvsp[-2].node); (yyval.node)->link[2] = (yyvsp[0].node);
1922  }
1923 #line 1924 "nasl_grammar.tab.c"
1924  break;
1925 
1926  case 39:
1927 #line 264 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1928  {
1929  (yyval.node) = alloc_typed_cell (NODE_FOR);
1930  (yyval.node)->line_nb = LNB;
1931  (yyval.node)->link[0] = (yyvsp[-6].node);
1932  (yyval.node)->link[1] = (yyvsp[-4].node);
1933  (yyval.node)->link[2] = (yyvsp[-2].node);
1934  (yyval.node)->link[3] = (yyvsp[0].node);
1935  }
1936 #line 1937 "nasl_grammar.tab.c"
1937  break;
1938 
1939  case 40:
1940 #line 274 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1941  {
1942  (yyval.node) = alloc_typed_cell (NODE_WHILE);
1943  (yyval.node)->line_nb = LNB;
1944  (yyval.node)->link[0] = (yyvsp[-2].node);
1945  (yyval.node)->link[1] = (yyvsp[0].node);
1946  }
1947 #line 1948 "nasl_grammar.tab.c"
1948  break;
1949 
1950  case 41:
1951 #line 281 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1952  {
1954  (yyval.node)->line_nb = LNB;
1955  (yyval.node)->link[0] = (yyvsp[-3].node);
1956  (yyval.node)->link[1] = (yyvsp[-1].node);
1957  }
1958 #line 1959 "nasl_grammar.tab.c"
1959  break;
1960 
1961  case 42:
1962 #line 289 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1963  {
1964  (yyval.node) = alloc_typed_cell (NODE_FOREACH);
1965  (yyval.node)->line_nb = LNB;
1966  (yyval.node)->x.str_val = (yyvsp[-4].str);
1967  (yyval.node)->link[0] = (yyvsp[-2].node);
1968  (yyval.node)->link[1] = (yyvsp[0].node);
1969  }
1970 #line 1971 "nasl_grammar.tab.c"
1971  break;
1972 
1973  case 46:
1974 #line 298 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1975  { (yyval.node) = NULL; }
1976 #line 1977 "nasl_grammar.tab.c"
1977  break;
1978 
1979  case 47:
1980 #line 302 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1981  {
1982  (yyval.node) = alloc_typed_cell (NODE_REPEATED);
1983  (yyval.node)->line_nb = LNB;
1984  (yyval.node)->link[0] = (yyvsp[-2].node);
1985  (yyval.node)->link[1] = (yyvsp[0].node);
1986  }
1987 #line 1988 "nasl_grammar.tab.c"
1988  break;
1989 
1990  case 48:
1991 #line 309 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1992  { (yyval.str) = (yyvsp[0].data).val; }
1993 #line 1994 "nasl_grammar.tab.c"
1994  break;
1995 
1996  case 50:
1997 #line 313 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
1998  {
1999  char *tmp;
2000  naslctxt subctx;
2001 
2002  bzero (&subctx, sizeof (subctx));
2003  subctx.always_signed = ((naslctxt*)parm)->always_signed;
2004  subctx.kb = ((naslctxt *) parm)->kb;
2005  subctx.tree = ((naslctxt*) parm)->tree;
2006  (yyval.node) = NULL;
2007  tmp = g_strdup (nasl_get_filename (NULL));
2008  nasl_set_filename ((yyvsp[-1].str));
2009  if (!includes_hash)
2010  includes_hash = g_hash_table_new_full
2011  (g_str_hash, g_str_equal, g_free,
2012  (GDestroyNotify) deref_cell);
2013 
2014  if ((subctx.tree = g_hash_table_lookup (includes_hash, (yyvsp[-1].str))))
2015  {
2016  (yyval.node) = subctx.tree;
2017  ref_cell ((yyval.node));
2018  g_free ((yyvsp[-1].str));
2019  }
2020  else if (init_nasl_ctx (&subctx, (yyvsp[-1].str)) >= 0)
2021  {
2022  if (!naslparse (&subctx))
2023  {
2024  (yyval.node) = subctx.tree;
2025  g_hash_table_insert (includes_hash, (yyvsp[-1].str), (yyval.node));
2026  ref_cell ((yyval.node));
2027  }
2028  else
2029  {
2030  nasl_perror (NULL, "%s: Parse error at or near line %d\n", (yyvsp[-1].str),
2031  subctx.line_nb);
2032  g_free ((yyvsp[-1].str));
2033  }
2034  g_free (subctx.buffer);
2035  }
2036  else
2037  {
2038  g_free((yyvsp[-1].str));
2039  g_free (tmp);
2040  return -2;
2041  }
2042  nasl_set_filename (tmp);
2043  g_free (tmp);
2044  }
2045 #line 2046 "nasl_grammar.tab.c"
2046  break;
2047 
2048  case 51:
2049 #line 363 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2050  {
2051  (yyval.node) = alloc_typed_cell (NODE_FUN_CALL);
2052  (yyval.node)->line_nb = LNB;
2053  (yyval.node)->x.str_val = (yyvsp[-3].str);
2054  (yyval.node)->link[0] = (yyvsp[-1].node);
2055  }
2056 #line 2057 "nasl_grammar.tab.c"
2057  break;
2058 
2059  case 53:
2060 #line 370 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2061  { (yyval.node) = NULL; }
2062 #line 2063 "nasl_grammar.tab.c"
2063  break;
2064 
2065  case 55:
2066 #line 372 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2067  {
2068  (yyvsp[-2].node)->link[1] = (yyvsp[0].node);
2069  (yyval.node) = (yyvsp[-2].node);
2070  }
2071 #line 2072 "nasl_grammar.tab.c"
2072  break;
2073 
2074  case 56:
2075 #line 378 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2076  {
2077  (yyval.node) = alloc_typed_cell (NODE_ARG);
2078  (yyval.node)->line_nb = LNB;
2079  (yyval.node)->link[0] = (yyvsp[0].node);
2080  }
2081 #line 2082 "nasl_grammar.tab.c"
2082  break;
2083 
2084  case 57:
2085 #line 384 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2086  {
2087  (yyval.node) = alloc_typed_cell (NODE_ARG);
2088  (yyval.node)->line_nb = LNB;
2089  (yyval.node)->x.str_val = (yyvsp[-2].str);
2090  (yyval.node)->link[0] = (yyvsp[0].node);
2091  }
2092 #line 2093 "nasl_grammar.tab.c"
2093  break;
2094 
2095  case 58:
2096 #line 393 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2097  {
2098  (yyval.node) = alloc_expr_cell(LNB, NODE_AFF, (yyvsp[-2].node), (yyvsp[0].node));
2099  }
2100 #line 2101 "nasl_grammar.tab.c"
2101  break;
2102 
2103  case 59:
2104 #line 396 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2105  { (yyval.node) = alloc_expr_cell(LNB, NODE_PLUS_EQ, (yyvsp[-2].node), (yyvsp[0].node)); }
2106 #line 2107 "nasl_grammar.tab.c"
2107  break;
2108 
2109  case 60:
2110 #line 397 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2111  { (yyval.node) = alloc_expr_cell(LNB, NODE_MINUS_EQ, (yyvsp[-2].node), (yyvsp[0].node)); }
2112 #line 2113 "nasl_grammar.tab.c"
2113  break;
2114 
2115  case 61:
2116 #line 398 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2117  { (yyval.node) = alloc_expr_cell(LNB, NODE_MULT_EQ, (yyvsp[-2].node), (yyvsp[0].node)); }
2118 #line 2119 "nasl_grammar.tab.c"
2119  break;
2120 
2121  case 62:
2122 #line 399 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2123  { (yyval.node) = alloc_expr_cell(LNB, NODE_DIV_EQ, (yyvsp[-2].node), (yyvsp[0].node)); }
2124 #line 2125 "nasl_grammar.tab.c"
2125  break;
2126 
2127  case 63:
2128 #line 400 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2129  { (yyval.node) = alloc_expr_cell(LNB, NODE_MODULO_EQ, (yyvsp[-2].node), (yyvsp[0].node)); }
2130 #line 2131 "nasl_grammar.tab.c"
2131  break;
2132 
2133  case 64:
2134 #line 401 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2135  { (yyval.node) = alloc_expr_cell(LNB, NODE_R_SHIFT_EQ, (yyvsp[-2].node), (yyvsp[0].node)); }
2136 #line 2137 "nasl_grammar.tab.c"
2137  break;
2138 
2139  case 65:
2140 #line 402 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2141  { (yyval.node) = alloc_expr_cell(LNB, NODE_R_USHIFT_EQ, (yyvsp[-2].node), (yyvsp[0].node)); }
2142 #line 2143 "nasl_grammar.tab.c"
2143  break;
2144 
2145  case 66:
2146 #line 403 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2147  { (yyval.node) = alloc_expr_cell(LNB, NODE_L_SHIFT_EQ, (yyvsp[-2].node), (yyvsp[0].node)); }
2148 #line 2149 "nasl_grammar.tab.c"
2149  break;
2150 
2151  case 67:
2152 #line 407 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2153  { (yyval.node) = alloc_typed_cell (NODE_VAR);
2154  (yyval.node)->line_nb = LNB;
2155  (yyval.node)->x.str_val = (yyvsp[0].str);
2156  }
2157 #line 2158 "nasl_grammar.tab.c"
2158  break;
2159 
2160  case 70:
2161 #line 412 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2162  { (yyval.str) = strdup("x"); }
2163 #line 2164 "nasl_grammar.tab.c"
2164  break;
2165 
2166  case 71:
2167 #line 415 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2168  {
2169  (yyval.node) = alloc_typed_cell (NODE_ARRAY_EL);
2170  (yyval.node)->line_nb = LNB;
2171  (yyval.node)->x.str_val = (yyvsp[-3].str);
2172  (yyval.node)->link[0] = (yyvsp[-1].node);
2173  }
2174 #line 2175 "nasl_grammar.tab.c"
2175  break;
2176 
2177  case 73:
2178 #line 425 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2179  { (yyval.node) = alloc_expr_cell(LNB, EXPR_INCR, NULL, (yyvsp[0].node)); }
2180 #line 2181 "nasl_grammar.tab.c"
2181  break;
2182 
2183  case 74:
2184 #line 426 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2185  {(yyval.node) = alloc_expr_cell(LNB, EXPR_DECR, NULL, (yyvsp[0].node)); }
2186 #line 2187 "nasl_grammar.tab.c"
2187  break;
2188 
2189  case 75:
2190 #line 427 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2191  { (yyval.node)= alloc_expr_cell(LNB, EXPR_INCR, (yyvsp[-1].node), NULL); }
2192 #line 2193 "nasl_grammar.tab.c"
2193  break;
2194 
2195  case 76:
2196 #line 428 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2197  { (yyval.node)= alloc_expr_cell(LNB, EXPR_DECR, (yyvsp[-1].node), NULL); }
2198 #line 2199 "nasl_grammar.tab.c"
2199  break;
2200 
2201  case 77:
2202 #line 432 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2203  { (yyval.node) = (yyvsp[-1].node); }
2204 #line 2205 "nasl_grammar.tab.c"
2205  break;
2206 
2207  case 78:
2208 #line 433 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2209  { (yyval.node) = alloc_expr_cell(LNB, EXPR_AND, (yyvsp[-2].node), (yyvsp[0].node)); }
2210 #line 2211 "nasl_grammar.tab.c"
2211  break;
2212 
2213  case 79:
2214 #line 434 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2215  { (yyval.node) = alloc_expr_cell(LNB, EXPR_NOT, (yyvsp[0].node), NULL); }
2216 #line 2217 "nasl_grammar.tab.c"
2217  break;
2218 
2219  case 80:
2220 #line 435 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2221  { (yyval.node) = alloc_expr_cell(LNB, EXPR_OR, (yyvsp[-2].node), (yyvsp[0].node)); }
2222 #line 2223 "nasl_grammar.tab.c"
2223  break;
2224 
2225  case 81:
2226 #line 436 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2227  { (yyval.node) = alloc_expr_cell(LNB, EXPR_PLUS, (yyvsp[-2].node), (yyvsp[0].node)); }
2228 #line 2229 "nasl_grammar.tab.c"
2229  break;
2230 
2231  case 82:
2232 #line 437 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2233  { (yyval.node) = alloc_expr_cell(LNB, EXPR_MINUS, (yyvsp[-2].node), (yyvsp[0].node)); }
2234 #line 2235 "nasl_grammar.tab.c"
2235  break;
2236 
2237  case 83:
2238 #line 438 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2239  { (yyval.node) = alloc_expr_cell(LNB, EXPR_U_MINUS, (yyvsp[0].node), NULL);}
2240 #line 2241 "nasl_grammar.tab.c"
2241  break;
2242 
2243  case 84:
2244 #line 439 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2245  { (yyval.node) = alloc_expr_cell(LNB, EXPR_BIT_NOT, (yyvsp[0].node), NULL);}
2246 #line 2247 "nasl_grammar.tab.c"
2247  break;
2248 
2249  case 85:
2250 #line 440 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2251  { (yyval.node) = alloc_expr_cell(LNB, EXPR_MULT, (yyvsp[-2].node), (yyvsp[0].node)); }
2252 #line 2253 "nasl_grammar.tab.c"
2253  break;
2254 
2255  case 86:
2256 #line 441 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2257  { (yyval.node) = alloc_expr_cell(LNB, EXPR_EXPO, (yyvsp[-2].node), (yyvsp[0].node)); }
2258 #line 2259 "nasl_grammar.tab.c"
2259  break;
2260 
2261  case 87:
2262 #line 442 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2263  { (yyval.node) = alloc_expr_cell(LNB, EXPR_DIV, (yyvsp[-2].node), (yyvsp[0].node)); }
2264 #line 2265 "nasl_grammar.tab.c"
2265  break;
2266 
2267  case 88:
2268 #line 443 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2269  { (yyval.node) = alloc_expr_cell(LNB, EXPR_MODULO, (yyvsp[-2].node), (yyvsp[0].node)); }
2270 #line 2271 "nasl_grammar.tab.c"
2271  break;
2272 
2273  case 89:
2274 #line 444 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2275  { (yyval.node) = alloc_expr_cell(LNB, EXPR_BIT_AND, (yyvsp[-2].node), (yyvsp[0].node)); }
2276 #line 2277 "nasl_grammar.tab.c"
2277  break;
2278 
2279  case 90:
2280 #line 445 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2281  { (yyval.node) = alloc_expr_cell(LNB, EXPR_BIT_XOR, (yyvsp[-2].node), (yyvsp[0].node)); }
2282 #line 2283 "nasl_grammar.tab.c"
2283  break;
2284 
2285  case 91:
2286 #line 446 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2287  { (yyval.node) = alloc_expr_cell(LNB, EXPR_BIT_OR, (yyvsp[-2].node), (yyvsp[0].node)); }
2288 #line 2289 "nasl_grammar.tab.c"
2289  break;
2290 
2291  case 92:
2292 #line 447 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2293  { (yyval.node) = alloc_expr_cell(LNB, EXPR_R_SHIFT, (yyvsp[-2].node), (yyvsp[0].node)); }
2294 #line 2295 "nasl_grammar.tab.c"
2295  break;
2296 
2297  case 93:
2298 #line 448 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2299  { (yyval.node) = alloc_expr_cell(LNB, EXPR_R_USHIFT, (yyvsp[-2].node), (yyvsp[0].node)); }
2300 #line 2301 "nasl_grammar.tab.c"
2301  break;
2302 
2303  case 94:
2304 #line 449 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2305  { (yyval.node) = alloc_expr_cell(LNB, EXPR_L_SHIFT, (yyvsp[-2].node), (yyvsp[0].node)); }
2306 #line 2307 "nasl_grammar.tab.c"
2307  break;
2308 
2309  case 96:
2310 #line 451 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2311  { (yyval.node) = alloc_expr_cell(LNB, COMP_MATCH, (yyvsp[-2].node), (yyvsp[0].node)); }
2312 #line 2313 "nasl_grammar.tab.c"
2313  break;
2314 
2315  case 97:
2316 #line 452 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2317  { (yyval.node) = alloc_expr_cell(LNB, COMP_NOMATCH, (yyvsp[-2].node), (yyvsp[0].node)); }
2318 #line 2319 "nasl_grammar.tab.c"
2319  break;
2320 
2321  case 98:
2322 #line 453 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2323  { (yyval.node) = alloc_RE_cell(LNB, COMP_RE_MATCH, (yyvsp[-2].node), (yyvsp[0].str)); }
2324 #line 2325 "nasl_grammar.tab.c"
2325  break;
2326 
2327  case 99:
2328 #line 454 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2329  { (yyval.node) = alloc_RE_cell(LNB, COMP_RE_NOMATCH, (yyvsp[-2].node), (yyvsp[0].str)); }
2330 #line 2331 "nasl_grammar.tab.c"
2331  break;
2332 
2333  case 100:
2334 #line 455 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2335  { (yyval.node) = alloc_expr_cell(LNB, COMP_LT, (yyvsp[-2].node), (yyvsp[0].node)); }
2336 #line 2337 "nasl_grammar.tab.c"
2337  break;
2338 
2339  case 101:
2340 #line 456 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2341  { (yyval.node) = alloc_expr_cell(LNB, COMP_GT, (yyvsp[-2].node), (yyvsp[0].node)); }
2342 #line 2343 "nasl_grammar.tab.c"
2343  break;
2344 
2345  case 102:
2346 #line 457 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2347  { (yyval.node) = alloc_expr_cell(LNB, COMP_EQ, (yyvsp[-2].node), (yyvsp[0].node)); }
2348 #line 2349 "nasl_grammar.tab.c"
2349  break;
2350 
2351  case 103:
2352 #line 458 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2353  { (yyval.node) = alloc_expr_cell(LNB, COMP_NE, (yyvsp[-2].node), (yyvsp[0].node)); }
2354 #line 2355 "nasl_grammar.tab.c"
2355  break;
2356 
2357  case 104:
2358 #line 459 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2359  { (yyval.node) = alloc_expr_cell(LNB, COMP_GE, (yyvsp[-2].node), (yyvsp[0].node)); }
2360 #line 2361 "nasl_grammar.tab.c"
2361  break;
2362 
2363  case 105:
2364 #line 460 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2365  { (yyval.node) = alloc_expr_cell(LNB, COMP_LE, (yyvsp[-2].node), (yyvsp[0].node)); }
2366 #line 2367 "nasl_grammar.tab.c"
2367  break;
2368 
2369  case 111:
2370 #line 464 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2371  { (yyval.node) = make_array_from_elems((yyvsp[-1].node)); }
2372 #line 2373 "nasl_grammar.tab.c"
2373  break;
2374 
2375  case 112:
2376 #line 466 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2377  { (yyval.node) = (yyvsp[0].node); }
2378 #line 2379 "nasl_grammar.tab.c"
2379  break;
2380 
2381  case 113:
2382 #line 467 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2383  {
2384  (yyvsp[-2].node)->link[1] = (yyvsp[0].node); (yyval.node) = (yyvsp[-2].node);
2385  }
2386 #line 2387 "nasl_grammar.tab.c"
2387  break;
2388 
2389  case 114:
2390 #line 471 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2391  {
2392  (yyval.node) = alloc_typed_cell(ARRAY_ELEM);
2393  (yyval.node)->link[0] = (yyvsp[0].node);
2394  }
2395 #line 2396 "nasl_grammar.tab.c"
2396  break;
2397 
2398  case 115:
2399 #line 474 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2400  {
2401  (yyval.node) = alloc_typed_cell(ARRAY_ELEM);
2402  (yyval.node)->link[0] = (yyvsp[0].node);
2403  (yyval.node)->x.str_val = (yyvsp[-2].str);
2404  }
2405 #line 2406 "nasl_grammar.tab.c"
2406  break;
2407 
2408  case 116:
2409 #line 480 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2410  { (yyval.node) = alloc_typed_cell(CONST_INT); (yyval.node)->x.i_val = (yyvsp[0].num); }
2411 #line 2412 "nasl_grammar.tab.c"
2412  break;
2413 
2414  case 117:
2415 #line 481 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2416  {
2417  (yyval.node) = alloc_typed_cell(CONST_STR); (yyval.node)->x.str_val = (yyvsp[0].str);
2418  (yyval.node)->size = strlen((yyvsp[0].str));
2419  }
2420 #line 2421 "nasl_grammar.tab.c"
2421  break;
2422 
2423  case 118:
2424 #line 485 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2425  {
2426  (yyval.node) = alloc_typed_cell(CONST_DATA); (yyval.node)->x.str_val = (yyvsp[0].data).val;
2427  (yyval.node)->size = (yyvsp[0].data).len;
2428  }
2429 #line 2430 "nasl_grammar.tab.c"
2430  break;
2431 
2432  case 120:
2433 #line 493 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2434  {
2435  (yyval.node) = alloc_typed_cell (NODE_VAR);
2436  (yyval.node)->line_nb = LNB;
2437  (yyval.node)->x.str_val = (yyvsp[0].str);
2438  }
2439 #line 2440 "nasl_grammar.tab.c"
2440  break;
2441 
2442  case 124:
2443 #line 503 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2444  {
2445  char *s = g_strdup_printf ("%ld.%ld.%ld.%ld", (yyvsp[-6].num), (yyvsp[-4].num), (yyvsp[-2].num), (yyvsp[0].num));
2446  (yyval.node) = alloc_typed_cell (CONST_STR);
2447  (yyval.node)->line_nb = LNB;
2448  (yyval.node)->x.str_val = s;
2449  (yyval.node)->size = strlen(s);
2450  }
2451 #line 2452 "nasl_grammar.tab.c"
2452  break;
2453 
2454  case 125:
2455 #line 513 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2456  {
2457  (yyval.node) = alloc_typed_cell (NODE_LOCAL);
2458  (yyval.node)->line_nb = LNB;
2459  (yyval.node)->link[0] = (yyvsp[0].node);
2460  }
2461 #line 2462 "nasl_grammar.tab.c"
2462  break;
2463 
2464  case 126:
2465 #line 521 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2466  {
2467  (yyval.node) = alloc_typed_cell (NODE_GLOBAL);
2468  (yyval.node)->line_nb = LNB;
2469  (yyval.node)->link[0] = (yyvsp[0].node);
2470  }
2471 #line 2472 "nasl_grammar.tab.c"
2472  break;
2473 
2474 
2475 #line 2476 "nasl_grammar.tab.c"
2476 
2477  default: break;
2478  }
2479  /* User semantic actions sometimes alter yychar, and that requires
2480  that yytoken be updated with the new translation. We take the
2481  approach of translating immediately before every use of yytoken.
2482  One alternative is translating here after every semantic action,
2483  but that translation would be missed if the semantic action invokes
2484  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2485  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
2486  incorrect destructor might then be invoked immediately. In the
2487  case of YYERROR or YYBACKUP, subsequent parser actions might lead
2488  to an incorrect destructor call or verbose syntax error message
2489  before the lookahead is translated. */
2490  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2491 
2492  YYPOPSTACK (yylen);
2493  yylen = 0;
2494  YY_STACK_PRINT (yyss, yyssp);
2495 
2496  *++yyvsp = yyval;
2497 
2498  /* Now 'shift' the result of the reduction. Determine what state
2499  that goes to, based on the state we popped back to and the rule
2500  number reduced by. */
2501  {
2502  const int yylhs = yyr1[yyn] - YYNTOKENS;
2503  const int yyi = yypgoto[yylhs] + *yyssp;
2504  yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
2505  ? yytable[yyi]
2506  : yydefgoto[yylhs]);
2507  }
2508 
2509  goto yynewstate;
2510 
2511 
2512 /*--------------------------------------.
2513 | yyerrlab -- here on detecting error. |
2514 `--------------------------------------*/
2515 yyerrlab:
2516  /* Make sure we have latest lookahead translation. See comments at
2517  user semantic actions for why this is necessary. */
2518  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
2519 
2520  /* If not already recovering from an error, report this error. */
2521  if (!yyerrstatus)
2522  {
2523  ++yynerrs;
2524 #if ! YYERROR_VERBOSE
2525  yyerror (parm, YY_("syntax error"));
2526 #else
2527 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2528  yyssp, yytoken)
2529  {
2530  char const *yymsgp = YY_("syntax error");
2531  int yysyntax_error_status;
2532  yysyntax_error_status = YYSYNTAX_ERROR;
2533  if (yysyntax_error_status == 0)
2534  yymsgp = yymsg;
2535  else if (yysyntax_error_status == 1)
2536  {
2537  if (yymsg != yymsgbuf)
2538  YYSTACK_FREE (yymsg);
2539  yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
2540  if (!yymsg)
2541  {
2542  yymsg = yymsgbuf;
2543  yymsg_alloc = sizeof yymsgbuf;
2544  yysyntax_error_status = 2;
2545  }
2546  else
2547  {
2548  yysyntax_error_status = YYSYNTAX_ERROR;
2549  yymsgp = yymsg;
2550  }
2551  }
2552  yyerror (parm, yymsgp);
2553  if (yysyntax_error_status == 2)
2554  goto yyexhaustedlab;
2555  }
2556 # undef YYSYNTAX_ERROR
2557 #endif
2558  }
2559 
2560 
2561 
2562  if (yyerrstatus == 3)
2563  {
2564  /* If just tried and failed to reuse lookahead token after an
2565  error, discard it. */
2566 
2567  if (yychar <= YYEOF)
2568  {
2569  /* Return failure if at end of input. */
2570  if (yychar == YYEOF)
2571  YYABORT;
2572  }
2573  else
2574  {
2575  yydestruct ("Error: discarding",
2576  yytoken, &yylval, parm);
2577  yychar = YYEMPTY;
2578  }
2579  }
2580 
2581  /* Else will try to reuse lookahead token after shifting the error
2582  token. */
2583  goto yyerrlab1;
2584 
2585 
2586 /*---------------------------------------------------.
2587 | yyerrorlab -- error raised explicitly by YYERROR. |
2588 `---------------------------------------------------*/
2589 yyerrorlab:
2590  /* Pacify compilers when the user code never invokes YYERROR and the
2591  label yyerrorlab therefore never appears in user code. */
2592  if (0)
2593  YYERROR;
2594 
2595  /* Do not reclaim the symbols of the rule whose action triggered
2596  this YYERROR. */
2597  YYPOPSTACK (yylen);
2598  yylen = 0;
2599  YY_STACK_PRINT (yyss, yyssp);
2600  yystate = *yyssp;
2601  goto yyerrlab1;
2602 
2603 
2604 /*-------------------------------------------------------------.
2605 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2606 `-------------------------------------------------------------*/
2607 yyerrlab1:
2608  yyerrstatus = 3; /* Each real token shifted decrements this. */
2609 
2610  for (;;)
2611  {
2612  yyn = yypact[yystate];
2613  if (!yypact_value_is_default (yyn))
2614  {
2615  yyn += YYTERROR;
2616  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2617  {
2618  yyn = yytable[yyn];
2619  if (0 < yyn)
2620  break;
2621  }
2622  }
2623 
2624  /* Pop the current state because it cannot handle the error token. */
2625  if (yyssp == yyss)
2626  YYABORT;
2627 
2628 
2629  yydestruct ("Error: popping",
2630  yystos[yystate], yyvsp, parm);
2631  YYPOPSTACK (1);
2632  yystate = *yyssp;
2633  YY_STACK_PRINT (yyss, yyssp);
2634  }
2635 
2637  *++yyvsp = yylval;
2639 
2640 
2641  /* Shift the error token. */
2642  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2643 
2644  yystate = yyn;
2645  goto yynewstate;
2646 
2647 
2648 /*-------------------------------------.
2649 | yyacceptlab -- YYACCEPT comes here. |
2650 `-------------------------------------*/
2651 yyacceptlab:
2652  yyresult = 0;
2653  goto yyreturn;
2654 
2655 
2656 /*-----------------------------------.
2657 | yyabortlab -- YYABORT comes here. |
2658 `-----------------------------------*/
2659 yyabortlab:
2660  yyresult = 1;
2661  goto yyreturn;
2662 
2663 
2664 #if !defined yyoverflow || YYERROR_VERBOSE
2665 /*-------------------------------------------------.
2666 | yyexhaustedlab -- memory exhaustion comes here. |
2667 `-------------------------------------------------*/
2668 yyexhaustedlab:
2669  yyerror (parm, YY_("memory exhausted"));
2670  yyresult = 2;
2671  /* Fall through. */
2672 #endif
2673 
2674 
2675 /*-----------------------------------------------------.
2676 | yyreturn -- parsing is finished, return the result. |
2677 `-----------------------------------------------------*/
2678 yyreturn:
2679  if (yychar != YYEMPTY)
2680  {
2681  /* Make sure we have latest lookahead translation. See comments at
2682  user semantic actions for why this is necessary. */
2683  yytoken = YYTRANSLATE (yychar);
2684  yydestruct ("Cleanup: discarding lookahead",
2685  yytoken, &yylval, parm);
2686  }
2687  /* Do not reclaim the symbols of the rule whose action triggered
2688  this YYABORT or YYACCEPT. */
2689  YYPOPSTACK (yylen);
2690  YY_STACK_PRINT (yyss, yyssp);
2691  while (yyssp != yyss)
2692  {
2693  yydestruct ("Cleanup: popping",
2694  yystos[*yyssp], yyvsp, parm);
2695  YYPOPSTACK (1);
2696  }
2697 #ifndef yyoverflow
2698  if (yyss != yyssa)
2699  YYSTACK_FREE (yyss);
2700 #endif
2701 #if YYERROR_VERBOSE
2702  if (yymsg != yymsgbuf)
2703  YYSTACK_FREE (yymsg);
2704 #endif
2705  return yyresult;
2706 }
2707 #line 527 "/builddir/build/BUILD/openvas-7.0.1/nasl/nasl_grammar.y"
2708 
2709 
2710 #include <stdio.h>
2711 #include <stdlib.h>
2712 #include <gvm/base/logging.h>
2713 #include <gvm/base/prefs.h>
2714 #include <libgen.h>
2715 #include <gcrypt.h>
2716 
2717 static void
2718 naslerror(naslctxt *parm, const char *s)
2719 {
2720  (void) parm;
2721  g_message ("%s", s);
2722 }
2723 
2724 static GSList * inc_dirs = NULL;
2725 
2737 int
2738 add_nasl_inc_dir (const char * dir)
2739 {
2740  if (dir == NULL)
2741  {
2742  return 0;
2743  }
2744 
2745  // Allow initialization with empty element
2746  if (*dir == '\0')
2747  {
2748  inc_dirs = g_slist_append (inc_dirs, g_strdup((gchar *)dir));
2749  return 0;
2750  }
2751 
2752  struct stat stat_buf;
2753 
2754  if (stat (dir, &stat_buf) != 0)
2755  return -1;
2756 
2757  if (S_ISDIR(stat_buf.st_mode) != 0)
2758  {
2759  inc_dirs = g_slist_append (inc_dirs, g_strdup((gchar *)dir));
2760  return 0;
2761  }
2762  else
2763  return -2;
2764 }
2765 
2766 static int checksum_algorithm = GCRY_MD_NONE;
2767 
2768 static void
2770 {
2771  static int loaded = 0;
2772  const char *base, *prefix;
2773  char filename[2048], *fbuffer;
2774  FILE *file;
2775  size_t flen;
2776 
2777  if (loaded)
2778  return;
2779  loaded = 1;
2780  base = prefs_get ("plugins_folder");
2781  snprintf (filename, sizeof (filename), "%s/sha256sums", base);
2782  if (g_file_get_contents (filename, &fbuffer, &flen, NULL))
2783  checksum_algorithm = GCRY_MD_SHA256;
2784  else
2785  {
2786  snprintf (filename, sizeof (filename), "%s/md5sums", base);
2787  if (g_file_get_contents (filename, &fbuffer, &flen, NULL))
2788  checksum_algorithm = GCRY_MD_MD5;
2789  }
2790  if (checksum_algorithm == GCRY_MD_NONE)
2791  {
2792  g_warning ("No plugins checksums file");
2793  return;
2794  }
2795  /* Verify checksum */
2796  if (nasl_verify_signature (filename, fbuffer, flen) != 0)
2797  {
2798  g_warning ("Erroneous or missing signature for checksums file %s",
2799  filename);
2800  g_free (fbuffer);
2801  return;
2802  }
2803  g_free (fbuffer);
2804 
2805  /* Insert content into KB */
2806  file = fopen (filename, "r");
2807  if (!file)
2808  {
2809  g_warning ("%s: Couldn't read file %s", __FUNCTION__, filename);
2810  return;
2811  }
2812  if (checksum_algorithm == GCRY_MD_MD5)
2813  {
2814  kb_del_items (kb, "md5sums:*");
2815  prefix = "md5sums";
2816  }
2817  else
2818  {
2819  kb_del_items (kb, "sha256sums:*");
2820  prefix = "sha256sums";
2821  }
2822  while (1)
2823  {
2824  char buffer[2048], **splits;
2825  if (!fgets (buffer, sizeof (buffer), file))
2826  break;
2827  if (strstr (buffer, ".asc")
2828  || (!strstr (buffer, ".inc") && !strstr (buffer, ".nasl")))
2829  continue;
2830  splits = g_strsplit (buffer, " ", -1);
2831  if (g_strv_length (splits) != 2)
2832  {
2833  g_warning ("%s: Erroneous checksum entry %s", __FUNCTION__, buffer);
2834  g_strfreev (splits);
2835  break;
2836  }
2837  splits[1][strlen (splits[1]) - 1] = '\0';
2838  if (strstr (splits[1], ".inc"))
2839  g_snprintf (buffer, sizeof (buffer), "%s:%s", prefix,
2840  basename (splits[1]));
2841  else
2842  g_snprintf (buffer, sizeof (buffer), "%s:%s/%s", prefix, base,
2843  splits[1]);
2844  kb_item_set_str (kb, buffer, splits[0], 0);
2845  g_strfreev (splits);
2846  }
2847  fclose (file);
2848 }
2849 
2858 static char *
2859 file_checksum (const char *filename, int algorithm)
2860 {
2861  char *content = NULL, digest[128], *result;
2862  size_t len = 0, i, alglen;
2863 
2864  assert (algorithm == GCRY_MD_MD5 || algorithm == GCRY_MD_SHA256);
2865  if (!filename || !g_file_get_contents (filename, &content, &len, NULL))
2866  return NULL;
2867 
2868  gcry_md_hash_buffer (algorithm, digest, content, len);
2869  alglen = gcry_md_get_algo_dlen (algorithm);
2870  result = g_malloc0 (alglen * 2 + 1);
2871  for (i = 0; i < alglen; i++)
2872  snprintf (result + 2 * i, 3, "%02x", (unsigned char) digest[i]);
2873  g_free (content);
2874 
2875  return result;
2876 }
2877 
2878 
2893 int
2894 init_nasl_ctx(naslctxt* pc, const char* name)
2895 {
2896  char *full_name = NULL, key_path[2048], *checksum, *filename;
2897  GSList * inc_dir = inc_dirs; // iterator for include directories
2898  size_t flen = 0;
2899  time_t timestamp;
2900 
2901  // initialize if not yet done (for openvas-server < 2.0.1)
2902  if (! inc_dirs) add_nasl_inc_dir("");
2903 
2904  pc->line_nb = 1;
2905  pc->tree = NULL;
2906  if (!parse_len)
2907  {
2908  parse_len = 9092;
2909  parse_buffer = g_malloc0 (parse_len);
2910  }
2911  else
2912  parse_buffer[0] = '\0';
2913 
2914 
2916  while (inc_dir != NULL) {
2917  if (full_name)
2918  g_free (full_name);
2919  full_name = g_build_filename(inc_dir->data, name, NULL);
2920 
2921  if ((g_file_get_contents (full_name, &pc->buffer, &flen, NULL)))
2922  break;
2923 
2924  inc_dir = g_slist_next(inc_dir);
2925  }
2926 
2927  if (!full_name || !pc->buffer) {
2928  g_message ("%s: Not able to open nor to locate it in include paths",
2929  name);
2930  g_free(full_name);
2931  return -1;
2932  }
2933 
2934  if (pc->always_signed)
2935  {
2936  g_free(full_name);
2937  return 0;
2938  }
2939  /* Cache the checksum of signature verified files, so that commonly included
2940  * files are not verified multiple times per scan. */
2941  if (strstr (full_name, ".inc"))
2942  filename = basename (full_name);
2943  else
2944  filename = full_name;
2945  snprintf (key_path, sizeof (key_path), "signaturecheck:%s", filename);
2946  timestamp = kb_item_get_int (pc->kb, key_path);
2947  if (timestamp > 0)
2948  {
2949  struct stat file_stat;
2950 
2951  if (stat (full_name, &file_stat) >= 0 && timestamp > file_stat.st_mtime)
2952  {
2953  /* Already checked. No need to check again. */
2954  g_free (full_name);
2955  return 0;
2956  }
2957  }
2958 
2959  load_checksums (pc->kb);
2960  if (checksum_algorithm == GCRY_MD_NONE)
2961  return -1;
2962  else if (checksum_algorithm == GCRY_MD_MD5)
2963  snprintf (key_path, sizeof (key_path), "md5sums:%s", filename);
2964  else if (checksum_algorithm == GCRY_MD_SHA256)
2965  snprintf (key_path, sizeof (key_path), "sha256sums:%s", filename);
2966  else
2967  abort ();
2968  checksum = kb_item_get_str (pc->kb, key_path);
2969  if (!checksum)
2970  {
2971  g_warning ("No checksum for %s", full_name);
2972  g_free (full_name);
2973  return -1;
2974  }
2975  else
2976  {
2977  int ret;
2978  char *check = file_checksum (full_name, checksum_algorithm);
2979 
2980  ret = strcmp (check, checksum);
2981  if (ret)
2982  g_warning ("checksum for %s not matching", full_name);
2983  else
2984  {
2985  snprintf (key_path, sizeof (key_path), "signaturecheck:%s", filename);
2986  kb_item_add_int (pc->kb, key_path, time (NULL));
2987  }
2988  g_free (full_name);
2989  g_free (checksum);
2990  g_free (check);
2991  return ret;
2992  }
2993 }
2994 
2995 void
2997 {
2998  deref_cell(c->tree);
2999  g_free (c->buffer);
3000 }
3001 
3002 void
3004 {
3005  if (!includes_hash)
3006  return;
3007  g_hash_table_destroy (includes_hash);
3008  includes_hash = NULL;
3009 }
3010 
3039 
3040 static int
3041 mylex (YYSTYPE *lvalp, void *parm)
3042 {
3043  char *p;
3044  naslctxt *ctx = parm;
3045  int c, st = ST_START, len, r;
3046  long int x, i;
3047 
3048  if (!ctx)
3049  return -1;
3050 
3051  p = parse_buffer;
3052  len = 0;
3053 
3054  while (1)
3055  {
3056  c = ctx->buffer[ctx->index++];
3057  if (c == '\0')
3058  break;
3059  if (c == '\n')
3060  ctx->line_nb ++;
3061 
3062  switch(st)
3063  {
3064  case ST_START:
3065  if (c == '#')
3066  st = ST_COMMENT;
3067  else if (isalpha(c) || c == '_')
3068  {
3069  st = ST_IDENT;
3070  *p++ = c;
3071  len ++;
3072  }
3073  else if (isspace(c))
3074  st = ST_SPACE;
3075  else if (c == '0')
3076  st = ST_ZERO;
3077  else if (isdigit(c))
3078  {
3079  st = ST_DEC;
3080  *p++ = c;
3081  len ++;
3082  }
3083  else if (c == '\'')
3084  st = ST_STRING1;
3085  else if (c == '"')
3086  st = ST_STRING2;
3087  else if (c == '+')
3088  st = ST_PLUS;
3089  else if (c == '-')
3090  st = ST_MINUS;
3091  else if (c == '*')
3092  st = ST_MULT;
3093  else if (c == '/')
3094  st = ST_DIV;
3095  else if (c == '%')
3096  st = ST_MODULO;
3097  else if (c == '>')
3098  st = ST_SUP;
3099  else if (c == '<')
3100  st = ST_INF;
3101  else if (c == '=')
3102  st = ST_EQ;
3103  else if (c == '|')
3104  st = ST_OR;
3105  else if (c == '!')
3106  st = ST_NOT;
3107  else if (c == '&')
3108  st = ST_AND;
3109  else
3110  {
3111  return c;
3112  }
3113  break;
3114 
3115  case ST_STRING2:
3116  if (c == '"')
3117  goto exit_loop;
3118  *p++ = c;
3119  len ++;
3120  break;
3121 
3122  case ST_STRING1:
3123  if (c == '\'')
3124  goto exit_loop;
3125  else if (c == '\\')
3126  {
3127  c = ctx->buffer[ctx->index++];
3128  if (c == '\0')
3129  {
3130  nasl_perror(NULL, "Unfinished string\n");
3131  goto exit_loop; /* parse error? */
3132  }
3133  switch (c)
3134  {
3135  case '\n': /* escaped end of line */
3136  ctx->line_nb ++;
3137  break;
3138  case '\\':
3139  *p++ ='\\'; len ++;
3140  break;
3141  case 'n':
3142  *p++ = '\n'; len++;
3143  break;
3144  case 'f':
3145  *p++ = '\f'; len ++;
3146  break;
3147  case 't':
3148  *p++ = '\t'; len ++;
3149  break;
3150  case 'r':
3151  *p++ = '\r'; len++;
3152  break;
3153  case 'v':
3154  *p++ = '\v'; len ++;
3155  break;
3156  case '"':
3157  *p ++ = '"'; len ++;
3158  break;
3159  /* Not yet, as we do not return the length of the string */
3160  case '0':
3161  *p++ = '\0'; len++;
3162  break;
3163  case '\'':
3164  *p++ = '\''; len++;
3165  break;
3166 
3167  case 'x':
3168  x = 0;
3169  for (i = 0; i < 2; i ++)
3170  {
3171  c = ctx->buffer[ctx->index++];
3172  if (c == '\0')
3173  {
3174  nasl_perror(NULL, "Unfinished \\x escape sequence (EOF)\n");
3175  goto exit_loop;
3176  }
3177  if (c == '\n')
3178  ctx->line_nb ++;
3179 
3180  c = tolower(c);
3181  if (c >= '0' && c <= '9')
3182  x = x * 16 + (c - '0');
3183  else if (c >= 'a' && c <= 'f')
3184  x = x * 16 + 10 + (c - 'a');
3185  else
3186  {
3187  nasl_perror(NULL, "Unfinished \\x escape sequence\n");
3188  ctx->index--;
3189  if (c == '\n')
3190  ctx->line_nb --;
3191  break;
3192  }
3193  }
3194  *p++ = x; len ++;
3195  break;
3196 
3197  default:
3198  nasl_perror(NULL, "Unknown escape sequence \\%c\n", c);
3199  ctx->index--;
3200  goto exit_loop;
3201  }
3202  }
3203  else
3204  {
3205  *p++ = c;
3206  len ++;
3207  }
3208  break;
3209 
3210  case ST_IDENT:
3211  if (isalnum(c) || c == '_')
3212  {
3213  st = ST_IDENT;
3214  *p++ = c;
3215  len ++;
3216  }
3217  else
3218  {
3219  ctx->index--;
3220  if (c == '\n')
3221  ctx->line_nb --;
3222  goto exit_loop;
3223  }
3224  break;
3225 
3226  case ST_ZERO:
3227  if (c == 'x' || c == 'X')
3228  st = ST_ZEROX;
3229  else if (isdigit(c))
3230  {
3231  if (c <= '7')
3232  st = ST_OCT;
3233  else
3234  st = ST_DEC;
3235  *p ++ = c;
3236  len ++;
3237  }
3238  else
3239  {
3240  ctx->index--;
3241  if (c == '\n')
3242  ctx->line_nb --;
3243  goto exit_loop;
3244  }
3245  break;
3246 
3247  case ST_ZEROX:
3248  if (isxdigit(c))
3249  {
3250  st = ST_HEX;
3251  *p++ = c;
3252  len ++;
3253  }
3254  else
3255  {
3256  /* This should be a parse error */
3257  ctx->index--;
3258  if (c == '\n')
3259  ctx->line_nb --;
3260  goto exit_loop;
3261  }
3262  break;
3263 
3264  case ST_OCT:
3265  if (c >= '0')
3266  {
3267  if (c <= '7')
3268  {
3269  *p++ = c;
3270  len ++;
3271  break;
3272  }
3273  else if (c <= '9')
3274  {
3275  *p++ = c;
3276  len ++;
3277  st = ST_DEC;
3278  break;
3279  }
3280  }
3281  ctx->index--;
3282  if (c == '\n')
3283  ctx->line_nb --;
3284  goto exit_loop;
3285 
3286  case ST_DEC:
3287  if (isdigit(c))
3288  {
3289  *p++ = c;
3290  len ++;
3291  }
3292  else
3293  {
3294  ctx->index--;
3295  if (c == '\n')
3296  ctx->line_nb --;
3297  goto exit_loop;
3298  }
3299  break;
3300 
3301  case ST_HEX:
3302  if (isxdigit(c))
3303  {
3304  *p++ = c;
3305  len ++;
3306  }
3307  else
3308  {
3309  ctx->index--;
3310  if (c == '\n')
3311  ctx->line_nb --;
3312  goto exit_loop;
3313  }
3314  break;
3315 
3316  case ST_SPACE:
3317  if (! isspace(c))
3318  {
3319  ctx->index--;
3320  if (c == '\n')
3321  ctx->line_nb --;
3322  st = ST_START;
3323  }
3324  break;
3325 
3326  case ST_COMMENT:
3327  if (c == '\n')
3328  st = ST_START;
3329  break;
3330 
3331  case ST_SUP_EXCL:
3332  if (c == '<')
3333  return NOMATCH;
3334  else
3335  {
3336  ctx->index--;
3337  if (c == '\n')
3338  ctx->line_nb --;
3339  if (! isprint(c)) c = '.';
3340  g_message ("lexer error: invalid token >!%c "
3341  "parsed as >!< %c", c, c);
3342  return NOMATCH;
3343  }
3344  break;
3345 
3346  case ST_SUP:
3347  if (c == '=')
3348  return SUPEQ;
3349  else if (c == '<')
3350  return MATCH;
3351  else if (c == '>')
3352  st = ST_R_SHIFT;
3353  else if (c == '!')
3354  st = ST_SUP_EXCL;
3355  else
3356  {
3357  ctx->index--;
3358  if (c == '\n')
3359  ctx->line_nb --;
3360  return '>';
3361  }
3362  break;
3363 
3364  case ST_INF:
3365  if (c == '=')
3366  return INFEQ;
3367  else if (c == '<')
3368  st = ST_L_SHIFT;
3369  else
3370  {
3371  ctx->index--;
3372  if (c == '\n')
3373  ctx->line_nb --;
3374  return '<';
3375  }
3376  break;
3377 
3378  case ST_R_SHIFT:
3379  if (c == '=')
3380  return R_SHIFT_EQ;
3381  else if (c == '>')
3382  st = ST_R_USHIFT;
3383  else
3384  {
3385  ctx->index--;
3386  if (c == '\n')
3387  ctx->line_nb --;
3388  return R_SHIFT;
3389  }
3390  /*NOTREACHED*/
3391  break;
3392 
3393  case ST_R_USHIFT:
3394  if (c == '=')
3395  return R_USHIFT_EQ;
3396  else
3397  {
3398  ctx->index--;
3399  if (c == '\n')
3400  ctx->line_nb --;
3401  return R_USHIFT;
3402  }
3403  /*NOTREACHED*/
3404  break;
3405 
3406  case ST_L_SHIFT:
3407  if (c == '=')
3408  return L_SHIFT_EQ;
3409  else
3410  {
3411  ctx->index--;
3412  if (c == '\n')
3413  ctx->line_nb --;
3414  return L_SHIFT;
3415  }
3416  /*NOTREACHED*/
3417  break;
3418 
3419  case ST_AND:
3420  if (c == '&')
3421  return AND;
3422  ctx->index--;
3423  if (c == '\n')
3424  ctx->line_nb --;
3425  return '&';
3426 
3427  case ST_OR:
3428  if (c == '|')
3429  return OR;
3430  ctx->index--;
3431  if (c == '\n')
3432  ctx->line_nb --;
3433  return '|';
3434 
3435  case ST_NOT:
3436  if (c == '=')
3437  return NEQ;
3438  else if (c == '~')
3439  return RE_NOMATCH;
3440  ctx->index--;
3441  if (c == '\n')
3442  ctx->line_nb --;
3443  return '!';
3444 
3445  case ST_EQ:
3446  if (c == '=')
3447  return EQ;
3448  else if (c == '~')
3449  return RE_MATCH;
3450  else if (c == '>')
3451  return ARROW;
3452  ctx->index--;
3453  if (c == '\n')
3454  ctx->line_nb --;
3455  return '=';
3456 
3457  case ST_PLUS:
3458  if (c == '+')
3459  return PLUS_PLUS;
3460  else if (c == '=')
3461  return PLUS_EQ;
3462 
3463  ctx->index--;
3464  if (c == '\n')
3465  ctx->line_nb --;
3466  return '+';
3467 
3468  case ST_MINUS:
3469  if (c == '-')
3470  return MINUS_MINUS;
3471  else if (c == '=')
3472  return MINUS_EQ;
3473 
3474  ctx->index--;
3475  if (c == '\n')
3476  ctx->line_nb --;
3477  return '-';
3478 
3479  case ST_MULT:
3480  if (c == '=')
3481  return MULT_EQ;
3482  else if (c == '*')
3483  return EXPO;
3484  ctx->index--;
3485  if (c == '\n')
3486  ctx->line_nb --;
3487  return '*';
3488 
3489  case ST_DIV:
3490  if (c == '=')
3491  return DIV_EQ;
3492 
3493  ctx->index--;
3494  if (c == '\n')
3495  ctx->line_nb --;
3496  return '/';
3497 
3498  case ST_MODULO:
3499  if (c == '=')
3500  return MODULO_EQ;
3501 
3502  ctx->index--;
3503  if (c == '\n')
3504  ctx->line_nb --;
3505  return '%';
3506 
3507  }
3508 
3509  if (len >= parse_len)
3510  {
3511  int offs = p - parse_buffer;
3512  parse_len += 9092;
3513  parse_buffer = g_realloc (parse_buffer, parse_len);
3514  p = parse_buffer + offs;
3515  }
3516  }
3517 
3518  exit_loop:
3519  parse_buffer[len] = '\0';
3520  switch (st)
3521  {
3522  case ST_START:
3523  case ST_COMMENT:
3524  case ST_SPACE:
3525  return 0;
3526 
3527  case ST_STRING2:
3528  r = STRING2;
3529  lvalp->str = g_strdup (parse_buffer);
3530  return r;
3531 
3532  case ST_STRING1:
3533  r = STRING1;
3534  lvalp->data.val = g_malloc0 (len+2);
3535  memcpy (lvalp->data.val, parse_buffer, len + 1);
3536  lvalp->data.len = len;
3537  return r;
3538 
3539  case ST_IDENT:
3540  if (strcmp (parse_buffer, "if") == 0)
3541  r = IF;
3542  else if (strcmp (parse_buffer, "else") == 0)
3543  r = ELSE;
3544  else if (strcmp (parse_buffer, "for") == 0)
3545  r = FOR;
3546  else if (strcmp (parse_buffer, "while") == 0)
3547  r = WHILE;
3548  else if (strcmp (parse_buffer, "repeat") == 0)
3549  r = REPEAT;
3550  else if (strcmp (parse_buffer, "until") == 0)
3551  r = UNTIL;
3552  else if (strcmp (parse_buffer, "foreach") == 0)
3553  r = FOREACH;
3554  else if (strcmp (parse_buffer, "function") == 0)
3555  r = FUNCTION;
3556  else if (strcmp (parse_buffer, "return") == 0)
3557  r = RETURN;
3558  else if (strcmp (parse_buffer, "x") == 0)
3559  r = REP;
3560  else if (strcmp (parse_buffer, "include") == 0)
3561  r = INCLUDE;
3562  else if (strcmp (parse_buffer, "break") == 0)
3563  r = BREAK;
3564  else if (strcmp (parse_buffer, "continue") == 0)
3565  r = CONTINUE;
3566  else if (strcmp (parse_buffer, "local_var") == 0)
3567  r = LOCAL;
3568  else if (strcmp (parse_buffer, "global_var") == 0)
3569  r = GLOBAL;
3570  else
3571  {
3572  r = IDENT;
3573  lvalp->str = g_strdup (parse_buffer);
3574  return r;
3575  }
3576  return r;
3577 
3578  case ST_DEC:
3579  /* -123 is parsed as "-" and "123" so that we can write "4-2" without
3580  * inserting a white space after the minus operator
3581  * Note that strtoul would also work on negative integers */
3582  lvalp->num = x = strtoul (parse_buffer, NULL, 10);
3583  return INTEGER;
3584 
3585  case ST_OCT:
3586  lvalp->num = x = strtoul (parse_buffer, NULL, 8);
3587  return INTEGER;
3588 
3589  case ST_HEX:
3590  lvalp->num = x = strtoul (parse_buffer, NULL, 16);
3591  return INTEGER;
3592 
3593  case ST_ZEROX:
3594  nasl_perror(NULL, "Invalid token 0x parsed as 0 at line %d\n",
3595  ctx->line_nb);
3596  /* fallthrough */
3597  case ST_ZERO:
3598  lvalp->num = 0;
3599  return INTEGER;
3600  default:
3601  abort();
3602  }
3603 }
3604 
3605 static int
3606 nasllex(YYSTYPE * lvalp, void * parm)
3607 {
3608  int x = mylex (lvalp, parm);
3609  return x;
3610 }
3611 
NODE_LOCAL
@ NODE_LOCAL
Definition: nasl_tree.h:43
ST_STRING1_ESC
@ ST_STRING1_ESC
Definition: nasl_grammar.tab.c:3025
EXPR_AND
@ EXPR_AND
Definition: nasl_tree.h:56
yylex
#define yylex
Definition: nasl_grammar.tab.c:68
yytokentype
yytokentype
Definition: nasl_grammar.tab.c:176
YYEOF
#define YYEOF
Definition: nasl_grammar.tab.c:1060
EXPR_BIT_XOR
@ EXPR_BIT_XOR
Definition: nasl_tree.h:70
yydefact
static const yytype_int8 yydefact[]
Definition: nasl_grammar.tab.c:727
ST_AND
@ ST_AND
Definition: nasl_grammar.tab.c:3037
ST_STRING1
@ ST_STRING1
Definition: nasl_grammar.tab.c:3024
CONST_DATA
@ CONST_DATA
Definition: nasl_tree.h:93
naslparse
int naslparse(naslctxt *parm)
PLUS_EQ
@ PLUS_EQ
Definition: nasl_grammar.tab.c:207
yytype_int16
short yytype_int16
Definition: nasl_grammar.tab.c:298
IF
@ IF
Definition: nasl_grammar.tab.c:178
ST_DIV
@ ST_DIV
Definition: nasl_grammar.tab.c:3030
ST_HEX
@ ST_HEX
Definition: nasl_grammar.tab.c:3019
naslerror
static void naslerror(naslctxt *, const char *)
Definition: nasl_grammar.tab.c:2718
malloc
void * malloc(YYSIZE_T)
NODE_MINUS_EQ
@ NODE_MINUS_EQ
Definition: nasl_tree.h:47
NODE_WHILE
@ NODE_WHILE
Definition: nasl_tree.h:28
YYSIZEOF
#define YYSIZEOF(X)
Definition: nasl_grammar.tab.c:358
yy_state_fast_t
int yy_state_fast_t
Definition: nasl_grammar.tab.c:364
NODE_DECL
@ NODE_DECL
Definition: nasl_tree.h:34
NODE_RETURN
@ NODE_RETURN
Definition: nasl_tree.h:36
TC::str_val
char * str_val
Definition: nasl_tree.h:112
NODE_GLOBAL
@ NODE_GLOBAL
Definition: nasl_tree.h:44
FUNCTION
@ FUNCTION
Definition: nasl_grammar.tab.c:196
YY_
#define YY_(Msgid)
Definition: nasl_grammar.tab.c:374
yystrlen
static YYPTRDIFF_T yystrlen(const char *yystr)
Definition: nasl_grammar.tab.c:1250
NODE_AFF
@ NODE_AFF
Definition: nasl_tree.h:41
NODE_DIV_EQ
@ NODE_DIV_EQ
Definition: nasl_tree.h:49
NODE_L_SHIFT_EQ
@ NODE_L_SHIFT_EQ
Definition: nasl_tree.h:52
nasl_clean_ctx
void nasl_clean_ctx(naslctxt *c)
Definition: nasl_grammar.tab.c:2996
EXPR_R_USHIFT
@ EXPR_R_USHIFT
Definition: nasl_tree.h:76
CONST_STR
@ CONST_STR
Definition: nasl_tree.h:91
UMINUS
@ UMINUS
Definition: nasl_grammar.tab.c:223
YYSTACK_BYTES
#define YYSTACK_BYTES(N)
Definition: nasl_grammar.tab.c:519
ARROW
@ ARROW
Definition: nasl_grammar.tab.c:217
load_checksums
static void load_checksums(kb_t kb)
Definition: nasl_grammar.tab.c:2769
naslctxt
Definition: nasl_global_ctxt.h:26
YYSTYPE::num
long int num
Definition: nasl_grammar.tab.c:234
NEQ
@ NEQ
Definition: nasl_grammar.tab.c:181
NODE_REPEAT_UNTIL
@ NODE_REPEAT_UNTIL
Definition: nasl_tree.h:30
ST_OCT
@ ST_OCT
Definition: nasl_grammar.tab.c:3017
YY_STACK_PRINT
#define YY_STACK_PRINT(Bottom, Top)
Definition: nasl_grammar.tab.c:1177
inc_dirs
static GSList * inc_dirs
Definition: nasl_grammar.tab.c:2724
NODE_ARRAY_EL
@ NODE_ARRAY_EL
Definition: nasl_tree.h:40
yypact
static const yytype_int16 yypact[]
Definition: nasl_grammar.tab.c:697
PLUS_PLUS
@ PLUS_PLUS
Definition: nasl_grammar.tab.c:201
ST_L_SHIFT
@ ST_L_SHIFT
Definition: nasl_grammar.tab.c:3034
YY_IGNORE_MAYBE_UNINITIALIZED_END
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
Definition: nasl_grammar.tab.c:414
STRING1
@ STRING1
Definition: nasl_grammar.tab.c:219
ST_OR
@ ST_OR
Definition: nasl_grammar.tab.c:3038
L_SHIFT
@ L_SHIFT
Definition: nasl_grammar.tab.c:203
WHILE
@ WHILE
Definition: nasl_grammar.tab.c:193
R_USHIFT_EQ
@ R_USHIFT_EQ
Definition: nasl_grammar.tab.c:214
YY_SYMBOL_PRINT
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: nasl_grammar.tab.c:1112
R_SHIFT_EQ
@ R_SHIFT_EQ
Definition: nasl_grammar.tab.c:213
YY_REDUCE_PRINT
#define YY_REDUCE_PRINT(Rule)
Definition: nasl_grammar.tab.c:1208
ST_R_USHIFT
@ ST_R_USHIFT
Definition: nasl_grammar.tab.c:3033
nasllex
static int nasllex(YYSTYPE *lvalp, void *parm)
Definition: nasl_grammar.tab.c:3606
nasl_set_function_filename
void nasl_set_function_filename(const char *function)
Definition: nasl_debug.c:108
ST_COMMENT
@ ST_COMMENT
Definition: nasl_grammar.tab.c:3020
YYSTACK_ALLOC
#define YYSTACK_ALLOC
Definition: nasl_grammar.tab.c:474
yyalloc::yyss_alloc
yy_state_t yyss_alloc
Definition: nasl_grammar.tab.c:510
nasl_clean_inc
void nasl_clean_inc(void)
Definition: nasl_grammar.tab.c:3003
YYPOPSTACK
#define YYPOPSTACK(N)
EXPR_BIT_NOT
@ EXPR_BIT_NOT
Definition: nasl_tree.h:71
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Definition: nasl_grammar.tab.c:413
nasl_signature.h
EXPO
@ EXPO
Definition: nasl_grammar.tab.c:206
YYEMPTY
#define YYEMPTY
Definition: nasl_grammar.tab.c:1059
NODE_FUN_DEF
@ NODE_FUN_DEF
Definition: nasl_tree.h:32
checksum_algorithm
static int checksum_algorithm
Definition: nasl_grammar.tab.c:2766
yyr1
static const yytype_int8 yyr1[]
Definition: nasl_grammar.tab.c:1021
lex_state
lex_state
Definition: nasl_grammar.tab.c:3011
BREAK
@ BREAK
Definition: nasl_grammar.tab.c:194
RE_MATCH
@ RE_MATCH
Definition: nasl_grammar.tab.c:215
EXPR_U_MINUS
@ EXPR_U_MINUS
Definition: nasl_tree.h:62
MINUS_MINUS
@ MINUS_MINUS
Definition: nasl_grammar.tab.c:202
yynerrs
#define yynerrs
Definition: nasl_grammar.tab.c:71
YYLAST
#define YYLAST
Definition: nasl_grammar.tab.c:566
yyerror
#define yyerror
Definition: nasl_grammar.tab.c:69
name
const char * name
Definition: nasl_init.c:377
naslctxt::kb
kb_t kb
Definition: nasl_global_ctxt.h:33
yytnamerr
static YYPTRDIFF_T yytnamerr(char *yyres, const char *yystr)
Definition: nasl_grammar.tab.c:1289
yypgoto
static const yytype_int16 yypgoto[]
Definition: nasl_grammar.tab.c:755
AND
@ AND
Definition: nasl_grammar.tab.c:185
LNB
#define LNB
Definition: nasl_grammar.tab.c:97
ST_INF
@ ST_INF
Definition: nasl_grammar.tab.c:3022
YYNSTATES
#define YYNSTATES
Definition: nasl_grammar.tab.c:575
yytable_value_is_error
#define yytable_value_is_error(Yyn)
Definition: nasl_grammar.tab.c:692
NODE_R_SHIFT_EQ
@ NODE_R_SHIFT_EQ
Definition: nasl_tree.h:53
YYSTYPE::str
char * str
Definition: nasl_grammar.tab.c:235
EXPR_MODULO
@ EXPR_MODULO
Definition: nasl_tree.h:65
yystpcpy
static char * yystpcpy(char *yydest, const char *yysrc)
Definition: nasl_grammar.tab.c:1267
REPEAT
@ REPEAT
Definition: nasl_grammar.tab.c:190
STRING2
@ STRING2
Definition: nasl_grammar.tab.c:220
NODE_FUN_CALL
@ NODE_FUN_CALL
Definition: nasl_tree.h:33
YY_CAST
#define YY_CAST(Type, Val)
Definition: nasl_grammar.tab.c:137
YYSTYPE::asciiz::val
char * val
Definition: nasl_grammar.tab.c:237
nasl_debug.h
YY_INITIAL_VALUE
#define YY_INITIAL_VALUE(Value)
Definition: nasl_grammar.tab.c:410
COMP_LE
@ COMP_LE
Definition: nasl_tree.h:84
naslctxt::buffer
char * buffer
Definition: nasl_global_ctxt.h:32
ST_MULT
@ ST_MULT
Definition: nasl_grammar.tab.c:3029
NOT
@ NOT
Definition: nasl_grammar.tab.c:222
nasl_verify_signature
int nasl_verify_signature(const char *filename)
ARRAY_ELEM
@ ARRAY_ELEM
Definition: nasl_tree.h:96
NODE_FOREACH
@ NODE_FOREACH
Definition: nasl_tree.h:29
yy_state_t
yytype_uint8 yy_state_t
Definition: nasl_grammar.tab.c:361
nasl_perror
void nasl_perror(lex_ctxt *lexic, char *msg,...)
Definition: nasl_debug.c:120
mylex
static int mylex(YYSTYPE *lvalp, void *parm)
Definition: nasl_grammar.tab.c:3041
alloc_RE_cell
tree_cell * alloc_RE_cell(int lnb, int t, tree_cell *l, char *re_str)
Definition: nasl_tree.c:48
EXPR_DECR
@ EXPR_DECR
Definition: nasl_tree.h:73
OR
@ OR
Definition: nasl_grammar.tab.c:184
YYINITDEPTH
#define YYINITDEPTH
Definition: nasl_grammar.tab.c:1227
YY_ASSERT
#define YY_ASSERT(E)
Definition: nasl_grammar.tab.c:433
YYPTRDIFF_T
#define YYPTRDIFF_T
Definition: nasl_grammar.tab.c:334
ST_DEC
@ ST_DEC
Definition: nasl_grammar.tab.c:3018
yysyntax_error
static int yysyntax_error(YYPTRDIFF_T *yymsg_alloc, char **yymsg, yy_state_t *yyssp, int yytoken)
Definition: nasl_grammar.tab.c:1340
yyr2
static const yytype_int8 yyr2[]
Definition: nasl_grammar.tab.c:1039
ST_SUP_EXCL
@ ST_SUP_EXCL
Definition: nasl_grammar.tab.c:3023
ST_SUP
@ ST_SUP
Definition: nasl_grammar.tab.c:3021
NODE_VAR
@ NODE_VAR
Definition: nasl_tree.h:42
yy_reduce_print
static void yy_reduce_print(yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule, naslctxt *parm)
Definition: nasl_grammar.tab.c:1189
yytype_uint8
unsigned char yytype_uint8
Definition: nasl_grammar.tab.c:307
REP
@ REP
Definition: nasl_grammar.tab.c:188
nasldebug
int nasldebug
ELSE
@ ELSE
Definition: nasl_grammar.tab.c:179
yytranslate
static const yytype_int8 yytranslate[]
Definition: nasl_grammar.tab.c:588
NOMATCH
@ NOMATCH
Definition: nasl_grammar.tab.c:187
YYSTACK_ALLOC_MAXIMUM
#define YYSTACK_ALLOC_MAXIMUM
Definition: nasl_grammar.tab.c:477
MINUS_EQ
@ MINUS_EQ
Definition: nasl_grammar.tab.c:208
EXPR_PLUS
@ EXPR_PLUS
Definition: nasl_tree.h:60
NODE_INSTR_L
@ NODE_INSTR_L
Definition: nasl_tree.h:26
nasl_lex_ctxt.h
RETURN
@ RETURN
Definition: nasl_grammar.tab.c:197
LOCAL
@ LOCAL
Definition: nasl_grammar.tab.c:199
ST_ZERO
@ ST_ZERO
Definition: nasl_grammar.tab.c:3015
yy_symbol_print
static void yy_symbol_print(FILE *yyo, int yytype, YYSTYPE const *const yyvaluep, naslctxt *parm)
Definition: nasl_grammar.tab.c:1151
YYDPRINTF
#define YYDPRINTF(Args)
Definition: nasl_grammar.tab.c:1100
NODE_REPEATED
@ NODE_REPEATED
Definition: nasl_tree.h:31
YY_NULLPTR
#define YY_NULLPTR
Definition: nasl_grammar.tab.c:149
FOREACH
@ FOREACH
Definition: nasl_grammar.tab.c:192
YYSTYPE
Definition: nasl_grammar.tab.c:230
EXPR_R_SHIFT
@ EXPR_R_SHIFT
Definition: nasl_tree.h:75
EXPR_NOT
@ EXPR_NOT
Definition: nasl_tree.h:58
FOR
@ FOR
Definition: nasl_grammar.tab.c:189
INTEGER
@ INTEGER
Definition: nasl_grammar.tab.c:221
yytname
static const char *const yytname[]
Definition: nasl_grammar.tab.c:646
EXPR_DIV
@ EXPR_DIV
Definition: nasl_tree.h:64
ST_NOT
@ ST_NOT
Definition: nasl_grammar.tab.c:3035
ST_EQ
@ ST_EQ
Definition: nasl_grammar.tab.c:3036
BIT_NOT
@ BIT_NOT
Definition: nasl_grammar.tab.c:224
YY_IGNORE_USELESS_CAST_BEGIN
#define YY_IGNORE_USELESS_CAST_BEGIN
Definition: nasl_grammar.tab.c:428
prefix
static void prefix(int n, int i)
Definition: nasl_tree.c:233
YYSTACK_RELOCATE
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
Definition: nasl_grammar.tab.c:530
nasl_func.h
EQ
@ EQ
Definition: nasl_grammar.tab.c:180
UNTIL
@ UNTIL
Definition: nasl_grammar.tab.c:191
yyalloc::yyvs_alloc
YYSTYPE yyvs_alloc
Definition: nasl_grammar.tab.c:511
L_SHIFT_EQ
@ L_SHIFT_EQ
Definition: nasl_grammar.tab.c:212
yycheck
static const yytype_int16 yycheck[]
Definition: nasl_grammar.tab.c:884
INCLUDE
@ INCLUDE
Definition: nasl_grammar.tab.c:198
file_checksum
static char * file_checksum(const char *filename, int algorithm)
Get the checksum of a file.
Definition: nasl_grammar.tab.c:2859
ST_R_SHIFT
@ ST_R_SHIFT
Definition: nasl_grammar.tab.c:3032
COMP_RE_NOMATCH
@ COMP_RE_NOMATCH
Definition: nasl_tree.h:81
SUPEQ
@ SUPEQ
Definition: nasl_grammar.tab.c:182
alloc_expr_cell
tree_cell * alloc_expr_cell(int lnb, int t, tree_cell *l, tree_cell *r)
Definition: nasl_tree.c:74
YY_IGNORE_USELESS_CAST_END
#define YY_IGNORE_USELESS_CAST_END
Definition: nasl_grammar.tab.c:429
ST_ZEROX
@ ST_ZEROX
Definition: nasl_grammar.tab.c:3016
make_array_from_elems
tree_cell * make_array_from_elems(tree_cell *el)
Definition: nasl_var.c:1332
EXPR_L_SHIFT
@ EXPR_L_SHIFT
Definition: nasl_tree.h:74
EXPR_BIT_AND
@ EXPR_BIT_AND
Definition: nasl_tree.h:68
TC
Definition: nasl_tree.h:104
COMP_MATCH
@ COMP_MATCH
Definition: nasl_tree.h:78
yytype_int8
signed char yytype_int8
Definition: nasl_grammar.tab.c:290
parse_buffer
static char * parse_buffer
Definition: nasl_grammar.tab.c:120
naslctxt::tree
tree_cell * tree
Definition: nasl_global_ctxt.h:31
yy_symbol_value_print
static void yy_symbol_value_print(FILE *yyo, int yytype, YYSTYPE const *const yyvaluep, naslctxt *parm)
Definition: nasl_grammar.tab.c:1129
YYFPRINTF
#define YYFPRINTF
Definition: nasl_grammar.tab.c:1097
nasl_var.h
yydebug
#define yydebug
Definition: nasl_grammar.tab.c:70
naslctxt::always_signed
int always_signed
Definition: nasl_global_ctxt.h:29
ST_SPACE
@ ST_SPACE
Definition: nasl_grammar.tab.c:3013
ST_STRING2
@ ST_STRING2
Definition: nasl_grammar.tab.c:3026
ref_cell
void ref_cell(tree_cell *c)
Definition: nasl_tree.c:178
NODE_R_USHIFT_EQ
@ NODE_R_USHIFT_EQ
Definition: nasl_tree.h:54
yydefgoto
static const yytype_int16 yydefgoto[]
Definition: nasl_grammar.tab.c:765
R_SHIFT
@ R_SHIFT
Definition: nasl_grammar.tab.c:204
ST_PLUS
@ ST_PLUS
Definition: nasl_grammar.tab.c:3027
COMP_GE
@ COMP_GE
Definition: nasl_tree.h:88
NODE_MULT_EQ
@ NODE_MULT_EQ
Definition: nasl_tree.h:48
yyparse
#define yyparse
Definition: nasl_grammar.tab.c:67
EXPR_MINUS
@ EXPR_MINUS
Definition: nasl_tree.h:61
add_nasl_inc_dir
int add_nasl_inc_dir(const char *dir)
Adds the given string as directory for searching for includes.
Definition: nasl_grammar.tab.c:2738
MODULO_EQ
@ MODULO_EQ
Definition: nasl_grammar.tab.c:211
YYSIZE_T
#define YYSIZE_T
Definition: nasl_grammar.tab.c:348
nasl_global_ctxt.h
naslctxt::index
int index
Definition: nasl_global_ctxt.h:30
EXPR_INCR
@ EXPR_INCR
Definition: nasl_tree.h:72
YYABORT
#define YYABORT
Definition: nasl_grammar.tab.c:1063
CONST_INT
@ CONST_INT
Definition: nasl_tree.h:90
yypact_value_is_default
#define yypact_value_is_default(Yyn)
Definition: nasl_grammar.tab.c:687
YYSTYPE::asciiz::len
int len
Definition: nasl_grammar.tab.c:238
YYERROR
#define YYERROR
Definition: nasl_grammar.tab.c:1064
yyrline
static const yytype_int16 yyrline[]
Definition: nasl_grammar.tab.c:625
YYSYNTAX_ERROR
#define YYSYNTAX_ERROR
MULT_EQ
@ MULT_EQ
Definition: nasl_grammar.tab.c:209
YYMAXDEPTH
#define YYMAXDEPTH
Definition: nasl_grammar.tab.c:1238
YYUSE
#define YYUSE(E)
Definition: nasl_grammar.tab.c:396
COMP_LT
@ COMP_LT
Definition: nasl_tree.h:83
NODE_IF_ELSE
@ NODE_IF_ELSE
Definition: nasl_tree.h:25
DIV_EQ
@ DIV_EQ
Definition: nasl_grammar.tab.c:210
R_USHIFT
@ R_USHIFT
Definition: nasl_grammar.tab.c:205
YYSTYPE::data
struct YYSTYPE::asciiz data
YYNTOKENS
#define YYNTOKENS
Definition: nasl_grammar.tab.c:569
COMP_NE
@ COMP_NE
Definition: nasl_tree.h:86
ST_START
@ ST_START
Definition: nasl_grammar.tab.c:3012
parse_len
static int parse_len
Definition: nasl_grammar.tab.c:122
yytype_uint16
unsigned short yytype_uint16
Definition: nasl_grammar.tab.c:318
ST_IDENT
@ ST_IDENT
Definition: nasl_grammar.tab.c:3014
EXPR_OR
@ EXPR_OR
Definition: nasl_tree.h:57
ST_MODULO
@ ST_MODULO
Definition: nasl_grammar.tab.c:3031
NODE_CONTINUE
@ NODE_CONTINUE
Definition: nasl_tree.h:38
yy_stack_print
static void yy_stack_print(yy_state_t *yybottom, yy_state_t *yytop)
Definition: nasl_grammar.tab.c:1166
yyalloc
Definition: nasl_grammar.tab.c:508
NODE_FOR
@ NODE_FOR
Definition: nasl_tree.h:27
COMP_RE_MATCH
@ COMP_RE_MATCH
Definition: nasl_tree.h:80
GLOBAL
@ GLOBAL
Definition: nasl_grammar.tab.c:200
nasl_get_filename
const char * nasl_get_filename(const char *function)
Definition: nasl_debug.c:69
NODE_MODULO_EQ
@ NODE_MODULO_EQ
Definition: nasl_tree.h:50
YYFINAL
#define YYFINAL
Definition: nasl_grammar.tab.c:564
yydestruct
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep, naslctxt *parm)
Definition: nasl_grammar.tab.c:1479
YYSTYPE::asciiz
Definition: nasl_grammar.tab.c:236
MATCH
@ MATCH
Definition: nasl_grammar.tab.c:186
yytable
static const yytype_int16 yytable[]
Definition: nasl_grammar.tab.c:777
nasl_set_filename
void nasl_set_filename(const char *filename)
Definition: nasl_debug.c:97
NODE_BREAK
@ NODE_BREAK
Definition: nasl_tree.h:37
IDENT
@ IDENT
Definition: nasl_grammar.tab.c:218
init_nasl_ctx
int init_nasl_ctx(naslctxt *pc, const char *name)
Initialize a NASL context for a NASL file.
Definition: nasl_grammar.tab.c:2894
YYSTACK_FREE
#define YYSTACK_FREE
Definition: nasl_grammar.tab.c:475
YYSTYPE::node
tree_cell * node
Definition: nasl_grammar.tab.c:240
NODE_PLUS_EQ
@ NODE_PLUS_EQ
Definition: nasl_tree.h:46
INFEQ
@ INFEQ
Definition: nasl_grammar.tab.c:183
deref_cell
void deref_cell(tree_cell *c)
Definition: nasl_tree.c:192
alloc_typed_cell
tree_cell * alloc_typed_cell(int typ)
Definition: nasl_tree.c:40
free
void free(void *)
COMP_NOMATCH
@ COMP_NOMATCH
Definition: nasl_tree.h:79
YYACCEPT
#define YYACCEPT
Definition: nasl_grammar.tab.c:1062
RE_NOMATCH
@ RE_NOMATCH
Definition: nasl_grammar.tab.c:216
NODE_ARG
@ NODE_ARG
Definition: nasl_tree.h:35
EXPR_EXPO
@ EXPR_EXPO
Definition: nasl_tree.h:66
nasl_tree.h
includes_hash
GHashTable * includes_hash
Definition: nasl_grammar.tab.c:126
YYTRANSLATE
#define YYTRANSLATE(YYX)
Definition: nasl_grammar.tab.c:583
EXPR_BIT_OR
@ EXPR_BIT_OR
Definition: nasl_tree.h:69
EXPR_MULT
@ EXPR_MULT
Definition: nasl_tree.h:63
COMP_EQ
@ COMP_EQ
Definition: nasl_tree.h:85
naslctxt::line_nb
int line_nb
Definition: nasl_global_ctxt.h:28
ST_MINUS
@ ST_MINUS
Definition: nasl_grammar.tab.c:3028
YYCASE_
#define YYCASE_(N, S)
yystos
static const yytype_int8 yystos[]
Definition: nasl_grammar.tab.c:993
CONTINUE
@ CONTINUE
Definition: nasl_grammar.tab.c:195
TC::i_val
long int i_val
Definition: nasl_tree.h:113
YYTERROR
#define YYTERROR
Definition: nasl_grammar.tab.c:1087
COMP_GT
@ COMP_GT
Definition: nasl_tree.h:87