Skip to content

Latest commit

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

dynami_c

a simple & lightweight interpreter

Example files

$1="I said \"Hello\" and val is 0x%x\n"
$2=0x1234
printf

Output:

I said "Hello" and val is 0x1234

A c program to run this program:

#include<stdio.h>#include"dynamic.h"structsymbolsymbols[] = {
{ "printf", &printf },
{ }
};
intmain() {
// Make sure this is mutable! (p.s. it will be destroyed after the run)charprogram[] ="$1=\"I said \\\"Hello\\\" and val is 0x%x\\n\"\n""$2=0x1234\n""printf";
if (dynamic_eval(program, symbols) !=0) {
printf("dynami_c failed to parse the program\n");
return-1;
}
return0;
}

About

a simple & lightweight interpreter

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages