#include <string.h>
#include <gtk/gtk.h>
#include "mc.h"
#include "class.h"
#include "variable.h"
#include "turtle.h"
#include "debug.h"
Functions | |
void | mc_init (void) |
void | mc_free (void) |
gboolean | mc_beginning_procedure (gchar *name) |
void | mc_ending_procedure (void) |
gboolean | mc_add_proc_parameter (gchar *name) |
s_class * | mc_add_variable (var_locality_t locality, gchar *varname) |
s_class * | mc_add_variable_reference (gchar *varname) |
s_class * | mc_add_noarg_op (op_t op) |
s_class * | mc_add_unary_op (op_t op, struct s_class *arg) |
s_class * | mc_add_binary_op (op_t op, struct s_class *arg1, struct s_class *arg2) |
void | mc_update_branch (struct s_instr *instr, struct s_instr *dest) |
s_proc * | mc_find_procedure (gchar *name) |
Variables | |
s_turtle | my_turtle |
|
Add a binary expression (i.e "a + b"). visibility :: public
|
|
Add a expression with no argument (i.e "CS"). visibility :: public
|
|
Adding a parameter to the current procedure. visibility :: public @remarks: 1. the parameters when the procedure will be call shall be in the same order 2. parameter names must be unique
|
|
Add a unary expression (i.e "TD 10"). visibility :: public
|
|
!!! FAUX (l-expr)
Adding a variable reference (i.e. used in a right-expression). visibility :: public @remarks: 1. we must check that the variable exist (local variable, global variable or parameter)
|
|
Entering a new procedure. visibility :: public
|
|
Leaving the current procedure. visibility :: public @remarks: 1. the default procedure is the main one
|
|
Freeing and reinitializing all middle-code informations. visibility :: public
|
|
Update the destination of a branch instruction. visibility :: public @remarks: 1. the destination of a branch is the first argument of the branch instruction (the second is the optional condition)
|