| COTTON(1) | General Commands Manual | COTTON(1) |
NAME
cotton — a tiny
stack machine for the cot programming language
SYNOPSIS
cotton |
file.cot |
DESCRIPTION
cotton is a small stack machine for the cot(5) programming language (inspired by Lua, Forth and Uxntal) written in C99
cotton's internals consist of 7 files (as of cotton 0.1) which are:
src/
- main.c
- This file reads each .cot file line by line and then hands each read line to the loom, then, it returns the results
cotton.c- This file handles the core operations of cotton: initializing state, and, pushing and popping the stack
cotton.h- This file has the Cotton struct, contains the cog types, opcode definitions and the specs for Cotton
weave.c- This file has the cogs, so, the builtin and runtime keycogs
weave.h- This file declares the keycogs so they can be used elsewhere inside of Cotton
loom.c- This file is for the compiler and the runtime for Cotton
loom.h- This file is where cotton_compile and cotton_run are declared to be used in loom.c
as of now it only compiles cot programs, but, i do intend to add the option to compile cot programs to uxntal in the future :P
SEE ALSO
| September 2026 | cotton 0.1 |