Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Overv/lambda
Compile anonymous functions based on C# lambda expressions at runtime.
https://github.com/Overv/lambda
Last synced: 3 months ago
JSON representation
Compile anonymous functions based on C# lambda expressions at runtime.
- Host: GitHub
- URL: https://github.com/Overv/lambda
- Owner: Overv
- Created: 2012-09-22T18:27:54.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-09-28T23:06:03.000Z (over 12 years ago)
- Last Synced: 2024-11-05T09:25:15.050Z (3 months ago)
- Language: C
- Size: 228 KB
- Stars: 25
- Watchers: 8
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- AwesomeCompiler - lambda
README
# lambda
This is an experimental library for compiling anonymous functions based on C#'s lambda expressions at runtime. It serves as a minimal example of runtime code generation and not necessarily something useful in practice. The library only supports the x86 instruction set as of this time.
## Sample
```c
#include
#includeint main()
{
int x;lambda_func f = lambda_compile("3xx+5x-9");
for (x = 1; x <= 10; x++) {
printf("%d squared = %d\n", x, f(x));
}lambda_cleanup(f);
return 0;
}
```## Todo
* Floating point numbers
* Bracket support## License
MIT