Crap, aka Concise RegEx-Aware Preprocessor, is a programming language created in 2018 by Henry Kroll III.
#1507on PLDB | 6Years Old |
git clone https://github.com/themanyone/crap
crap stands for concise, regex-aware preprocessor, it turns simplified crap code, python or lua-like pseudocode into c11
#if 0
crap $0 | tcc -run -; exit 0
#endif
#include <stdio.h>
#define M 3
#define N 4
main
// defined length [M][N] is computable
int test_image[M][N]=
{{1,2,3,4},
{5,6,7,8},
{9,10,11,12}},
// undefined length *i is not
*i, j
for i in test_image // computable length
for j in i[:N] // undefined length, add [:N]
printf "%i%s", j, j_index==N-1?"\n":", "
Feature | Supported | Example | Token |
---|---|---|---|
MultiLine Comments | ✓ | ||
Binary Literals | ✓ | // The same as c | |
Integers | ✓ | // The same as c | |
Floats | ✓ | // The same as c | |
Hexadecimals | ✓ | // The same as c | |
Semantic Indentation | ✓ | // Similar to python or lua | |
Comments | ✓ | /* A comment */ | |
Line Comments | ✓ | // The same as c | // |