OpenVAS Scanner  6.0.0~git
Functions | Variables
nasl_tree.c File Reference
#include "nasl_tree.h"
#include "exec.h"
#include "nasl_debug.h"
#include "nasl_func.h"
#include "nasl_global_ctxt.h"
#include "nasl_lex_ctxt.h"
#include "nasl_var.h"
#include <glib.h>
#include <regex.h>
#include <stdlib.h>
#include <string.h>

Functions

tree_cellalloc_tree_cell ()
 
tree_cellalloc_typed_cell (int typ)
 
tree_cellalloc_RE_cell (int lnb, int t, tree_cell *l, char *re_str)
 
tree_cellalloc_expr_cell (int lnb, int t, tree_cell *l, tree_cell *r)
 
tree_celldup_cell (const tree_cell *tc)
 
static void free_tree (tree_cell *c)
 
void ref_cell (tree_cell *c)
 
void deref_cell (tree_cell *c)
 
static void prefix (int n, int i)
 
char * dump_cell_val (const tree_cell *c)
 
static void dump_tree (const tree_cell *c, int n, int idx)
 
const char * nasl_type_name (int t)
 
void nasl_dump_tree (const tree_cell *c)
 
char * get_line_nb (const tree_cell *c)
 
int nasl_is_leaf (const tree_cell *pc)
 
int cell_type (const tree_cell *c)
 

Variables

static char * node_names []
 

Function Documentation

◆ alloc_expr_cell()

tree_cell* alloc_expr_cell ( int  lnb,
int  t,
tree_cell l,
tree_cell r 
)

◆ alloc_RE_cell()

tree_cell* alloc_RE_cell ( int  lnb,
int  t,
tree_cell l,
char *  re_str 
)

◆ alloc_tree_cell()

tree_cell* alloc_tree_cell ( void  )

◆ alloc_typed_cell()

tree_cell* alloc_typed_cell ( int  typ)

◆ cell_type()

int cell_type ( const tree_cell c)

◆ deref_cell()

void deref_cell ( tree_cell c)

◆ dump_cell_val()

char* dump_cell_val ( const tree_cell c)

◆ dump_tree()

static void dump_tree ( const tree_cell c,
int  n,
int  idx 
)
static

◆ dup_cell()

tree_cell* dup_cell ( const tree_cell tc)

◆ free_tree()

static void free_tree ( tree_cell c)
static

◆ get_line_nb()

char* get_line_nb ( const tree_cell c)

◆ nasl_dump_tree()

void nasl_dump_tree ( const tree_cell c)

◆ nasl_is_leaf()

int nasl_is_leaf ( const tree_cell pc)

◆ nasl_type_name()

const char* nasl_type_name ( int  t)

◆ prefix()

static void prefix ( int  n,
int  i 
)
static

◆ ref_cell()

void ref_cell ( tree_cell c)

Variable Documentation

◆ node_names

char* node_names[]
static
Initial value:
= {
"NODE_EMPTY", "NODE_IF_ELSE", "NODE_INSTR_L", "NODE_FOR",
"NODE_WHILE", "NODE_FOREACH", "NODE_REPEAT_UNTIL", "NODE_REPEATED",
"NODE_FUN_DEF", "NODE_FUN_CALL", "NODE_DECL", "NODE_ARG",
"NODE_RETURN", "NODE_BREAK", "NODE_CONTINUE",
"NODE_ARRAY_EL", "NODE_AFF", "NODE_VAR", "NODE_LOCAL",
"NODE_GLOBAL", "NODE_PLUS_EQ", "NODE_MINUS_EQ", "NODE_MULT_EQ",
"NODE_DIV_EQ", "NODE_MODULO_EQ",
"NODE_L_SHIFT_EQ", "NODE_R_SHIFT_EQ", "NODE_R_USHIFT_EQ", "EXPR_AND",
"EXPR_OR", "EXPR_NOT",
"EXPR_PLUS", "EXPR_MINUS", "EXPR_U_MINUS", "EXPR_MULT",
"EXPR_DIV", "EXPR_MODULO", "EXPR_EXPO",
"EXPR_BIT_AND", "EXPR_BIT_OR", "EXPR_BIT_XOR", "EXPR_BIT_NOT",
"EXPR_INCR", "EXPR_DECR", "EXPR_L_SHIFT", "EXPR_R_SHIFT",
"EXPR_R_USHIFT",
"COMP_MATCH", "COMP_NOMATCH", "COMP_RE_MATCH", "COMP_RE_NOMATCH",
"COMP_LT", "COMP_LE", "COMP_EQ", "COMP_NE",
"COMP_GT", "COMP_GE", "CONST_INT", "CONST_STR",
"CONST_DATA", "CONST_REGEX",
"ARRAY_ELEM",
"REF_VAR", "REF_ARRAY", "DYN_ARRAY"}