Skip to content

Commit e9ae86e

Browse files
committed
evaluation form command line support
1 parent 79c7335 commit e9ae86e

File tree

6 files changed

+225
-15
lines changed

6 files changed

+225
-15
lines changed

+++

Whitespace-only changes.

kisscomp.c

+66-11
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,49 @@ static void newcode(struct compstate* x, enum bytecode n) {
174174
x->codedata = 0;
175175
}
176176

177+
struct reader {
178+
void* ctx;
179+
int (*getc) (void*);
180+
int (*iseof) (void*);
181+
};
182+
177183
/*
178-
* Compilation function :p
184+
* Compile string :p
179185
*/
180-
int loadcode(struct kissfuck* kf, const char* filename) {
186+
static int sgetc(void* ctx) {
187+
const char** ptr = (const char**)ctx;
188+
char c = **ptr;
189+
if (c) (*ptr)++;
190+
return c;
191+
}
192+
193+
static int seof(void* ctx) {
194+
const char** ptr = (const char**)ctx;
195+
return (**ptr) == '\0';
196+
}
197+
198+
static const struct reader string_reader = {
199+
NULL, sgetc, seof
200+
};
201+
202+
static int ffgetc(void* ctx) {
203+
FILE* ptr = (FILE*)ctx;
204+
return getc(ptr);
205+
}
206+
207+
static int ffeof(void* ctx) {
208+
FILE* ptr = (FILE*)ctx;
209+
return feof(ptr);
210+
}
211+
212+
static const struct reader file_reader = {
213+
NULL, ffgetc, ffeof
214+
};
215+
216+
/*
217+
* Generic compilation function :p
218+
*/
219+
static int compile(struct kissfuck* kf, struct reader rd) {
181220
if (kf == ERR_ERR) return ERR_ERR;
182221
int status = ERR_OK;
183222
char ch;
@@ -190,16 +229,10 @@ int loadcode(struct kissfuck* kf, const char* filename) {
190229
// init
191230
stopcode(kf);
192231

193-
FILE *f = fopen(filename, "r");
194-
if (!f) {
195-
fprintf(stderr, "[compiler] : can't open file %s!\n", filename);
196-
return ERR_ERR;
197-
}
198-
199-
while ((ch = getc(f)) && !feof(f)) {
232+
while ((ch = rd.getc(rd.ctx)) && !rd.iseof(rd.ctx)) {
200233

201234
if (CHAR_COMM(ch)) { // comment
202-
while (getc(f) != '\n') {};
235+
while (rd.getc(rd.ctx) != '\n' && !rd.iseof(rd.ctx)) {};
203236
x->line++;
204237
} else if (VALID_TOKEN(ch)) {
205238
int val = 0;
@@ -265,8 +298,30 @@ int loadcode(struct kissfuck* kf, const char* filename) {
265298
}
266299

267300
end_it :
268-
fclose(f);
269301
return status;
270302
}
271303

304+
int loadcode(struct kissfuck* kf, const char* filename) {
305+
if (!filename) return ERR_ERR;
306+
FILE *f = fopen(filename, "r");
307+
if (!f) {
308+
fprintf(stderr, "[compiler] : can't open file %s!\n", filename);
309+
return ERR_ERR;
310+
}
311+
312+
struct reader rd = file_reader;
313+
rd.ctx = (void*)f;
314+
315+
int stat = compile(kf, rd);
316+
317+
fclose(f);
318+
return stat;
319+
}
320+
321+
int loadstring(struct kissfuck* kf, const char* string) {
322+
struct reader rd = string_reader;
323+
rd.ctx = (void*)(&string);
272324

325+
int stat = compile(kf, rd);
326+
return stat;
327+
}

kissfuck.c

+12-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424

2525
#define STR_USAGE "\tUSAGE :\n"\
2626
" $ %s [-h to help]\n $ %s [-v to version]\n"\
27-
" $ %s [filename]\n $ %s [-d to debug] [filename]\n"
27+
" $ %s [filename]\n $ %s [-d to debug] [filename]\n"\
28+
" $ %s [FLAGS...] -e [Brainfuck Code...]"
2829

2930
#define STR_HELP \
3031
"\tLANGUAGE :\n"\
@@ -39,13 +40,14 @@
3940
">\tChanges cell to next\n"
4041

4142
static const char* default_filename = "./test.bfk";
43+
static int do_eval = 0;
4244
static const char* argv0 = "NULL";
4345

4446
static inline void print_usage(int err) {
4547
if (err == 2) fprintf(stderr, "Bad Usage! ");
4648
if (err == 3) fprintf(stderr, "Bad Flag! ");
4749
if (err == 4) fprintf(stderr, " -- flags are not allowed! ");
48-
fprintf(stderr, STR_USAGE, argv0, argv0, argv0, argv0);
50+
fprintf(stderr, STR_USAGE, argv0, argv0, argv0, argv0, argv0);
4951
}
5052

5153
static inline void print_help() {
@@ -59,7 +61,7 @@ int debug = 0;
5961
static int parse_argv(int argc, char** argv) {
6062
argv0 = argv[0];
6163

62-
if (argc > 3) {
64+
if (argc > 4) {
6365
print_usage(2);
6466
return ERR_ERR;
6567
}
@@ -80,6 +82,12 @@ static int parse_argv(int argc, char** argv) {
8082
goto repeatit;
8183
break;
8284
case 'v' : fprintf(stderr, STR_VERSION); return ERR_ERR;
85+
case 'e' : do_eval = 1;
86+
if (!argv[i+1]) return ERR_ERR;
87+
default_filename = argv[i+1];
88+
do_eval = 1;
89+
break;
90+
break;
8391
default : print_usage(3); return ERR_ERR;
8492
}
8593
return ERR_OK;
@@ -90,7 +98,7 @@ int main(int argc, char** argv) {
9098
if (parse_argv(argc, argv) != ERR_OK) return -1;
9199
struct kissfuck* K = makectx();
92100
if (K == ERR_ERR) return -2;
93-
if (loadcode(K, default_filename) != ERR_OK) {
101+
if ((do_eval ? loadstring(K, default_filename) : loadcode(K, default_filename)) != ERR_OK) {
94102
fprintf(stderr, "Show bytecode Dump? (y/n) : ");
95103
if (debug || getchar() == 'y') dumpcode(K);
96104
return -3;

kissfuck.h

+1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ struct kissfuck {
9494

9595
struct kissfuck* makectx();
9696
int loadcode(struct kissfuck* restrict const, const char* filename);
97+
int loadstring(struct kissfuck* kf, const char* string);
9798
int execcode(struct kissfuck*);
9899
void stopcode(struct kissfuck*);
99100
int dumpcode(struct kissfuck*);

test.bfk

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-[--->+<]>-.[---->+++++<]>-.+.++++++++++.+[---->+<]>+++.-[--->++<]>-.++++++++++.+[---->+<]>+++.>-[--->+<]>--.-[-->+++<]>--.------.+.+++[->+++<]>.++++++++.[->+++++<]>-.--[-->+++++<]>.---[->++++<]>.---[->++++<]>.------------.---.--[--->+<]>-.+[->+++<]>.++++++++++++..---.[-->+<]>--------.

wow.bfk

+145
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
A mandelbr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