mirror of
https://github.com/PoetryInCode/1337cc.git
synced 2025-04-19 11:27:14 -04:00
README!
This commit is contained in:
parent
2cd361ef5b
commit
977a3f2391
10
.gitignore
vendored
10
.gitignore
vendored
@ -1,7 +1,9 @@
|
|||||||
./main
|
main
|
||||||
|
|
||||||
./main.c
|
main.c
|
||||||
|
|
||||||
./primes
|
primes
|
||||||
|
|
||||||
./primes.c
|
primes.c
|
||||||
|
|
||||||
|
.#*
|
||||||
|
39
README.md
Normal file
39
README.md
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# 1337C
|
||||||
|
|
||||||
|
This is a hacky C-transpiler that I threw together for as a joke.
|
||||||
|
|
||||||
|
It transpiles C code that is written in my brand of 1337 or 13375p34k and tries
|
||||||
|
its best to translate it into C. Because of how my brand of 1337 both `l` and `i`
|
||||||
|
map to a `1`, so it has to guess whether a `1` is an `l` or `i`. Which it does so
|
||||||
|
shockingly decent.
|
||||||
|
|
||||||
|
All integer constants must be represented in octal form. Why? I don't quite remember
|
||||||
|
why, I wrote this at 2:00am. Though I'm sure I had a good reason. The octal
|
||||||
|
constants are translated into binary literals because they are easy to fix with
|
||||||
|
regex.
|
||||||
|
|
||||||
|
This is the sample hello world program in [./m41n.c1337](./m41n.c1337).
|
||||||
|
```
|
||||||
|
#1nc1vd3 <57d10.|-|>
|
||||||
|
|
||||||
|
1n7
|
||||||
|
m41n()
|
||||||
|
{
|
||||||
|
pv75("|-|3110 vv0r1d!");
|
||||||
|
r37vrn 00;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Sadly, it doesn't support upper-case characters since my brand of 1337 also
|
||||||
|
doesn't care about casing. Who uses case in C anyways? All the Java and Go devs
|
||||||
|
can keep their casing (eww...).
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
The script reads from stdin and will print the transpiled code to stdout. See
|
||||||
|
the [./Makefile](./Makefile)
|
||||||
|
|
||||||
|
```
|
||||||
|
./1337cc.pl <./m41n.c >main.c && gcc main.c -o main
|
||||||
|
./main
|
||||||
|
```
|
Loading…
x
Reference in New Issue
Block a user