Go to the documentation of this file.
16 #define CONST_INT_NODE 1
17 #define CONST_FLOAT_NODE 2
18 #define CONST_PTR_NODE 3
21 #define READ_PARAM_NODE 6
36 #define OPR_FUNC_INTRO 12
37 #define OPR_FUNC_OUTRO 13
39 #define OPR_EXT_CALL 15
40 #define OPR_PLUS_EQ 16
44 #define OPR_CALL_EXPR 20
45 #define OPR_AFFECT_LIST 21
46 #define OPR_FOREACH 22
47 #define OPR_VAR_LIST 23
216 #define FIRST_RESERVED 0x80000
218 #define TYPE_INTEGER 0x90001
219 #define TYPE_FLOAT 0x90002
220 #define TYPE_VAR 0x90003
221 #define TYPE_PTR 0x90004
222 #define TYPE_LABEL 0x90005
224 #define TYPE_OP_EQUAL 6
225 #define TYPE_IVAR 0xa0001
226 #define TYPE_FVAR 0xa0002
227 #define TYPE_PVAR 0xa0003
228 #define TYPE_SVAR 0xa0004
231 #define INSTR_JZERO 29
232 #define INSTR_CALL 36
234 #define INSTR_EXT_CALL 38
235 #define INSTR_JNZERO 40
237 #define INSTR_SET 0x80001
238 #define INSTR_INT 0x80002
239 #define INSTR_FLOAT 0x80003
240 #define INSTR_PTR 0x80004
241 #define INSTR_LABEL 0x80005
242 #define INSTR_ISLOWER 0x80006
243 #define INSTR_ADD 0x80007
244 #define INSTR_MUL 0x80008
245 #define INSTR_DIV 0x80009
246 #define INSTR_SUB 0x80010
247 #define INSTR_ISEQUAL 0x80011
248 #define INSTR_NOT 0x80012
int val
Definition: goomsl_private.h:52
int yy_state_type
Definition: goomsl_lex.c:344
#define LINE_COMMENT
Definition: goomsl_lex.c:645
const char * name
Definition: goomsl_private.h:105
static void yy_flex_strncpy(char *, char *, int)
Definition: goomsl_lex.c:2060
GoomHash ** vnamespace
Definition: goomsl_private.h:108
char * yy_buf_pos
Definition: goomsl_lex.c:199
void gsl_declare_task(const char *name)
Definition: goomsl.c:844
InstructionData data
Definition: goomsl_private.h:103
char * nop_label
Definition: goomsl_private.h:115
Definition: goomsl_private.h:121
int tabsize
Definition: goomsl_private.h:125
#define YY_DO_BEFORE_ACTION
Definition: goomsl_lex.c:361
GoomSL * currentGoomSL
Definition: goomsl_lex.c:635
int cur_param
Definition: goomsl_private.h:110
int address
Definition: goomsl_private.h:113
static flex_int16_t yy_nxt[276]
Definition: goomsl_lex.c:515
#define LTYPE_VAR
Definition: goomsl_yacc.c:81
void yy_delete_buffer(YY_BUFFER_STATE b)
Definition: goomsl_lex.c:1666
YY_BUFFER_STATE yy_create_buffer(FILE *file, int size)
Definition: goomsl_lex.c:1638
int jump_offset
Definition: goomsl_private.h:85
int yyleng
Definition: goomsl_lex.c:280
void yypop_buffer_state(void)
Definition: goomsl_lex.c:1776
OprNodeType opr
Definition: goomsl_private.h:75
GoomHash * gsl_leavenamespace(void)
Definition: goomsl.c:828
float * var_float
Definition: goomsl_private.h:84
int value_int
Definition: goomsl_private.h:94
int type
Definition: goomsl_private.h:152
Definition: goomsl_lex.c:378
#define YY_START
Definition: goomsl_lex.c:122
int type
Definition: goomsl_private.h:61
int num_lines
Definition: goomsl_private.h:166
unsigned int flex_uint32_t
Definition: goomsl_lex.c:48
int id
Definition: goomsl_private.h:58
YY_BUFFER_STATE yy_scan_bytes(char *bytes, int len)
Definition: goomsl_lex.c:1890
int * var_int
Definition: goomsl_private.h:82
Definition: goomsl_private.h:157
GoomHash * namespaces[16]
Definition: goomsl_private.h:174
GSL_Struct ** gsl_struct
Definition: goomsl_private.h:182
#define EXTERNAL
Definition: goomsl_yacc.c:87
int yy_flex_debug
Definition: goomsl_lex.c:591
static flex_int16_t yy_base[159]
Definition: goomsl_lex.c:473
#define YY_FATAL_ERROR(msg)
Definition: goomsl_lex.c:754
int yylex(void)
Definition: goomsl_lex.c:790
FILE * yyin
Definition: goomsl_lex.c:342
int gsl_malloc(GoomSL *_this, int size)
Definition: goomsl.c:783
void yy_switch_to_buffer(YY_BUFFER_STATE new_buffer)
Definition: goomsl_lex.c:1593
Definition: goomsl_lex.c:194
GoomHash * labels
Definition: goomsl_private.h:126
#define EOB_ACT_CONTINUE_SCAN
Definition: goomsl_lex.c:147
void(* GoomSL_ExternalFunction)(GoomSL *gsl, GoomHash *global_vars, GoomHash *local_vars)
Definition: goomsl.h:7
#define YY_MORE_ADJ
Definition: goomsl_lex.c:611
void ** ptrArray
Definition: goomsl_private.h:187
YY_BUFFER_STATE yy_scan_buffer(char *base, yy_size_t size)
Definition: goomsl_lex.c:1840
#define YY_CURRENT_BUFFER_LVALUE
Definition: goomsl_lex.c:275
#define YY_RULE_SETUP
Definition: goomsl_lex.c:782
union _INSTRUCTION_DATA::@42 usrc
#define YY_BUFFER_NEW
Definition: goomsl_lex.c:240
#define LTYPE_INTEGER
Definition: goomsl_yacc.c:79
char ** params
Definition: goomsl_private.h:107
#define FOR
Definition: goomsl_yacc.c:99
static flex_int16_t yy_def[159]
Definition: goomsl_lex.c:494
struct _ConstPtrNodeType ConstPtrNodeType
struct _GSL_StructField GSL_StructField
static int yy_init
Definition: goomsl_lex.c:284
#define YY_BUFFER_EOF_PENDING
Definition: goomsl_lex.c:252
unsigned int yy_size_t
Definition: goomsl_lex.c:189
static void yyensure_buffer_stack(void)
Definition: goomsl_lex.c:1795
#define YY_RESTORE_YY_MORE_OFFSET
Definition: goomsl_lex.c:612
int gsl_type_of_var(GoomHash *namespace, const char *name)
Definition: goomsl_yacc.c:358
struct _ConstFloatNodeType ConstFloatNodeType
float value_float
Definition: goomsl_private.h:96
Definition: goomsl_private.h:51
char * jump_label
Definition: goomsl_private.h:114
int yy_at_bol
Definition: goomsl_lex.c:228
#define YY_BUFFER_NORMAL
Definition: goomsl_lex.c:241
int currentNS
Definition: goomsl_private.h:173
void gsl_instr_add_param(Instruction *_this, const char *param, int type)
Definition: goomsl.c:141
#define PLUS_EQ
Definition: goomsl_yacc.c:91
static int yy_get_next_buffer(void)
Definition: goomsl_lex.c:1302
#define YY_DECL
Definition: goomsl_lex.c:767
static size_t yy_buffer_stack_top
Definition: goomsl_lex.c:258
int nbOp
Definition: goomsl_private.h:62
struct _GSL_Struct GSL_Struct
int yy_is_our_buffer
Definition: goomsl_lex.c:215
Definition: goomsl_private.h:66
union _NODE_TYPE::@40 unode
FastInstruction * instr
Definition: goomsl_private.h:137
struct yy_buffer_state * YY_BUFFER_STATE
Definition: goomsl_lex.c:140
void * var
Definition: goomsl_private.h:81
#define YY_NEW_FILE
Definition: goomsl_lex.c:129
Definition: goomsl_private.h:78
char strValue[2048]
Definition: goomsl_yacc.c:1319
void gsl_commit_compilation(void)
Definition: goomsl_yacc.c:1150
#define STRUCT
Definition: goomsl_yacc.c:98
Definition: goomsl_private.h:129
#define YY_STATE_EOF(state)
Definition: goomsl_lex.c:126
#define YY_INPUT(buf, result, max_size)
Definition: goomsl_lex.c:707
static int yy_more_offset
Definition: goomsl_lex.c:607
int yywrap(void)
Definition: goomsl_lex.c:2119
Instruction * gsl_instr_init(GoomSL *parent, const char *name, int id, int nb_param, int line_number)
Definition: goomsl.c:175
static void yy_load_buffer_state(void)
Definition: goomsl_lex.c:1624
#define YY_SC_TO_UI(c)
Definition: goomsl_lex.c:110
struct _INSTRUCTION Instruction
InstructionFlow * iflow
Definition: goomsl_private.h:169
int value_ptr
Definition: goomsl_private.h:95
static void yy_fatal_error(char msg[])
static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file)
Definition: goomsl_lex.c:1689
int id
Definition: goomsl_private.h:102
NULL
Definition: xine_plugin.c:78
int number
Definition: goomsl_private.h:124
#define YY_READ_BUF_SIZE
Definition: goomsl_lex.c:692
#define YY_BUF_SIZE
Definition: goomsl_lex.c:135
void gsl_reenternamespace(GoomHash *ns)
Definition: goomsl.c:823
static char * yy_full_match
Definition: goomsl_lex.c:594
void yy_flush_buffer(YY_BUFFER_STATE b)
Definition: goomsl_lex.c:1717
#define LOW_EQ
Definition: goomsl_yacc.c:96
int yy_fill_buffer
Definition: goomsl_lex.c:236
struct _FAST_INSTRUCTION FastInstruction
#define LTYPE_FLOAT
Definition: goomsl_yacc.c:80
void gsl_enternamespace(const char *name)
Definition: goomsl.c:809
#define C_COMMENT
Definition: goomsl_lex.c:644
static flex_int32_t yy_ec[256]
Definition: goomsl_lex.c:432
#define NOT_EQ
Definition: goomsl_yacc.c:97
void * yyalloc(yy_size_t)
Definition: goomsl_lex.c:2079
#define SUP_EQ
Definition: goomsl_yacc.c:95
int nb_param
Definition: goomsl_private.h:111
struct _NODE_TYPE NodeType
Instruction * instr
Definition: goomsl_private.h:167
struct _NODE_TYPE * op[3]
Definition: goomsl_private.h:63
struct _NODE_TYPE * next
Definition: goomsl_private.h:64
FILE * yy_input_file
Definition: goomsl_lex.c:196
Definition: goomsl_hash.h:20
#define EOB_ACT_LAST_MATCH
Definition: goomsl_lex.c:149
#define YY_BREAK
Definition: goomsl_lex.c:779
void gsl_declare_external_task(const char *name)
Definition: goomsl.c:858
GoomSL * currentGoomSL
Definition: goomsl_lex.c:635
int * types
Definition: goomsl_private.h:109
Instruction ** instr
Definition: goomsl_private.h:123
Definition: goomsl_private.h:135
struct _ExternalFunctionStruct * external_function
Definition: goomsl_private.h:86
GSL_StructField * fields[64]
Definition: goomsl_private.h:159
Block fBlock[64]
Definition: goomsl_private.h:162
struct _OprNodeType OprNodeType
#define EOB_ACT_END_OF_FILE
Definition: goomsl_lex.c:148
#define YYLMAX
Definition: goomsl_lex.c:618
int size
Definition: goomsl_private.h:160
signed char flex_int8_t
Definition: goomsl_lex.c:43
int data
Definition: goomsl_private.h:148
static size_t yy_buffer_stack_max
Definition: goomsl_lex.c:259
static flex_int16_t yy_acclist[214]
Definition: goomsl_lex.c:383
static int yy_start
Definition: goomsl_lex.c:285
#define YY_AT_BOL()
Definition: goomsl_lex.c:336
char * yy_ch_buf
Definition: goomsl_lex.c:198
struct _ConstIntNodeType ConstIntNodeType
static void yyunput(int c, char *buf_ptr)
int ptrArraySize
Definition: goomsl_private.h:186
#define yyconst
Definition: goomsl_lex.c:99
GoomHash * structIDS
Definition: goomsl_private.h:181
static YY_BUFFER_STATE * yy_buffer_stack
Definition: goomsl_lex.c:260
GoomHash * gsl_find_namespace(const char *name)
Definition: goomsl.c:834
Definition: goomsl_private.h:147
static int yy_lp
Definition: goomsl_lex.c:595
unsigned char YY_CHAR
Definition: goomsl_lex.c:340
static yy_state_type * yy_state_buf
Definition: goomsl_lex.c:593
unsigned short int flex_uint16_t
Definition: goomsl_lex.c:47
int size
Definition: goomsl_private.h:149
struct _INSTRUCTION_DATA InstructionData
#define STRING
Definition: goomsl_lex.c:646
Definition: goomsl_private.h:100
GoomHash * vnamespace
Definition: goomsl_private.h:69
void yyerror(const char *)
Definition: goomsl_yacc.c:2989
void gsl_instr_set_namespace(Instruction *_this, GoomHash *ns)
Definition: goomsl.c:132
char * yytext_ptr
Definition: goomsl_lex.c:622
int line_number
Definition: goomsl_private.h:70
int yy_buffer_status
Definition: goomsl_lex.c:238
void yyrestart(FILE *input_file)
Definition: goomsl_lex.c:1576
yy_size_t yy_buf_size
Definition: goomsl_lex.c:204
const char name[16]
Definition: memcpy.c:569
void * mallocedInstr
Definition: goomsl_private.h:138
float val
Definition: goomsl_private.h:55
#define PTR_TK
Definition: goomsl_yacc.c:83
GoomHash * vars
Definition: goomsl_private.h:172
YYSTYPE yylval
Definition: goomsl_yacc.c:2118
flex_int32_t yy_nxt
Definition: goomsl_lex.c:381
Definition: goomsl_private.h:141
static yy_state_type * yy_state_ptr
Definition: goomsl_lex.c:593
Definition: goomsl_private.h:151
#define INITIAL
Definition: goomsl_lex.c:643
char yytext[]
Definition: goomsl_lex.c:621
void yyfree(void *)
Definition: goomsl_lex.c:2096
flex_int32_t yy_verify
Definition: goomsl_lex.c:380
int yylineno
Definition: goomsl_lex.c:349
void yyparse(void)
Definition: goomsl_yacc.c:2142
static char * yy_c_buf_p
Definition: goomsl_lex.c:283
int yy_bs_column
Definition: goomsl_lex.c:231
int yy_n_chars
Definition: goomsl_lex.c:209
static yy_state_type yy_try_NUL_trans(yy_state_type current_state)
Definition: goomsl_lex.c:1431
int is_extern
Definition: goomsl_private.h:144
int nbFields
Definition: goomsl_private.h:158
#define DECLARE
Definition: goomsl_yacc.c:86
int number
Definition: goomsl_private.h:136
#define YY_END_OF_BUFFER_CHAR
Definition: goomsl_lex.c:131
int yy_is_interactive
Definition: goomsl_lex.c:222
GoomHeap * data_heap
Definition: goomsl_private.h:178
Block iBlock[64]
Definition: goomsl_private.h:161
int type
Definition: goomsl_private.h:67
static flex_int16_t yy_accept[152]
Definition: goomsl_lex.c:411
#define DO
Definition: goomsl_yacc.c:89
int compilationOK
Definition: goomsl_private.h:189
Instruction * proto
Definition: goomsl_private.h:132
unsigned char flex_uint8_t
Definition: goomsl_lex.c:46
struct _INSTRUCTION_FLOW InstructionFlow
GoomSL * parent
Definition: goomsl_private.h:104
static int string_size
Definition: goomsl_lex.c:636
static flex_int32_t yy_rule_can_match_eol[50]
Definition: goomsl_lex.c:584
Definition: goomsl_private.h:165
static flex_int32_t yy_meta[51]
Definition: goomsl_lex.c:464
Definition: goomsl_private.h:60
int nbPtr
Definition: goomsl_private.h:185
static flex_int16_t yy_chk[276]
Definition: goomsl_lex.c:549
ConstIntNodeType constInt
Definition: goomsl_private.h:72
int flex_int32_t
Definition: goomsl_lex.c:45
#define ECHO
Definition: goomsl_lex.c:700
static int yy_n_chars
Definition: goomsl_lex.c:279
#define SUB_EQ
Definition: goomsl_yacc.c:92
int nbStructID
Definition: goomsl_private.h:180
#define INT_TK
Definition: goomsl_yacc.c:84
struct _FastInstructionFlow FastInstructionFlow
#define YY_EXIT_FAILURE
Definition: goomsl_lex.c:1921
char charValue
Definition: goomsl_yacc.c:1318
ConstFloatNodeType constFloat
Definition: goomsl_private.h:73
#define FLOAT_TK
Definition: goomsl_yacc.c:85
#define WHILE
Definition: goomsl_yacc.c:88
GoomHash * vars
Definition: goomsl_private.h:143
#define LTYPE_PTR
Definition: goomsl_yacc.c:82
#define MUL_EQ
Definition: goomsl_yacc.c:94
struct _ExternalFunctionStruct ExternalFunctionStruct
#define YY_CURRENT_BUFFER
Definition: goomsl_lex.c:268
FILE * yyout
Definition: goomsl_lex.c:145
static yy_state_type yy_get_previous_state(void)
Definition: goomsl_lex.c:1399
int * var_ptr
Definition: goomsl_private.h:83
static int yy_prev_more_offset
Definition: goomsl_lex.c:608
char * str
Definition: goomsl_private.h:68
static int input(void)
Definition: goomsl_lex.c:1495
YY_BUFFER_STATE yy_scan_string(char *yy_str)
Definition: goomsl_lex.c:1877
GoomHash * functions
Definition: goomsl_private.h:176
void * yyrealloc(void *, yy_size_t)
Definition: goomsl_lex.c:2084
Definition: goomsl_private.h:57
ConstPtrNodeType constPtr
Definition: goomsl_private.h:74
Definition: goomsl_heap.c:10
#define IN
Definition: goomsl_yacc.c:100
short int flex_int16_t
Definition: goomsl_lex.c:44
FastInstructionFlow * fastiflow
Definition: goomsl_private.h:170
int gsl_struct_size
Definition: goomsl_private.h:183
void yypush_buffer_state(YY_BUFFER_STATE new_buffer)
Definition: goomsl_lex.c:1746
Definition: goomsl_private.h:54
int id
Definition: goomsl_private.h:130
int yy_bs_lineno
Definition: goomsl_lex.c:230
static int yy_did_buffer_switch_on_eof
Definition: goomsl_lex.c:290
#define NOT
Definition: goomsl_yacc.c:90
#define BEGIN
Definition: goomsl_lex.c:116
#define DIV_EQ
Definition: goomsl_yacc.c:93
static char yy_hold_char
Definition: goomsl_lex.c:278
#define YY_END_OF_BUFFER
Definition: goomsl_lex.c:375
union _INSTRUCTION_DATA::@41 udest
int line_number
Definition: goomsl_private.h:117
#define yyterminate()
Definition: goomsl_lex.c:744
InstructionData data
Definition: goomsl_private.h:131
char name[256]
Definition: goomsl_private.h:153
int offsetInStruct
Definition: goomsl_private.h:154