OpenVAS Libraries  8.0.7
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 "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 <stdio.h>
#include <stdlib.h>
#include "openvas_logging.h"
#include "openvas_file.h"
#include <gcrypt.h>

Data Structures

union  YYSTYPE
 
struct  YYSTYPE::asciiz
 
union  yyalloc
 

Macros

#define YYBISON   1
 
#define YYBISON_VERSION   "2.7"
 
#define YYSKELETON_NAME   "yacc.c"
 
#define YYPURE   1
 
#define YYPUSH   0
 
#define YYPULL   1
 
#define yyparse   naslparse
 
#define yylex   nasllex
 
#define yyerror   naslerror
 
#define yylval   nasllval
 
#define yychar   naslchar
 
#define yydebug   nasldebug
 
#define yynerrs   naslnerrs
 
#define YYPARSE_PARAM   parm
 
#define YYLEX_PARAM   parm
 
#define LNB   (((naslctxt*)parm)->line_nb)
 
#define YYERROR_VERBOSE
 
#define YY_NULL   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   YYSTYPE /* obsolescent; will be withdrawn */
 
#define YYSTYPE_IS_DECLARED   1
 
#define YYSIZE_T   unsigned int
 
#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)
 
#define YY_(Msgid)   Msgid
 
#define YYUSE(E)   ((void) (E))
 
#define YYID(N)   (N)
 
#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 YYTABLE_NINF   -69
 
#define yypact_value_is_default(Yystate)   (!!((Yystate) == (-91)))
 
#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 YYFAIL   goto yyerrlab
 
#define YYRECOVERING()   (!!yyerrstatus)
 
#define YYBACKUP(Token, Value)
 
#define YYTERROR   1
 
#define YYERRCODE   256
 
#define YY_LOCATION_PRINT(File, Loc)   ((void) 0)
 
#define YYLEX   yylex (&yylval, YYLEX_PARAM)
 
#define YYFPRINTF   fprintf
 
#define YYDPRINTF(Args)
 
#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 YY_INITIAL_VALUE(Value)   = Value
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
 
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
 
#define YYSYNTAX_ERROR
 

Typedefs

typedef union YYSTYPE YYSTYPE
 
typedef unsigned char yytype_uint8
 
typedef short int 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, BIT_NOT = 303, UMINUS = 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,
  BIT_NOT = 303, UMINUS = 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

int naslparse ()
 
 YYUSE (yyo)
 
 YYUSE (parm)
 
 YYUSE (yyoutput)
 
 switch (yytype)
 
else YYFPRINTF (yyoutput,"nterm %s (", yytname[yytype])
 
 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parm)
 
 YYFPRINTF (yyoutput,")")
 
 for (;yybottom<=yytop;yybottom++)
 
 YYFPRINTF (stderr,"\n")
 
 YYFPRINTF (stderr,"Reducing stack by rule %d (line %lu):\n", yyrule-1, yylno)
 
 for (yyi=0;yyi< yynrhs;yyi++)
 
 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp)
 
YYSTYPE yylval YY_INITIAL_VALUE (yyval_default)
 
 YYDPRINTF ((stderr,"Starting parse\n"))
 
 if (yyss+yystacksize-1<=yyssp)
 
 YYDPRINTF ((stderr,"Entering state %d\n", yystate))
 
 if (yychar==YYEMPTY)
 
 if (yychar<=YYEOF)
 
 YY_SYMBOL_PRINT ("Next token is", yytoken,&yylval,&yylloc)
 
 if (yyn<=0)
 
 YY_SYMBOL_PRINT ("Shifting", yytoken,&yylval,&yylloc)
 
 YY_REDUCE_PRINT (yyn)
 
 switch (yyn)
 
 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn],&yyval,&yyloc)
 
 YYPOPSTACK (yylen)
 
 YY_STACK_PRINT (yyss, yyssp)
 
 if (!yyerrstatus)
 
 if (yyerrstatus==3)
 
 for (;;)
 
YY_IGNORE_MAYBE_UNINITIALIZED_END YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp)
 
yyexhaustedlab YY_ ("memory exhausted"))
 
 yydestruct ("Cleanup: discarding lookahead", yytoken,&yylval, parm)
 
 while (yyssp!=yyss)
 
 YYSTACK_FREE (yyss)
 
 YYSTACK_FREE (yymsg)
 
return YYID (yyresult)
 
int add_nasl_inc_dir (const char *dir)
 Adds the given string as directory for searching for includes. 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)
 
 while ((c=getc(fp))!=EOF)
 
 switch (st)
 

Variables

int nasldebug
 
int yytype
 
YYSTYPE const *const yyvaluep
 
naslctxtparm
 
 return
 
yytype_int16yytop
 
int yyrule
 
int yyi
 
unsigned long int yylno = yyrline[yyrule]
 
int yydebug
 
 continue
 
return yylen = 0
 
const char * yysrc
 
const char * yys = yysrc
 
return yyd
 
int void * YYPARSE_PARAM
 
int yynerrs = 0
 
int yystate = 0
 
int yyerrstatus = 0
 
yytype_int16 yyssa [YYINITDEPTH]
 
yytype_int16yyss
 
yytype_int16yyssp = yyss = yyssa
 
YYSTYPE yyvsa [YYINITDEPTH]
 
YYSTYPEyyvs
 
YYSIZE_T yystacksize = YYINITDEPTH
 
int yyn = yytoken
 
int yyresult = 2
 
int yytoken = 0
 
YYSTYPE yyval = yyvsp[1-yylen]
 
char yymsgbuf [128]
 
YYSIZE_T yymsg_alloc = sizeof yymsgbuf
 
 yychar = YYEMPTY
 
goto yysetstate
 
yynewstate __pad0__
 
yysetstate __pad1__
 
 YYACCEPT
 
goto yybackup
 
yybackup __pad2__
 
goto yydefault
 
 else
 
YY_IGNORE_MAYBE_UNINITIALIZED_END
goto 
yynewstate
 
yydefault __pad3__
 
goto yyerrlab
 
goto yyreduce
 
yyreduce __pad4__
 
yyerrlab __pad5__
 
goto yyerrlab1
 
yyerrorlab __pad6__
 
yyerrlab1 __pad7__
 
yyacceptlab __pad8__
 
goto yyreturn
 
yyabortlab __pad9__
 
yyexhaustedlab __pad10__
 
yyreturn __pad11__
 
naslctxtctx = parm
 
FILE * fp = ctx->fp
 
int c
 
int st = ST_START
 
int len = 0
 
int r
 
int x
 
int i
 
 p = ctx->buffer
 
exit_loop __pad12__
 

Macro Definition Documentation

#define LNB   (((naslctxt*)parm)->line_nb)
#define YY_ (   Msgid)    Msgid
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
#define YY_INITIAL_VALUE (   Value)    = Value
#define YY_LOCATION_PRINT (   File,
  Loc 
)    ((void) 0)
#define YY_NASL_NASL_GRAMMAR_TAB_H_INCLUDED
#define YY_NULL   0
#define YY_REDUCE_PRINT (   Rule)
Value:
do { \
yy_reduce_print (yyvsp, Rule, parm); \
} while (YYID (0))
#define yydebug
Definition: nasl_grammar.tab.c:68
if(arglst!=NULL)
Definition: arglists.c:219
naslctxt * parm
Definition: nasl_grammar.tab.c:1121
#define YYID(N)
Definition: nasl_grammar.tab.c:319
#define YY_STACK_PRINT (   Bottom,
  Top 
)
Value:
do { \
yy_stack_print ((Bottom), (Top)); \
} while (YYID (0))
#define yydebug
Definition: nasl_grammar.tab.c:68
if(arglst!=NULL)
Definition: arglists.c:219
#define YYID(N)
Definition: nasl_grammar.tab.c:319
#define YY_SYMBOL_PRINT (   Title,
  Type,
  Value,
  Location 
)
Value:
do { \
{ \
YYFPRINTF (stderr, "%s ", Title); \
yy_symbol_print (stderr, \
Type, Value, parm); \
YYFPRINTF (stderr, "\n"); \
} \
} while (YYID (0))
#define yydebug
Definition: nasl_grammar.tab.c:68
if(arglst!=NULL)
Definition: arglists.c:219
#define YYFPRINTF
Definition: nasl_grammar.tab.c:1085
naslctxt * parm
Definition: nasl_grammar.tab.c:1121
#define YYID(N)
Definition: nasl_grammar.tab.c:319
#define YYABORT   goto yyabortlab
#define YYACCEPT   goto yyacceptlab
#define YYBACKUP (   Token,
  Value 
)
Value:
{ \
yychar = (Token); \
yylval = (Value); \
goto yybackup; \
} \
{ \
yyerror (parm, YY_("syntax error: cannot back up")); \
} \
while (YYID (0))
#define YY_(Msgid)
Definition: nasl_grammar.tab.c:306
#define YYEMPTY
Definition: nasl_grammar.tab.c:1020
#define YYPOPSTACK(N)
Definition: nasl_grammar.tab.c:1640
#define yyerror
Definition: nasl_grammar.tab.c:65
yytype_int16 * yyssp
Definition: nasl_grammar.tab.c:1616
goto yybackup
Definition: nasl_grammar.tab.c:1735
int yystate
Definition: nasl_grammar.tab.c:1602
else
Definition: arglists.c:376
if(arglst!=NULL)
Definition: arglists.c:219
return yylen
Definition: nasl_grammar.tab.c:1287
while(args->next)
Definition: arglists.c:275
#define yylval
Definition: nasl_grammar.tab.c:66
naslctxt * parm
Definition: nasl_grammar.tab.c:1121
#define YYID(N)
Definition: nasl_grammar.tab.c:319
#define YYERROR
Definition: nasl_grammar.tab.c:1025
#define yychar
Definition: nasl_grammar.tab.c:67
#define YYBISON   1
#define YYBISON_VERSION   "2.7"
#define YYCASE_ (   N,
 
)
Value:
case N: \
yyformat = S; \
break
#define yychar   naslchar
#define yyclearin   (yychar = YYEMPTY)
#define YYCOPY (   Dst,
  Src,
  Count 
)
Value:
do \
{ \
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
while (YYID (0))
for(;yybottom<=yytop;yybottom++)
Definition: nasl_grammar.tab.c:1186
while(args->next)
Definition: arglists.c:275
#define YYID(N)
Definition: nasl_grammar.tab.c:319
#define YYSIZE_T
Definition: nasl_grammar.tab.c:292
int yyi
Definition: nasl_grammar.tab.c:1216
#define YYCOPY_NEEDED   1
#define yydebug   nasldebug
#define YYDEBUG   1
#define YYDPRINTF (   Args)
Value:
do { \
YYFPRINTF Args; \
} while (YYID (0))
#define yydebug
Definition: nasl_grammar.tab.c:68
if(arglst!=NULL)
Definition: arglists.c:219
#define YYFPRINTF
Definition: nasl_grammar.tab.c:1085
#define YYID(N)
Definition: nasl_grammar.tab.c:319
#define YYEMPTY   (-2)
#define YYEOF   0
#define YYERRCODE   256
#define yyerrok   (yyerrstatus = 0)
#define yyerror   naslerror
#define YYERROR   goto yyerrorlab
#define YYERROR_VERBOSE
#define YYERROR_VERBOSE   1
#define YYFAIL   goto yyerrlab
#define YYFINAL   78
#define YYFPRINTF   fprintf
#define YYFREE   free
#define YYID (   N)    (N)
#define YYINITDEPTH   200
#define YYLAST   1029
#define yylex   nasllex
#define YYLEX   yylex (&yylval, YYLEX_PARAM)
#define YYLEX_PARAM   parm
#define yylval   nasllval
#define YYMALLOC   malloc
#define YYMAXDEPTH   10000
#define YYMAXUTOK   304
#define yynerrs   naslnerrs
#define YYNNTS   43
#define YYNRULES   126
#define YYNSTATES   227
#define YYNTOKENS   73
#define YYPACT_NINF   -91
#define yypact_value_is_default (   Yystate)    (!!((Yystate) == (-91)))
#define yyparse   naslparse
#define YYPARSE_PARAM   parm
#define YYPOPSTACK (   N)    (yyvsp -= (N), yyssp -= (N))
#define YYPULL   1
#define YYPURE   1
#define YYPUSH   0
#define YYRECOVERING ( )    (!!yyerrstatus)
#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)
#define YYSIZE_T   unsigned int
#define YYSKELETON_NAME   "yacc.c"
#define YYSTACK_ALLOC   YYMALLOC
#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM
#define YYSTACK_BYTES (   N)
Value:
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
short int yytype_int16
Definition: nasl_grammar.tab.c:279
#define YYSTACK_GAP_MAXIMUM
Definition: nasl_grammar.tab.c:418
union YYSTYPE YYSTYPE
#define YYSTACK_FREE   YYFREE
#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)
#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 (YYID (0))
while(args->next)
Definition: arglists.c:275
YYSIZE_T yystacksize
Definition: nasl_grammar.tab.c:1623
#define YYID(N)
Definition: nasl_grammar.tab.c:319
#define YYSIZE_T
Definition: nasl_grammar.tab.c:292
#define YYSTACK_GAP_MAXIMUM
Definition: nasl_grammar.tab.c:418
#define YYCOPY(Dst, Src, Count)
Definition: nasl_grammar.tab.c:454
#define yystype   YYSTYPE /* obsolescent; will be withdrawn */
#define YYSTYPE_IS_DECLARED   1
#define YYSTYPE_IS_TRIVIAL   1
#define YYSYNTAX_ERROR
Value:
yysyntax_error (&yymsg_alloc, &yymsg, \
YYSIZE_T yymsg_alloc
Definition: nasl_grammar.tab.c:1637
yytype_int16 * yyssp
Definition: nasl_grammar.tab.c:1616
int yytoken
Definition: nasl_grammar.tab.c:1628
#define YYTABLE_NINF   -69
#define yytable_value_is_error (   Yytable_value)    (!!((Yytable_value) == (-69)))
#define YYTERROR   1
#define YYTOKENTYPE
#define YYTRANSLATE (   YYX)    ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
#define YYUNDEFTOK   2
#define YYUSE (   E)    ((void) (E))

Typedef Documentation

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

Enumeration Type Documentation

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 
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 
BIT_NOT 
UMINUS 
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 
BIT_NOT 
UMINUS 

Function Documentation

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.
for ( ;yybottom<=yytop;yybottom++  )
for ( )
for ( ;;  )
if ( yyss+yystacksize-1<=  yyssp)
if ( yychar  = YYEMPTY)
if ( yychar<=  YYEOF)
if ( yyn<=  0)
if ( yyerrstatus)
if ( yyerrstatus  = = 3)
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, pc->fp is set with the respective file descriptor -1 if either the filename was not found/accessable or the signature verification failed (provided signature checking is enabled. Also, the pc->fp is set to NULL. In any case, various elements of pc are modified (initialized);
void nasl_clean_ctx ( naslctxt c)
int naslparse ( )
switch ( yytype  )
switch ( yyn  )
switch ( st  )
while ( yyssp!  = yyss)
while ( (c=getc(fp))!  = EOF)
yyexhaustedlab YY_ ( "memory exhausted"  )
YYSTYPE yylval YY_INITIAL_VALUE ( yyval_default  )
YY_REDUCE_PRINT ( yyn  )
YY_STACK_PRINT ( yyss  ,
yyssp   
)
YY_SYMBOL_PRINT ( yymsg  ,
yytype  ,
yyvaluep  ,
yylocationp   
)
YY_SYMBOL_PRINT ( "Next token is"  ,
yytoken  ,
yylval,
yylloc 
)
YY_SYMBOL_PRINT ( "Shifting"  ,
yytoken  ,
yylval,
yylloc 
)
YY_SYMBOL_PRINT ( )
YY_IGNORE_MAYBE_UNINITIALIZED_END YY_SYMBOL_PRINT ( "Shifting"  ,
yystos  [yyn],
yyvsp  ,
yylsp   
)
yy_symbol_value_print ( yyoutput  ,
yytype  ,
yyvaluep  ,
parm   
)
yydestruct ( "Cleanup: discarding lookahead"  ,
yytoken  ,
yylval,
parm   
)
YYDPRINTF ( (stderr,"Starting parse\n")  )
YYDPRINTF ( (stderr,"Entering state %d\n", yystate)  )
else YYFPRINTF ( yyoutput  )
YYFPRINTF ( yyoutput  ,
 
)
YYFPRINTF ( stderr  ,
"\n"   
)
YYFPRINTF ( stderr  ,
"Reducing stack by rule %d (line %lu):\n ,
yyrule 1,
yylno   
)
return YYID ( yyresult  )
YYPOPSTACK ( yylen  )
YYSTACK_FREE ( yyss  )
YYSTACK_FREE ( yymsg  )
YYUSE ( yyo  )
YYUSE ( parm  )
Initial value:
{
YYSTYPE const *const yyvaluep
Definition: nasl_grammar.tab.c:1120
#define YYUSE(E)
Definition: nasl_grammar.tab.c:312
YYUSE ( yyoutput  )

Variable Documentation

yynewstate __pad0__
yyexhaustedlab __pad10__
yyreturn __pad11__
exit_loop __pad12__
yysetstate __pad1__
yybackup __pad2__
yydefault __pad3__
yyreduce __pad4__
yyerrlab __pad5__
yyerrorlab __pad6__
yyerrlab1 __pad7__
yyacceptlab __pad8__
yyabortlab __pad9__
int c
continue
Initial value:
{
return yylen
Definition: nasl_grammar.tab.c:1287
#define YYSIZE_T
Definition: nasl_grammar.tab.c:292
naslctxt* ctx = parm
else
Initial value:
{
#define YYTRANSLATE(YYX)
Definition: nasl_grammar.tab.c:484
int yytoken
Definition: nasl_grammar.tab.c:1628
#define yychar
Definition: nasl_grammar.tab.c:67
fp = ctx->fp
int i
len = 0
int nasldebug
p = ctx->buffer
void * parm
int r
return
int st = ST_START
int x
YYACCEPT
goto yybackup
yychar = YYEMPTY
return yyd
int yydebug
goto yydefault
goto yyerrlab
goto yyerrlab1
yyerrstatus = 0
int yyi
Initial value:
{
int yynrhs = yyr2[yyrule]
int yyrule
Definition: nasl_grammar.tab.c:1213
int yylen = 0
unsigned long int yylno = yyrline[yyrule]
YYSIZE_T yymsg_alloc = sizeof yymsgbuf
char yymsgbuf[128]
yyn = yytoken
yynerrs = 0
goto yynewstate
int void* YYPARSE_PARAM
goto yyreduce
yyresult = 2
goto yyreturn
int yyrule
const char* yys = yysrc
goto yysetstate
const char* yysrc
yytype_int16* yyss
yyssp = yyss = yyssa
yystacksize = YYINITDEPTH
else yystate = 0
int yytoken = 0
yytype_int16* yytop
int yytype
yyval = yyvsp[1-yylen]
YYSTYPE * yyvaluep
YYSTYPE* yyvs