xine-lib 1.2.11
Macros | Functions | Variables
goomsl.c File Reference
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "goomsl.h"
#include "goomsl_private.h"
#include "goomsl_yacc.h"

Macros

#define INSTR_SETI_VAR_INTEGER   1
 
#define INSTR_SETI_VAR_VAR   2
 
#define INSTR_SETF_VAR_FLOAT   3
 
#define INSTR_SETF_VAR_VAR   4
 
#define INSTR_NOP   5
 
#define INSTR_SETP_VAR_PTR   7
 
#define INSTR_SETP_VAR_VAR   8
 
#define INSTR_SUBI_VAR_INTEGER   9
 
#define INSTR_SUBI_VAR_VAR   10
 
#define INSTR_SUBF_VAR_FLOAT   11
 
#define INSTR_SUBF_VAR_VAR   12
 
#define INSTR_ISLOWERF_VAR_VAR   13
 
#define INSTR_ISLOWERF_VAR_FLOAT   14
 
#define INSTR_ISLOWERI_VAR_VAR   15
 
#define INSTR_ISLOWERI_VAR_INTEGER   16
 
#define INSTR_ADDI_VAR_INTEGER   17
 
#define INSTR_ADDI_VAR_VAR   18
 
#define INSTR_ADDF_VAR_FLOAT   19
 
#define INSTR_ADDF_VAR_VAR   20
 
#define INSTR_MULI_VAR_INTEGER   21
 
#define INSTR_MULI_VAR_VAR   22
 
#define INSTR_MULF_VAR_FLOAT   23
 
#define INSTR_MULF_VAR_VAR   24
 
#define INSTR_DIVI_VAR_INTEGER   25
 
#define INSTR_DIVI_VAR_VAR   26
 
#define INSTR_DIVF_VAR_FLOAT   27
 
#define INSTR_DIVF_VAR_VAR   28
 
#define INSTR_ISEQUALP_VAR_VAR   30
 
#define INSTR_ISEQUALP_VAR_PTR   31
 
#define INSTR_ISEQUALI_VAR_VAR   32
 
#define INSTR_ISEQUALI_VAR_INTEGER   33
 
#define INSTR_ISEQUALF_VAR_VAR   34
 
#define INSTR_ISEQUALF_VAR_FLOAT   35
 
#define INSTR_NOT_VAR   39
 
#define INSTR_SETS_VAR_VAR   41
 
#define INSTR_ISEQUALS_VAR_VAR   42
 
#define INSTR_ADDS_VAR_VAR   43
 
#define INSTR_SUBS_VAR_VAR   44
 
#define INSTR_MULS_VAR_VAR   45
 
#define INSTR_DIVS_VAR_VAR   46
 
#define VALIDATE_ERROR   "error while validating "
 
#define VALIDATE_TODO   "todo"
 
#define VALIDATE_SYNTHAX_ERROR   "synthax error"
 
#define VALIDATE_NO_SUCH_INT   "no such integer variable"
 
#define VALIDATE_NO_SUCH_VAR   "no such variable"
 
#define VALIDATE_NO_SUCH_DEST_VAR   "no such destination variable"
 
#define VALIDATE_NO_SUCH_SRC_VAR   "no such src variable"
 
#define pSRC_VAR   instr[ip].data.usrc.var
 
#define SRC_VAR_INT   *instr[ip].data.usrc.var_int
 
#define SRC_VAR_FLOAT   *instr[ip].data.usrc.var_float
 
#define SRC_VAR_PTR   *instr[ip].data.usrc.var_ptr
 
#define pDEST_VAR   instr[ip].data.udest.var
 
#define DEST_VAR_INT   *instr[ip].data.udest.var_int
 
#define DEST_VAR_FLOAT   *instr[ip].data.udest.var_float
 
#define DEST_VAR_PTR   *instr[ip].data.udest.var_ptr
 
#define VALUE_INT   instr[ip].data.usrc.value_int
 
#define VALUE_FLOAT   instr[ip].data.usrc.value_float
 
#define VALUE_PTR   instr[ip].data.usrc.value_ptr
 
#define JUMP_OFFSET   instr[ip].data.udest.jump_offset
 
#define SRC_STRUCT_ID   instr[ip].data.usrc.var_int[-1]
 
#define DEST_STRUCT_ID   instr[ip].data.udest.var_int[-1]
 
#define SRC_STRUCT_IBLOCK(i)   gsl->gsl_struct[SRC_STRUCT_ID]->iBlock[i]
 
#define SRC_STRUCT_FBLOCK(i)   gsl->gsl_struct[SRC_STRUCT_ID]->fBlock[i]
 
#define DEST_STRUCT_IBLOCK(i)   gsl->gsl_struct[DEST_STRUCT_ID]->iBlock[i]
 
#define DEST_STRUCT_FBLOCK(i)   gsl->gsl_struct[DEST_STRUCT_ID]->fBlock[i]
 
#define DEST_STRUCT_IBLOCK_VAR(i, j)    ((int*)((char*)pDEST_VAR + gsl->gsl_struct[DEST_STRUCT_ID]->iBlock[i].data))[j]
 
#define DEST_STRUCT_FBLOCK_VAR(i, j)    ((float*)((char*)pDEST_VAR + gsl->gsl_struct[DEST_STRUCT_ID]->fBlock[i].data))[j]
 
#define SRC_STRUCT_IBLOCK_VAR(i, j)    ((int*)((char*)pSRC_VAR + gsl->gsl_struct[SRC_STRUCT_ID]->iBlock[i].data))[j]
 
#define SRC_STRUCT_FBLOCK_VAR(i, j)    ((float*)((char*)pSRC_VAR + gsl->gsl_struct[SRC_STRUCT_ID]->fBlock[i].data))[j]
 
#define DEST_STRUCT_SIZE   gsl->gsl_struct[DEST_STRUCT_ID]->size
 

Functions

static void gsl_instr_free (Instruction *_this)
 
static const char * gsl_instr_validate (Instruction *_this)
 
static void gsl_instr_display (Instruction *_this)
 
static InstructionFlowiflow_new (void)
 
static void iflow_add_instr (InstructionFlow *_this, Instruction *instr)
 
static void iflow_clean (InstructionFlow *_this)
 
static void iflow_free (InstructionFlow *_this)
 
static void iflow_execute (FastInstructionFlow *_this, GoomSL *gsl)
 
void gsl_instr_set_namespace (Instruction *_this, GoomHash *ns)
 
void gsl_instr_add_param (Instruction *instr, const char *param, int type)
 
Instructiongsl_instr_init (GoomSL *parent, const char *name, int id, int nb_param, int line_number)
 
static const char * validate_v_v (Instruction *_this)
 
static const char * validate_v_i (Instruction *_this)
 
static const char * validate_v_p (Instruction *_this)
 
static const char * validate_v_f (Instruction *_this)
 
static const char * validate (Instruction *_this, int vf_f_id, int vf_v_id, int vi_i_id, int vi_v_id, int vp_p_id, int vp_v_id, int vs_v_id)
 
int gsl_malloc (GoomSL *_this, int size)
 
void * gsl_get_ptr (GoomSL *_this, int id)
 
void gsl_free_ptr (GoomSL *_this, int id)
 
void gsl_enternamespace (const char *name)
 
void gsl_reenternamespace (GoomHash *nsinfo)
 
GoomHashgsl_leavenamespace (void)
 
GoomHashgsl_find_namespace (const char *name)
 
void gsl_declare_task (const char *name)
 
void gsl_declare_external_task (const char *name)
 
static void reset_scanner (GoomSL *gss)
 
static void calculate_labels (InstructionFlow *iflow)
 
static void gsl_create_fast_iflow (void)
 
void yy_scan_string (const char *str)
 
void yyparse (void)
 
GoomHashgsl_globals (GoomSL *_this)
 
static void ext_charAt (GoomSL *gsl, GoomHash *global, GoomHash *local)
 
static void ext_i2f (GoomSL *gsl, GoomHash *global, GoomHash *local)
 
static void ext_f2i (GoomSL *gsl, GoomHash *global, GoomHash *local)
 
void gsl_compile (GoomSL *_currentGoomSL, const char *script)
 
void gsl_execute (GoomSL *scanner)
 
GoomSLgsl_new (void)
 
void gsl_bind_function (GoomSL *gss, const char *fname, GoomSL_ExternalFunction func)
 
int gsl_is_compiled (GoomSL *gss)
 
void gsl_free (GoomSL *gss)
 
char * gsl_init_buffer (const char *fname)
 
static char * gsl_read_file (const char *fname)
 
void gsl_append_file_to_buffer (const char *fname, char **buffer)
 

Variables

static const char * VALIDATE_OK = "ok"
 
static int gsl_nb_import
 
static char gsl_already_imported [256][256]
 

Macro Definition Documentation

◆ DEST_STRUCT_FBLOCK

#define DEST_STRUCT_FBLOCK (   i)    gsl->gsl_struct[DEST_STRUCT_ID]->fBlock[i]

◆ DEST_STRUCT_FBLOCK_VAR

#define DEST_STRUCT_FBLOCK_VAR (   i,
 
)     ((float*)((char*)pDEST_VAR + gsl->gsl_struct[DEST_STRUCT_ID]->fBlock[i].data))[j]

◆ DEST_STRUCT_IBLOCK

#define DEST_STRUCT_IBLOCK (   i)    gsl->gsl_struct[DEST_STRUCT_ID]->iBlock[i]

◆ DEST_STRUCT_IBLOCK_VAR

#define DEST_STRUCT_IBLOCK_VAR (   i,
 
)     ((int*)((char*)pDEST_VAR + gsl->gsl_struct[DEST_STRUCT_ID]->iBlock[i].data))[j]

◆ DEST_STRUCT_ID

#define DEST_STRUCT_ID   instr[ip].data.udest.var_int[-1]

◆ DEST_STRUCT_SIZE

#define DEST_STRUCT_SIZE   gsl->gsl_struct[DEST_STRUCT_ID]->size

◆ DEST_VAR_FLOAT

#define DEST_VAR_FLOAT   *instr[ip].data.udest.var_float

◆ DEST_VAR_INT

#define DEST_VAR_INT   *instr[ip].data.udest.var_int

◆ DEST_VAR_PTR

#define DEST_VAR_PTR   *instr[ip].data.udest.var_ptr

◆ INSTR_ADDF_VAR_FLOAT

#define INSTR_ADDF_VAR_FLOAT   19

◆ INSTR_ADDF_VAR_VAR

#define INSTR_ADDF_VAR_VAR   20

◆ INSTR_ADDI_VAR_INTEGER

#define INSTR_ADDI_VAR_INTEGER   17

◆ INSTR_ADDI_VAR_VAR

#define INSTR_ADDI_VAR_VAR   18

◆ INSTR_ADDS_VAR_VAR

#define INSTR_ADDS_VAR_VAR   43

◆ INSTR_DIVF_VAR_FLOAT

#define INSTR_DIVF_VAR_FLOAT   27

◆ INSTR_DIVF_VAR_VAR

#define INSTR_DIVF_VAR_VAR   28

◆ INSTR_DIVI_VAR_INTEGER

#define INSTR_DIVI_VAR_INTEGER   25

◆ INSTR_DIVI_VAR_VAR

#define INSTR_DIVI_VAR_VAR   26

◆ INSTR_DIVS_VAR_VAR

#define INSTR_DIVS_VAR_VAR   46

◆ INSTR_ISEQUALF_VAR_FLOAT

#define INSTR_ISEQUALF_VAR_FLOAT   35

◆ INSTR_ISEQUALF_VAR_VAR

#define INSTR_ISEQUALF_VAR_VAR   34

◆ INSTR_ISEQUALI_VAR_INTEGER

#define INSTR_ISEQUALI_VAR_INTEGER   33

◆ INSTR_ISEQUALI_VAR_VAR

#define INSTR_ISEQUALI_VAR_VAR   32

◆ INSTR_ISEQUALP_VAR_PTR

#define INSTR_ISEQUALP_VAR_PTR   31

◆ INSTR_ISEQUALP_VAR_VAR

#define INSTR_ISEQUALP_VAR_VAR   30

◆ INSTR_ISEQUALS_VAR_VAR

#define INSTR_ISEQUALS_VAR_VAR   42

◆ INSTR_ISLOWERF_VAR_FLOAT

#define INSTR_ISLOWERF_VAR_FLOAT   14

◆ INSTR_ISLOWERF_VAR_VAR

#define INSTR_ISLOWERF_VAR_VAR   13

◆ INSTR_ISLOWERI_VAR_INTEGER

#define INSTR_ISLOWERI_VAR_INTEGER   16

◆ INSTR_ISLOWERI_VAR_VAR

#define INSTR_ISLOWERI_VAR_VAR   15

◆ INSTR_MULF_VAR_FLOAT

#define INSTR_MULF_VAR_FLOAT   23

◆ INSTR_MULF_VAR_VAR

#define INSTR_MULF_VAR_VAR   24

◆ INSTR_MULI_VAR_INTEGER

#define INSTR_MULI_VAR_INTEGER   21

◆ INSTR_MULI_VAR_VAR

#define INSTR_MULI_VAR_VAR   22

◆ INSTR_MULS_VAR_VAR

#define INSTR_MULS_VAR_VAR   45

◆ INSTR_NOP

#define INSTR_NOP   5

◆ INSTR_NOT_VAR

#define INSTR_NOT_VAR   39

◆ INSTR_SETF_VAR_FLOAT

#define INSTR_SETF_VAR_FLOAT   3

◆ INSTR_SETF_VAR_VAR

#define INSTR_SETF_VAR_VAR   4

◆ INSTR_SETI_VAR_INTEGER

#define INSTR_SETI_VAR_INTEGER   1

◆ INSTR_SETI_VAR_VAR

#define INSTR_SETI_VAR_VAR   2

◆ INSTR_SETP_VAR_PTR

#define INSTR_SETP_VAR_PTR   7

◆ INSTR_SETP_VAR_VAR

#define INSTR_SETP_VAR_VAR   8

◆ INSTR_SETS_VAR_VAR

#define INSTR_SETS_VAR_VAR   41

◆ INSTR_SUBF_VAR_FLOAT

#define INSTR_SUBF_VAR_FLOAT   11

◆ INSTR_SUBF_VAR_VAR

#define INSTR_SUBF_VAR_VAR   12

◆ INSTR_SUBI_VAR_INTEGER

#define INSTR_SUBI_VAR_INTEGER   9

◆ INSTR_SUBI_VAR_VAR

#define INSTR_SUBI_VAR_VAR   10

◆ INSTR_SUBS_VAR_VAR

#define INSTR_SUBS_VAR_VAR   44

◆ JUMP_OFFSET

#define JUMP_OFFSET   instr[ip].data.udest.jump_offset

◆ pDEST_VAR

#define pDEST_VAR   instr[ip].data.udest.var

◆ pSRC_VAR

#define pSRC_VAR   instr[ip].data.usrc.var

◆ SRC_STRUCT_FBLOCK

#define SRC_STRUCT_FBLOCK (   i)    gsl->gsl_struct[SRC_STRUCT_ID]->fBlock[i]

◆ SRC_STRUCT_FBLOCK_VAR

#define SRC_STRUCT_FBLOCK_VAR (   i,
 
)     ((float*)((char*)pSRC_VAR + gsl->gsl_struct[SRC_STRUCT_ID]->fBlock[i].data))[j]

◆ SRC_STRUCT_IBLOCK

#define SRC_STRUCT_IBLOCK (   i)    gsl->gsl_struct[SRC_STRUCT_ID]->iBlock[i]

◆ SRC_STRUCT_IBLOCK_VAR

#define SRC_STRUCT_IBLOCK_VAR (   i,
 
)     ((int*)((char*)pSRC_VAR + gsl->gsl_struct[SRC_STRUCT_ID]->iBlock[i].data))[j]

◆ SRC_STRUCT_ID

#define SRC_STRUCT_ID   instr[ip].data.usrc.var_int[-1]

◆ SRC_VAR_FLOAT

#define SRC_VAR_FLOAT   *instr[ip].data.usrc.var_float

◆ SRC_VAR_INT

#define SRC_VAR_INT   *instr[ip].data.usrc.var_int

◆ SRC_VAR_PTR

#define SRC_VAR_PTR   *instr[ip].data.usrc.var_ptr

◆ VALIDATE_ERROR

#define VALIDATE_ERROR   "error while validating "

◆ VALIDATE_NO_SUCH_DEST_VAR

#define VALIDATE_NO_SUCH_DEST_VAR   "no such destination variable"

◆ VALIDATE_NO_SUCH_INT

#define VALIDATE_NO_SUCH_INT   "no such integer variable"

◆ VALIDATE_NO_SUCH_SRC_VAR

#define VALIDATE_NO_SUCH_SRC_VAR   "no such src variable"

◆ VALIDATE_NO_SUCH_VAR

#define VALIDATE_NO_SUCH_VAR   "no such variable"

◆ VALIDATE_SYNTHAX_ERROR

#define VALIDATE_SYNTHAX_ERROR   "synthax error"

◆ VALIDATE_TODO

#define VALIDATE_TODO   "todo"

◆ VALUE_FLOAT

#define VALUE_FLOAT   instr[ip].data.usrc.value_float

◆ VALUE_INT

#define VALUE_INT   instr[ip].data.usrc.value_int

◆ VALUE_PTR

#define VALUE_PTR   instr[ip].data.usrc.value_ptr

Function Documentation

◆ calculate_labels()

static void calculate_labels ( InstructionFlow iflow)
static

◆ ext_charAt()

static void ext_charAt ( GoomSL gsl,
GoomHash global,
GoomHash local 
)
static

Some native external functions

References GSL_GLOBAL_INT, GSL_LOCAL_INT, GSL_LOCAL_PTR, and NULL.

Referenced by gsl_compile().

◆ ext_f2i()

static void ext_f2i ( GoomSL gsl,
GoomHash global,
GoomHash local 
)
static

References GSL_GLOBAL_INT, and GSL_LOCAL_FLOAT.

Referenced by gsl_compile().

◆ ext_i2f()

static void ext_i2f ( GoomSL gsl,
GoomHash global,
GoomHash local 
)
static

References GSL_GLOBAL_FLOAT, and GSL_LOCAL_INT.

Referenced by gsl_compile().

◆ gsl_append_file_to_buffer()

void gsl_append_file_to_buffer ( const char *  fname,
char **  buffer 
)

◆ gsl_bind_function()

void gsl_bind_function ( GoomSL gss,
const char *  fname,
GoomSL_ExternalFunction  func 
)

◆ gsl_compile()

void gsl_compile ( GoomSL _currentGoomSL,
const char *  script 
)

◆ gsl_create_fast_iflow()

static void gsl_create_fast_iflow ( void  )
static

References currentGoomSL, _INSTRUCTION::data, _FAST_INSTRUCTION::data, DEST_STRUCT_FBLOCK, DEST_STRUCT_IBLOCK, DEST_STRUCT_IBLOCK_VAR, DEST_STRUCT_SIZE, _INSTRUCTION_DATA::external_function, _GoomSL::fastiflow, _INSTRUCTION::id, _FAST_INSTRUCTION::id, _GoomSL::iflow, _INSTRUCTION_FLOW::instr, _FastInstructionFlow::instr, INSTR_ADDF_VAR_FLOAT, INSTR_ADDF_VAR_VAR, INSTR_ADDI_VAR_INTEGER, INSTR_ADDI_VAR_VAR, INSTR_ADDS_VAR_VAR, INSTR_CALL, INSTR_DIVF_VAR_FLOAT, INSTR_DIVF_VAR_VAR, INSTR_DIVI_VAR_INTEGER, INSTR_DIVI_VAR_VAR, INSTR_DIVS_VAR_VAR, INSTR_EXT_CALL, INSTR_ISEQUALF_VAR_FLOAT, INSTR_ISEQUALF_VAR_VAR, INSTR_ISEQUALI_VAR_INTEGER, INSTR_ISEQUALI_VAR_VAR, INSTR_ISEQUALP_VAR_PTR, INSTR_ISEQUALP_VAR_VAR, INSTR_ISEQUALS_VAR_VAR, INSTR_ISLOWERF_VAR_FLOAT, INSTR_ISLOWERF_VAR_VAR, INSTR_ISLOWERI_VAR_INTEGER, INSTR_ISLOWERI_VAR_VAR, INSTR_JNZERO, INSTR_JUMP, INSTR_JZERO, INSTR_MULF_VAR_FLOAT, INSTR_MULF_VAR_VAR, INSTR_MULI_VAR_INTEGER, INSTR_MULI_VAR_VAR, INSTR_MULS_VAR_VAR, INSTR_NOP, INSTR_NOT_VAR, INSTR_RET, INSTR_SETF_VAR_FLOAT, INSTR_SETF_VAR_VAR, INSTR_SETI_VAR_INTEGER, INSTR_SETI_VAR_VAR, INSTR_SETP_VAR_PTR, INSTR_SETP_VAR_VAR, INSTR_SETS_VAR_VAR, INSTR_SUBF_VAR_FLOAT, INSTR_SUBF_VAR_VAR, INSTR_SUBI_VAR_INTEGER, INSTR_SUBI_VAR_VAR, INSTR_SUBS_VAR_VAR, _INSTRUCTION::jump_label, _FastInstructionFlow::mallocedInstr, _INSTRUCTION::nop_label, NULL, _INSTRUCTION_FLOW::number, _FastInstructionFlow::number, pDEST_VAR, _FAST_INSTRUCTION::proto, pSRC_VAR, SRC_STRUCT_IBLOCK_VAR, _INSTRUCTION_DATA::udest, _INSTRUCTION_DATA::usrc, _INSTRUCTION_DATA::value_float, _INSTRUCTION_DATA::value_int, _INSTRUCTION_DATA::value_ptr, _INSTRUCTION_DATA::var_float, _INSTRUCTION_DATA::var_int, _INSTRUCTION_DATA::var_ptr, _ExternalFunctionStruct::vars, and _GoomSL::vars.

Referenced by gsl_compile().

◆ gsl_declare_external_task()

void gsl_declare_external_task ( const char *  name)

◆ gsl_declare_task()

void gsl_declare_task ( const char *  name)

◆ gsl_enternamespace()

void gsl_enternamespace ( const char *  name)

◆ gsl_execute()

void gsl_execute ( GoomSL scanner)

◆ gsl_find_namespace()

GoomHash * gsl_find_namespace ( const char *  name)

◆ gsl_free()

void gsl_free ( GoomSL gss)

◆ gsl_free_ptr()

void gsl_free_ptr ( GoomSL _this,
int  id 
)

References _GoomSL::ptrArray.

◆ gsl_get_ptr()

void * gsl_get_ptr ( GoomSL _this,
int  id 
)

References NULL, and _GoomSL::ptrArray.

◆ gsl_globals()

GoomHash * gsl_globals ( GoomSL _this)

References _GoomSL::vars.

◆ gsl_init_buffer()

char * gsl_init_buffer ( const char *  fname)

◆ gsl_instr_add_param()

void gsl_instr_add_param ( Instruction instr,
const char *  param,
int  type 
)

◆ gsl_instr_display()

void gsl_instr_display ( Instruction _this)
static

◆ gsl_instr_free()

void gsl_instr_free ( Instruction _this)
static

◆ gsl_instr_init()

Instruction * gsl_instr_init ( GoomSL parent,
const char *  name,
int  id,
int  nb_param,
int  line_number 
)

◆ gsl_instr_set_namespace()

void gsl_instr_set_namespace ( Instruction _this,
GoomHash ns 
)

◆ gsl_instr_validate()

const char * gsl_instr_validate ( Instruction _this)
static

References _INSTRUCTION::data, _INSTRUCTION_DATA::external_function, FIRST_RESERVED, _GoomSL::functions, goom_hash_get(), goom_hash_put_int(), gsl_type_of_var(), _INSTRUCTION::id, _GoomSL::iflow, INSTR_ADD, INSTR_ADDF_VAR_FLOAT, INSTR_ADDF_VAR_VAR, INSTR_ADDI_VAR_INTEGER, INSTR_ADDI_VAR_VAR, INSTR_ADDS_VAR_VAR, INSTR_CALL, INSTR_DIV, INSTR_DIVF_VAR_FLOAT, INSTR_DIVF_VAR_VAR, INSTR_DIVI_VAR_INTEGER, INSTR_DIVI_VAR_VAR, INSTR_DIVS_VAR_VAR, INSTR_EXT_CALL, INSTR_FLOAT, INSTR_INT, INSTR_ISEQUAL, INSTR_ISEQUALF_VAR_FLOAT, INSTR_ISEQUALF_VAR_VAR, INSTR_ISEQUALI_VAR_INTEGER, INSTR_ISEQUALI_VAR_VAR, INSTR_ISEQUALP_VAR_PTR, INSTR_ISEQUALP_VAR_VAR, INSTR_ISEQUALS_VAR_VAR, INSTR_ISLOWER, INSTR_ISLOWERF_VAR_FLOAT, INSTR_ISLOWERF_VAR_VAR, INSTR_ISLOWERI_VAR_INTEGER, INSTR_ISLOWERI_VAR_VAR, INSTR_JNZERO, INSTR_JUMP, INSTR_JZERO, INSTR_LABEL, INSTR_MUL, INSTR_MULF_VAR_FLOAT, INSTR_MULF_VAR_VAR, INSTR_MULI_VAR_INTEGER, INSTR_MULI_VAR_VAR, INSTR_MULS_VAR_VAR, INSTR_NOP, INSTR_NOT, INSTR_NOT_VAR, INSTR_PTR, INSTR_RET, INSTR_SET, INSTR_SETF_VAR_FLOAT, INSTR_SETF_VAR_VAR, INSTR_SETI_VAR_INTEGER, INSTR_SETI_VAR_VAR, INSTR_SETP_VAR_PTR, INSTR_SETP_VAR_VAR, INSTR_SETS_VAR_VAR, INSTR_SUB, INSTR_SUBF_VAR_FLOAT, INSTR_SUBF_VAR_VAR, INSTR_SUBI_VAR_INTEGER, INSTR_SUBI_VAR_VAR, INSTR_SUBS_VAR_VAR, _INSTRUCTION::jump_label, _INSTRUCTION_FLOW::labels, _INSTRUCTION::line_number, _INSTRUCTION::nb_param, _INSTRUCTION::nop_label, _INSTRUCTION_FLOW::number, _INSTRUCTION::params, _INSTRUCTION::parent, HashValue::ptr, TYPE_FVAR, TYPE_IVAR, TYPE_LABEL, TYPE_PVAR, TYPE_VAR, _INSTRUCTION::types, _INSTRUCTION_DATA::udest, validate(), VALIDATE_ERROR, VALIDATE_OK, VALIDATE_TODO, and _INSTRUCTION::vnamespace.

Referenced by gsl_instr_add_param().

◆ gsl_is_compiled()

int gsl_is_compiled ( GoomSL gss)

◆ gsl_leavenamespace()

GoomHash * gsl_leavenamespace ( void  )

◆ gsl_malloc()

int gsl_malloc ( GoomSL _this,
int  size 
)

◆ gsl_new()

GoomSL * gsl_new ( void  )

◆ gsl_read_file()

static char * gsl_read_file ( const char *  fname)
static

◆ gsl_reenternamespace()

void gsl_reenternamespace ( GoomHash nsinfo)

◆ iflow_add_instr()

void iflow_add_instr ( InstructionFlow _this,
Instruction instr 
)
static

◆ iflow_clean()

void iflow_clean ( InstructionFlow _this)
static

◆ iflow_execute()

void iflow_execute ( FastInstructionFlow _this,
GoomSL gsl 
)
static

References _FAST_INSTRUCTION::data, DEST_STRUCT_FBLOCK, DEST_STRUCT_FBLOCK_VAR, DEST_STRUCT_IBLOCK, DEST_STRUCT_IBLOCK_VAR, DEST_STRUCT_SIZE, DEST_VAR_FLOAT, DEST_VAR_INT, DEST_VAR_PTR, _INSTRUCTION_DATA::external_function, _ExternalFunctionStruct::function, gsl_instr_display(), _FastInstructionFlow::instr, INSTR_ADDF_VAR_FLOAT, INSTR_ADDF_VAR_VAR, INSTR_ADDI_VAR_INTEGER, INSTR_ADDI_VAR_VAR, INSTR_ADDS_VAR_VAR, INSTR_CALL, INSTR_DIVF_VAR_FLOAT, INSTR_DIVF_VAR_VAR, INSTR_DIVI_VAR_INTEGER, INSTR_DIVI_VAR_VAR, INSTR_DIVS_VAR_VAR, INSTR_EXT_CALL, INSTR_ISEQUALF_VAR_FLOAT, INSTR_ISEQUALF_VAR_VAR, INSTR_ISEQUALI_VAR_INTEGER, INSTR_ISEQUALI_VAR_VAR, INSTR_ISEQUALP_VAR_PTR, INSTR_ISEQUALP_VAR_VAR, INSTR_ISEQUALS_VAR_VAR, INSTR_ISLOWERF_VAR_FLOAT, INSTR_ISLOWERF_VAR_VAR, INSTR_ISLOWERI_VAR_INTEGER, INSTR_ISLOWERI_VAR_VAR, INSTR_JNZERO, INSTR_JUMP, INSTR_JZERO, INSTR_MULF_VAR_FLOAT, INSTR_MULF_VAR_VAR, INSTR_MULI_VAR_INTEGER, INSTR_MULI_VAR_VAR, INSTR_MULS_VAR_VAR, INSTR_NOP, INSTR_NOT_VAR, INSTR_RET, INSTR_SETF_VAR_FLOAT, INSTR_SETF_VAR_VAR, INSTR_SETI_VAR_INTEGER, INSTR_SETI_VAR_VAR, INSTR_SETP_VAR_PTR, INSTR_SETP_VAR_VAR, INSTR_SETS_VAR_VAR, INSTR_SUBF_VAR_FLOAT, INSTR_SUBF_VAR_VAR, INSTR_SUBI_VAR_INTEGER, INSTR_SUBI_VAR_VAR, INSTR_SUBS_VAR_VAR, JUMP_OFFSET, pDEST_VAR, pSRC_VAR, SRC_STRUCT_FBLOCK_VAR, SRC_STRUCT_IBLOCK_VAR, SRC_VAR_FLOAT, SRC_VAR_INT, SRC_VAR_PTR, _INSTRUCTION_DATA::udest, VALUE_FLOAT, VALUE_INT, VALUE_PTR, _ExternalFunctionStruct::vars, and _GoomSL::vars.

Referenced by gsl_execute().

◆ iflow_free()

void iflow_free ( InstructionFlow _this)
static

◆ iflow_new()

InstructionFlow * iflow_new ( void  )
static

◆ reset_scanner()

static void reset_scanner ( GoomSL gss)
static

◆ validate()

static const char * validate ( Instruction _this,
int  vf_f_id,
int  vf_v_id,
int  vi_i_id,
int  vi_v_id,
int  vp_p_id,
int  vp_v_id,
int  vs_v_id 
)
static

◆ validate_v_f()

static const char * validate_v_f ( Instruction _this)
static

◆ validate_v_i()

static const char * validate_v_i ( Instruction _this)
static

◆ validate_v_p()

static const char * validate_v_p ( Instruction _this)
static

◆ validate_v_v()

static const char * validate_v_v ( Instruction _this)
static

◆ yy_scan_string()

void yy_scan_string ( const char *  str)

Referenced by gsl_compile().

◆ yyparse()

int yyparse ( void  )

References currentGoomSL, FLOAT_TK, gsl_add_struct(), gsl_add_struct_field(), gsl_append(), gsl_declare_external_task(), gsl_declare_global_variable(), gsl_declare_task(), gsl_enternamespace(), gsl_float_decl_local(), gsl_get_struct_id(), gsl_int_decl_local(), gsl_leavenamespace(), gsl_new_struct(), gsl_new_struct_field(), gsl_new_struct_field_struct(), gsl_ptr_decl_local(), gsl_reenternamespace(), YYSTYPE::gsl_struct, gsl_struct_decl_local(), YYSTYPE::gsl_struct_field, INSTR_FLOAT, INSTR_INT, INSTR_PTR, INT_TK, YYSTYPE::intValue, lastNode, new_add(), new_affec_list(), new_block(), new_call(), new_call_expr(), new_constFloat(), new_constInt(), new_constPtr(), new_div(), new_div_eq(), new_equ(), new_function_intro(), new_function_outro(), new_if(), new_low(), new_mul(), new_mul_eq(), new_neg(), new_not(), new_plus_eq(), new_set(), new_static_foreach(), new_sub(), new_sub_eq(), new_var(), new_var_list(), new_while(), YYSTYPE::nPtr, NULL, _GoomSL::num_lines, _OprNodeType::op, _NODE_TYPE::opr, PTR_TK, YYSTYPE::strValue, _NODE_TYPE::unode, YY_REDUCE_PRINT, YY_STACK_PRINT, YYABORT, YYACCEPT, yychar, yycheck, yydefact, yydefgoto, yydestruct(), YYDPRINTF, YYDSYMPRINTF, YYEMPTY, YYEOF, yyerror(), YYFINAL, YYINITDEPTH, YYLAST, YYLEX, yylval, YYMAXDEPTH, yynerrs, YYNTOKENS, yypact, YYPACT_NINF, yypgoto, YYPOPSTACK, yyr1, yyr2, YYSIZE_T, yyalloc::yyss, YYSTACK_ALLOC, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, yystos, yytable, YYTABLE_NINF, YYTERROR, YYTRANSLATE, and yyalloc::yyvs.

Referenced by gsl_compile().

Variable Documentation

◆ gsl_already_imported

char gsl_already_imported[256][256]
static

◆ gsl_nb_import

int gsl_nb_import
static

◆ VALIDATE_OK

const char* VALIDATE_OK = "ok"
static