do not edit — generated by btf.
git.druid.rocksindexdruid520nsccdocs/index.btft

docs/index.btft


[table class="topnav"]
[tr]
[td class="logotab"]nscc[e]
[td][see name="index"]index[e][e]
[td][see name="nsc"]nsc[e][e]
[td][see name="ir"]ir[e][e]
[td][see name="nscc"]nscc[e][e]
[e]
[e]
 
[h1]docs[e]
 
nscc is the notsuckyc compiler. nsc, its language, is a strict, explicit c89-like variant of c: no floats, no macros, no libc, no gnu extensions -- explicit-width signed integers (i8/i16/i32/i64), one untyped pointer (ptr), void, and real structs (word-addressed, not byte-packed). include exists (see [see name="nsc"]nsc[e]) but is textual splicing only, the same as it's always been -- there is still no #define, no token substitution, no conditional compilation. the compiler turns it into plain x86_64 att asm (no gnu extensions) through eight tiny text-to-text stages, each one reading the last stage's output and writing its own -- every intermediate is a file you can read and diff.
 
three pages:
 
[see name="nsc"]nsc[e] - the language standard. the grammar, the type set, and every semantic rule pinned down as a decision, not an accident: what >> does to negatives, what a shift count of 64 means, what INT_MIN / -1 does, how to spell an i64 literal, the one and only null pointer, void rules, main's exact signature, string literal addresses, and the keyword list.
 
[see name="ir"]ir[e] - the intermediate formats, versions locked in. one format per stage, .toks.j0 through .mir1.j7, each pinned exactly: token line shape, the s-expression grammar and its atom escaping (a \n inside an atom is \x0A), the lir and mir0 opcode sets as enumerated lists with signatures, the func header that three stages must pass through intact, and the target header that makes -s output self-describing.
 
[see name="nscc"]nscc[e] - the compiler itself. the driver and its flags (-j, -s, -o), what each of the eight stages owns, the mk build system, the error idiom, and how the test suite is shaped.
 
[see name="ir"]ir.btft[e] is the contract every stage is written against; [see name="nsc"]nsc.btft[e] is the contract every nsc program is written against. when one of them changes, the stages change with them -- the docs are the spec, the code follows it.
powered by btf.