OpenVAS Scanner  6.0.1
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
nasl_grammar.tab.c File Reference
#include <ctype.h>
#include <pcap.h>
#include <string.h>
#include <sys/stat.h>
#include <glib.h>
#include "nasl_tree.h"
#include "nasl_global_ctxt.h"
#include "nasl_func.h"
#include "nasl_var.h"
#include "nasl_lex_ctxt.h"
#include "nasl_debug.h"
#include "nasl_signature.h"
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <gvm/base/logging.h>
#include <gvm/base/prefs.h>
#include <libgen.h>
#include <gcrypt.h>

Data Structures

union  YYSTYPE
 
struct  YYSTYPE::asciiz
 
union  yyalloc
 

Macros

#define YYBISON   1
 
#define YYBISON_VERSION   "3.0.5"
 
#define YYSKELETON_NAME   "yacc.c"
 
#define YYPURE   1
 
#define YYPUSH   0
 
#define YYPULL   1
 
#define yyparse   naslparse
 
#define yylex   nasllex
 
#define yyerror   naslerror
 
#define yydebug   nasldebug
 
#define yynerrs   naslnerrs
 
#define YYPARSE_PARAM   parm
 
#define YYLEX_PARAM   parm
 
#define LNB   (((naslctxt*)parm)->line_nb)
 
#define G_LOG_DOMAIN   "lib nasl"
 GLib logging domain. More...
 
#define YYERROR_VERBOSE
 
#define YY_NULLPTR   0
 
#define YYERROR_VERBOSE   1
 
#define YY_NASL_NASL_GRAMMAR_TAB_H_INCLUDED
 
#define YYDEBUG   1
 
#define YYTOKENTYPE
 
#define YYSTYPE_IS_TRIVIAL   1
 
#define YYSTYPE_IS_DECLARED   1
 
#define YYSIZE_T   size_t
 
#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)
 
#define YY_(Msgid)   Msgid
 
#define YY_ATTRIBUTE(Spec)   /* empty */
 
#define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
 
#define YY_ATTRIBUTE_UNUSED   YY_ATTRIBUTE ((__unused__))
 
#define _Noreturn   YY_ATTRIBUTE ((__noreturn__))
 
#define YYUSE(E)   ((void) (E))
 
#define YY_INITIAL_VALUE(Value)   Value
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
 
#define YYSTACK_ALLOC   YYMALLOC
 
#define YYSTACK_FREE   YYFREE
 
#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM
 
#define YYMALLOC   malloc
 
#define YYFREE   free
 
#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)
 
#define YYSTACK_BYTES(N)
 
#define YYCOPY_NEEDED   1
 
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
 
#define YYCOPY(Dst, Src, Count)
 
#define YYFINAL   78
 
#define YYLAST   1029
 
#define YYNTOKENS   73
 
#define YYNNTS   43
 
#define YYNRULES   126
 
#define YYNSTATES   227
 
#define YYUNDEFTOK   2
 
#define YYMAXUTOK   304
 
#define YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
#define YYPACT_NINF   -91
 
#define yypact_value_is_default(Yystate)   (!!((Yystate) == (-91)))
 
#define YYTABLE_NINF   -69
 
#define yytable_value_is_error(Yytable_value)   (!!((Yytable_value) == (-69)))
 
#define yyerrok   (yyerrstatus = 0)
 
#define yyclearin   (yychar = YYEMPTY)
 
#define YYEMPTY   (-2)
 
#define YYEOF   0
 
#define YYACCEPT   goto yyacceptlab
 
#define YYABORT   goto yyabortlab
 
#define YYERROR   goto yyerrorlab
 
#define YYRECOVERING()   (!!yyerrstatus)
 
#define YYBACKUP(Token, Value)
 
#define YYTERROR   1
 
#define YYERRCODE   256
 
#define YYFPRINTF   fprintf
 
#define YYDPRINTF(Args)
 
#define YY_LOCATION_PRINT(File, Loc)   ((void) 0)
 
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
 
#define YY_STACK_PRINT(Bottom, Top)
 
#define YY_REDUCE_PRINT(Rule)
 
#define YYINITDEPTH   200
 
#define YYMAXDEPTH   10000
 
#define YYCASE_(N, S)
 
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
 
#define YYSYNTAX_ERROR
 

Typedefs

typedef union YYSTYPE YYSTYPE
 
typedef unsigned char yytype_uint8
 
typedef signed char yytype_int8
 
typedef unsigned short int yytype_uint16
 
typedef short int yytype_int16
 

Enumerations

enum  yytokentype {
  IF = 258, ELSE = 259, EQ = 260, NEQ = 261,
  SUPEQ = 262, INFEQ = 263, OR = 264, AND = 265,
  MATCH = 266, NOMATCH = 267, REP = 268, FOR = 269,
  REPEAT = 270, UNTIL = 271, FOREACH = 272, WHILE = 273,
  BREAK = 274, CONTINUE = 275, FUNCTION = 276, RETURN = 277,
  INCLUDE = 278, LOCAL = 279, GLOBAL = 280, PLUS_PLUS = 281,
  MINUS_MINUS = 282, L_SHIFT = 283, R_SHIFT = 284, R_USHIFT = 285,
  EXPO = 286, PLUS_EQ = 287, MINUS_EQ = 288, MULT_EQ = 289,
  DIV_EQ = 290, MODULO_EQ = 291, L_SHIFT_EQ = 292, R_SHIFT_EQ = 293,
  R_USHIFT_EQ = 294, RE_MATCH = 295, RE_NOMATCH = 296, ARROW = 297,
  IDENT = 298, STRING1 = 299, STRING2 = 300, INTEGER = 301,
  NOT = 302, UMINUS = 303, BIT_NOT = 304, IF = 258,
  ELSE = 259, EQ = 260, NEQ = 261, SUPEQ = 262,
  INFEQ = 263, OR = 264, AND = 265, MATCH = 266,
  NOMATCH = 267, REP = 268, FOR = 269, REPEAT = 270,
  UNTIL = 271, FOREACH = 272, WHILE = 273, BREAK = 274,
  CONTINUE = 275, FUNCTION = 276, RETURN = 277, INCLUDE = 278,
  LOCAL = 279, GLOBAL = 280, PLUS_PLUS = 281, MINUS_MINUS = 282,
  L_SHIFT = 283, R_SHIFT = 284, R_USHIFT = 285, EXPO = 286,
  PLUS_EQ = 287, MINUS_EQ = 288, MULT_EQ = 289, DIV_EQ = 290,
  MODULO_EQ = 291, L_SHIFT_EQ = 292, R_SHIFT_EQ = 293, R_USHIFT_EQ = 294,
  RE_MATCH = 295, RE_NOMATCH = 296, ARROW = 297, IDENT = 298,
  STRING1 = 299, STRING2 = 300, INTEGER = 301, NOT = 302,
  UMINUS = 303, BIT_NOT = 304
}
 
enum  lex_state {
  ST_START = 0, ST_SPACE, ST_IDENT, ST_ZERO,
  ST_ZEROX, ST_OCT, ST_DEC, ST_HEX,
  ST_COMMENT, ST_SUP, ST_INF, ST_SUP_EXCL,
  ST_STRING1, ST_STRING1_ESC, ST_STRING2, ST_PLUS,
  ST_MINUS, ST_MULT, ST_DIV, ST_MODULO,
  ST_R_SHIFT, ST_R_USHIFT, ST_L_SHIFT, ST_NOT,
  ST_EQ, ST_AND, ST_OR
}
 

Functions

static void naslerror (naslctxt *, const char *)
 
int naslparse (naslctxt *parm)
 
static int nasllex (YYSTYPE *lvalp, void *parm)
 
void * malloc (YYSIZE_T)
 
void free (void *)
 
static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep, naslctxt *parm)
 
static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep, naslctxt *parm)
 
static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
 
static void yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, naslctxt *parm)
 
static YYSIZE_T yystrlen (const char *yystr)
 
static char * yystpcpy (char *yydest, const char *yysrc)
 
static YYSIZE_T yytnamerr (char *yyres, const char *yystr)
 
static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken)
 
static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, naslctxt *parm)
 
int yyparse (naslctxt *parm)
 
int add_nasl_inc_dir (const char *dir)
 Adds the given string as directory for searching for includes. More...
 
static void load_checksums (kb_t kb)
 
static char * file_checksum (const char *filename, int algorithm)
 Get the checksum of a file. More...
 
int init_nasl_ctx (naslctxt *pc, const char *name)
 Initialize a NASL context for a NASL file. More...
 
void nasl_clean_ctx (naslctxt *c)
 
void nasl_clean_inc (void)
 
static int mylex (YYSTYPE *lvalp, void *parm)
 

Variables

static char * parse_buffer = NULL
 
static int parse_len = 0
 
GHashTable * includes_hash = NULL
 
int nasldebug
 
static const yytype_uint8 yytranslate []
 
static const yytype_uint16 yyrline []
 
static const char *const yytname []
 
static const yytype_int16 yypact []
 
static const yytype_uint8 yydefact []
 
static const yytype_int16 yypgoto []
 
static const yytype_int16 yydefgoto []
 
static const yytype_int16 yytable []
 
static const yytype_int16 yycheck []
 
static const yytype_uint8 yystos []
 
static const yytype_uint8 yyr1 []
 
static const yytype_uint8 yyr2 []
 
int yydebug
 
static GSList * inc_dirs = NULL
 
static int checksum_algorithm = GCRY_MD_NONE
 

Macro Definition Documentation

◆ _Noreturn

#define _Noreturn   YY_ATTRIBUTE ((__noreturn__))

◆ G_LOG_DOMAIN

#define G_LOG_DOMAIN   "lib nasl"

GLib logging domain.

◆ LNB

#define LNB   (((naslctxt*)parm)->line_nb)

◆ YY_

#define YY_ (   Msgid)    Msgid

◆ YY_ATTRIBUTE

#define YY_ATTRIBUTE (   Spec)    /* empty */

◆ YY_ATTRIBUTE_PURE

#define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))

◆ YY_ATTRIBUTE_UNUSED

#define YY_ATTRIBUTE_UNUSED   YY_ATTRIBUTE ((__unused__))

◆ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

◆ YY_IGNORE_MAYBE_UNINITIALIZED_END

#define YY_IGNORE_MAYBE_UNINITIALIZED_END

◆ YY_INITIAL_VALUE

#define YY_INITIAL_VALUE (   Value)    Value

◆ YY_LOCATION_PRINT

#define YY_LOCATION_PRINT (   File,
  Loc 
)    ((void) 0)

◆ YY_NASL_NASL_GRAMMAR_TAB_H_INCLUDED

#define YY_NASL_NASL_GRAMMAR_TAB_H_INCLUDED

◆ YY_NULLPTR

#define YY_NULLPTR   0

◆ YY_REDUCE_PRINT

#define YY_REDUCE_PRINT (   Rule)
Value:
do { \
if (yydebug) \
yy_reduce_print (yyssp, yyvsp, Rule, parm); \
} while (0)
#define yydebug
Definition: nasl_grammar.tab.c:66

◆ YY_STACK_PRINT

#define YY_STACK_PRINT (   Bottom,
  Top 
)
Value:
do { \
if (yydebug) \
yy_stack_print ((Bottom), (Top)); \
} while (0)
#define yydebug
Definition: nasl_grammar.tab.c:66

◆ YY_SYMBOL_PRINT

#define YY_SYMBOL_PRINT (   Title,
  Type,
  Value,
  Location 
)
Value:
do { \
if (yydebug) \
{ \
YYFPRINTF (stderr, "%s ", Title); \
yy_symbol_print (stderr, \
Type, Value, parm); \
YYFPRINTF (stderr, "\n"); \
} \
} while (0)
#define yydebug
Definition: nasl_grammar.tab.c:66

◆ YYABORT

#define YYABORT   goto yyabortlab

◆ YYACCEPT

#define YYACCEPT   goto yyacceptlab

◆ YYBACKUP

#define YYBACKUP (   Token,
  Value 
)
Value:
do \
if (yychar == YYEMPTY) \
{ \
yychar = (Token); \
yylval = (Value); \
YYPOPSTACK (yylen); \
yystate = *yyssp; \
goto yybackup; \
} \
else \
{ \
yyerror (parm, YY_("syntax error: cannot back up")); \
YYERROR; \
} \
while (0)
#define YY_(Msgid)
Definition: nasl_grammar.tab.c:299
#define YYEMPTY
Definition: nasl_grammar.tab.c:980

◆ YYBISON

#define YYBISON   1

◆ YYBISON_VERSION

#define YYBISON_VERSION   "3.0.5"

◆ YYCASE_

#define YYCASE_ (   N,
 
)
Value:
case N: \
yyformat = S; \
break

◆ yyclearin

#define yyclearin   (yychar = YYEMPTY)

◆ YYCOPY

#define YYCOPY (   Dst,
  Src,
  Count 
)
Value:
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
while (0)

◆ YYCOPY_NEEDED

#define YYCOPY_NEEDED   1

◆ yydebug

#define yydebug   nasldebug

◆ YYDEBUG

#define YYDEBUG   1

◆ YYDPRINTF

#define YYDPRINTF (   Args)
Value:
do { \
if (yydebug) \
YYFPRINTF Args; \
} while (0)
#define yydebug
Definition: nasl_grammar.tab.c:66

◆ YYEMPTY

#define YYEMPTY   (-2)

◆ YYEOF

#define YYEOF   0

◆ YYERRCODE

#define YYERRCODE   256

◆ yyerrok

#define yyerrok   (yyerrstatus = 0)

◆ yyerror

#define yyerror   naslerror

◆ YYERROR

#define YYERROR   goto yyerrorlab

◆ YYERROR_VERBOSE [1/2]

#define YYERROR_VERBOSE

◆ YYERROR_VERBOSE [2/2]

#define YYERROR_VERBOSE   1

◆ YYFINAL

#define YYFINAL   78

◆ YYFPRINTF

#define YYFPRINTF   fprintf

◆ YYFREE

#define YYFREE   free

◆ YYINITDEPTH

#define YYINITDEPTH   200

◆ YYLAST

#define YYLAST   1029

◆ yylex

#define yylex   nasllex

◆ YYLEX_PARAM

#define YYLEX_PARAM   parm

◆ YYMALLOC

#define YYMALLOC   malloc

◆ YYMAXDEPTH

#define YYMAXDEPTH   10000

◆ YYMAXUTOK

#define YYMAXUTOK   304

◆ yynerrs

#define yynerrs   naslnerrs

◆ YYNNTS

#define YYNNTS   43

◆ YYNRULES

#define YYNRULES   126

◆ YYNSTATES

#define YYNSTATES   227

◆ YYNTOKENS

#define YYNTOKENS   73

◆ YYPACT_NINF

#define YYPACT_NINF   -91

◆ yypact_value_is_default

#define yypact_value_is_default (   Yystate)    (!!((Yystate) == (-91)))

◆ yyparse

#define yyparse   naslparse

◆ YYPARSE_PARAM

#define YYPARSE_PARAM   parm

◆ YYPOPSTACK

#define YYPOPSTACK (   N)    (yyvsp -= (N), yyssp -= (N))

◆ YYPULL

#define YYPULL   1

◆ YYPURE

#define YYPURE   1

◆ YYPUSH

#define YYPUSH   0

◆ YYRECOVERING

#define YYRECOVERING ( )    (!!yyerrstatus)

◆ YYSIZE_MAXIMUM

#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)

◆ YYSIZE_T

#define YYSIZE_T   size_t

◆ YYSKELETON_NAME

#define YYSKELETON_NAME   "yacc.c"

◆ YYSTACK_ALLOC

#define YYSTACK_ALLOC   YYMALLOC

◆ YYSTACK_ALLOC_MAXIMUM

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

◆ YYSTACK_BYTES

#define YYSTACK_BYTES (   N)
Value:
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
short int yytype_int16
Definition: nasl_grammar.tab.c:273
union YYSTYPE YYSTYPE
Definition: nasl_grammar.tab.c:230
#define YYSTACK_GAP_MAXIMUM
Definition: nasl_grammar.tab.c:437

◆ YYSTACK_FREE

#define YYSTACK_FREE   YYFREE

◆ YYSTACK_GAP_MAXIMUM

#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)

◆ YYSTACK_RELOCATE

#define YYSTACK_RELOCATE (   Stack_alloc,
  Stack 
)
Value:
do \
{ \
YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
while (0)
#define YYSTACK_GAP_MAXIMUM
Definition: nasl_grammar.tab.c:437

◆ YYSTYPE_IS_DECLARED

#define YYSTYPE_IS_DECLARED   1

◆ YYSTYPE_IS_TRIVIAL

#define YYSTYPE_IS_TRIVIAL   1

◆ YYSYNTAX_ERROR

#define YYSYNTAX_ERROR
Value:
yysyntax_error (&yymsg_alloc, &yymsg, \
yyssp, yytoken)
static int yysyntax_error(YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken)
Definition: nasl_grammar.tab.c:1256

◆ YYTABLE_NINF

#define YYTABLE_NINF   -69

◆ yytable_value_is_error

#define yytable_value_is_error (   Yytable_value)    (!!((Yytable_value) == (-69)))

◆ YYTERROR

#define YYTERROR   1

◆ YYTOKENTYPE

#define YYTOKENTYPE

◆ YYTRANSLATE

#define YYTRANSLATE (   YYX)    ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

◆ YYUNDEFTOK

#define YYUNDEFTOK   2

◆ YYUSE

#define YYUSE (   E)    ((void) (E))

Typedef Documentation

◆ YYSTYPE

typedef union YYSTYPE YYSTYPE

◆ yytype_int16

typedef short int yytype_int16

◆ yytype_int8

typedef signed char yytype_int8

◆ yytype_uint16

typedef unsigned short int yytype_uint16

◆ yytype_uint8

typedef unsigned char yytype_uint8

Enumeration Type Documentation

◆ lex_state

enum lex_state
Enumerator
ST_START 
ST_SPACE 
ST_IDENT 
ST_ZERO 
ST_ZEROX 
ST_OCT 
ST_DEC 
ST_HEX 
ST_COMMENT 
ST_SUP 
ST_INF 
ST_SUP_EXCL 
ST_STRING1 
ST_STRING1_ESC 
ST_STRING2 
ST_PLUS 
ST_MINUS 
ST_MULT 
ST_DIV 
ST_MODULO 
ST_R_SHIFT 
ST_R_USHIFT 
ST_L_SHIFT 
ST_NOT 
ST_EQ 
ST_AND 
ST_OR 

◆ yytokentype

Enumerator
IF 
ELSE 
EQ 
NEQ 
SUPEQ 
INFEQ 
OR 
AND 
MATCH 
NOMATCH 
REP 
FOR 
REPEAT 
UNTIL 
FOREACH 
WHILE 
BREAK 
CONTINUE 
FUNCTION 
RETURN 
INCLUDE 
LOCAL 
GLOBAL 
PLUS_PLUS 
MINUS_MINUS 
L_SHIFT 
R_SHIFT 
R_USHIFT 
EXPO 
PLUS_EQ 
MINUS_EQ 
MULT_EQ 
DIV_EQ 
MODULO_EQ 
L_SHIFT_EQ 
R_SHIFT_EQ 
R_USHIFT_EQ 
RE_MATCH 
RE_NOMATCH 
ARROW 
IDENT 
STRING1 
STRING2 
INTEGER 
NOT 
UMINUS 
BIT_NOT 
IF 
ELSE 
EQ 
NEQ 
SUPEQ 
INFEQ 
OR 
AND 
MATCH 
NOMATCH 
REP 
FOR 
REPEAT 
UNTIL 
FOREACH 
WHILE 
BREAK 
CONTINUE 
FUNCTION 
RETURN 
INCLUDE 
LOCAL 
GLOBAL 
PLUS_PLUS 
MINUS_MINUS 
L_SHIFT 
R_SHIFT 
R_USHIFT 
EXPO 
PLUS_EQ 
MINUS_EQ 
MULT_EQ 
DIV_EQ 
MODULO_EQ 
L_SHIFT_EQ 
R_SHIFT_EQ 
R_USHIFT_EQ 
RE_MATCH 
RE_NOMATCH 
ARROW 
IDENT 
STRING1 
STRING2 
INTEGER 
NOT 
UMINUS 
BIT_NOT 

Function Documentation

◆ add_nasl_inc_dir()

int add_nasl_inc_dir ( const char *  dir)

Adds the given string as directory for searching for includes.

Parameters
dirA directory path. This function will add a copy of this parameter to the list of include folders. This means the parameter can be freed elsewhere without affecting the list.
Returns
0 in case of success. -1 if the stat on the given directory path was unsuccessful. -2 if the given directory path was not a directory.

◆ file_checksum()

static char* file_checksum ( const char *  filename,
int  algorithm 
)
static

Get the checksum of a file.

Parameters
[in]filenamePath to file.
[in]algorithmLibgcrypt hash algorithm to use for generating the checksum.
Returns
checksum string, NULL otherwise.

◆ free()

void free ( void *  )

◆ init_nasl_ctx()

int init_nasl_ctx ( naslctxt pc,
const char *  name 
)

Initialize a NASL context for a NASL file.

Parameters
pcThe NASL context handler.
nameThe filename of the NASL script.
Returns
0 in case of success. Then, file content is set in pc->buffer. -1 if either the filename was not found/accessible or the signature verification failed (provided signature checking is enabled. In any case, various elements of pc are modified (initialized);

◆ load_checksums()

static void load_checksums ( kb_t  kb)
static

◆ malloc()

void* malloc ( YYSIZE_T  )

◆ mylex()

static int mylex ( YYSTYPE lvalp,
void *  parm 
)
static

◆ nasl_clean_ctx()

void nasl_clean_ctx ( naslctxt c)

◆ nasl_clean_inc()

void nasl_clean_inc ( void  )

◆ naslerror()

static void naslerror ( naslctxt parm,
const char *  s 
)
static

◆ nasllex()

static int nasllex ( YYSTYPE lvalp,
void *  parm 
)
static

◆ naslparse()

int naslparse ( naslctxt parm)

◆ yy_reduce_print()

static void yy_reduce_print ( yytype_int16 yyssp,
YYSTYPE yyvsp,
int  yyrule,
naslctxt parm 
)
static

◆ yy_stack_print()

static void yy_stack_print ( yytype_int16 yybottom,
yytype_int16 yytop 
)
static

◆ yy_symbol_print()

static void yy_symbol_print ( FILE *  yyoutput,
int  yytype,
YYSTYPE const *const  yyvaluep,
naslctxt parm 
)
static

◆ yy_symbol_value_print()

static void yy_symbol_value_print ( FILE *  yyoutput,
int  yytype,
YYSTYPE const *const  yyvaluep,
naslctxt parm 
)
static

◆ yydestruct()

static void yydestruct ( const char *  yymsg,
int  yytype,
YYSTYPE yyvaluep,
naslctxt parm 
)
static

◆ yyparse()

int yyparse ( naslctxt parm)

◆ yystpcpy()

static char* yystpcpy ( char *  yydest,
const char *  yysrc 
)
static

◆ yystrlen()

static YYSIZE_T yystrlen ( const char *  yystr)
static

◆ yysyntax_error()

static int yysyntax_error ( YYSIZE_T yymsg_alloc,
char **  yymsg,
yytype_int16 yyssp,
int  yytoken 
)
static

◆ yytnamerr()

static YYSIZE_T yytnamerr ( char *  yyres,
const char *  yystr 
)
static

Variable Documentation

◆ checksum_algorithm

int checksum_algorithm = GCRY_MD_NONE
static

◆ inc_dirs

GSList* inc_dirs = NULL
static

◆ includes_hash

GHashTable* includes_hash = NULL

◆ nasldebug

int nasldebug

◆ parse_buffer

char* parse_buffer = NULL
static

◆ parse_len

int parse_len = 0
static

◆ yycheck

const yytype_int16 yycheck[]
static

◆ yydebug

int yydebug

◆ yydefact

const yytype_uint8 yydefact[]
static
Initial value:
=
{
30, 0, 70, 0, 30, 0, 0, 28, 29, 0,
32, 0, 8, 8, 0, 0, 69, 30, 0, 2,
3, 6, 17, 5, 0, 24, 18, 19, 35, 36,
37, 38, 22, 25, 23, 20, 0, 67, 68, 21,
26, 27, 0, 46, 0, 0, 0, 0, 118, 117,
116, 0, 0, 0, 0, 0, 122, 107, 123, 121,
95, 31, 110, 109, 106, 120, 108, 0, 125, 9,
10, 126, 73, 67, 74, 13, 0, 14, 1, 4,
16, 0, 75, 76, 0, 0, 0, 0, 0, 0,
0, 0, 0, 53, 0, 0, 0, 45, 43, 44,
0, 0, 0, 8, 0, 83, 0, 118, 117, 116,
0, 0, 112, 119, 114, 79, 84, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 48, 49, 0, 0, 12, 15, 47, 59, 60,
61, 62, 63, 66, 64, 65, 58, 0, 52, 54,
123, 56, 0, 72, 30, 0, 0, 0, 30, 0,
0, 77, 0, 111, 0, 102, 103, 104, 105, 80,
78, 96, 97, 94, 92, 93, 86, 98, 99, 100,
101, 91, 90, 89, 81, 82, 85, 87, 88, 50,
11, 51, 0, 0, 71, 33, 0, 41, 30, 40,
0, 0, 115, 113, 55, 57, 30, 46, 42, 7,
0, 34, 0, 0, 30, 124, 39
}

◆ yydefgoto

const yytype_int16 yydefgoto[]
static
Initial value:
=
{
-1, 18, 19, 20, 21, 68, 69, 22, 76, 23,
24, 25, 26, 27, 28, 29, 30, 31, 96, 32,
110, 33, 56, 157, 158, 159, 57, 36, 58, 59,
162, 60, 161, 62, 111, 112, 63, 114, 64, 65,
66, 40, 41
}

◆ yypact

const yytype_int16 yypact[]
static
Initial value:
=
{
464, -53, -91, -50, 491, -6, -42, -91, -91, -6,
499, -40, -6, -6, -6, -6, -91, 259, 25, -91,
91, -91, -91, -91, -39, -91, -91, -91, -91, -91,
-91, -91, -91, -91, 23, -91, 553, -13, -91, -91,
-91, -91, 499, 26, 29, -30, 499, -21, -91, -91,
-18, 499, 499, 13, 499, 499, -91, -91, 961, 611,
-91, 798, -91, -91, -91, -91, -91, 19, -91, -91,
-12, -91, -91, -26, -91, -91, -9, 123, -91, -91,
-91, 499, -91, -91, 499, 499, 499, 499, 499, 499,
499, 499, 499, 499, 499, 566, -4, -91, -91, -91,
499, 499, 624, -6, 14, 37, 682, 39, 40, -91,
42, 7, 22, -91, -91, 37, 37, 499, 499, 499,
499, 499, 499, 499, 499, 499, 499, 499, 499, 19,
19, 499, 499, 499, 499, 499, 499, 499, 499, 499,
499, -91, -91, 28, -6, -91, -91, 798, 798, 798,
798, 798, 798, 798, 798, 798, 798, 35, -91, 33,
945, 798, 17, 798, 491, 499, 347, 740, 491, 36,
16, -91, 34, -91, 13, 882, 882, 882, 882, 851,
913, 882, 882, 398, 398, 398, 37, -91, -91, 882,
882, 354, 337, 415, 15, 15, 37, 37, 37, -91,
-91, -91, 499, 499, -91, 83, 409, -91, 491, -91,
27, 53, -91, -91, -91, 798, 491, 26, -91, -91,
47, -91, 38, 56, 491, -91, -91
}

◆ yypgoto

const yytype_int16 yypgoto[]
static
Initial value:
=
{
-91, -91, 101, -91, -91, -11, -20, -87, 48, 12,
-91, -91, -91, -91, -91, -91, -91, -91, -90, -91,
-64, -91, 6, -91, -74, -91, 24, 60, 0, 18,
-91, 30, 209, -91, -45, -91, -52, -41, -91, -91,
-91, -91, -91
}

◆ yyr1

const yytype_uint8 yyr1[]
static
Initial value:
=
{
0, 73, 74, 75, 75, 76, 76, 77, 78, 78,
79, 79, 80, 80, 81, 81, 82, 82, 82, 82,
83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
83, 84, 84, 85, 85, 86, 86, 86, 86, 87,
88, 89, 90, 91, 91, 91, 91, 92, 93, 93,
94, 95, 96, 96, 97, 97, 98, 98, 99, 99,
99, 99, 99, 99, 99, 99, 99, 100, 100, 101,
101, 102, 103, 104, 104, 104, 104, 105, 105, 105,
105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
105, 106, 107, 107, 108, 108, 109, 109, 109, 110,
111, 111, 111, 112, 113, 114, 115
}

◆ yyr2

const yytype_uint8 yyr2[]
static
Initial value:
=
{
0, 2, 1, 1, 2, 1, 1, 6, 0, 1,
1, 3, 3, 2, 1, 2, 2, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
0, 2, 1, 5, 7, 1, 1, 1, 1, 9,
5, 5, 6, 1, 1, 1, 0, 3, 1, 1,
4, 4, 1, 0, 1, 3, 1, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 1, 1, 1,
1, 4, 1, 2, 2, 2, 2, 3, 3, 2,
3, 3, 3, 2, 2, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 1, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 1, 1, 1, 1,
1, 3, 1, 3, 1, 3, 1, 1, 1, 1,
1, 1, 1, 1, 7, 2, 2
}

◆ yyrline

const yytype_uint16 yyrline[]
static
Initial value:
=
{
0, 156, 156, 161, 168, 176, 176, 179, 190, 190,
191, 198, 208, 208, 209, 210, 225, 225, 225, 225,
228, 228, 228, 229, 229, 229, 229, 229, 230, 235,
240, 243, 250, 258, 265, 274, 274, 274, 274, 275,
286, 294, 303, 314, 314, 314, 314, 317, 326, 326,
329, 379, 388, 388, 389, 389, 395, 402, 412, 416,
417, 418, 419, 420, 421, 422, 423, 426, 431, 433,
433, 435, 444, 447, 448, 449, 450, 454, 455, 456,
457, 458, 459, 460, 461, 462, 463, 464, 465, 466,
467, 468, 469, 470, 471, 472, 473, 474, 475, 476,
477, 478, 479, 480, 481, 482, 483, 483, 483, 483,
483, 486, 488, 489, 493, 496, 502, 503, 507, 512,
514, 521, 521, 523, 525, 536, 545
}

◆ yystos

const yytype_uint8 yystos[]
static
Initial value:
=
{
0, 3, 13, 14, 15, 17, 18, 19, 20, 21,
22, 23, 24, 25, 26, 27, 43, 64, 74, 75,
76, 77, 80, 82, 83, 84, 85, 86, 87, 88,
89, 90, 92, 94, 95, 99, 100, 101, 102, 104,
114, 115, 61, 61, 82, 101, 61, 101, 44, 45,
46, 54, 61, 68, 70, 71, 95, 99, 101, 102,
104, 105, 106, 109, 111, 112, 113, 61, 78, 79,
101, 78, 100, 101, 100, 65, 81, 82, 0, 75,
66, 13, 26, 27, 32, 33, 34, 35, 36, 37,
38, 39, 47, 61, 68, 105, 91, 95, 99, 104,
16, 61, 105, 61, 72, 105, 105, 44, 45, 46,
93, 107, 108, 109, 110, 105, 105, 5, 6, 7,
8, 9, 10, 11, 12, 28, 29, 30, 31, 40,
41, 48, 49, 50, 51, 52, 53, 54, 55, 56,
57, 44, 45, 93, 63, 65, 81, 105, 105, 105,
105, 105, 105, 105, 105, 105, 105, 96, 97, 98,
101, 105, 103, 105, 62, 66, 105, 105, 62, 78,
46, 62, 42, 69, 63, 105, 105, 105, 105, 105,
105, 105, 105, 105, 105, 105, 105, 93, 93, 105,
105, 105, 105, 105, 105, 105, 105, 105, 105, 62,
79, 62, 63, 67, 69, 82, 105, 66, 62, 82,
62, 72, 110, 107, 97, 105, 4, 66, 82, 80,
46, 82, 91, 72, 62, 46, 82
}

◆ yytable

const yytype_int16 yytable[]
static

◆ yytname

const char* const yytname[]
static
Initial value:
=
{
"$end", "error", "$undefined", "IF", "ELSE", "EQ", "NEQ", "SUPEQ",
"INFEQ", "OR", "AND", "MATCH", "NOMATCH", "REP", "FOR", "REPEAT",
"UNTIL", "FOREACH", "WHILE", "BREAK", "CONTINUE", "FUNCTION", "RETURN",
"INCLUDE", "LOCAL", "GLOBAL", "PLUS_PLUS", "MINUS_MINUS", "L_SHIFT",
"R_SHIFT", "R_USHIFT", "EXPO", "PLUS_EQ", "MINUS_EQ", "MULT_EQ",
"DIV_EQ", "MODULO_EQ", "L_SHIFT_EQ", "R_SHIFT_EQ", "R_USHIFT_EQ",
"RE_MATCH", "RE_NOMATCH", "ARROW", "IDENT", "STRING1", "STRING2",
"INTEGER", "'='", "'<'", "'>'", "'|'", "'^'", "'&'", "'+'", "'-'", "'*'",
"'/'", "'%'", "NOT", "UMINUS", "BIT_NOT", "'('", "')'", "','", "'{'",
"'}'", "';'", "':'", "'['", "']'", "'!'", "'~'", "'.'", "$accept",
"tiptop", "instr_decl_list", "instr_decl", "func_decl", "arg_decl",
"arg_decl_1", "block", "instr_list", "instr", "simple_instr", "ret",
"if_block", "loop", "for_loop", "while_loop", "repeat_loop",
"foreach_loop", "aff_func", "rep", "string", "inc", "func_call",
"arg_list", "arg_list_1", "arg", "aff", "lvalue", "identifier",
"array_elem", "array_index", "post_pre_incr", "expr", "const_array",
"list_array_data", "array_data", "atom", "simple_array_data", "var",
"var_name", "ipaddr", "loc", "glob", YY_NULLPTR
}
#define YY_NULLPTR
Definition: nasl_grammar.tab.c:133

◆ yytranslate

const yytype_uint8 yytranslate[]
static