Top 1K Features Creators Events Podcasts Books Extensions Interviews Blog Explorer CSV

Crap

< >

Crap, aka Concise RegEx-Aware Preprocessor, is a programming language created in 2018 by Henry Kroll III.

#1511on PLDB 6Years Old
Download source code:
git clone https://github.com/themanyone/crap
Homepage · Source Code

crap stands for concise, regex-aware preprocessor, it turns simplified crap code, python or lua-like pseudocode into c11


Example from the web:
#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":", "

Language features

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 //

- Build the next great programming language · Add · Issues · About · Search · Keywords · Livestreams · Labs · Resources · Acknowledgements

Built with Scroll v164.7.0