piinit.h
Go to the documentation of this file.
1 
9 
10 #ifndef PIINIT_H
11 #define PIINIT_H
12 #include "picell.h"
13 #include "piparser.h"
14 #include "pisettings.h"
15 #include "pistack.h"
16 #include <stdio.h>
17 
18 // ==================== Builtin Lambdas Structure ====================
20 size_t builtin_lambdas_index; // first free cell
21 
22 // ==================== Builtin Macro Structure ====================
24 size_t builtin_macros_index; // first free cell
25 
26 /********************************************************************************
27  * Init Functions
28  ********************************************************************************/
29 
36 void init_pi(); // always call this before using pilisp
37 
42 void init_builtin_macros();
43 
49 
54 void init_stack();
55 
56 
61 void init_env(); // inits the global env
62 
69 
70 
71 /********************************************************************************
72  * Free Functions
73  ********************************************************************************/
74 
75 void free_pi();
77 
78 /********************************************************************************
79  * Builtin Symbols
80  ********************************************************************************/
81 
82 // ==================== Lambdas ====================
87 cell *symbol_eq; // eq
124 
125 // ==================== Keyword Symbols ====================
127 
128 // ==================== Macros ====================
139 
140 #endif // !PIINIT_H
#define N_BUILTIN_MACRO
Number of builtin macros. It's used to create the array to store them.
Definition: pisettings.h:205
cell * symbol_bye
Definition: piinit.h:114
cell * symbol_symbolp
Definition: piinit.h:117
cell * symbol_lasm
Definition: piinit.h:123
cell * symbol_cdr
Definition: piinit.h:84
cell * symbol_file_ended
Definition: piinit.h:108
cell * symbol_label
Definition: piinit.h:96
cell * symbol_true
Definition: piinit.h:89
cell * symbol_division
Definition: piinit.h:94
#define N_BUILTIN_LAMBDA
Number of builtin lambdas. It's used to create the array to store them.
Definition: pisettings.h:199
cell * symbol_write
Definition: piinit.h:118
cell * symbol_string
Definition: piinit.h:126
cell * symbol_concatenate
Definition: piinit.h:121
void free_builtin_symbols()
Definition: piinit.c:115
cell * symbol_cond
Definition: piinit.h:134
cell * symbol_or
Definition: piinit.h:98
cell * symbol_cons
Definition: piinit.h:85
cell * symbol_nth
Definition: piinit.h:107
cell * symbol_lambda
Definition: piinit.h:95
cell * symbol_eq
Definition: piinit.h:87
cell * symbol_subseq
Definition: piinit.h:119
cell * symbol_car
Definition: piinit.h:83
cell * symbol_quote
Definition: piinit.h:135
void init_env()
Provides some non-builtin definitions, like 1+.
Definition: piinit.c:71
void init_builtin_lambdas()
Initializes the array of builtin lambdas.
Definition: piinit.c:25
cell * symbol_multiplication
Definition: piinit.h:93
cell * symbol_greater_equal
Definition: piinit.h:102
cell * symbol_not
Definition: piinit.h:100
cell * symbol_eq_math
Definition: piinit.h:88
cell * symbol_addition
Definition: piinit.h:91
cell * symbol_member
Definition: piinit.h:106
cell * symbol_asm
Definition: piinit.h:136
Basic Lisp entity.
Definition: picell.h:44
size_t builtin_lambdas_index
Definition: piinit.h:20
cell * symbol_defun
Definition: piinit.h:132
cell * symbol_mem_dump
Definition: piinit.h:110
cell BUILTIN_LAMBDAS[N_BUILTIN_LAMBDA]
Definition: piinit.h:19
void init_pi()
Initializes the variables and the structures that pilisp needs in order to properly work...
Definition: piinit.c:3
cell * symbol_less
Definition: piinit.h:103
cell * symbol_atom
Definition: piinit.h:86
void init_stack()
Initializes the variables to handle the stack.
Definition: piinit.c:69
cell * symbol_dotimes
Definition: piinit.h:112
cell * symbol_integerp
Definition: piinit.h:116
void free_pi()
Definition: piinit.c:110
size_t builtin_macros_index
Definition: piinit.h:24
cell * symbol_load
Definition: piinit.h:97
cell * symbol_env
Definition: piinit.h:109
cell * symbol_map
Definition: piinit.h:133
cell * symbol_timer
Definition: piinit.h:131
cell * symbol_subtraction
Definition: piinit.h:92
cell * symbol_greater
Definition: piinit.h:101
cell * symbol_and
Definition: piinit.h:99
cell * symbol_length
Definition: piinit.h:105
cell * symbol_list
Definition: piinit.h:113
void init_builtin_macros()
Initializes the array of builtin macros.
Definition: piinit.c:10
cell BUILTIN_MACROS[N_BUILTIN_MACRO]
Definition: piinit.h:23
cell * symbol_less_equal
Definition: piinit.h:104
cell * symbol_append
Definition: piinit.h:122
cell * symbol_collect_garbage
Definition: piinit.h:111
cell * symbol_compile
Definition: piinit.h:137
cell * symbol_setq
Definition: piinit.h:129
cell * symbol_let
Definition: piinit.h:130
cell * symbol_set
Definition: piinit.h:90
cell * symbol_reverse
Definition: piinit.h:120
cell * symbol_macro
Definition: piinit.h:115
char * get_compiler_source_hardcoded()
Get the compiler source hardcoded.
Definition: piinit.c:123