#include <math.h>#include <time.h>#include <stdlib.h>#include <gtk/gtk.h>#include "exec.h"#include "turtle.h"#include "mc.h"#include "class.h"#include "type.h"#include "list.h"#include "proc.h"#include "instr.h"Typedefs | |
| typedef s_instr *(* | exec_clb_t )(struct s_instr *) |
Functions | |
| void | exec_execute_all () |
| void | exec_execute_proc (struct s_proc *proc) |
| s_instr * | exec_noop (struct s_instr *instr) |
| s_instr * | exec_proccall (struct s_instr *instr) |
| s_instr * | exec_return (struct s_instr *instr) |
| s_instr * | exec_moveforward (struct s_instr *instr) |
| s_instr * | exec_moveback (struct s_instr *instr) |
| s_instr * | exec_turnright (struct s_instr *instr) |
| s_instr * | exec_turnleft (struct s_instr *instr) |
| s_instr * | exec_setpos (struct s_instr *instr) |
| s_instr * | exec_setheading (struct s_instr *instr) |
| s_instr * | exec_clearscreen (struct s_instr *instr) |
| s_instr * | exec_hideturtle (struct s_instr *instr) |
| s_instr * | exec_showturtle (struct s_instr *instr) |
| s_instr * | exec_hidepen (struct s_instr *instr) |
| s_instr * | exec_showpen (struct s_instr *instr) |
| s_instr * | exec_setpredefcolor (struct s_instr *instr) |
| s_instr * | exec_setuserdefcolor (struct s_instr *instr) |
| s_instr * | exec_notrace (struct s_instr *instr) |
| s_instr * | exec_trace (struct s_instr *instr) |
| s_instr * | exec_write (struct s_instr *instr) |
| s_instr * | exec_stop (struct s_instr *instr) |
| s_instr * | exec_affect (struct s_instr *instr) |
| s_instr * | exec_locaffect (struct s_instr *instr) |
| s_instr * | exec_danse (struct s_instr *instr) |
| s_instr * | exec_sleep (struct s_instr *instr) |
| s_instr * | exec_getheading (struct s_instr *instr) |
| s_instr * | exec_hazard (struct s_instr *instr) |
| s_instr * | exec_repeat (struct s_instr *instr) |
| s_instr * | exec_loopcnt (struct s_instr *instr) |
| s_instr * | exec_if (struct s_instr *instr) |
| s_instr * | exec_else (struct s_instr *instr) |
| s_instr * | exec_while (struct s_instr *instr) |
| s_instr * | exec_jump (struct s_instr *instr) |
| s_instr * | exec_and (struct s_instr *instr) |
| s_instr * | exec_or (struct s_instr *instr) |
| s_instr * | exec_eq (struct s_instr *instr) |
| s_instr * | exec_lt (struct s_instr *instr) |
| s_instr * | exec_gt (struct s_instr *instr) |
| s_instr * | exec_leq (struct s_instr *instr) |
| s_instr * | exec_geq (struct s_instr *instr) |
| s_instr * | exec_add (struct s_instr *instr) |
| s_instr * | exec_sub (struct s_instr *instr) |
| s_instr * | exec_mul (struct s_instr *instr) |
| s_instr * | exec_div (struct s_instr *instr) |
| s_instr * | exec_uneg (struct s_instr *instr) |
Variables | |
| s_turtle | my_turtle |
| exec_clb_t | exec_clb [44] |
| gushort | predefined_colors [16][3] |
| valuetype_t | comparison_allowed_types [6][6] |
| valuetype_t | arithmetic_allowed_types [6][6] |
|
|
'ADD':: add arithmetic operator. visibility :: public
|
|
|
'AFFECT':: affect a value to a variable. visibility :: public
|
|
|
'AND':: and boolean operator. visibility :: public
|
|
|
'CLEARSCREEN':: clear the screen. visibility :: public
|
|
|
'DANSE':: make the turtle dancing :)). visibility :: public
|
|
|
'DIV':: div arithmetic operator. visibility :: public
|
|
|
'ELSE':: else instruction. visibility :: public
|
|
|
'EQ':: eq comparison operator. visibility :: public
|
|
|
main execution function. visibility :: public
|
|
|
execute a procedure. visibility :: public
|
|
|
'GEQ':: greater-or-equal comparison operator. visibility :: public
|
|
|
'GET HEADING':: get the current heading. visibility :: public
|
|
|
'GT':: greater-than comparison operator. visibility :: public
|
|
|
'HAZARD':: choose a hazardous number. visibility :: public
|
|
|
'HIDE PEN':: hide the pen (difference with NOTRACE ???). visibility :: public
|
|
|
'HIDE TURTLE':: hide the turtle. visibility :: public
|
|
|
'IF':: if instruction. visibility :: public
|
|
|
'JUMP':: unconditional jump. visibility :: public
|
|
|
'LEQ':: lower-or-equal comparison operator. visibility :: public
|
|
|
'LOCAFFECT':: affect a value to a local variable. visibility :: public
|
|
|
'LOOPCNT':: get the current loop counter. visibility :: public
|
|
|
'LT':: lower-than comparison operator. visibility :: public
|
|
|
'MOVE BACK':: move the turtle back. visibility :: public
|
|
|
'MOVE FORWARD':: move the turtle forward. visibility :: public
|
|
|
'MUL':: mul arithmetic operator. visibility :: public
|
|
|
'NOOP':: do nothing. visibility :: public
|
|
|
'NO TRACE':: don't trace (???). visibility :: public
|
|
|
'OR':: or boolean operator. visibility :: public
|
|
|
'PROCCAL':: procedure call. visibility :: public
|
|
|
'REPEAT':: repeat structure. visibility :: public
|
|
|
'RETURN':: ???. visibility :: public
|
|
|
'SET HEADING':: set the turtle heading. visibility :: public
|
|
|
'SET POS':: set the position of the turtle. visibility :: public
|
|
|
'SET PREDEF COLOR':: set predefined color. visibility :: public
|
|
|
'SET USERDEF COLOR':: set userdef color. visibility :: public
|
|
|
'SHOW PEN':: show the pen (see up). visibility :: public
|
|
|
'SHOW TURTLE':: show the turtle. visibility :: public
|
|
|
'DANSE':: make the turtle sleeping :)). visibility :: public
|
|
|
'STOP':: stop the execution. visibility :: public
|
|
|
'SUB':: sub arithmetic operator. visibility :: public
|
|
|
'TRACE':: trace (???). visibility :: public
|
|
|
'TURN LEFT':: turn the turtle left. visibility :: public
|
|
|
'TURN RIGHT':: turn the turtle right. visibility :: public
|
|
|
'UNEG':: uneg arithmetic operator. visibility :: public
|
|
|
'WHILE':: while instruction. visibility :: public
|
|
|
'WRITE':: write a string. visibility :: public
|
|
|
Initial value: {
{ T_ILLEGAL, T_ILLEGAL, T_ILLEGAL, T_ILLEGAL, T_ILLEGAL ,
T_ILLEGAL},
{ T_ILLEGAL, T_ILLEGAL, T_ILLEGAL, T_ILLEGAL, T_ILLEGAL ,
T_ILLEGAL},
{ T_ILLEGAL, T_ILLEGAL, T_INT , T_FLOAT , T_ILLEGAL ,
T_ILLEGAL},
{ T_ILLEGAL, T_ILLEGAL, T_FLOAT , T_FLOAT , T_ILLEGAL ,
T_ILLEGAL},
{ T_ILLEGAL, T_ILLEGAL, T_ILLEGAL, T_ILLEGAL, T_ILLEGAL ,
T_ILLEGAL},
{ T_ILLEGAL, T_ILLEGAL, T_ILLEGAL, T_ILLEGAL, T_ILLEGAL ,
T_ILLEGAL}
} |
|
|
Initial value: {
{ T_ILLEGAL, T_ILLEGAL, T_ILLEGAL, T_ILLEGAL, T_ILLEGAL ,
T_ILLEGAL},
{ T_ILLEGAL, T_ILLEGAL, T_ILLEGAL, T_ILLEGAL, T_ILLEGAL ,
T_ILLEGAL},
{ T_ILLEGAL, T_ILLEGAL, T_INT , T_FLOAT , T_ILLEGAL ,
T_ILLEGAL},
{ T_ILLEGAL, T_ILLEGAL, T_FLOAT , T_FLOAT , T_ILLEGAL ,
T_ILLEGAL},
{ T_ILLEGAL, T_ILLEGAL, T_ILLEGAL, T_ILLEGAL, T_BOOL ,
T_ILLEGAL},
{ T_ILLEGAL, T_ILLEGAL, T_ILLEGAL, T_ILLEGAL, T_ILLEGAL ,
T_STRING }
} |
|
|
Initial value: {
{ 0, 0, 0},
{ 0, 0, 65535},
{ 0, 65535, 0},
{ 0, 65535, 65535},
{ 65535, 0, 0},
{ 65535, 0, 65535},
{ 65535, 65535, 0},
{ 65535, 65535, 65535},
{ 39835, 24672, 15163},
{ 50629, 34952, 4626},
{ 25700, 41634, 16448},
{ 30840, 48059, 48059},
{ 65535, 38293, 30583},
{ 37008, 29041, 53456},
{ 65535, 41891, 0},
{ 47031, 47031, 47031}
} |
1.2.15