xine-lib 1.2.11
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "goomsl.h"
#include "goomsl_private.h"
Data Structures | |
union | YYSTYPE |
union | yyalloc |
Macros | |
#define | YYBISON 1 |
#define | YYSKELETON_NAME "yacc.c" |
#define | YYPURE 0 |
#define | YYLSP_NEEDED 0 |
#define | YYTOKENTYPE |
#define | LTYPE_INTEGER 258 |
#define | LTYPE_FLOAT 259 |
#define | LTYPE_VAR 260 |
#define | LTYPE_PTR 261 |
#define | PTR_TK 262 |
#define | INT_TK 263 |
#define | FLOAT_TK 264 |
#define | DECLARE 265 |
#define | EXTERNAL 266 |
#define | WHILE 267 |
#define | DO 268 |
#define | NOT 269 |
#define | PLUS_EQ 270 |
#define | SUB_EQ 271 |
#define | DIV_EQ 272 |
#define | MUL_EQ 273 |
#define | SUP_EQ 274 |
#define | LOW_EQ 275 |
#define | NOT_EQ 276 |
#define | STRUCT 277 |
#define | FOR 278 |
#define | IN 279 |
#define | STRUCT_ALIGNMENT 16 |
#define | ALIGN_ADDR(_addr, _align) |
#define | YYDEBUG 0 |
#define | YYERROR_VERBOSE 0 |
#define | yystype YYSTYPE /* obsolescent; will be withdrawn */ |
#define | YYSTYPE_IS_DECLARED 1 |
#define | YYSTYPE_IS_TRIVIAL 1 |
#define | YYSTACK_ALLOC malloc |
#define | YYSTACK_FREE free |
#define | YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
#define | YYSTACK_BYTES(N) |
#define | YYCOPY(To, From, Count) |
#define | YYSTACK_RELOCATE(Stack) |
#define | YYFINAL 3 |
#define | YYLAST 229 |
#define | YYNTOKENS 42 |
#define | YYNNTS 30 |
#define | YYNRULES 89 |
#define | YYNSTATES 217 |
#define | YYUNDEFTOK 2 |
#define | YYMAXUTOK 279 |
#define | YYTRANSLATE(YYX) ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
#define | YYPACT_NINF -116 |
#define | YYTABLE_NINF -1 |
#define | YYSIZE_T unsigned int |
#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 yyerrlab1 |
#define | YYFAIL goto yyerrlab |
#define | YYRECOVERING() (!!yyerrstatus) |
#define | YYBACKUP(Token, Value) |
#define | YYTERROR 1 |
#define | YYERRCODE 256 |
#define | YYLLOC_DEFAULT(Current, Rhs, N) |
#define | YYLEX yylex () |
#define | YYDPRINTF(Args) |
#define | YYDSYMPRINT(Args) |
#define | YYDSYMPRINTF(Title, Token, Value, Location) |
#define | YY_STACK_PRINT(Bottom, Top) |
#define | YY_REDUCE_PRINT(Rule) |
#define | YYINITDEPTH 200 |
#define | YYMAXDEPTH 10000 |
#define | YYPOPSTACK (yyvsp--, yyssp--) |
Typedefs | |
typedef union YYSTYPE | YYSTYPE |
typedef short | yysigned_char |
Enumerations | |
enum | yytokentype { LTYPE_INTEGER = 258 , LTYPE_FLOAT = 259 , LTYPE_VAR = 260 , LTYPE_PTR = 261 , PTR_TK = 262 , INT_TK = 263 , FLOAT_TK = 264 , DECLARE = 265 , EXTERNAL = 266 , WHILE = 267 , DO = 268 , NOT = 269 , PLUS_EQ = 270 , SUB_EQ = 271 , DIV_EQ = 272 , MUL_EQ = 273 , SUP_EQ = 274 , LOW_EQ = 275 , NOT_EQ = 276 , STRUCT = 277 , FOR = 278 , IN = 279 , LTYPE_INTEGER = 258 , LTYPE_FLOAT = 259 , LTYPE_VAR = 260 , LTYPE_PTR = 261 , PTR_TK = 262 , INT_TK = 263 , FLOAT_TK = 264 , DECLARE = 265 , EXTERNAL = 266 , WHILE = 267 , DO = 268 , NOT = 269 , PLUS_EQ = 270 , SUB_EQ = 271 , DIV_EQ = 272 , MUL_EQ = 273 , SUP_EQ = 274 , LOW_EQ = 275 , NOT_EQ = 276 , STRUCT = 277 , FOR = 278 , IN = 279 } |
Functions | |
int | yylex (void) |
void | yyerror (const char *) |
static NodeType * | nodeNew (const char *str, int type, int line_number) |
static NodeType * | nodeClone (NodeType *node) |
static void | nodeFreeInternals (NodeType *node) |
static void | nodeFree (NodeType *node) |
static void | commit_node (NodeType *node, int releaseIfTemp) |
static void | precommit_node (NodeType *node) |
static NodeType * | new_constInt (const char *str, int line_number) |
static NodeType * | new_constFloat (const char *str, int line_number) |
static NodeType * | new_constPtr (const char *str, int line_number) |
static NodeType * | new_var (const char *str, int line_number) |
static NodeType * | new_nop (const char *str) |
static NodeType * | new_op (const char *str, int type, int nbOp) |
static int | allocateLabel (void) |
static int | allocateTemp (void) |
static void | releaseTemp (int n) |
static void | releaseAllTemps (void) |
static int | is_tmp_expr (NodeType *node) |
static int | get_tmp_id (NodeType *node) |
static int | is_commutative_expr (int itype) |
static void | GSL_PUT_LABEL (char *name, int line_number) |
static void | GSL_PUT_JUMP (char *name, int line_number) |
static void | GSL_PUT_JXXX (const char *name, const char *iname, int instr_id, int line_number) |
static void | GSL_PUT_JZERO (const char *name, int line_number) |
static void | GSL_PUT_JNZERO (const char *name, int line_number) |
static void | gsl_prepare_struct (GSL_Struct *s, int s_align, int i_align, int f_align) |
static int | gsl_get_struct_id (const char *name) |
static void | gsl_add_struct (const char *name, GSL_Struct *gsl_struct) |
static GSL_StructField * | gsl_new_struct_field (const char *name, int type) |
static GSL_StructField * | gsl_new_struct_field_struct (const char *name, const char *type) |
static GSL_Struct * | gsl_new_struct (GSL_StructField *field) |
static void | gsl_add_struct_field (GSL_Struct *s, GSL_StructField *field) |
int | gsl_type_of_var (GoomHash *ns, const char *name) |
static void | gsl_declare_var (GoomHash *ns, const char *name, int type, void *space) |
static void | gsl_struct_decl (GoomHash *namespace, const char *struct_name, const char *name) |
static void | gsl_float_decl_global (const char *name) |
static void | gsl_int_decl_global (const char *name) |
static void | gsl_ptr_decl_global (const char *name) |
static void | gsl_struct_decl_global_from_id (const char *name, int id) |
static void | gsl_float_decl_local (const char *name) |
static void | gsl_int_decl_local (const char *name) |
static void | gsl_ptr_decl_local (const char *name) |
static void | gsl_struct_decl_local (const char *struct_name, const char *name) |
static void | commit_test2 (NodeType *set, const char *type, int instr) |
static NodeType * | new_call (const char *name, NodeType *affect_list) |
static NodeType * | new_set (NodeType *lvalue, NodeType *expression) |
static void | commit_set (NodeType *set) |
static NodeType * | new_plus_eq (NodeType *lvalue, NodeType *expression) |
static void | commit_plus_eq (NodeType *set) |
static NodeType * | new_sub_eq (NodeType *lvalue, NodeType *expression) |
static void | commit_sub_eq (NodeType *set) |
static NodeType * | new_mul_eq (NodeType *lvalue, NodeType *expression) |
static void | commit_mul_eq (NodeType *set) |
static NodeType * | new_div_eq (NodeType *lvalue, NodeType *expression) |
static void | commit_div_eq (NodeType *set) |
static void | precommit_expr (NodeType *expr, const char *type, int instr_id) |
static NodeType * | new_expr1 (const char *name, int id, NodeType *expr1) |
static NodeType * | new_expr2 (const char *name, int id, NodeType *expr1, NodeType *expr2) |
static NodeType * | new_add (NodeType *expr1, NodeType *expr2) |
static void | precommit_add (NodeType *add) |
static NodeType * | new_sub (NodeType *expr1, NodeType *expr2) |
static void | precommit_sub (NodeType *sub) |
static NodeType * | new_neg (NodeType *expr) |
static NodeType * | new_mul (NodeType *expr1, NodeType *expr2) |
static void | precommit_mul (NodeType *mul) |
static NodeType * | new_div (NodeType *expr1, NodeType *expr2) |
static void | precommit_div (NodeType *mul) |
static NodeType * | new_call_expr (const char *name, NodeType *affect_list) |
static void | precommit_call_expr (NodeType *call) |
static NodeType * | new_not (NodeType *expr1) |
static void | commit_not (NodeType *set) |
static NodeType * | new_equ (NodeType *expr1, NodeType *expr2) |
static void | commit_equ (NodeType *mul) |
static NodeType * | new_low (NodeType *expr1, NodeType *expr2) |
static void | commit_low (NodeType *mul) |
static NodeType * | new_while (NodeType *expression, NodeType *instr) |
static void | commit_while (NodeType *node) |
static NodeType * | new_static_foreach (NodeType *var, NodeType *var_list, NodeType *instr) |
static void | commit_foreach (NodeType *node) |
static NodeType * | new_if (NodeType *expression, NodeType *instr) |
static void | commit_if (NodeType *node) |
static NodeType * | new_block (NodeType *lastNode) |
static void | commit_block (NodeType *node) |
static NodeType * | new_function_intro (const char *name) |
static void | commit_function_intro (NodeType *node) |
static NodeType * | new_function_outro () |
static void | commit_function_outro (NodeType *node) |
static NodeType * | new_affec_list (NodeType *set, NodeType *next) |
static NodeType * | new_affect_list_after (NodeType *affect_list) |
static void | commit_affect_list (NodeType *node) |
static NodeType * | new_var_list (NodeType *var, NodeType *next) |
static void | commit_var_list (NodeType *node) |
static void | commit_ext_call (NodeType *node) |
static void | commit_call (NodeType *node) |
static NodeType * | gsl_append (NodeType *curNode) |
void | gsl_commit_compilation () |
static void | gsl_declare_global_variable (int type, char *name) |
static void | yydestruct (int yytype, YYSTYPE *yyvaluep) |
int | yyparse () |
Variables | |
GoomSL * | currentGoomSL |
static NodeType * | rootNode = 0 |
static NodeType * | lastNode = 0 |
static int | lastLabel = 0 |
static const unsigned char | yytranslate [] |
static const unsigned char | yyr1 [] |
static const unsigned char | yyr2 [] |
static const unsigned char | yydefact [] |
static const short | yydefgoto [] |
static const short | yypact [] |
static const yysigned_char | yypgoto [] |
static const unsigned char | yytable [] |
static const short | yycheck [] |
static const unsigned char | yystos [] |
int | yychar |
YYSTYPE | yylval |
int | yynerrs |
#define ALIGN_ADDR | ( | _addr, | |
_align | |||
) |
#define DECLARE 265 |
#define DIV_EQ 272 |
#define DO 268 |
#define EXTERNAL 266 |
#define FLOAT_TK 264 |
#define FOR 278 |
#define IN 279 |
#define INT_TK 263 |
#define LOW_EQ 275 |
#define LTYPE_FLOAT 259 |
#define LTYPE_INTEGER 258 |
#define LTYPE_PTR 261 |
#define LTYPE_VAR 260 |
#define MUL_EQ 273 |
#define NOT 269 |
#define NOT_EQ 276 |
#define PLUS_EQ 270 |
#define PTR_TK 262 |
#define STRUCT 277 |
#define STRUCT_ALIGNMENT 16 |
#define SUB_EQ 271 |
#define SUP_EQ 274 |
#define WHILE 267 |
#define YY_REDUCE_PRINT | ( | Rule | ) |
#define YY_STACK_PRINT | ( | Bottom, | |
Top | |||
) |
#define YYABORT goto yyabortlab |
#define YYACCEPT goto yyacceptlab |
#define YYBACKUP | ( | Token, | |
Value | |||
) |
#define YYBISON 1 |
#define YYCOPY | ( | To, | |
From, | |||
Count | |||
) |
#define YYDEBUG 0 |
#define YYDPRINTF | ( | Args | ) |
#define YYDSYMPRINT | ( | Args | ) |
#define YYDSYMPRINTF | ( | Title, | |
Token, | |||
Value, | |||
Location | |||
) |
#define YYEMPTY (-2) |
#define YYEOF 0 |
#define YYERRCODE 256 |
#define yyerrok (yyerrstatus = 0) |
#define YYERROR goto yyerrlab1 |
#define YYERROR_VERBOSE 0 |
#define YYFAIL goto yyerrlab |
#define YYFINAL 3 |
#define YYINITDEPTH 200 |
#define YYLAST 229 |
#define YYLEX yylex () |
#define YYLLOC_DEFAULT | ( | Current, | |
Rhs, | |||
N | |||
) |
#define YYLSP_NEEDED 0 |
#define YYMAXDEPTH 10000 |
#define YYMAXUTOK 279 |
#define YYNNTS 30 |
#define YYNRULES 89 |
#define YYNSTATES 217 |
#define YYNTOKENS 42 |
#define YYPACT_NINF -116 |
#define YYPOPSTACK (yyvsp--, yyssp--) |
#define YYPURE 0 |
#define YYRECOVERING | ( | ) | (!!yyerrstatus) |
#define YYSIZE_T unsigned int |
#define YYSKELETON_NAME "yacc.c" |
#define YYSTACK_ALLOC malloc |
#define YYSTACK_BYTES | ( | N | ) |
#define YYSTACK_FREE free |
#define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
#define YYSTACK_RELOCATE | ( | Stack | ) |
#define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
#define YYSTYPE_IS_DECLARED 1 |
#define YYSTYPE_IS_TRIVIAL 1 |
#define YYTABLE_NINF -1 |
#define YYTERROR 1 |
#define YYTOKENTYPE |
#define YYTRANSLATE | ( | YYX | ) | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
#define YYUNDEFTOK 2 |
typedef short yysigned_char |
enum yytokentype |
|
static |
References lastLabel.
Referenced by allocateTemp(), commit_foreach(), commit_if(), and commit_while().
|
static |
References allocateLabel().
Referenced by commit_test2(), precommit_call_expr(), and precommit_expr().
|
static |
References commit_node(), NULL, _OprNodeType::op, _NODE_TYPE::opr, precommit_node(), and _NODE_TYPE::unode.
Referenced by commit_node().
|
static |
References commit_node(), _OprNodeType::next, _OprNodeType::op, _NODE_TYPE::opr, and _NODE_TYPE::unode.
Referenced by commit_node().
|
static |
References commit_node(), currentGoomSL, gsl_instr_add_param(), gsl_instr_init(), _GoomSL::instr, INSTR_CALL, _NODE_TYPE::line_number, new_affect_list_after(), _OprNodeType::op, _NODE_TYPE::opr, _NODE_TYPE::str, TYPE_LABEL, and _NODE_TYPE::unode.
Referenced by commit_node().
|
static |
References commit_node(), currentGoomSL, gsl_instr_init(), _GoomSL::instr, INSTR_DIV, _NODE_TYPE::line_number, _OprNodeType::op, _NODE_TYPE::opr, precommit_node(), _NODE_TYPE::str, and _NODE_TYPE::unode.
Referenced by commit_node().
|
static |
References commit_test2(), and INSTR_ISEQUAL.
Referenced by commit_node().
|
static |
References commit_node(), currentGoomSL, gsl_instr_add_param(), gsl_instr_init(), _GoomSL::instr, INSTR_EXT_CALL, _NODE_TYPE::line_number, new_affect_list_after(), _OprNodeType::op, _NODE_TYPE::opr, _NODE_TYPE::str, TYPE_VAR, and _NODE_TYPE::unode.
Referenced by commit_node().
|
static |
References allocateLabel(), commit_node(), currentGoomSL, gsl_instr_add_param(), gsl_instr_init(), GSL_PUT_JUMP(), GSL_PUT_LABEL(), _GoomSL::instr, INSTR_CALL, INSTR_RET, _NODE_TYPE::line_number, new_set(), nodeClone(), nodeFree(), NULL, _OprNodeType::op, _NODE_TYPE::opr, precommit_node(), TYPE_LABEL, and _NODE_TYPE::unode.
Referenced by commit_node().
|
static |
References currentGoomSL, gsl_instr_add_param(), gsl_instr_init(), _GoomSL::instr, INSTR_LABEL, _NODE_TYPE::line_number, _NODE_TYPE::str, and TYPE_LABEL.
Referenced by commit_node().
|
static |
References currentGoomSL, gsl_instr_add_param(), gsl_instr_init(), _GoomSL::instr, INSTR_RET, _NODE_TYPE::line_number, releaseAllTemps(), and TYPE_LABEL.
Referenced by commit_node().
|
static |
References allocateLabel(), commit_node(), GSL_PUT_JZERO(), GSL_PUT_LABEL(), _NODE_TYPE::line_number, _OprNodeType::op, _NODE_TYPE::opr, and _NODE_TYPE::unode.
Referenced by commit_node().
|
static |
References commit_test2(), and INSTR_ISLOWER.
Referenced by commit_node().
|
static |
References commit_node(), currentGoomSL, gsl_instr_init(), _GoomSL::instr, INSTR_MUL, _NODE_TYPE::line_number, _OprNodeType::op, _NODE_TYPE::opr, precommit_node(), _NODE_TYPE::str, and _NODE_TYPE::unode.
Referenced by commit_node().
|
static |
References commit_affect_list(), commit_block(), commit_call(), commit_div_eq(), commit_equ(), commit_ext_call(), commit_foreach(), commit_function_intro(), commit_function_outro(), commit_if(), commit_low(), commit_mul_eq(), commit_node(), commit_not(), commit_plus_eq(), commit_set(), commit_sub_eq(), commit_var_list(), commit_while(), CONST_FLOAT_NODE, CONST_INT_NODE, CONST_PTR_NODE, currentGoomSL, EMPTY_NODE, get_tmp_id(), gsl_instr_add_param(), gsl_instr_set_namespace(), _GoomSL::instr, is_tmp_expr(), _OprNodeType::next, nodeFree(), _NODE_TYPE::opr, OPR_AFFECT_LIST, OPR_BLOCK, OPR_CALL, OPR_DIV_EQ, OPR_EQU, OPR_EXT_CALL, OPR_FOREACH, OPR_FUNC_INTRO, OPR_FUNC_OUTRO, OPR_IF, OPR_LOW, OPR_MUL_EQ, OPR_NODE, OPR_NOT, OPR_PLUS_EQ, OPR_SET, OPR_SUB_EQ, OPR_VAR_LIST, OPR_WHILE, releaseTemp(), _NODE_TYPE::str, _OprNodeType::type, _NODE_TYPE::type, TYPE_FLOAT, TYPE_INTEGER, TYPE_PTR, TYPE_VAR, _NODE_TYPE::unode, VAR_NODE, and _NODE_TYPE::vnamespace.
Referenced by commit_affect_list(), commit_block(), commit_call(), commit_div_eq(), commit_ext_call(), commit_foreach(), commit_if(), commit_mul_eq(), commit_node(), commit_not(), commit_plus_eq(), commit_sub_eq(), commit_test2(), commit_while(), gsl_commit_compilation(), precommit_call_expr(), and precommit_expr().
|
static |
References commit_node(), currentGoomSL, gsl_instr_add_param(), gsl_instr_init(), _GoomSL::instr, INSTR_NOT, _NODE_TYPE::line_number, _OprNodeType::op, _NODE_TYPE::opr, TYPE_LABEL, and _NODE_TYPE::unode.
Referenced by commit_node().
|
static |
References commit_node(), currentGoomSL, gsl_instr_init(), _GoomSL::instr, INSTR_ADD, _NODE_TYPE::line_number, _OprNodeType::op, _NODE_TYPE::opr, precommit_node(), _NODE_TYPE::str, and _NODE_TYPE::unode.
Referenced by commit_node().
|
static |
References commit_test2(), and INSTR_SET.
Referenced by commit_node().
|
static |
References commit_node(), currentGoomSL, gsl_instr_init(), _GoomSL::instr, INSTR_SUB, _NODE_TYPE::line_number, _OprNodeType::op, _NODE_TYPE::opr, precommit_node(), _NODE_TYPE::str, and _NODE_TYPE::unode.
Referenced by commit_node().
|
static |
References allocateTemp(), commit_node(), CONST_FLOAT_NODE, CONST_INT_NODE, CONST_PTR_NODE, currentGoomSL, gsl_float_decl_global(), gsl_instr_init(), gsl_int_decl_global(), gsl_ptr_decl_global(), _GoomSL::instr, INSTR_SET, _NODE_TYPE::line_number, new_set(), new_var(), nodeClone(), _OprNodeType::op, _NODE_TYPE::opr, precommit_node(), _NODE_TYPE::str, _NODE_TYPE::type, and _NODE_TYPE::unode.
Referenced by commit_equ(), commit_low(), and commit_set().
|
static |
Referenced by commit_node().
|
static |
References allocateLabel(), commit_node(), GSL_PUT_JNZERO(), GSL_PUT_JUMP(), GSL_PUT_LABEL(), _NODE_TYPE::line_number, _OprNodeType::op, _NODE_TYPE::opr, and _NODE_TYPE::unode.
Referenced by commit_node().
|
static |
References _NODE_TYPE::str.
Referenced by commit_node().
|
static |
References currentGoomSL, goom_hash_put_int(), gsl_get_struct_id(), gsl_prepare_struct(), _GoomSL::gsl_struct, _GoomSL::gsl_struct_size, name, _GoomSL::nbStructID, STRUCT_ALIGNMENT, and _GoomSL::structIDS.
Referenced by yyparse().
|
static |
References field, _GSL_Struct::fields, and _GSL_Struct::nbFields.
Referenced by yyparse().
References lastNode, _OprNodeType::next, _NODE_TYPE::opr, rootNode, and _NODE_TYPE::unode.
Referenced by yyparse().
void gsl_commit_compilation | ( | void | ) |
References commit_node(), lastNode, and rootNode.
Referenced by gsl_compile().
|
static |
References FLOAT_TK, gsl_float_decl_global(), gsl_int_decl_global(), gsl_ptr_decl_global(), gsl_struct_decl_global_from_id(), INT_TK, name, and PTR_TK.
Referenced by yyparse().
|
static |
References currentGoomSL, _GoomSL::data_heap, _GSL_Struct::fields, FIRST_RESERVED, goom_hash_put_int(), goom_hash_put_ptr(), goom_heap_malloc_with_alignment(), goom_heap_malloc_with_alignment_prefixed(), gsl_declare_var(), _GoomSL::gsl_struct, INSTR_FLOAT, INSTR_INT, INSTR_PTR, name, _GSL_StructField::name, _GSL_Struct::nbFields, NULL, _GSL_StructField::offsetInStruct, _GSL_Struct::size, STRUCT_ALIGNMENT, _GSL_StructField::type, and _GoomSL::vars.
Referenced by gsl_declare_var(), gsl_float_decl_global(), gsl_float_decl_local(), gsl_int_decl_global(), gsl_int_decl_local(), gsl_ptr_decl_global(), gsl_ptr_decl_local(), gsl_struct_decl(), and gsl_struct_decl_global_from_id().
|
static |
References currentGoomSL, gsl_declare_var(), INSTR_FLOAT, name, NULL, and _GoomSL::vars.
Referenced by commit_test2(), gsl_declare_global_variable(), precommit_call_expr(), and precommit_expr().
|
static |
References currentGoomSL, _GoomSL::currentNS, gsl_declare_var(), INSTR_FLOAT, name, _GoomSL::namespaces, and NULL.
Referenced by yyparse().
|
static |
References currentGoomSL, goom_hash_get(), HashValue::i, name, NULL, and _GoomSL::structIDS.
Referenced by gsl_add_struct(), gsl_new_struct_field_struct(), gsl_struct_decl(), and yyparse().
|
static |
References currentGoomSL, gsl_declare_var(), INSTR_INT, name, NULL, and _GoomSL::vars.
Referenced by commit_test2(), gsl_declare_global_variable(), precommit_call_expr(), and precommit_expr().
|
static |
References currentGoomSL, _GoomSL::currentNS, gsl_declare_var(), INSTR_INT, name, _GoomSL::namespaces, and NULL.
Referenced by yyparse().
|
static |
References field, _GSL_Struct::fields, and _GSL_Struct::nbFields.
Referenced by yyparse().
|
static |
Referenced by gsl_new_struct_field_struct(), and yyparse().
|
static |
References currentGoomSL, field, gsl_get_struct_id(), gsl_new_struct_field(), name, and _GoomSL::num_lines.
Referenced by yyparse().
|
static |
References ALIGN_ADDR, currentGoomSL, _Block::data, _GSL_Struct::fBlock, _GSL_Struct::fields, FIRST_RESERVED, gsl_prepare_struct(), _GoomSL::gsl_struct, _GSL_Struct::iBlock, INSTR_FLOAT, INSTR_INT, INSTR_PTR, _GSL_Struct::nbFields, _GSL_StructField::offsetInStruct, _Block::size, _GSL_Struct::size, and _GSL_StructField::type.
Referenced by gsl_add_struct(), and gsl_prepare_struct().
|
static |
References currentGoomSL, gsl_declare_var(), INSTR_PTR, name, NULL, and _GoomSL::vars.
Referenced by commit_test2(), gsl_declare_global_variable(), precommit_call_expr(), and precommit_expr().
|
static |
References currentGoomSL, _GoomSL::currentNS, gsl_declare_var(), INSTR_PTR, name, _GoomSL::namespaces, and NULL.
Referenced by yyparse().
|
static |
References GSL_PUT_JXXX(), INSTR_JNZERO, and name.
Referenced by commit_while().
|
static |
References currentGoomSL, gsl_instr_add_param(), gsl_instr_init(), _GoomSL::instr, INSTR_JUMP, name, and TYPE_LABEL.
Referenced by commit_foreach(), and commit_while().
|
static |
References currentGoomSL, gsl_instr_add_param(), gsl_instr_init(), _GoomSL::instr, name, and TYPE_LABEL.
Referenced by GSL_PUT_JNZERO(), and GSL_PUT_JZERO().
|
static |
References GSL_PUT_JXXX(), INSTR_JZERO, and name.
Referenced by commit_if().
|
static |
References currentGoomSL, gsl_instr_add_param(), gsl_instr_init(), _GoomSL::instr, INSTR_LABEL, name, and TYPE_LABEL.
Referenced by commit_foreach(), commit_if(), and commit_while().
|
static |
References gsl_declare_var(), gsl_get_struct_id(), name, and NULL.
Referenced by gsl_struct_decl_local().
|
static |
References currentGoomSL, gsl_declare_var(), name, NULL, and _GoomSL::vars.
Referenced by gsl_declare_global_variable(), precommit_call_expr(), and precommit_expr().
|
static |
References currentGoomSL, _GoomSL::currentNS, gsl_struct_decl(), name, and _GoomSL::namespaces.
Referenced by yyparse().
int gsl_type_of_var | ( | GoomHash * | ns, |
const char * | name | ||
) |
References goom_hash_get(), HashValue::i, name, and NULL.
Referenced by gsl_instr_validate(), new_neg(), precommit_call_expr(), and precommit_expr().
|
static |
References INSTR_ADD, INSTR_ISEQUAL, and INSTR_MUL.
Referenced by precommit_expr().
|
static |
References _NODE_TYPE::str.
Referenced by commit_node(), and precommit_expr().
References new_expr2(), and OPR_ADD.
Referenced by yyparse().
References new_op(), _OprNodeType::op, _NODE_TYPE::opr, OPR_AFFECT_LIST, and _NODE_TYPE::unode.
Referenced by new_affect_list_after(), and yyparse().
References new_affec_list(), new_set(), nodeClone(), NULL, _OprNodeType::op, _NODE_TYPE::opr, _NODE_TYPE::str, _NODE_TYPE::type, _NODE_TYPE::unode, and VAR_NODE.
Referenced by commit_call(), and commit_ext_call().
References lastNode, new_nop(), new_op(), _OprNodeType::op, _NODE_TYPE::opr, OPR_BLOCK, and _NODE_TYPE::unode.
Referenced by yyparse().
References currentGoomSL, _GoomSL::functions, goom_hash_get(), gsl_declare_task(), _ExternalFunctionStruct::is_extern, name, new_op(), NULL, _GoomSL::num_lines, _OprNodeType::op, _NODE_TYPE::opr, OPR_CALL, OPR_EXT_CALL, HashValue::ptr, and _NODE_TYPE::unode.
Referenced by new_call_expr(), and yyparse().
References currentGoomSL, gsl_find_namespace(), name, new_call(), new_expr1(), NULL, _GoomSL::num_lines, OPR_CALL_EXPR, and _NODE_TYPE::vnamespace.
Referenced by yyparse().
|
static |
References CONST_FLOAT_NODE, _NODE_TYPE::constFloat, nodeNew(), _NODE_TYPE::unode, and _ConstFloatNodeType::val.
|
static |
References CONST_INT_NODE, _NODE_TYPE::constInt, nodeNew(), _NODE_TYPE::unode, and _ConstIntNodeType::val.
|
static |
References CONST_PTR_NODE, _NODE_TYPE::constPtr, _ConstPtrNodeType::id, nodeNew(), NULL, and _NODE_TYPE::unode.
Referenced by yyparse().
References new_expr2(), and OPR_DIV.
Referenced by yyparse().
References new_op(), _OprNodeType::op, _NODE_TYPE::opr, OPR_DIV_EQ, and _NODE_TYPE::unode.
Referenced by yyparse().
References new_expr2(), and OPR_EQU.
Referenced by yyparse().
References name, new_op(), _OprNodeType::op, _NODE_TYPE::opr, and _NODE_TYPE::unode.
Referenced by new_call_expr(), and new_not().
|
static |
References name, new_op(), _OprNodeType::op, _NODE_TYPE::opr, and _NODE_TYPE::unode.
Referenced by new_add(), new_div(), new_equ(), new_low(), new_mul(), new_neg(), and new_sub().
|
static |
References name, new_op(), and OPR_FUNC_INTRO.
Referenced by yyparse().
|
static |
References new_op(), and OPR_FUNC_OUTRO.
Referenced by yyparse().
References new_op(), _OprNodeType::op, _NODE_TYPE::opr, OPR_IF, and _NODE_TYPE::unode.
Referenced by yyparse().
References new_expr2(), and OPR_LOW.
Referenced by yyparse().
References new_expr2(), and OPR_MUL.
Referenced by yyparse().
References new_op(), _OprNodeType::op, _NODE_TYPE::opr, OPR_MUL_EQ, and _NODE_TYPE::unode.
Referenced by yyparse().
References CONST_FLOAT_NODE, CONST_INT_NODE, CONST_PTR_NODE, currentGoomSL, gsl_type_of_var(), INSTR_FLOAT, INSTR_INT, INSTR_PTR, _NODE_TYPE::line_number, new_constFloat(), new_constInt(), new_expr2(), NULL, _GoomSL::num_lines, _OprNodeType::op, _NODE_TYPE::opr, OPR_SUB, _NODE_TYPE::str, _NODE_TYPE::type, _NODE_TYPE::unode, and _NODE_TYPE::vnamespace.
Referenced by yyparse().
|
static |
References EMPTY_NODE, and new_op().
Referenced by new_block().
References new_expr1(), and OPR_NOT.
Referenced by yyparse().
|
static |
References currentGoomSL, _OprNodeType::nbOp, _OprNodeType::next, nodeNew(), _GoomSL::num_lines, _OprNodeType::op, _NODE_TYPE::opr, OPR_NODE, _OprNodeType::type, and _NODE_TYPE::unode.
Referenced by new_affec_list(), new_block(), new_call(), new_div_eq(), new_expr1(), new_expr2(), new_function_intro(), new_function_outro(), new_if(), new_mul_eq(), new_nop(), new_plus_eq(), new_set(), new_static_foreach(), new_sub_eq(), new_var_list(), and new_while().
References new_op(), _OprNodeType::op, _NODE_TYPE::opr, OPR_PLUS_EQ, and _NODE_TYPE::unode.
Referenced by yyparse().
References new_op(), _OprNodeType::op, _NODE_TYPE::opr, OPR_SET, and _NODE_TYPE::unode.
Referenced by commit_foreach(), commit_test2(), new_affect_list_after(), precommit_call_expr(), precommit_expr(), and yyparse().
|
static |
References currentGoomSL, _NODE_TYPE::line_number, new_op(), _GoomSL::num_lines, _OprNodeType::op, _NODE_TYPE::opr, OPR_FOREACH, and _NODE_TYPE::unode.
Referenced by yyparse().
References new_expr2(), and OPR_SUB.
Referenced by yyparse().
References new_op(), _OprNodeType::op, _NODE_TYPE::opr, OPR_SUB_EQ, and _NODE_TYPE::unode.
Referenced by yyparse().
|
static |
References gsl_find_namespace(), nodeNew(), VAR_NODE, and _NODE_TYPE::vnamespace.
Referenced by commit_test2(), precommit_call_expr(), precommit_expr(), and yyparse().
References new_op(), _OprNodeType::op, _NODE_TYPE::opr, OPR_VAR_LIST, and _NODE_TYPE::unode.
Referenced by yyparse().
References new_op(), _OprNodeType::op, _NODE_TYPE::opr, OPR_WHILE, and _NODE_TYPE::unode.
Referenced by yyparse().
References _NODE_TYPE::line_number, nodeNew(), _NODE_TYPE::str, _NODE_TYPE::type, _NODE_TYPE::unode, and _NODE_TYPE::vnamespace.
Referenced by commit_foreach(), commit_test2(), new_affect_list_after(), precommit_call_expr(), and precommit_expr().
|
static |
References nodeFreeInternals().
Referenced by commit_foreach(), and commit_node().
|
static |
References _NODE_TYPE::str.
Referenced by nodeFree(), precommit_call_expr(), and precommit_expr().
|
static |
References _NODE_TYPE::line_number, NULL, _NODE_TYPE::str, _NODE_TYPE::type, and _NODE_TYPE::vnamespace.
Referenced by new_constFloat(), new_constInt(), new_constPtr(), new_op(), new_var(), and nodeClone().
|
static |
References INSTR_ADD, and precommit_expr().
Referenced by precommit_node().
|
static |
References allocateTemp(), commit_node(), gsl_float_decl_global(), gsl_int_decl_global(), gsl_ptr_decl_global(), gsl_struct_decl_global_from_id(), gsl_type_of_var(), INSTR_FLOAT, INSTR_INT, INSTR_PTR, _NODE_TYPE::line_number, new_set(), new_var(), nodeClone(), nodeFreeInternals(), _OprNodeType::op, _NODE_TYPE::opr, _NODE_TYPE::str, _NODE_TYPE::unode, and _NODE_TYPE::vnamespace.
Referenced by precommit_node().
|
static |
References INSTR_DIV, and precommit_expr().
Referenced by precommit_node().
|
static |
References allocateTemp(), commit_node(), CONST_FLOAT_NODE, CONST_INT_NODE, CONST_PTR_NODE, currentGoomSL, gsl_float_decl_global(), gsl_instr_init(), gsl_int_decl_global(), gsl_ptr_decl_global(), gsl_struct_decl_global_from_id(), gsl_type_of_var(), _GoomSL::instr, INSTR_FLOAT, INSTR_INT, INSTR_PTR, is_commutative_expr(), is_tmp_expr(), _NODE_TYPE::line_number, _OprNodeType::nbOp, new_set(), new_var(), nodeClone(), nodeFreeInternals(), _OprNodeType::op, _NODE_TYPE::opr, precommit_node(), _NODE_TYPE::str, _NODE_TYPE::type, _NODE_TYPE::unode, and _NODE_TYPE::vnamespace.
Referenced by precommit_add(), precommit_div(), precommit_mul(), and precommit_sub().
|
static |
References INSTR_MUL, and precommit_expr().
Referenced by precommit_node().
|
static |
References _NODE_TYPE::opr, OPR_ADD, OPR_CALL_EXPR, OPR_DIV, OPR_MUL, OPR_NODE, OPR_SUB, precommit_add(), precommit_call_expr(), precommit_div(), precommit_mul(), precommit_sub(), _OprNodeType::type, _NODE_TYPE::type, and _NODE_TYPE::unode.
Referenced by commit_affect_list(), commit_div_eq(), commit_foreach(), commit_mul_eq(), commit_plus_eq(), commit_sub_eq(), commit_test2(), and precommit_expr().
|
static |
References INSTR_SUB, and precommit_expr().
Referenced by precommit_node().
|
static |
Referenced by commit_function_outro().
|
static |
Referenced by commit_node().
void yyerror | ( | const char * | str | ) |
References _GoomSL::compilationOK, currentGoomSL, and _GoomSL::num_lines.
Referenced by yyparse().
int yylex | ( | void | ) |
The main scanner function which does all the work.
References BEGIN, C_COMMENT, YYSTYPE::charValue, currentGoomSL, DECLARE, DIV_EQ, DO, ECHO, EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, EXTERNAL, FLOAT_TK, FOR, gsl_malloc(), IN, INITIAL, INT_TK, LINE_COMMENT, LOW_EQ, LTYPE_FLOAT, LTYPE_INTEGER, LTYPE_PTR, LTYPE_VAR, MUL_EQ, NOT, NOT_EQ, _GoomSL::num_lines, PLUS_EQ, PTR_TK, _GoomSL::ptrArray, STRING, string_size, STRUCT, YYSTYPE::strValue, SUB_EQ, SUP_EQ, WHILE, yy_accept, yy_acclist, YY_AT_BOL, yy_base, YY_BREAK, YY_BUF_SIZE, YY_BUFFER_NEW, YY_BUFFER_NORMAL, yy_c_buf_p, yy_chk, yy_create_buffer(), YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_def, yy_did_buffer_switch_on_eof, YY_DO_BEFORE_ACTION, yy_ec, YY_END_OF_BUFFER, YY_FATAL_ERROR, yy_full_match, yy_get_next_buffer(), yy_get_previous_state(), yy_hold_char, yy_init, yy_load_buffer_state(), yy_lp, yy_meta, YY_MORE_ADJ, yy_n_chars, YY_NEW_FILE, yy_nxt, yy_prev_more_offset, YY_RESTORE_YY_MORE_OFFSET, yy_rule_can_match_eol, YY_RULE_SETUP, YY_SC_TO_UI, YY_START, yy_start, yy_state_buf, YY_STATE_EOF, yy_state_ptr, yy_try_NUL_trans(), yyalloc(), yyensure_buffer_stack(), yyin, yyleng, yylineno, yylval, yyout, yyterminate, yytext, yytext_ptr, and yywrap().
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().
|
extern |
Referenced by commit_call(), commit_div_eq(), commit_ext_call(), commit_foreach(), commit_function_intro(), commit_function_outro(), commit_mul_eq(), commit_node(), commit_not(), commit_plus_eq(), commit_sub_eq(), commit_test2(), gsl_add_struct(), gsl_compile(), gsl_create_fast_iflow(), gsl_declare_external_task(), gsl_declare_task(), gsl_declare_var(), gsl_enternamespace(), gsl_find_namespace(), gsl_float_decl_global(), gsl_float_decl_local(), gsl_get_struct_id(), gsl_int_decl_global(), gsl_int_decl_local(), gsl_leavenamespace(), gsl_new_struct_field_struct(), gsl_prepare_struct(), gsl_ptr_decl_global(), gsl_ptr_decl_local(), GSL_PUT_JUMP(), GSL_PUT_JXXX(), GSL_PUT_LABEL(), gsl_reenternamespace(), gsl_struct_decl_global_from_id(), gsl_struct_decl_local(), new_call(), new_call_expr(), new_neg(), new_op(), new_static_foreach(), precommit_expr(), yyerror(), yylex(), and yyparse().
|
static |
Referenced by allocateLabel().
|
static |
Referenced by gsl_append(), gsl_commit_compilation(), new_block(), and yyparse().
|
static |
Referenced by gsl_append(), and gsl_commit_compilation().
int yychar |
Referenced by yyparse().
|
static |
Referenced by yyparse().
|
static |
Referenced by yyparse().
|
static |
Referenced by yyparse().
int yynerrs |
Referenced by yyparse().
|
static |
Referenced by yyparse().
|
static |
Referenced by yyparse().
|
static |
Referenced by yyparse().
|
static |
Referenced by yyparse().
|
static |
Referenced by yyparse().
|
static |
Referenced by yyparse().
|
static |